1st unit in docx format according given prompt consider as instruction and generate

Reading File
Reading File
Running Command

cd /home/daytona/workspace/attachments/6623c967-943c-4677-86e0-cf906be1a7cb && python3 -c " from pypdf import PdfReader reader = PdfReader('prompt for unit wise docx.pdf') for i, page in enumerate(reader.pages): print(f'=== PAGE {i+1} ===') print(page.extract_text()) "

Running Command

cd /home/daytona/workspace/attachments/6623c967-943c-4677-86e0-cf906be1a7cb && pandoc "Syllabus (Applied Anatomy) 1 sem.docx" -o /tmp/syllabus.md && cat /tmp/syllabus.md

Reading File
Running Command

ls /home/daytona/skills/docx/scripts/office/ && ls /home/daytona/workspace/

Running Command

mkdir -p /home/daytona/workspace/applied-anatomy-unit1 && node --version && npm list -g docx 2>/dev/null | head -5

Writing File

~/applied-anatomy-unit1/generate.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  Header, Footer, AlignmentType, HeadingLevel, BorderStyle, WidthType,
  ShadingType, VerticalAlign, PageNumber, PageBreak, UnderlineType,
  TabStopType, TabStopPosition, LevelFormat
} = require('docx');
const fs = require('fs');

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const DEEP_BLUE    = "1A3A6B";
const ACCENT_BLUE  = "2E5FA3";
const LIGHT_BLUE   = "D6E4F0";
const DARK_TEAL    = "1A5276";
const TEAL_LIGHT   = "D1F2EB";
const GOLD         = "B7950B";
const GOLD_LIGHT   = "FEF9E7";
const GREEN_DARK   = "1E8449";
const GREEN_LIGHT  = "D5F5E3";
const RED_DARK     = "922B21";
const RED_LIGHT    = "FADBD8";
const GREY_LIGHT   = "F2F3F4";
const WHITE        = "FFFFFF";

// ─── HELPERS ─────────────────────────────────────────────────────────────────

function hRule() {
  return new Paragraph({
    border: { bottom: { color: ACCENT_BLUE, space: 1, style: BorderStyle.THICK, size: 12 } },
    spacing: { before: 80, after: 80 },
    children: []
  });
}

function coverTitle(text, sz, bold, color, spacing) {
  return new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: spacing || 120, after: spacing || 120 },
    children: [new TextRun({ text, bold: bold !== false, size: sz || 52, color: color || WHITE, font: "Calibri" })]
  });
}

function sectionHeading(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 300, after: 120 },
    shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
    children: [new TextRun({ text: `  ${text}  `, bold: true, size: 28, color: WHITE, font: "Calibri" })]
  });
}

function subHeading(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 220, after: 80 },
    shading: { type: ShadingType.SOLID, color: ACCENT_BLUE, fill: ACCENT_BLUE },
    children: [new TextRun({ text: `  ${text}`, bold: true, size: 24, color: WHITE, font: "Calibri" })]
  });
}

function subSubHeading(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 160, after: 60 },
    shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
    children: [new TextRun({ text: `  ${text}`, bold: true, size: 22, color: DEEP_BLUE, font: "Calibri" })]
  });
}

function bullet(text, level) {
  return new Paragraph({
    bullet: { level: level || 0 },
    spacing: { before: 40, after: 40 },
    children: [new TextRun({ text, size: 20, font: "Calibri" })]
  });
}

function bulletBold(label, text) {
  return new Paragraph({
    bullet: { level: 0 },
    spacing: { before: 40, after: 40 },
    children: [
      new TextRun({ text: label, bold: true, size: 20, font: "Calibri" }),
      new TextRun({ text: ` ${text}`, size: 20, font: "Calibri" })
    ]
  });
}

function normal(text) {
  return new Paragraph({
    spacing: { before: 60, after: 60 },
    children: [new TextRun({ text, size: 20, font: "Calibri" })]
  });
}

function definitionBox(term, definition) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: GOLD_LIGHT, fill: GOLD_LIGHT },
            borders: {
              top: { style: BorderStyle.THICK, size: 8, color: GOLD },
              bottom: { style: BorderStyle.THICK, size: 8, color: GOLD },
              left: { style: BorderStyle.THICK, size: 8, color: GOLD },
              right: { style: BorderStyle.THICK, size: 8, color: GOLD }
            },
            children: [
              new Paragraph({
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: `📌 DEFINITION: ${term}`, bold: true, size: 22, color: GOLD, font: "Calibri" })]
              }),
              new Paragraph({
                spacing: { before: 20, after: 60 },
                children: [new TextRun({ text: definition, size: 20, font: "Calibri" })]
              })
            ]
          })
        ]
      })
    ]
  });
}

function importantBox(title, items) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: GREEN_LIGHT, fill: GREEN_LIGHT },
            borders: {
              top: { style: BorderStyle.THICK, size: 8, color: GREEN_DARK },
              bottom: { style: BorderStyle.THICK, size: 8, color: GREEN_DARK },
              left: { style: BorderStyle.THICK, size: 8, color: GREEN_DARK },
              right: { style: BorderStyle.THICK, size: 8, color: GREEN_DARK }
            },
            children: [
              new Paragraph({
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: `✅ ${title}`, bold: true, size: 22, color: GREEN_DARK, font: "Calibri" })]
              }),
              ...items.map(it => new Paragraph({
                bullet: { level: 0 },
                spacing: { before: 30, after: 30 },
                children: [new TextRun({ text: it, size: 20, font: "Calibri" })]
              }))
            ]
          })
        ]
      })
    ]
  });
}

function clinicalBox(items) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: RED_LIGHT, fill: RED_LIGHT },
            borders: {
              top: { style: BorderStyle.THICK, size: 8, color: RED_DARK },
              bottom: { style: BorderStyle.THICK, size: 8, color: RED_DARK },
              left: { style: BorderStyle.THICK, size: 8, color: RED_DARK },
              right: { style: BorderStyle.THICK, size: 8, color: RED_DARK }
            },
            children: [
              new Paragraph({
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: "🏥 CLINICAL / NURSING IMPLICATIONS", bold: true, size: 22, color: RED_DARK, font: "Calibri" })]
              }),
              ...items.map(it => new Paragraph({
                bullet: { level: 0 },
                spacing: { before: 30, after: 30 },
                children: [new TextRun({ text: it, size: 20, font: "Calibri" })]
              }))
            ]
          })
        ]
      })
    ]
  });
}

function noteBox(items) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: TEAL_LIGHT, fill: TEAL_LIGHT },
            borders: {
              top: { style: BorderStyle.THICK, size: 8, color: DARK_TEAL },
              bottom: { style: BorderStyle.THICK, size: 8, color: DARK_TEAL },
              left: { style: BorderStyle.THICK, size: 8, color: DARK_TEAL },
              right: { style: BorderStyle.THICK, size: 8, color: DARK_TEAL }
            },
            children: [
              new Paragraph({
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: "📝 REMEMBER / KEY POINTS", bold: true, size: 22, color: DARK_TEAL, font: "Calibri" })]
              }),
              ...items.map(it => new Paragraph({
                bullet: { level: 0 },
                spacing: { before: 30, after: 30 },
                children: [new TextRun({ text: it, size: 20, font: "Calibri" })]
              }))
            ]
          })
        ]
      })
    ]
  });
}

function spacer(n) {
  return new Paragraph({ spacing: { before: n || 120, after: 0 }, children: [] });
}

