MBBS Essay OBG Endometrial Cancer
| Feature | Type I (Endometrioid) | Type II (Non-Endometrioid) |
|---|---|---|
| Frequency | 75-85% | 15-25% |
| Estrogen | Estrogen-dependent | Estrogen-independent |
| Background | Endometrial hyperplasia | Atrophic endometrium |
| Histology | Endometrioid adenocarcinoma | Serous, clear cell |
| Grade | Well-differentiated (low grade) | Poorly differentiated (high grade) |
| Prognosis | Favorable | Poor |
| Patient | Obese, younger, perimenopausal | Thin, older, postmenopausal |
| Racial predominance | Any | Disproportionate in African American, Asian women |


| Stage | Description |
|---|---|
| Stage I | Confined to the uterine body |
| IA | Tumour invades <50% of myometrium |
| IB | Tumour invades ≥50% of myometrium |
| Stage II | Tumour invades cervical stroma, but not beyond uterus |
| Stage III | Local/regional spread |
| IIIA | Tumour invades uterine serosa and/or adnexa |
| IIIB | Vaginal and/or parametrial involvement |
| IIIC1 | Pelvic lymph node metastasis |
| IIIC2 | Para-aortic lymph node metastasis |
| Stage IV | Tumour invades bladder/bowel mucosa, or distant metastases |
| IVA | Bladder/bowel mucosal invasion |
| IVB | Distant metastases (lungs, liver, bone, inguinal lymph nodes) |
| Stage | Primary Treatment | Adjuvant |
|---|---|---|
| IA, Grade 1-2 | TAH+BSO | Observation ± vaginal brachytherapy |
| IA, Grade 3 / IB | TAH+BSO + lymph nodes | Vaginal brachytherapy ± EBRT |
| Stage II | TAH+BSO + lymph nodes | EBRT + vaginal brachytherapy |
| Stage III | TAH+BSO + debulking | Chemotherapy + radiation |
| Stage IV | Debulking surgery | Chemotherapy; palliative care |
| Type | Origin | Notes |
|---|---|---|
| Leiomyosarcoma | Smooth muscle | Most common uterine sarcoma; arises de novo, not from fibroids |
| Endometrial Stromal Sarcoma | Endometrial stroma | Low-grade; ER/PR positive; responds to hormonal therapy |
| Adenosarcoma | Mixed Mullerian | Low-grade malignant stroma + benign glands |
| Carcinosarcoma (MMMT) | Mixed | Highly aggressive; now classified as metaplastic carcinoma |
| Point | Detail |
|---|---|
| Most common | Malignancy of female genital tract |
| Cardinal symptom | Postmenopausal bleeding |
| Main risk factor | Unopposed estrogen stimulation |
| Commonest type | Endometrioid adenocarcinoma (80-85%) |
| Deadliest type | Serous carcinoma (<10% of cases, >50% of deaths) |
| Precursor | Atypical endometrial hyperplasia |
| Hereditary risk | Lynch syndrome (HNPCC) |
| Diagnosis | Endometrial biopsy (Pipelle) |
| Imaging | TVS (screen), MRI pelvis (staging) |
| Staging | Surgical (FIGO 2009) |
| Treatment | TAH+BSO ± lymph node dissection |
| Adjuvant | Radiotherapy ± chemotherapy |
| Overall 5-yr survival | ~75% |
Pupillary light reflex pathway