function makeTable(headers, rows, headerShade) {
  const shade = headerShade || ACCENT_BLUE;
  const headerRow = new TableRow({
    tableHeader: true,
    children: headers.map(h => new TableCell({
      shading: { type: ShadingType.SOLID, color: shade, fill: shade },
      verticalAlign: VerticalAlign.CENTER,
      children: [new Paragraph({
        alignment: AlignmentType.CENTER,
        children: [new TextRun({ text: h, bold: true, size: 20, color: WHITE, font: "Calibri" })]
      })]
    }))
  });
  const dataRows = rows.map((row, ri) => new TableRow({
    children: row.map(cell => new TableCell({
      shading: { type: ShadingType.SOLID, color: ri % 2 === 0 ? WHITE : GREY_LIGHT, fill: ri % 2 === 0 ? WHITE : GREY_LIGHT },
      children: [new Paragraph({
        spacing: { before: 40, after: 40 },
        children: [new TextRun({ text: cell, size: 20, font: "Calibri" })]
      })]
    }))
  }));
  return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows: [headerRow, ...dataRows] });
}

function pageBreak() {
  return new Paragraph({ children: [new PageBreak()] });
}

// ─── HEADER / FOOTER ─────────────────────────────────────────────────────────
const headerContent = new Header({
  children: [
    new Table({
      width: { size: 100, type: WidthType.PERCENTAGE },
      rows: [
        new TableRow({
          children: [
            new TableCell({
              shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
              children: [
                new Paragraph({
                  alignment: AlignmentType.LEFT,
                  children: [new TextRun({ text: "  2026 | Applied Anatomy | Unit I", bold: true, size: 18, color: WHITE, font: "Calibri" })]
                }),
                new Paragraph({
                  alignment: AlignmentType.LEFT,
                  children: [new TextRun({ text: "  Introduction to Anatomical Terms & Organisation of Human Body", size: 16, color: LIGHT_BLUE, font: "Calibri" })]
                })
              ]
            })
          ]
        })
      ]
    }),
    spacer(60)
  ]
});

const footerContent = new Footer({
  children: [
    new Paragraph({
      alignment: AlignmentType.CENTER,
      border: { top: { style: BorderStyle.SINGLE, size: 4, color: ACCENT_BLUE } },
      spacing: { before: 60 },
      children: [
        new TextRun({ text: "Smart Nursing Notes for Exam Success | Download more at: ", size: 16, font: "Calibri", color: ACCENT_BLUE }),
        new TextRun({ text: "https://healtheducationalmedia.com/", size: 16, font: "Calibri", color: ACCENT_BLUE, bold: true }),
        new TextRun({ text: "          Page ", size: 16, font: "Calibri" }),
        new TextRun({ children: [PageNumber.CURRENT], size: 16, font: "Calibri" }),
        new TextRun({ text: " of ", size: 16, font: "Calibri" }),
        new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 16, font: "Calibri" })
      ]
    })
  ]
});

// ─── COVER PAGE ──────────────────────────────────────────────────────────────
const coverPage = [
  // Blue top bar
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 120, after: 40 },
                children: [new TextRun({ text: '"Read in the Name of your Lord who created — He created man from a clinging substance."', italics: true, size: 18, color: GOLD_LIGHT, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 40, after: 120 },
                children: [new TextRun({ text: "— Al-Qur'an, Surah Al-Alaq (96:1–2)", size: 16, color: LIGHT_BLUE, font: "Calibri" })]
              })
            ]
          })
        ]
      })
    ]
  }),
  spacer(200),
  // Course badge
  new Table({
    width: { size: 60, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: ACCENT_BLUE, fill: ACCENT_BLUE },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: "B.Sc NURSING  |  SEMESTER I  |  RGUHS", bold: true, size: 22, color: WHITE, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 20, after: 60 },
                children: [new TextRun({ text: "Academic Year 2026", size: 18, color: LIGHT_BLUE, font: "Calibri" })]
              })
            ]
          })
        ]
      })
    ],
    margins: { left: 1440, right: 1440 }
  }),
  spacer(120),
  // Subject title box
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
            borders: {
              top: { style: BorderStyle.THICK, size: 24, color: GOLD },
              bottom: { style: BorderStyle.THICK, size: 24, color: GOLD },
              left: { style: BorderStyle.THICK, size: 12, color: GOLD },
              right: { style: BorderStyle.THICK, size: 12, color: GOLD }
            },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 80, after: 40 },
                children: [new TextRun({ text: "APPLIED ANATOMY", bold: true, size: 52, color: WHITE, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 40, after: 80 },
                children: [new TextRun({ text: "Study Notes — Exam Oriented", size: 24, color: LIGHT_BLUE, font: "Calibri" })]
              })
            ]
          })
        ]
      })
    ]
  }),
  spacer(80),
  // Unit label
  new Table({
    width: { size: 80, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: GOLD, fill: GOLD },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 60, after: 60 },
                children: [new TextRun({ text: "UNIT I", bold: true, size: 44, color: WHITE, font: "Calibri" })]
              })
            ]
          })
        ]
      })
    ],
    margins: { left: 720, right: 720 }
  }),
  spacer(40),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 40, after: 100 },
    children: [new TextRun({ text: "Introduction to Anatomical Terms and Organisation of the Human Body", bold: true, size: 28, color: DEEP_BLUE, font: "Calibri" })]
  }),
  spacer(120),
  // Author box
  new Table({
    width: { size: 80, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: GREY_LIGHT, fill: GREY_LIGHT },
            borders: {
              top: { style: BorderStyle.THICK, size: 8, color: ACCENT_BLUE },
              bottom: { style: BorderStyle.THICK, size: 8, color: ACCENT_BLUE },
              left: { style: BorderStyle.THICK, size: 8, color: ACCENT_BLUE },
              right: { style: BorderStyle.THICK, size: 8, color: ACCENT_BLUE }
            },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: "Prepared By:", bold: true, size: 20, color: DEEP_BLUE, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 0, after: 10 },
                children: [new TextRun({ text: "MR. UMAR SHAIKH", bold: true, size: 26, color: ACCENT_BLUE, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 0, after: 10 },
                children: [new TextRun({ text: "M.Sc Nursing (CHN)", size: 20, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 0, after: 10 },
                children: [new TextRun({ text: "Nursing Lecturer & Academic Notes Developer", size: 20, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 0, after: 60 },
                children: [new TextRun({ text: "Specialization: Community Health Nursing", italics: true, size: 20, font: "Calibri" })]
              })
            ]
          })
        ]
      })
    ],
    margins: { left: 720, right: 720 }
  }),
  spacer(80),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 60, after: 60 },
    children: [new TextRun({
      text: '"These notes are prepared according to university syllabus using standard textbooks, previous question papers, and AI-assisted academic structuring for better student understanding and exam preparation."',
      italics: true, size: 17, color: "555555", font: "Calibri"
    })]
  }),
  pageBreak()
];

// ─── MAIN CONTENT ────────────────────────────────────────────────────────────
const content = [

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("INTRODUCTION TO ANATOMY"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  definitionBox("ANATOMY",
    "Anatomy is the branch of science that deals with the structure of the human body, its parts, and the relationship between different organs and systems. The word 'Anatomy' is derived from the Greek words 'ana' (apart) and 'temnein' (to cut)."),
  spacer(80),

  definitionBox("APPLIED ANATOMY",
    "Applied Anatomy is the practical application of anatomical knowledge in clinical practice, nursing procedures, and patient care. It helps nurses understand why and how procedures are performed correctly."),
  spacer(80),

  subHeading("BRANCHES OF ANATOMY"),
  spacer(40),
  makeTable(
    ["Branch", "Description"],
    [
      ["Gross / Macroscopic Anatomy", "Study of structures visible to naked eye"],
      ["Microscopic Anatomy (Histology)", "Study of tissues and cells under microscope"],
      ["Developmental Anatomy (Embryology)", "Study of development from fertilization to birth"],
      ["Systemic Anatomy", "Study of body system by system"],
      ["Regional Anatomy", "Study of body region by region"],
      ["Surface Anatomy", "Study of external features and landmarks"],
      ["Radiological Anatomy", "Study of anatomy using X-rays, CT, MRI"],
      ["Clinical / Applied Anatomy", "Application of anatomy in clinical nursing practice"]
    ]
  ),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("ANATOMICAL TERMS OF POSITION & DIRECTION"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  normal("All anatomical descriptions are based on the Standard Anatomical Position:"),
  importantBox("STANDARD ANATOMICAL POSITION", [
    "Body standing ERECT (upright)",
    "Face looking FORWARD (anteriorly)",
    "Arms at the sides of the body",
    "Palms facing FORWARD (anteriorly)",
    "Feet flat on the ground, toes pointing forward"
  ]),
  spacer(80),

  subHeading("TERMS OF POSITION"),
  spacer(40),
  makeTable(
    ["Term", "Meaning", "Example"],
    [
      ["Anterior / Ventral", "Towards the front of the body", "Sternum is anterior to the heart"],
      ["Posterior / Dorsal", "Towards the back of the body", "Spine is posterior to the stomach"],
      ["Superior", "Towards the head / upper part", "Head is superior to the neck"],
      ["Inferior", "Away from head / lower part", "Feet are inferior to the knees"],
      ["Medial", "Towards the midline of body", "Nose is medial to the eyes"],
      ["Lateral", "Away from the midline", "Ears are lateral to the nose"],
      ["Proximal", "Nearer to the point of attachment", "Elbow is proximal to the wrist"],
      ["Distal", "Farther from point of attachment", "Wrist is distal to the elbow"],
      ["Superficial", "Towards the surface of body", "Skin is superficial to muscles"],
      ["Deep", "Away from the body surface", "Bone is deep to the skin"],
      ["Prone", "Body lying face DOWNWARD", "Patient lying on stomach"],
      ["Supine", "Body lying face UPWARD", "Patient lying on back"],
      ["Palmar", "Towards the palm of hand", "Palmar surface of fingers"],
      ["Plantar", "Towards the sole of foot", "Plantar surface of foot"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "In nursing documentation, we use proper anatomical terms to describe location of wounds, injection sites, pain locations, or operative incisions.",
    "Example: 'A wound is present on the anterior aspect of the left forearm' — this is correct clinical documentation.",
    "Prone position is used in ICU patients for improving oxygenation in ARDS (Acute Respiratory Distress Syndrome).",
    "Supine position is used during examination, CPR, and many surgical procedures.",
    "Proximal/Distal terms are used when describing fracture sites, e.g., 'proximal fracture of humerus'."
  ]),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("ANATOMICAL PLANES"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  definitionBox("ANATOMICAL PLANE",
    "An anatomical plane is an imaginary flat surface that divides the body into sections. These planes help describe the location and relationship of body structures precisely."),
  spacer(80),
  makeTable(
    ["Plane", "Also Called", "Division Made", "Example Use"],
    [
      ["Sagittal / Vertical Plane", "Median plane (if in midline)", "Left half and Right half", "MRI brain sections"],
      ["Median Sagittal Plane", "Mid-sagittal", "Equal Left and Right halves", "Divides body into mirror halves"],
      ["Parasagittal Plane", "Para-median", "Unequal left and right", "Parallel to midline sagittal"],
      ["Coronal / Frontal Plane", "Frontal plane", "Anterior (front) and Posterior (back)", "Front and back of body"],
      ["Axial / Transverse / Horizontal Plane", "Cross-section", "Superior (upper) and Inferior (lower)", "CT scan transverse sections"],
      ["Oblique Plane", "Diagonal plane", "Any unequal diagonal section", "Surgical incisions at angles"]
    ]
  ),
  spacer(80),
  noteBox([
    "Sagittal = side view cut (left and right)",
    "Coronal/Frontal = front and back cut",
    "Transverse/Axial/Horizontal = top and bottom cut",
    "CT scan slices = transverse plane",
    "MRI views brain in all three planes"
  ]),
  spacer(80),

  // ASCII diagram simulation as styled box
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: "DIAGRAM: ANATOMICAL PLANES (Simplified)", bold: true, size: 22, color: DEEP_BLUE, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 20, after: 20 },
                children: [new TextRun({ text: "        HEAD", size: 18, font: "Courier New", bold: true })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "          |", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "CORONAL PLANE ─── [ BODY ] ─── CORONAL PLANE", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "    (Front/Back)  SAGITTAL PLANE (Left/Right)", size: 16, font: "Courier New", italics: true })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "          |", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "  ════════════════  TRANSVERSE / AXIAL PLANE", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "         (Top / Bottom cut)", size: 16, font: "Courier New", italics: true })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 10, after: 60 },
                children: [new TextRun({ text: "         FEET", size: 18, font: "Courier New", bold: true })]
              })
            ]
          })
        ]
      })
    ]
  }),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("ANATOMICAL MOVEMENTS"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  normal("Body movements occur at joints. Understanding movements is essential for nursing procedures, patient mobilisation, and rehabilitation."),
  spacer(60),
  makeTable(
    ["Movement", "Definition", "Example"],
    [
      ["Flexion", "Decreasing the angle between two body parts", "Bending elbow — hand towards shoulder"],
      ["Extension", "Increasing the angle / straightening a joint", "Straightening elbow"],
      ["Abduction", "Moving a limb AWAY from the midline", "Raising arm sideways from body"],
      ["Adduction", "Moving a limb TOWARDS the midline", "Bringing arm back to body side"],
      ["Medial Rotation", "Rotating a limb towards the midline (inward)", "Turning arm so palm faces backward"],
      ["Lateral Rotation", "Rotating a limb away from midline (outward)", "Turning arm so palm faces forward"],
      ["Inversion", "Turning the sole of foot INWARD (medially)", "Tilting sole to face towards midline"],
      ["Eversion", "Turning the sole of foot OUTWARD (laterally)", "Tilting sole to face away from midline"],
      ["Supination", "Rotating forearm so palm faces UPWARD / anteriorly", "Holding a bowl of soup"],
      ["Pronation", "Rotating forearm so palm faces DOWNWARD / posteriorly", "Turning palm face-down"],
      ["Plantar Flexion", "Pointing the foot DOWNWARD (away from shin)", "Standing on tip-toes"],
      ["Dorsal Flexion (Dorsiflexion)", "Pointing the foot UPWARD (towards shin)", "Walking — heel strike phase"],
      ["Circumduction", "Circular movement combining all above", "Rotating the shoulder in full circle"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "Passive Range of Motion (PROM) exercises: Nurses perform flexion, extension, abduction, adduction for bedridden patients to prevent contractures.",
    "Foot drop prevention: Dorsiflexion exercises are done for stroke and post-surgical patients.",
    "Plantar flexion: Important in assessing deep vein thrombosis (DVT) risk — Homans sign test involves dorsiflexion.",
    "Supination and pronation are assessed after fractures of radius/ulna (forearm bones).",
    "Inversion sprains: Most common ankle injury — foot turns inward excessively."
  ]),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("CELL STRUCTURE AND CELL DIVISION"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  definitionBox("CELL",
    "The cell is the basic structural and functional unit of the human body. All living organisms are made up of cells. The human body contains approximately 37 trillion cells."),
  spacer(80),

  subHeading("STRUCTURE OF A TYPICAL HUMAN CELL"),
  spacer(40),
  normal("A cell has three main parts: Cell Membrane, Cytoplasm, and Nucleus."),
  spacer(40),
  makeTable(
    ["Cell Component", "Description", "Function"],
    [
      ["Cell Membrane (Plasma Membrane)", "Thin, flexible, bilayer phospholipid structure", "Controls entry and exit of substances; protects cell"],
      ["Cytoplasm", "Jelly-like fluid filling the cell; contains organelles", "Medium for cellular reactions"],
      ["Nucleus", "Round / oval, contains DNA, bounded by nuclear membrane", "Controls cell activity and heredity"],
      ["Mitochondria", "Rod-shaped, double membrane, called 'powerhouse of cell'", "Produces energy (ATP) by cellular respiration"],
      ["Endoplasmic Reticulum (ER)", "Network of membranes — Rough ER (with ribosomes) and Smooth ER", "Protein synthesis (Rough ER); lipid synthesis (Smooth ER)"],
      ["Ribosomes", "Tiny granules, found on Rough ER or free in cytoplasm", "Site of protein synthesis"],
      ["Golgi Apparatus (Golgi Body)", "Flat stacked membranous sacs", "Packages and exports proteins and secretions"],
      ["Lysosomes", "Membrane-bound vesicles containing enzymes", "Digests waste and foreign substances (suicide bags)"],
      ["Centrosome / Centrioles", "Near nucleus, paired cylindrical structures", "Involved in cell division (spindle formation)"],
      ["Vacuoles", "Fluid-filled spaces", "Storage of nutrients, water, waste"],
      ["Nucleolus", "Inside nucleus, dark-staining round body", "Produces ribosomal RNA (rRNA)"],
      ["Nuclear Membrane", "Double membrane surrounding nucleus, has pores", "Regulates exchange between nucleus and cytoplasm"]
    ]
  ),
  spacer(80),

  // Cell diagram text representation
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 60, after: 20 },
                children: [new TextRun({ text: "DIAGRAM: SIMPLIFIED CELL STRUCTURE", bold: true, size: 22, color: DEEP_BLUE, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "  ┌─────────────────────────────────────────────┐", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "  │         CELL MEMBRANE (outer boundary)       │", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "  │   ┌────────┐   Mitochondria  Ribosomes       │", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "  │   │Nucleus │   Golgi Body    ER (Rough/Smooth)│", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "  │   │(DNA)   │   Lysosomes     Vacuoles        │", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "  │   └────────┘          CYTOPLASM              │", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 10, after: 60 },
                children: [new TextRun({ text: "  └─────────────────────────────────────────────┘", size: 18, font: "Courier New" })]
              })
            ]
          })
        ]
      })
    ]
  }),
  spacer(80),

  subHeading("CELL DIVISION"),
  spacer(40),
  normal("Cell division is the process by which one parent cell divides into two or more daughter cells. There are two main types:"),
  spacer(40),

  subSubHeading("1. MITOSIS (Somatic / Body Cell Division)"),
  spacer(40),
  definitionBox("MITOSIS",
    "Mitosis is a type of cell division in which one parent cell divides to produce TWO genetically identical daughter cells, each with the same number of chromosomes as the parent (diploid — 46 chromosomes in humans)."),
  spacer(60),
  normal("PURPOSE: Growth, repair, replacement of cells"),
  spacer(40),
  makeTable(
    ["Phase", "Key Events"],
    [
      ["Interphase (Resting phase)", "DNA replication occurs; cell prepares for division; chromosomes are not visible"],
      ["Prophase", "Chromosomes condense and become visible; nuclear membrane disappears; spindle fibres form"],
      ["Metaphase", "Chromosomes line up at the centre (equatorial plate) of the cell"],
      ["Anaphase", "Sister chromatids separate and move to opposite poles of the cell"],
      ["Telophase", "Nuclear membrane reforms around each set; chromosomes decondense"],
      ["Cytokinesis", "Cytoplasm divides; two separate daughter cells formed"]
    ]
  ),
  spacer(40),
  noteBox([
    "Memory tip for Mitosis phases: IPMAT — Interphase, Prophase, Metaphase, Anaphase, Telophase",
    "Mitosis produces 2 daughter cells with 46 chromosomes each (DIPLOID)",
    "Occurs in: skin cells, bone marrow, intestinal lining cells, liver cells"
  ]),
  spacer(80),

  subSubHeading("2. MEIOSIS (Reproductive Cell Division)"),
  spacer(40),
  definitionBox("MEIOSIS",
    "Meiosis is a type of cell division in which one parent cell divides TWICE to produce FOUR genetically different daughter cells, each with half the number of chromosomes (haploid — 23 chromosomes in humans). Also called Reduction Division."),
  spacer(60),
  makeTable(
    ["Feature", "Mitosis", "Meiosis"],
    [
      ["No. of divisions", "One (1)", "Two (2) — Meiosis I and II"],
      ["No. of daughter cells", "2 cells", "4 cells"],
      ["Chromosomes", "Diploid (46) in daughter", "Haploid (23) in daughter"],
      ["Genetic similarity", "Identical to parent", "Different from parent (variation)"],
      ["Occurs in", "Somatic (body) cells", "Gonads — testes and ovaries"],
      ["Purpose", "Growth and repair", "Sexual reproduction"],
      ["Crossing over", "Does not occur", "Occurs (genetic variation)"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "Cancer is uncontrolled mitotic cell division — tumours are formed by abnormal mitosis.",
    "Radiation therapy and chemotherapy target rapidly dividing cells (cancer cells undergoing mitosis).",
    "Down syndrome (Trisomy 21): caused by error in meiosis (non-disjunction) — 47 chromosomes instead of 46.",
    "Wound healing: Mitosis replaces damaged cells at wound sites.",
    "Bone marrow produces blood cells by mitosis — important for understanding blood disorders."
  ]),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("TISSUES"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  definitionBox("TISSUE",
    "A tissue is a group of similar cells that work together to perform a specific function. The study of tissues is called Histology. Tissues are the basic building blocks of organs."),
  spacer(80),
  normal("The human body has FOUR primary types of tissues:"),
  spacer(40),

  // Tree structure for tissues
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
            children: [
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 60, after: 40 },
                children: [new TextRun({ text: "TYPES OF TISSUES", bold: true, size: 24, color: DEEP_BLUE, font: "Calibri" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "                    TISSUES", bold: true, size: 20, font: "Courier New", color: DEEP_BLUE })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                children: [new TextRun({ text: "          ┌──────────┼──────────┬──────────┐", size: 18, font: "Courier New" })]
              }),
              new Paragraph({
                alignment: AlignmentType.CENTER,
                spacing: { before: 0, after: 60 },
                children: [new TextRun({ text: "    Epithelial  Connective   Muscle    Nervous", bold: true, size: 18, font: "Courier New" })]
              })
            ]
          })
        ]
      })
    ]
  }),
  spacer(80),

  subHeading("1. EPITHELIAL TISSUE"),
  spacer(40),
  definitionBox("EPITHELIAL TISSUE",
    "Epithelial tissue is the tissue that covers body surfaces, lines body cavities and tubes, and forms glands. It sits on a basement membrane and has NO blood vessels (avascular)."),
  spacer(60),
  makeTable(
    ["Classification", "Type", "Location", "Function"],
    [
      ["Based on Cell Layers", "Simple Epithelium (1 layer)", "Blood vessels, alveoli, kidney tubules", "Diffusion, filtration, secretion"],
      ["Based on Cell Layers", "Stratified Epithelium (multiple layers)", "Skin (epidermis), oesophagus, vagina", "Protection from abrasion"],
      ["Based on Cell Layers", "Pseudostratified Epithelium", "Trachea, respiratory tract", "Looks layered but is single layer"],
      ["Based on Cell Shape", "Squamous (flat cells)", "Skin surface, alveoli", "Protection, gas exchange"],
      ["Based on Cell Shape", "Cuboidal (cube-shaped)", "Kidney tubules, thyroid", "Secretion, absorption"],
      ["Based on Cell Shape", "Columnar (tall cells)", "Stomach, intestines, uterus", "Secretion, absorption"],
      ["Special Type", "Transitional Epithelium", "Urinary bladder, ureters", "Stretching (allows expansion)"],
      ["Special Type", "Ciliated Epithelium", "Trachea, fallopian tube", "Movement of mucus, ovum"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "Bed sores (pressure ulcers): breakdown of epithelial and deeper tissues due to prolonged pressure — nurses must regularly reposition patients.",
    "Transitional epithelium in bladder stretches during filling — catheterisation must be done gently to protect this lining.",
    "Respiratory epithelium (ciliated) is damaged by smoking — leads to chronic bronchitis.",
    "Wound healing involves epithelial cell migration and mitosis to cover the wound."
  ]),
  spacer(80),

  subHeading("2. CONNECTIVE TISSUE"),
  spacer(40),
  definitionBox("CONNECTIVE TISSUE",
    "Connective tissue is the most abundant tissue in the body. It connects, supports, and binds other tissues together. It has scattered cells within an extracellular matrix (ground substance + fibres)."),
  spacer(60),
  makeTable(
    ["Type", "Characteristics", "Location", "Function"],
    [
      ["Loose Connective Tissue (Areolar)", "Loosely arranged fibres, spaces", "Under skin, around organs, mucous membranes", "Packing and supporting tissue"],
      ["Dense Connective Tissue", "Tightly packed collagen fibres", "Tendons (attach muscle to bone), Ligaments (bone to bone)", "Strength and attachment"],
      ["Adipose Tissue (Fat)", "Fat cells (adipocytes)", "Under skin, around kidneys, heart", "Insulation, energy storage, padding"],
      ["Cartilage", "Flexible, avascular, chondrocytes in lacunae", "Nose, ear, trachea, joints", "Support and flexibility (see below)"],
      ["Bone (Osseous Tissue)", "Hard, calcified matrix, osteocytes", "Skeleton", "Support, protection, movement"],
      ["Blood", "Liquid matrix (plasma), cells", "Circulatory system", "Transport of O2, nutrients, wastes"],
      ["Lymph", "Lymph fluid and lymphocytes", "Lymphatic system", "Immunity and fluid balance"]
    ]
  ),
  spacer(80),

  subSubHeading("TYPES OF CARTILAGE"),
  spacer(40),
  makeTable(
    ["Type", "Composition", "Location", "Key Feature"],
    [
      ["Hyaline Cartilage", "Fine collagen fibres in glassy matrix; most common type", "Articular surfaces of joints, costal cartilage, trachea rings, fetal skeleton, nasal septum", "Smooth, glassy, bluish-white; no perichondrium at joint surfaces"],
      ["Fibrocartilage", "Thick bundles of collagen fibres; strongest type", "Intervertebral discs, pubic symphysis, knee menisci, temporomandibular joint", "Can withstand compression and tension; absorbs shock"],
      ["Elastic Cartilage", "Elastin fibres in matrix; most flexible type", "External ear (auricle/pinna), epiglottis, auditory (Eustachian) tube", "Very flexible, maintains shape; has perichondrium"]
    ]
  ),
  spacer(60),
  noteBox([
    "Hyaline = most common; Fibrocartilage = strongest; Elastic = most flexible",
    "Cartilage is AVASCULAR — heals slowly (no direct blood supply)",
    "Intervertebral discs are fibrocartilage — prolapse (slip disc) causes nerve compression",
    "Articular cartilage (hyaline) degenerates in osteoarthritis"
  ]),
  spacer(80),

  subHeading("3. MUSCLE TISSUE"),
  spacer(40),
  makeTable(
    ["Feature", "Skeletal Muscle", "Smooth Muscle", "Cardiac Muscle"],
    [
      ["Also Called", "Voluntary / Striated muscle", "Involuntary / Non-striated / Visceral", "Cardiac / Involuntary striated"],
      ["Location", "Attached to bones (limbs, trunk)", "Walls of hollow organs (stomach, intestines, blood vessels, uterus, bladder)", "Heart wall (myocardium) only"],
      ["Cell Shape", "Long, cylindrical, unbranched fibres", "Spindle-shaped (fusiform) cells, tapered ends", "Cylindrical, branched fibres"],
      ["Nuclei", "Multiple nuclei per cell (peripheral)", "Single nucleus (central)", "Single / two nuclei (central)"],
      ["Striations (Cross-stripes)", "Present (clearly visible)", "Absent", "Present"],
      ["Control", "Voluntary (under conscious control)", "Involuntary (automatic)", "Involuntary (automatic)"],
      ["Speed of Contraction", "Fast", "Slow", "Moderate, rhythmic"],
      ["Fatigue", "Fatigues easily", "Resistant to fatigue", "Never fatigues (rhythmic)"],
      ["Special Feature", "Strong, powerful contractions", "Peristalsis, vasoconstriction", "Intercalated discs allow coordinated contraction"],
      ["Regeneration", "Limited repair ability", "Can regenerate (divides)", "Very limited regeneration"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "Intramuscular (IM) injections: Given in skeletal muscles — deltoid, vastus lateralis, gluteus medius.",
    "Cardiac muscle damage in myocardial infarction (heart attack) — cell death as cardiac muscle has poor regeneration.",
    "Smooth muscle of uterus (myometrium) contracts during labour — oxytocin stimulates these contractions.",
    "Smooth muscle of bronchi constricts in asthma — bronchodilators relax smooth muscle.",
    "Skeletal muscle wasting in bedridden patients — nurses must encourage physiotherapy and mobility."
  ]),
  spacer(80),

  subHeading("4. NERVOUS TISSUE"),
  spacer(40),
  definitionBox("NERVOUS TISSUE",
    "Nervous tissue is specialised tissue that conducts electrical impulses throughout the body. It is found in the brain, spinal cord, and nerves. It has two types of cells: Neurons (nerve cells) and Neuroglia (supporting cells)."),
  spacer(60),
  makeTable(
    ["Cell Type", "Description", "Function"],
    [
      ["Neuron (Nerve Cell)", "Has cell body, dendrites, and axon", "Conducts nerve impulses"],
      ["Astrocytes (Neuroglia)", "Star-shaped supporting cells", "Structural support, nutrient supply, blood-brain barrier"],
      ["Oligodendrocytes", "Form myelin sheath in CNS", "Electrical insulation of neurons"],
      ["Schwann Cells", "Form myelin sheath in PNS", "Electrical insulation, nerve regeneration"],
      ["Microglia", "Small phagocytic cells", "Immune defence of CNS"],
      ["Ependymal Cells", "Line ventricles and spinal canal", "Produce and circulate CSF (cerebrospinal fluid)"]
    ]
  ),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("MEMBRANES AND GLANDS"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),

  subHeading("BODY MEMBRANES"),
  spacer(40),
  definitionBox("MEMBRANE",
    "A membrane is a thin layer of tissue that covers surfaces, lines body cavities, or separates structures. Membranes protect organs, reduce friction, and prevent infection."),
  spacer(60),
  makeTable(
    ["Type", "Composition", "Location", "Function"],
    [
      ["Mucous Membrane (Mucosa)", "Epithelium + loose connective tissue; secretes mucus", "Lines respiratory tract, GI tract, urinary tract, reproductive tract", "Moistens, traps microbes and dust, lubrication"],
      ["Serous Membrane (Serosa)", "Simple squamous epithelium + connective tissue; secretes serous fluid", "Pleura (lungs), Pericardium (heart), Peritoneum (abdomen)", "Reduces friction during organ movement"],
      ["Cutaneous Membrane (Skin)", "Keratinised stratified squamous epithelium + connective tissue", "Covers entire body surface", "Protection from environment, pathogens, dehydration"],
      ["Synovial Membrane", "Connective tissue (no epithelial layer)", "Lines joint capsules (synovial joints)", "Secretes synovial fluid for joint lubrication"],
      ["Meninges", "Three layers: Dura, Arachnoid, Pia mater", "Covers brain and spinal cord", "Protection of CNS; CSF circulation in subarachnoid space"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "Pleurisy: Inflammation of the pleural membrane — causes chest pain with breathing.",
    "Peritonitis: Inflammation of peritoneum — emergency condition after bowel perforation.",
    "Pericarditis: Inflammation of pericardial membrane — causes chest pain and fluid around heart.",
    "Mucous membrane of respiratory tract: First line of defence — traps inhaled microbes in mucus, cilia sweep them out.",
    "Synovial membrane is affected in Rheumatoid Arthritis — inflamed synovium destroys joint cartilage."
  ]),
  spacer(80),

  subHeading("GLANDS"),
  spacer(40),
  definitionBox("GLAND",
    "A gland is a group of cells or an organ that produces and secretes substances (hormones, enzymes, or other products) for use in the body or for elimination. Glands develop from epithelial tissue."),
  spacer(60),
  makeTable(
    ["Classification", "Type", "Description", "Examples"],
    [
      ["By Secretion Method", "Exocrine Glands", "Secrete through ducts onto surface or into body cavity", "Salivary glands, sweat glands, liver, pancreas (digestive juice)"],
      ["By Secretion Method", "Endocrine Glands (Ductless)", "Secrete hormones directly into blood (no ducts)", "Pituitary, thyroid, adrenal, pancreas (insulin), ovaries, testes"],
      ["By Secretion Method", "Mixed Glands", "Both exocrine and endocrine", "Pancreas (insulin = endocrine; digestive enzymes = exocrine)"],
      ["By Cell Number", "Unicellular Glands", "Single cell gland", "Goblet cells — secrete mucus in gut and airways"],
      ["By Cell Number", "Multicellular Glands", "Multiple cells forming a gland", "Most glands in body"],
      ["By Secretion Type (Exocrine)", "Merocrine Glands", "Secrete by exocytosis; cell intact", "Salivary glands, pancreatic acini"],
      ["By Secretion Type (Exocrine)", "Apocrine Glands", "Apex of cell pinches off with secretion", "Mammary glands, axillary sweat glands"],
      ["By Secretion Type (Exocrine)", "Holocrine Glands", "Whole cell disintegrates to release secretion", "Sebaceous glands (oil glands of skin)"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "Diabetes mellitus: Destruction or dysfunction of pancreatic beta cells (endocrine) — inadequate insulin secretion.",
    "Hypothyroidism: Underactive thyroid gland — nurse monitors for fatigue, weight gain, cold intolerance.",
    "Sebaceous gland dysfunction: Leads to acne — important in adolescent care.",
    "Mammary glands (apocrine): Nurse assists with breastfeeding; mastitis is infection of mammary gland.",
    "Salivary gland infection (parotitis/mumps): Swelling of parotid gland."
  ]),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("ORGANISATION OF THE HUMAN BODY"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  normal("The human body is organised at six levels of structural complexity, from smallest to largest:"),
  spacer(60),

  // Flowchart style
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
            children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "1. CHEMICAL LEVEL", bold: true, size: 22, color: WHITE, font: "Calibri" })] })]
          }),
          new TableCell({
            shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
            children: [new Paragraph({ spacing: { before: 40, after: 40 }, children: [new TextRun({ text: "Atoms (C, H, O, N) → Molecules (water, glucose, DNA, proteins)", size: 20, font: "Calibri" })] })]
          })
        ]
      }),
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: ACCENT_BLUE, fill: ACCENT_BLUE },
            children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "2. CELLULAR LEVEL", bold: true, size: 22, color: WHITE, font: "Calibri" })] })]
          }),
          new TableCell({
            shading: { type: ShadingType.SOLID, color: WHITE, fill: WHITE },
            children: [new Paragraph({ spacing: { before: 40, after: 40 }, children: [new TextRun({ text: "Molecules → Cells (muscle cell, neuron, red blood cell) — smallest living unit", size: 20, font: "Calibri" })] })]
          })
        ]
      }),
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
            children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "3. TISSUE LEVEL", bold: true, size: 22, color: WHITE, font: "Calibri" })] })]
          }),
          new TableCell({
            shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
            children: [new Paragraph({ spacing: { before: 40, after: 40 }, children: [new TextRun({ text: "Similar cells grouped together → Tissues (epithelial, connective, muscle, nervous)", size: 20, font: "Calibri" })] })]
          })
        ]
      }),
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: ACCENT_BLUE, fill: ACCENT_BLUE },
            children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "4. ORGAN LEVEL", bold: true, size: 22, color: WHITE, font: "Calibri" })] })]
          }),
          new TableCell({
            shading: { type: ShadingType.SOLID, color: WHITE, fill: WHITE },
            children: [new Paragraph({ spacing: { before: 40, after: 40 }, children: [new TextRun({ text: "Two or more tissue types working together → Organ (heart, liver, lungs, skin)", size: 20, font: "Calibri" })] })]
          })
        ]
      }),
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
            children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "5. ORGAN SYSTEM LEVEL", bold: true, size: 22, color: WHITE, font: "Calibri" })] })]
          }),
          new TableCell({
            shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
            children: [new Paragraph({ spacing: { before: 40, after: 40 }, children: [new TextRun({ text: "Related organs grouped → System (cardiovascular, respiratory, digestive system)", size: 20, font: "Calibri" })] })]
          })
        ]
      }),
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: ACCENT_BLUE, fill: ACCENT_BLUE },
            children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "6. ORGANISM LEVEL", bold: true, size: 22, color: WHITE, font: "Calibri" })] })]
          }),
          new TableCell({
            shading: { type: ShadingType.SOLID, color: WHITE, fill: WHITE },
            children: [new Paragraph({ spacing: { before: 40, after: 40 }, children: [new TextRun({ text: "All systems working together → The complete Human Organism", size: 20, font: "Calibri" })] })]
          })
        ]
      })
    ]
  }),
  spacer(80),

  subHeading("ORGAN SYSTEMS OF THE HUMAN BODY"),
  spacer(40),
  makeTable(
    ["System", "Major Organs / Structures", "Main Function"],
    [
      ["Integumentary", "Skin, hair, nails, glands", "Protection, temperature regulation"],
      ["Skeletal", "Bones, cartilage, ligaments", "Support, protection, movement framework"],
      ["Muscular", "Skeletal, smooth, cardiac muscles", "Movement, posture, heat production"],
      ["Nervous", "Brain, spinal cord, nerves", "Communication, coordination, control"],
      ["Endocrine", "Pituitary, thyroid, adrenal, pancreas", "Chemical regulation via hormones"],
      ["Cardiovascular", "Heart, arteries, veins, capillaries", "Transport of blood, O2, nutrients"],
      ["Lymphatic / Immune", "Lymph nodes, spleen, thymus, tonsils", "Immunity, fluid balance"],
      ["Respiratory", "Lungs, trachea, bronchi, diaphragm", "Gas exchange (O2 and CO2)"],
      ["Digestive", "Oesophagus, stomach, intestines, liver, pancreas", "Digestion and absorption of nutrients"],
      ["Urinary / Renal", "Kidneys, ureters, bladder, urethra", "Waste excretion, fluid/electrolyte balance"],
      ["Reproductive", "Testes/ovaries, uterus, fallopian tubes", "Reproduction and hormone production"]
    ]
  ),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("MAJOR SURFACE AND BONY LANDMARKS"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  definitionBox("SURFACE / BONY LANDMARK",
    "Surface and bony landmarks are identifiable points on the body surface or skeleton that help locate anatomical structures, administer injections, assess fractures, monitor pulses, and perform procedures."),
  spacer(80),
  makeTable(
    ["Body Region", "Major Landmarks", "Clinical / Nursing Use"],
    [
      ["HEAD & NECK", "Mastoid process (behind ear); Temporal bone; Angle of mandible; Thyroid cartilage (Adam's apple); Cricoid cartilage; Carotid pulse (C4 level)", "Carotid pulse for CPR; Mastoid process for post-auricular lymph node palpation; Cricoid pressure in intubation"],
      ["THORAX (Chest)", "Manubrium sterni; Body of sternum; Xiphoid process; Sternal angle (Angle of Louis — at T4); Costal margin; Ribs 1-12; Intercostal spaces (ICS)", "Sternal angle = landmark for rib counting; IV line sites; Chest drain insertion; CPR hand placement on lower sternum; Auscultation landmarks"],
      ["ABDOMEN", "Iliac crest; Anterior superior iliac spine (ASIS); Pubic symphysis; Umbilicus; McBurney's point (RIF — appendix)", "Abdominal quadrants for pain description; ASIS for Dahl's injection technique; McBurney's point tenderness in appendicitis"],
      ["UPPER LIMB", "Acromion process; Greater tuberosity of humerus; Medial/Lateral epicondyle; Olecranon; Radial styloid; Ulnar styloid; Metacarpals; Phalanges", "Deltoid IM injection landmark (3 fingers below acromion); IV access at cubital fossa; Pulse at radial artery (wrist)"],
      ["LOWER LIMB", "Greater trochanter of femur; Patella; Medial/Lateral malleolus; Fibular head; Tibial tuberosity; Calcaneum (heel); ASIS", "Vastus lateralis IM injection site; Popliteal pulse (behind knee); Posterior tibial pulse (behind medial malleolus); Dorsalis pedis pulse"]
    ]
  ),
  spacer(80),
  clinicalBox([
    "IM Injection Sites — ESSENTIAL for nurses:",
    "  • Deltoid: 3 fingerbreadths below acromion process (max 1-2 mL)",
    "  • Vastus lateralis: Middle third of anterolateral thigh (preferred in infants)",
    "  • Dorsogluteal: Above and outer quadrant of buttock (use ASIS and greater trochanter to locate)",
    "  • Ventrogluteal: Triangle of ASIS, iliac crest, and greater trochanter (safest site)",
    "Radial artery pulse: Palpate at radial styloid — used for heart rate, BP, Allen test before arterial line.",
    "Sternal angle (Angle of Louis): Landmark for counting ribs — 2nd rib articulates here; used for cardiac auscultation."
  ]),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("NURSING APPLICATION AND IMPLICATIONS"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  importantBox("WHY ANATOMY IS IMPORTANT FOR NURSES", [
    "Nurses must understand body structure to perform safe, effective clinical procedures.",
    "Correct injection sites, catheterisation, wound care, positioning — all require anatomical knowledge.",
    "Documentation of wounds, pain, or clinical findings requires precise anatomical terminology.",
    "Patient education becomes accurate when nurses understand what they are teaching.",
    "Assessment skills (physical examination) depend on knowing normal structures and landmarks."
  ]),
  spacer(80),
  makeTable(
    ["Anatomical Concept", "Nursing Application"],
    [
      ["Anatomical planes and terms", "Documenting wound location, imaging reports, patient positioning descriptions"],
      ["Cell structure", "Understanding how medications work at cell level (pharmacology basis)"],
      ["Cell division", "Basis of cancer, wound healing, haematological disorders"],
      ["Epithelial tissue", "Skin integrity assessment, wound care, stoma care, catheter care"],
      ["Connective tissue", "Bone fractures, joint injuries, understanding scar tissue formation"],
      ["Muscle types", "IM injection site selection, physiotherapy, understanding cardiac arrest"],
      ["Cartilage types", "Joint health, intervertebral disc prolapse, airway management (tracheal rings)"],
      ["Body membranes", "Understanding pleurisy, peritonitis, pericarditis; aseptic technique rationale"],
      ["Glands", "Hormone-based disease management (diabetes, thyroid); breast care"],
      ["Body landmarks", "Safe injection technique, IV cannulation, pulse assessment, CPR"]
    ]
  ),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("SUMMARY POINTS — QUICK REVISION"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: GOLD_LIGHT, fill: GOLD_LIGHT },
            borders: {
              top: { style: BorderStyle.THICK, size: 12, color: GOLD },
              bottom: { style: BorderStyle.THICK, size: 12, color: GOLD },
              left: { style: BorderStyle.THICK, size: 12, color: GOLD },
              right: { style: BorderStyle.THICK, size: 12, color: GOLD }
            },
            children: [
              new Paragraph({ spacing: { before: 60, after: 20 }, children: [new TextRun({ text: "⭐ UNIT I — QUICK REVISION POINTS", bold: true, size: 24, color: GOLD, font: "Calibri" })] }),
              ...[
                "Anatomy: Study of structure; Applied Anatomy: Clinical application of anatomy",
                "Standard Anatomical Position: Standing erect, face forward, palms forward",
                "Anterior = front; Posterior = back; Superior = upper; Inferior = lower",
                "Medial = towards midline; Lateral = away from midline",
                "Proximal = nearer to attachment; Distal = farther from attachment",
                "Sagittal plane = left/right; Coronal plane = front/back; Transverse = upper/lower",
                "Flexion = decrease angle; Extension = increase angle; Abduction = away from midline",
                "Supination = palm up; Pronation = palm down; Dorsiflexion = foot up; Plantar flexion = foot down",
                "Cell = basic unit; Mitochondria = powerhouse; Nucleus = control centre",
                "Mitosis = 2 identical daughter cells (46 chromosomes) for growth and repair",
                "Meiosis = 4 different cells (23 chromosomes) for reproduction",
                "4 Tissue types: Epithelial, Connective, Muscle, Nervous",
                "3 Cartilage types: Hyaline (most common), Fibrocartilage (strongest), Elastic (most flexible)",
                "3 Muscle types: Skeletal (voluntary), Smooth (involuntary), Cardiac (involuntary striated)",
                "Glands: Exocrine (with duct), Endocrine (ductless/hormones), Mixed (pancreas)",
                "Organisation: Chemical → Cellular → Tissue → Organ → Organ System → Organism",
                "IM injection sites: Deltoid, Vastus lateralis, Dorsogluteal, Ventrogluteal"
              ].map(pt => new Paragraph({
                bullet: { level: 0 },
                spacing: { before: 30, after: 30 },
                children: [new TextRun({ text: pt, size: 20, font: "Calibri" })]
              }))
            ]
          })
        ]
      })
    ]
  }),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  sectionHeading("IMPORTANT QUESTIONS — UNIT I"),
  // ════════════════════════════════════════════════════════════════════
  spacer(60),

  subHeading("A. VERY SHORT ANSWER QUESTIONS (2 Marks)"),
  spacer(40),
  ...[
    "1. Define Anatomy.",
    "2. What is standard anatomical position?",
    "3. Define proximal and distal.",
    "4. What is the sagittal plane?",
    "5. Define flexion and extension.",
    "6. What is dorsiflexion?",
    "7. Name the powerhouse of the cell.",
    "8. What is mitosis?",
    "9. Name the four types of tissues.",
    "10. Define hyaline cartilage.",
    "11. What are exocrine glands? Give one example.",
    "12. Name the three types of muscle tissue.",
    "13. Define membrane.",
    "14. What is a synovial membrane?",
    "15. Name any two IM injection sites."
  ].map(q => bullet(q)),
  spacer(80),

  subHeading("B. SHORT ANSWER QUESTIONS (5 Marks)"),
  spacer(40),
  ...[
    "1. Write a short note on anatomical terms of position.",
    "2. Describe the anatomical planes with examples.",
    "3. List and explain the movements at joints.",
    "4. Write a short note on cell organelles.",
    "5. Compare mitosis and meiosis.",
    "6. Describe epithelial tissue with its classification and location.",
    "7. Write a short note on types of cartilage.",
    "8. Describe the features of skeletal, smooth, and cardiac muscle.",
    "9. Classify glands with examples.",
    "10. Write a note on the organisation of the human body.",
    "11. Explain body membranes and their clinical importance.",
    "12. Write the clinical applications of anatomical terms in nursing practice."
  ].map(q => bullet(q)),
  spacer(80),

  subHeading("C. LONG ANSWER QUESTIONS (10 Marks)"),
  spacer(40),
  ...[
    "1. Describe in detail the structure of a typical cell. Add a labelled diagram.",
    "2. Discuss cell division — types, phases, and clinical significance.",
    "3. Classify tissues with examples. Describe each type in detail.",
    "4. Write a detailed note on types of muscles with comparison and clinical implications for nursing.",
    "5. Describe the anatomical terms used in clinical practice. Explain how nurses apply them in patient care.",
    "6. Write a detailed essay on the organisation of the human body, from chemical level to organism level.",
    "7. Describe bony and surface landmarks of the body. Explain their clinical significance in nursing procedures."
  ].map(q => bullet(q)),
  spacer(80),

  subHeading("D. VIVA QUESTIONS"),
  spacer(40),
  makeTable(
    ["Viva Question", "Expected Answer (Key Points)"],
    [
      ["What is the anatomical term for the back of the body?", "Posterior / Dorsal"],
      ["What position is used during CPR?", "Supine position (patient lying on back)"],
      ["Which plane divides the body into left and right?", "Sagittal / Vertical plane"],
      ["What is the difference between pronation and supination?", "Pronation = palm down; Supination = palm up"],
      ["What is the powerhouse of the cell?", "Mitochondria (produces ATP)"],
      ["How many chromosomes in human body cells?", "46 chromosomes (23 pairs) — diploid"],
      ["What type of tissue lines the respiratory tract?", "Pseudostratified ciliated columnar epithelium"],
      ["Which cartilage forms the intervertebral discs?", "Fibrocartilage (strongest, can absorb shock)"],
      ["What is the function of synovial membrane?", "Secretes synovial fluid for joint lubrication"],
      ["Name three IM injection sites.", "Deltoid, Vastus lateralis, Dorsogluteal / Ventrogluteal"],
      ["What is holocene secretion? Example?", "Whole cell disintegrates to release secretion; Sebaceous gland"],
      ["Difference between endocrine and exocrine glands?", "Endocrine = ductless, hormones to blood; Exocrine = has duct, secretes to surface"],
      ["Why does cartilage heal slowly?", "Avascular — no direct blood supply, so nutrients reach by diffusion only"],
      ["What is the angle of Louis?", "Sternal angle at T4 level — used for rib counting and clinical procedures"],
      ["Name the six levels of body organisation.", "Chemical → Cellular → Tissue → Organ → Organ System → Organism"]
    ]
  ),
  spacer(120),
  pageBreak(),

  // ════════════════════════════════════════════════════════════════════
  // END MATTER
  // ════════════════════════════════════════════════════════════════════
  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: [
          new TableCell({
            shading: { type: ShadingType.SOLID, color: DEEP_BLUE, fill: DEEP_BLUE },
            children: [
              new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 80, after: 20 }, children: [new TextRun({ text: "END OF UNIT I", bold: true, size: 28, color: WHITE, font: "Calibri" })] }),
              new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 20, after: 40 }, children: [new TextRun({ text: "Introduction to Anatomical Terms & Organisation of the Human Body", size: 20, color: LIGHT_BLUE, font: "Calibri" })] }),
              new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 40, after: 80 }, children: [new TextRun({ text: '"Knowledge is the life of the mind."  — Prophet Muhammad (PBUH)', italics: true, size: 18, color: GOLD_LIGHT, font: "Calibri" })] })
            ]
          })
        ]
      })
    ]
  })
];