Key point: The light reflex fibers leave the optic tract just rostral (anterior) to the lateral geniculate body (LGB) and do NOT synapse there. They pass into the brachium of the superior colliculus to reach the midbrain pretectal area.This explains why lesions of the visual cortex or optic radiations (posterior to LGB) cause cortical blindness but preserve the pupillary light reflex - the reflex arc bypasses the geniculate-cortical pathway entirely.
Clinical note: Because pupilloconstrictor fibers run superficially in CN III, they are vulnerable to compression (e.g., posterior communicating artery aneurysm, uncal herniation) before the somatic motor fibers are affected. A dilated, unreactive pupil with CN III palsy strongly suggests compressive rather than ischaemic cause.
LIGHT stimulus (Left eye used as example)
↓
Retina (rods/cones + ipRGCs/melanopsin)
↓
Bipolar cells → Retinal ganglion cells
↓
Left Optic Nerve (CN II)
↓
Optic Chiasm (nasal fibers cross → bilateral representation)
↓
Both Optic Tracts
↓
Fibers LEAVE optic tract BEFORE lateral geniculate body
↓
↓ (via brachium of superior colliculus)
↓
Bilateral Pretectal Nuclei (olivary pretectal nucleus, dorsal midbrain)
↓
Internuncial neurons → BOTH Edinger-Westphal nuclei
(direct ipsilateral + via POSTERIOR COMMISSURE to contralateral)
↓ ↓
Left Edinger-Westphal nucleus Right Edinger-Westphal nucleus
↓ ↓
Left CN III (inferior division) Right CN III (inferior division)
(preganglionic parasympathetic)
↓ ↓
Left Ciliary Ganglion Right Ciliary Ganglion
↓ ↓
Left Short Ciliary Nerves Right Short Ciliary Nerves
↓ ↓
Left Sphincter Pupillae Right Sphincter Pupillae
↓ ↓
LEFT PUPIL CONSTRICTS RIGHT PUPIL CONSTRICTS
(Direct reflex) (Consensual reflex)
| Direct Reflex | Consensual Reflex | |
|---|---|---|
| Definition | Pupil constriction in the illuminated eye | Pupil constriction in the opposite (non-illuminated) eye |
| Why it occurs | Ipsilateral efferent pathway | Contralateral distribution via posterior commissure |
| Clinical use | Tests both afferent AND efferent limb | Tests afferent of one eye + efferent of the other |
| Point | Detail |
|---|---|
| Afferent nerve | CN II (Optic nerve) |
| Efferent nerve | CN III (Oculomotor nerve) |
| Reflex centre | Pretectal nucleus (olivary pretectal nucleus), dorsal midbrain |
| Parasympathetic nucleus | Edinger-Westphal nucleus (part of CN III nuclear complex) |
| Why consensual? | Internuncial neurons cross via posterior commissure to both EW nuclei |
| Critical divergence point | Fibers leave optic tract BEFORE LGB → bypass visual cortex |
| Ganglion in orbit | Ciliary ganglion (only parasympathetic synapse here) |
| Final effector | Sphincter pupillae muscle |
| Pupilloconstrictor fiber position in CN III | Superficial/dorsomedial - vulnerable to compression |
What about you
Generate a Word document on pupillary light reflex for revision
mkdir -p /home/daytona/workspace/pupillary-reflex && ls /home/daytona/workspace/pupillary-reflex
~/pupillary-reflex/generate.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, TableOfContents,
UnderlineType, PageBreak
} = require('docx');
const fs = require('fs');
// ─── COLOUR PALETTE ───────────────────────────────────────────────
const BLUE = "1F3864"; // dark navy heading
const LIGHT_BLUE = "2E75B6"; // medium blue subheading
const ACCENT = "1F4E79"; // deep blue for table header
const TABLE_HDR = "2E75B6"; // table header fill
const TABLE_ALT = "DEEAF1"; // alternate row
const TABLE_WHITE = "FFFFFF";
const KEY_FILL = "FFF2CC"; // yellow highlight box
const WARN_FILL = "FCE4D6"; // orange highlight box
const GREEN_FILL = "E2EFDA"; // green highlight box
// ─── HELPERS ──────────────────────────────────────────────────────
function heading1(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_1,
spacing: { before: 360, after: 120 },
children: [new TextRun({ text, bold: true, color: BLUE, size: 32 })]
});
}
function heading2(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_2,
spacing: { before: 280, after: 80 },
children: [new TextRun({ text, bold: true, color: LIGHT_BLUE, size: 26 })]
});
}
function heading3(text) {
return new Paragraph({
heading: HeadingLevel.HEADING_3,
spacing: { before: 200, after: 60 },
children: [new TextRun({ text, bold: true, color: ACCENT, size: 24 })]
});
}
function body(text, options = {}) {
return new Paragraph({
spacing: { before: 60, after: 60, line: 320 },
children: [new TextRun({ text, size: 22, ...options })]
});
}
function bold(text) {
return new Paragraph({
spacing: { before: 60, after: 60, line: 320 },
children: [new TextRun({ text, bold: true, size: 22 })]
});
}
function bullet(text, level = 0) {
const indent = level === 0 ? {} : { indent: { left: 720 * (level + 1) } };
return new Paragraph({
bullet: { level },
spacing: { before: 40, after: 40, line: 300 },
...indent,
children: [new TextRun({ text, size: 22 })]
});
}
function bulletMixed(runs) {
return new Paragraph({
bullet: { level: 0 },
spacing: { before: 40, after: 40, line: 300 },
children: runs
});
}
function spacer(n = 1) {
return Array.from({ length: n }, () =>
new Paragraph({ children: [new TextRun({ text: '' })], spacing: { before: 0, after: 0 } })
);
}
function divider() {
return new Paragraph({
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: LIGHT_BLUE } },
spacing: { before: 120, after: 120 },
children: [new TextRun('')]
});
}
function highlightBox(lines, fillColor = KEY_FILL, borderColor = "FFC000") {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
bottom: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
left: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
right: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
},
rows: [new TableRow({
children: [new TableCell({
shading: { fill: fillColor, type: ShadingType.CLEAR },
margins: { top: 100, bottom: 100, left: 200, right: 200 },
children: lines.map(l => new Paragraph({
spacing: { before: 40, after: 40, line: 300 },
children: typeof l === 'string'
? [new TextRun({ text: l, size: 21 })]
: l
}))
})]
})]
});
}
function tableRow(cells, isHeader = false, fillColor = TABLE_WHITE) {
return new TableRow({
tableHeader: isHeader,
children: cells.map((cell, i) => new TableCell({
shading: { fill: isHeader ? TABLE_HDR : fillColor, type: ShadingType.CLEAR },
verticalAlign: VerticalAlign.CENTER,
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph({
alignment: AlignmentType.LEFT,
spacing: { before: 0, after: 0 },
children: [new TextRun({
text: cell,
bold: isHeader,
color: isHeader ? "FFFFFF" : "000000",
size: 20
})]
})]
}))
});
}
function makeTable(headers, rows) {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
tableRow(headers, true),
...rows.map((r, i) => tableRow(r, false, i % 2 === 0 ? TABLE_WHITE : TABLE_ALT))
]
});
}
// ─── TITLE PAGE ───────────────────────────────────────────────────
const titleSection = [
...spacer(4),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 200 },
children: [new TextRun({ text: "PUPILLARY LIGHT REFLEX", bold: true, color: BLUE, size: 56 })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 120 },
children: [new TextRun({ text: "Complete Revision Notes", color: LIGHT_BLUE, size: 32, italics: true })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 80 },
children: [new TextRun({ text: "Anatomy | Physiology | Clinical Correlations", color: "555555", size: 24 })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 80 },
children: [new TextRun({ text: "MBBS – Ophthalmology / Neuroanatomy", color: "555555", size: 22 })]
}),
divider(),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Sources: Adams & Victor's Principles of Neurology | Kanski's Clinical Ophthalmology", color: "888888", size: 18, italics: true })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 40 },
children: [new TextRun({ text: "Localization in Clinical Neurology | Plum & Posner's Stupor & Coma | Neuroscience: Exploring the Brain", color: "888888", size: 18, italics: true })]
}),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 1: DEFINITION & OVERVIEW ─────────────────────────────
const sec1 = [
heading1("1. Definition & Overview"),
divider(),
body("The pupillary light reflex (PLR) is the constriction of the pupil in response to light stimulation of the retina. It is a brain stem reflex that does not involve the cerebral cortex."),
...spacer(1),
body("Key characteristics:"),
bullet("Consensual: light in ONE eye causes constriction of BOTH pupils"),
bullet("Mediated by CN II (afferent) and CN III (efferent)"),
bullet("Reflex centre: Pretectal nucleus (olivary pretectal nucleus), dorsal midbrain"),
bullet("Bypasses the lateral geniculate body and visual cortex"),
bullet("Most resistant of all nervous system responses to metabolic insult"),
...spacer(1),
highlightBox([
"★ KEY EXAM POINT",
"The afferent fibres leave the optic tract BEFORE the lateral geniculate body.",
"This is why cortical blindness (damage to visual cortex / optic radiations) PRESERVES the pupillary light reflex.",
"The reflex arc is: Retina → CN II → Pretectal nucleus → Edinger-Westphal nucleus → CN III → Ciliary ganglion → Short ciliary nerves → Sphincter pupillae"
], KEY_FILL, "FFC000"),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 2: COMPLETE PATHWAY ──────────────────────────────────
const sec2 = [
heading1("2. Complete Pathway – Step by Step"),
divider(),
heading2("2.1 Afferent Limb (Sensory – CN II)"),
heading3("Step 1 – Retinal Photoreceptors"),
bullet("Light stimulates rods and cones in the outer retina"),
bullet("Intrinsically photosensitive Retinal Ganglion Cells (ipRGCs) containing melanopsin also directly detect ambient light intensity"),
bullet("ipRGCs are irradiance detectors – NOT image-forming cells"),
bulletMixed([
new TextRun({ text: "Clinical significance: ", bold: true, size: 22 }),
new TextRun({ text: "Pupillary light reflexes are preserved even in patients with rod and cone degeneration (functionally blind), because ipRGCs are intact", size: 22 })
]),
heading3("Step 2 – Bipolar Cells (Inner Nuclear Layer of Retina)"),
bullet("Signals pass from photoreceptors through bipolar cells"),
heading3("Step 3 – Retinal Ganglion Cells → Optic Nerve → Optic Chiasm → Optic Tract"),
bullet("Retinal ganglion cell axons converge to form the optic nerve (CN II)"),
bullet("At the optic chiasm: nasal fibres decussate (cross), temporal fibres remain ipsilateral (~53% crossed, 47% uncrossed)"),
bullet("Fibres continue in the optic tract toward the midbrain"),
...spacer(1),
highlightBox([
"★ CRITICAL DIVERGENCE POINT",
"Pupillary light reflex fibres LEAVE the optic tract just ROSTRAL (anterior) to the lateral geniculate body (LGB).",
"They do NOT synapse in the LGB.",
"They pass via the brachium of the superior colliculus to reach the pretectal nucleus.",
"Result: Lesions of the visual cortex or optic radiations → cortical blindness but INTACT pupillary light reflex."
], KEY_FILL, "FFC000"),
...spacer(1),
heading3("Step 4 – Pretectal Nucleus (Olivary Pretectal Nucleus), Dorsal Midbrain"),
bullet("Pupillary fibres synapse in the olivary pretectal nucleus at the level of the superior colliculus"),
bullet("This nucleus receives bilateral input (due to partial chiasmal decussation)"),
heading2("2.2 Internuncial Neurons – Bilateral Distribution"),
bullet("Axons from each pretectal nucleus pass to BOTH Edinger-Westphal (EW) nuclei:"),
bullet("(a) Directly to the ipsilateral EW nucleus", 1),
bullet("(b) Crossing via the posterior commissure to the contralateral EW nucleus", 1),
...spacer(1),
highlightBox([
"This bilateral distribution is the anatomical basis for the CONSENSUAL reflex.",
"Lesion of the posterior commissure (e.g., pinealoma) → BILATERAL fixed, slightly large pupils (5–6 mm)."
], WARN_FILL, "FF0000"),
...spacer(1),
heading2("2.3 Efferent Limb (Motor – CN III) – Two-Neuron Parasympathetic Pathway"),
heading3("Neuron 1 (Preganglionic): Edinger-Westphal Nucleus → CN III"),
bullet("Edinger-Westphal (EW) nucleus = accessory parasympathetic nucleus of CN III"),
bullet("Located just DORSAL to the main oculomotor nucleus, close to the midline, in the midbrain tegmentum"),
bullet("Preganglionic parasympathetic fibres travel in CN III on its SUPERFICIAL / DORSOMEDIAL surface"),
bullet("Enter the inferior division of CN III → travel via the nerve to the inferior oblique → reach the ciliary ganglion"),
...spacer(1),
highlightBox([
"★ WHY COMPRESSION AFFECTS PUPIL FIRST:",
"Pupilloconstrictor fibres run SUPERFICIALLY in CN III.",
"Compression (e.g., posterior communicating artery aneurysm, uncal herniation) affects the outer fibres first → dilated unreactive pupil BEFORE somatic motor loss.",
"Ischaemic CN III palsy (e.g., diabetes) affects the central fibres → somatic motor paresis with PUPIL-SPARING."
], WARN_FILL, "FF4500"),
...spacer(1),
heading3("Synapse 2 – Ciliary Ganglion (Orbit)"),
bullet("Located within the muscle cone, just BEHIND the globe, in the posterior orbit"),
bullet("Preganglionic fibres synapse here on postganglionic parasympathetic neurons"),
bullet("Other fibres (sympathetic, sensory) pass through WITHOUT synapsing – only parasympathetic fibres synapse here"),
heading3("Neuron 2 (Postganglionic): Short Ciliary Nerves → Sphincter Pupillae"),
bullet("Postganglionic fibres leave the ciliary ganglion as short ciliary nerves (6–10 in number)"),
bullet("Innervate the sphincter pupillae (circular smooth muscle of the iris)"),
bullet("Sphincter pupillae contraction → MIOSIS (pupil constriction)"),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 3: SUMMARY TABLE ─────────────────────────────────────
const sec3 = [
heading1("3. Pathway Summary Table"),
divider(),
makeTable(
["Step", "Structure", "Notes"],
[
["1", "Retina (rods/cones + ipRGCs)", "melanopsin in ipRGCs; preserved in rod/cone degeneration"],
["2", "Bipolar cells", "Inner nuclear layer of retina"],
["3", "Retinal ganglion cells → Optic nerve", "Axons form CN II"],
["4", "Optic chiasm", "Nasal fibres cross; 53:47 ratio"],
["5", "Optic tract", "Bilateral representation"],
["6", "Fibres leave optic tract (before LGB)", "Critical divergence point; via brachium of SC"],
["7", "Pretectal nucleus (olivary)", "Dorsal midbrain; first synapse"],
["8", "Internuncial neurons via posterior commissure", "Bilateral EW nucleus distribution"],
["9", "Edinger-Westphal nucleus (bilateral)", "Midbrain; preganglionic parasympathetic origin"],
["10", "CN III (inferior division)", "Superficial fibres; pupilloconstrictor"],
["11", "Ciliary ganglion (orbit)", "Second synapse; only parasympathetic fibres synapse"],
["12", "Short ciliary nerves", "Postganglionic parasympathetic"],
["13", "Sphincter pupillae", "MIOSIS (constriction)"],
]
),
...spacer(2),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 4: DIRECT vs CONSENSUAL ─────────────────────────────
const sec4 = [
heading1("4. Direct vs Consensual Reflex"),
divider(),
makeTable(
["Feature", "Direct Reflex", "Consensual Reflex"],
[
["Definition", "Constriction of illuminated eye's pupil", "Constriction of opposite eye's pupil"],
["Afferent", "Ipsilateral optic nerve", "Ipsilateral optic nerve"],
["Efferent", "Ipsilateral CN III", "Contralateral CN III"],
["Mechanism", "Ipsilateral EW nucleus activation", "Crossing via posterior commissure"],
["Clinical use", "Tests afferent + efferent (same side)", "Tests afferent (one side) + efferent (other side)"],
]
),
...spacer(2),
heading2("Practical Testing – Swinging Flashlight Test"),
body("Alternately swing a bright light from one eye to the other at ~1-second intervals."),
bullet("Normal: both pupils constrict equally when either eye is illuminated"),
bullet("RAPD present: when light swings to the affected eye, both pupils dilate (paradoxically) due to weak afferent signal"),
...spacer(1),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 5: ANATOMICAL KEY POINTS ────────────────────────────
const sec5 = [
heading1("5. Key Anatomical Points"),
divider(),
makeTable(
["Point", "Detail"],
[
["Afferent nerve", "CN II (Optic nerve)"],
["Efferent nerve", "CN III (Oculomotor nerve)"],
["Reflex centre", "Pretectal nucleus (olivary pretectal nucleus), dorsal midbrain"],
["Parasympathetic nucleus", "Edinger-Westphal nucleus (part of CN III nuclear complex)"],
["Why consensual?", "Internuncial neurons cross via posterior commissure to both EW nuclei"],
["Critical divergence", "Fibres leave optic tract BEFORE LGB → bypass visual cortex"],
["Ganglion in orbit", "Ciliary ganglion (only parasympathetic synapse here)"],
["Final effector", "Sphincter pupillae muscle (circular smooth muscle)"],
["Pupilloconstrictor position in CN III", "Superficial / dorsomedial – vulnerable to compression"],
["ipRGCs", "Intrinsically photosensitive retinal ganglion cells; contain melanopsin; drive PLR"],
]
),
...spacer(2),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 6: CLINICAL CORRELATIONS ────────────────────────────
const sec6 = [
heading1("6. Clinical Correlations"),
divider(),
heading2("6.1 Relative Afferent Pupillary Defect (RAPD) – Marcus Gunn Pupil"),
highlightBox([
"Cause: Optic nerve lesion (unilateral or asymmetric)",
"Test: Swinging Flashlight Test",
"Finding: Light swings to affected eye → both pupils PARADOXICALLY DILATE",
"Explanation: Weak afferent signal from diseased eye → EW nucleus less stimulated → pupils dilate",
"Lesion sites: retina, optic nerve, optic chiasm, optic tract, pretectal nucleus",
"Note: RAPD is NEVER caused by a dense cataract (media opacity does NOT produce RAPD)"
], GREEN_FILL, "00B050"),
...spacer(1),
heading2("6.2 Absolute Afferent Pupillary Defect (Amaurotic Pupil)"),
bullet("Cause: Complete optic nerve lesion"),
bullet("Affected eye: completely blind (no light perception)"),
bullet("Light in affected eye → NEITHER pupil reacts"),
bullet("Light in normal eye → BOTH pupils react normally"),
bullet("Near reflex: normal in both eyes"),
...spacer(1),
heading2("6.3 CN III Palsy – Efferent Defect"),
bullet("Pupil is DILATED and UNREACTIVE (mydriasis) – loss of parasympathetic constriction"),
bullet("Both direct AND consensual reflex lost in the affected eye"),
bullet("Consensual reflex still intact in the other eye (afferent is intact)"),
bullet("Associated with: ptosis, 'down and out' gaze (exotropia + hypotropia)"),
bullet("Compressive CN III (aneurysm, herniation): pupil involved FIRST"),
bullet("Ischaemic CN III (diabetes, hypertension): pupil SPARED"),
...spacer(1),
heading2("6.4 Horner's Syndrome – Sympathetic Pathway Disruption"),
highlightBox([
"NOT a PLR pathway defect (sympathetic pathway is separate).",
"Features: Miosis (small pupil), Ptosis (partial), Anhidrosis (if pre-ganglionic), Enophthalmos (apparent)",
"Pupil still CONSTRICTS to light, but DILATES poorly in the dark.",
"Causes: Pancoast tumour, carotid artery dissection, lateral medullary syndrome, cervical cord lesions"
], TABLE_ALT, LIGHT_BLUE),
...spacer(1),
heading2("6.5 Light-Near Dissociation (Argyll Robertson Pupil)"),
bullet("Pupil constricts to NEAR (accommodation-convergence) but NOT to LIGHT"),
bullet("Classic causes: Neurosyphilis, Parinaud's syndrome, aberrant CN III regeneration, diabetes"),
bullet("Lesion: Dorsal internuncial neurons in pretectal area (connecting pretectal nucleus to EW nucleus)"),
bullet("Near reflex centre is more VENTRAL in midbrain – spared by dorsal lesions"),
bullet("Pupils typically small, irregular, bilateral in Argyll Robertson"),
...spacer(1),
heading2("6.6 Parinaud's Syndrome / Pinealoma"),
bullet("Compresses posterior commissure and pretectal area"),
bullet("Results: bilateral fixed pupils (internuncial neurons disrupted)"),
bullet("Also: upgaze palsy, convergence-retraction nystagmus, pseudo-Argyll Robertson pupils"),
...spacer(1),
heading2("6.7 Pupillary Findings in Coma (Localisation Value)"),
makeTable(
["Lesion Level", "Pupil Size", "Reactivity", "Clinical Significance"],
[
["Metabolic coma", "Small (bilateral)", "Reactive", "Last sign to go in metabolic causes"],
["Diencephalon", "Small (bilateral)", "Reactive", "Also seen in metabolic coma – limited localising value"],
["Midbrain", "Mid-position 5–6 mm", "Fixed", "Bilateral EW nucleus damage; posterior commissure lesion"],
["Pons", "Pinpoint (bilateral)", "Reactive", "Pontine haemorrhage; loss of sympathetic, parasympathetic intact"],
["Uncal herniation (CN III)", "Unilateral dilated", "Fixed", "Compressive CN III; ominous sign"],
["Horner's (sympathetic)", "Unilateral small", "Reactive", "Ipsilateral ptosis + anhidrosis"],
]
),
...spacer(1),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 7: NEAR REFLEX ───────────────────────────────────────
const sec7 = [
heading1("7. Near Reflex (Accommodation-Convergence Reflex)"),
divider(),
body("The near reflex is a SYNKINESIS (not a true reflex) activated when gaze shifts from distant to near target."),
...spacer(1),
body("It comprises THREE components:"),
bullet("Accommodation – lens thickening (ciliary muscle contraction)"),
bullet("Convergence – medial rectus contraction"),
bullet("Miosis – sphincter pupillae contraction"),
...spacer(1),
body("The final pathways are IDENTICAL to the light reflex (CN III → ciliary ganglion → short ciliary nerves)."),
body("The near reflex centre is more VENTRAL in the midbrain than the pretectal nucleus for the light reflex."),
...spacer(1),
highlightBox([
"IMPORTANT: There is no condition in which the light reflex is PRESENT but the near response is ABSENT.",
"However, the converse IS possible (Light-Near Dissociation = near present, light absent) –",
"seen in Argyll Robertson pupil (neurosyphilis), Parinaud's syndrome."
], KEY_FILL, "FFC000"),
...spacer(1),
new Paragraph({ children: [new PageBreak()] })
];
// ─── SECTION 8: QUICK REVISION BOX ───────────────────────────────
const sec8 = [
heading1("8. Quick Revision – High-Yield Summary"),
divider(),
highlightBox([
"AFFERENT: Retina → Bipolar cells → Retinal ganglion cells → Optic nerve (CN II) → Optic chiasm → Optic tract",
"↓ (fibres leave BEFORE LGB via brachium of superior colliculus)",
"→ Pretectal nucleus (olivary, dorsal midbrain) ← FIRST SYNAPSE",
"→ Internuncial neurons → BOTH EW nuclei (via posterior commissure for contralateral)",
"",
"EFFERENT: EW nucleus → CN III (superficial fibres) → Ciliary ganglion (orbit) ← SECOND SYNAPSE",
"→ Short ciliary nerves → Sphincter pupillae → MIOSIS",
"",
"CONSENSUAL reflex = bilateral EW distribution via posterior commissure",
"PUPIL SPARING CN III palsy = ischaemic (central fibres affected first)",
"RAPD = afferent limb lesion; detected by swinging flashlight test",
"Argyll Robertson = light-near dissociation; neurosyphilis",
"Cortical blindness = INTACT pupillary light reflex (reflex bypasses cortex)"
], GREEN_FILL, "00B050"),
...spacer(2),
heading2("Nerve – Nucleus Quick Reference"),
makeTable(
["Component", "Nerve / Structure", "Location"],
[
["Afferent", "CN II – Optic nerve", "Retina to pretectal nucleus"],
["1st synapse", "Olivary pretectal nucleus", "Dorsal midbrain (pretectum)"],
["Internuncial", "Via posterior commissure", "Dorsal midbrain"],
["Pre-ganglionic parasympathetic", "Edinger-Westphal nucleus → CN III", "Midbrain tegmentum"],
["2nd synapse", "Ciliary ganglion", "Posterior orbit (muscle cone)"],
["Post-ganglionic", "Short ciliary nerves", "Orbit to iris"],
["Effector", "Sphincter pupillae", "Iris (circular smooth muscle)"],
]
),
...spacer(2),
heading2("Sources"),
body("• Adams and Victor's Principles of Neurology, 12th Edition", { italics: true }),
body("• Kanski's Clinical Ophthalmology: A Systematic Approach, 10th Edition", { italics: true }),
body("• Localization in Clinical Neurology, 8th Edition", { italics: true }),
body("• Plum and Posner's Diagnosis and Treatment of Stupor and Coma", { italics: true }),
body("• Neuroscience: Exploring the Brain, 5th Edition", { italics: true }),
];
// ─── ASSEMBLE DOCUMENT ────────────────────────────────────────────
const doc = new Document({
creator: "Orris Medical AI",
title: "Pupillary Light Reflex – Complete Revision Notes",
description: "MBBS Revision: Pupillary Light Reflex Pathway, Clinical Correlations",
styles: {
default: {
document: {
run: { font: "Calibri", size: 22, color: "222222" }
}
}
},
sections: [{
properties: {
page: {
margin: { top: 1080, bottom: 1080, left: 1080, right: 1080 }
}
},
headers: {
default: new Header({
children: [new Paragraph({
alignment: AlignmentType.RIGHT,
border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: LIGHT_BLUE } },
children: [
new TextRun({ text: "Pupillary Light Reflex | MBBS Revision Notes", color: LIGHT_BLUE, size: 18, italics: true })
]
})]
})
},
footers: {
default: new Footer({
children: [new Paragraph({
alignment: AlignmentType.CENTER,
border: { top: { style: BorderStyle.SINGLE, size: 4, color: LIGHT_BLUE } },
children: [
new TextRun({ text: "Page ", size: 18, color: "888888" }),
new TextRun({ children: [PageNumber.CURRENT], size: 18, color: "888888" }),
new TextRun({ text: " of ", size: 18, color: "888888" }),
new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 18, color: "888888" }),
new TextRun({ text: " | Generated by Orris Medical AI", size: 18, color: "888888" })
]
})]
})
},
children: [
...titleSection,
...sec1,
...sec2,
...sec3,
...sec4,
...sec5,
...sec6,
...sec7,
...sec8
]
}]
});
Packer.toBuffer(doc).then(buf => {
fs.writeFileSync('/home/daytona/workspace/pupillary-reflex/Pupillary_Light_Reflex_Revision.docx', buf);
console.log('SUCCESS: Document written.');
}).catch(err => {
console.error('ERROR:', err);
process.exit(1);
});
cd /home/daytona/workspace/pupillary-reflex && node generate.js 2>&1
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/pupillary-reflex/Pupillary_Light_Reflex_Revision.docx 2>&1
cd /home/daytona/workspace/pupillary-reflex && ls -lh Pupillary_Light_Reflex_Revision.docx && python3 -c " import zipfile, sys try: with zipfile.ZipFile('Pupillary_Light_Reflex_Revision.docx') as z: names = z.namelist() print('ZIP OK, files:', len(names)) for n in names[:10]: print(' ', n) except Exception as e: print('ERROR:', e) sys.exit(1) "
Pupillary Light Reflex Revision
Word Document · DOCX
| Section | Content |
|---|---|
| 1 | Definition & Overview - key exam point on LGB bypass |
| 2 | Complete Pathway Step-by-Step - afferent, internuncial, efferent neurons |
| 3 | Pathway Summary Table - all 13 steps at a glance |
| 4 | Direct vs Consensual Reflex - comparison table + swinging flashlight test |
| 5 | Key Anatomical Points - exam favourites quick reference |
| 6 | Clinical Correlations - RAPD, CN III palsy, Horner's, Argyll Robertson, coma pupils |
| 7 | Near Reflex & Light-Near Dissociation |
| 8 | High-Yield Quick Revision Summary Box |