// ─── BUILD DOCUMENT ──────────────────────────────────────────────────────────
const doc = new Document({
  creator: "MR. UMAR SHAIKH",
  title: "Applied Anatomy – Unit I Notes",
  description: "B.Sc Nursing, Semester I, RGUHS – Applied Anatomy Study Notes",
  styles: {
    default: {
      document: {
        run: { font: "Calibri", size: 20 }
      }
    }
  },
  sections: [
    {
      properties: {
        page: {
          margin: { top: 1080, right: 1080, bottom: 1080, left: 1080 }
        }
      },
      headers: { default: headerContent },
      footers: { default: footerContent },
      children: [...coverPage, ...content]
    }
  ]
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync('/home/daytona/workspace/applied-anatomy-unit1/Applied_Anatomy_Unit_I_Notes.docx', buffer);
  console.log('DONE: File written successfully.');
}).catch(err => {
  console.error('ERROR:', err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/applied-anatomy-unit1 && node generate.js 2>&1

Running Command

python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/applied-anatomy-unit1/Applied_Anatomy_Unit_I_Notes.docx 2>&1

Running Command

# Manually validate the docx by checking it can be unzipped and contains required XML cd /home/daytona/workspace/applied-anatomy-unit1 python3 -c " import zipfile, os path = 'Applied_Anatomy_Unit_I_Notes.docx' size = os.path.getsize(path) print(f'File size: {size:,} bytes ({size/1024:.1f} KB)') with zipfile.ZipFile(path, 'r') as z: files = z.namelist() print(f'ZIP entries: {len(files)}') for f in files[:15]: print(f' {f}') # Check required files for req in ['word/document.xml', 'word/_rels/document.xml.rels', '[Content_Types].xml']: status = 'OK' if req in files else 'MISSING' print(f' [{status}] {req}') "

Running Command

cd /home/daytona/workspace/applied-anatomy-unit1 && pandoc Applied_Anatomy_Unit_I_Notes.docx -o /tmp/check_output.txt && wc -l /tmp/check_output.txt && head -60 /tmp/check_output.txt

Your Unit I DOCX is ready! Here is the download link:

Applied Anatomy Unit I Notes

Word Document · DOCX


What's Inside (1,305 lines / ~31 KB)

The document follows every instruction from your prompt exactly. Here's a full outline of what was built:

Cover Page

  • Islamic quote (Surah Al-Alaq 96:1-2) in a styled header band
  • B.Sc Nursing | Semester I | RGUHS | Academic Year 2026
  • APPLIED ANATOMY title block with gold border
  • UNIT I gold badge with unit name
  • Author box: MR. UMAR SHAIKH, M.Sc Nursing (CHN)
  • Disclaimer statement included

Header / Footer on Every Page

  • Header: Year | Subject | Unit I | Unit Name
  • Footer: Smart Nursing Notes for Exam Success | healtheducationalmedia.com | Page X of Y

Topics Covered (All from Syllabus - in order)

  1. Introduction to Anatomy - definition boxes (Anatomy & Applied Anatomy), branches table
  2. Anatomical Terms - full 14-term table with meanings and examples + Clinical Nursing Box
  3. Anatomical Planes - Sagittal, Coronal, Transverse, Oblique with ASCII diagram
  4. Movements - All 13 movements in table (flexion to circumduction) + Clinical Box
  5. Cell Structure - All organelles in detailed table + ASCII cell diagram
  6. Cell Division - Mitosis phases table + Mitosis vs Meiosis comparison table + Clinical Box
  7. Tissues - Tree structure + all 4 tissue types in full detail
  8. Cartilage - Hyaline, Fibrocartilage, Elastic - comparison table with key notes
  9. Muscle Types - 10-row comparison table (Skeletal vs Smooth vs Cardiac) + Clinical Box
  10. Nervous Tissue - Neuron + Neuroglia types
  11. Membranes - All 5 types with clinical implications
  12. Glands - Full classification table (8 rows) + Clinical Box
  13. Organisation of Human Body - 6-level flowchart table + 11-system organ table
  14. Surface & Bony Landmarks - Region-wise table + IM injection site nursing box
  15. Nursing Applications - Applied anatomy in nursing table
  16. Summary / Quick Revision - Gold box with 17 key revision points

Questions Section

  • Very Short Answer (15 questions - 2 marks)
  • Short Answer (12 questions - 5 marks)
  • Long Answer (7 questions - 10 marks)
  • Viva Questions (15 Q&A format table)

Shall I continue with Unit II - The Respiratory System?
This is a shared conversation. Sign in to Orris to start your own chat.