I wanna make a presentation on Facial nerve and its relation to Ophthalmology. Give me everydetails from standard textbook

Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/faci…

Writing File

~/facial-nerve-ppt/build.js

const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Facial Nerve & Its Relation to Ophthalmology";
pres.author = "Medical Education";

// ─── COLOUR PALETTE ────────────────────────────────────────────────────────────
const C = {
  navy:   "0A1628",   // dominant dark
  teal:   "0D7377",   // accent
  tealLt: "14A085",   // lighter teal
  white:  "FFFFFF",
  offwht: "F0F4F8",
  gold:   "F4A261",
  grey:   "9AA8B6",
  greyDk: "3A4A5C",
  red:    "E63946",
  green:  "2D6A4F",
};

// ─── HELPERS ──────────────────────────────────────────────────────────────────
function sectionBg(slide) {
  slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.navy} });
}
function contentBg(slide) {
  slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.offwht} });
  slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:5.625, fill:{color:C.teal} });
}
function addTitle(slide, txt, dark=false) {
  const col = dark ? C.white : C.navy;
  slide.addText(txt, { x:0.35, y:0.22, w:9.3, h:0.55, fontSize:22, bold:true,
    color:col, fontFace:"Calibri", margin:0 });
  slide.addShape(pres.ShapeType.rect, { x:0.35, y:0.8, w:2.2, h:0.055, fill:{color:C.teal} });
}
function addSource(slide, src) {
  slide.addText(src, { x:0.35, y:5.3, w:9.3, h:0.25, fontSize:8, color:C.grey,
    italic:true, fontFace:"Calibri", margin:0 });
}
function bullet(txt, lvl=0, bold=false, color=null) {
  return { text: txt, options: {
    bullet: { indent: 15 + lvl*18 },
    fontSize: lvl===0 ? 14 : 12.5,
    color: color || (lvl===0 ? C.navy : C.greyDk),
    bold: bold,
    fontFace: "Calibri",
    breakLine: true,
    indentLevel: lvl,
  }};
}
function subhead(txt) {
  return { text: txt, options: {
    fontSize: 13.5, bold:true, color:C.teal, fontFace:"Calibri",
    breakLine:true,
  }};
}
function gap() { return { text:" ", options:{fontSize:6, breakLine:true}}; }

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.navy} });
  // decorative teal band
  s.addShape(pres.ShapeType.rect, { x:0, y:3.8, w:10, h:0.08, fill:{color:C.teal} });
  s.addShape(pres.ShapeType.rect, { x:0, y:3.9, w:10, h:1.725, fill:{color:"0B1F38"} });
  // main title
  s.addText("FACIAL NERVE", { x:0.6, y:0.9, w:8.8, h:1, fontSize:46, bold:true,
    color:C.white, fontFace:"Calibri", charSpacing:4, align:"center" });
  s.addText("& Its Relation to Ophthalmology", { x:0.6, y:1.85, w:8.8, h:0.7,
    fontSize:24, color:C.gold, fontFace:"Calibri", align:"center", italic:true });
  s.addShape(pres.ShapeType.rect, { x:3, y:2.7, w:4, h:0.06, fill:{color:C.tealLt} });
  s.addText("Based on Standard Medical Textbooks", { x:0.6, y:3.9, w:8.8, h:0.5,
    fontSize:13, color:C.grey, fontFace:"Calibri", align:"center" });
  s.addText("Kanski's Clinical Ophthalmology  |  Harrison's  |  Wills Eye Manual  |  Adams & Victor's Neurology  |  Cummings ENT",
    { x:0.6, y:4.45, w:8.8, h:0.5, fontSize:10, color:C.grey, fontFace:"Calibri",
      align:"center", italic:true });
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — TABLE OF CONTENTS
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Contents at a Glance");
  const items = [
    "1.  Overview & Functional Components",
    "2.  Nuclei & Central Connections",
    "3.  Course of the Facial Nerve (Extra- & Intracranial)",
    "4.  Branches & Distribution",
    "5.  Key Ophthalmic Branches — Temporal & Zygomatic",
    "6.  Lacrimal Gland Innervation (Greater Superficial Petrosal Nerve)",
    "7.  Orbicularis Oculi — Anatomy & Ophthalmic Importance",
    "8.  Bell's Phenomenon",
    "9.  Facial Nerve Palsy — Classification & Localization",
    "10. Bell's Palsy — Clinical Features & Ophthalmic Impact",
    "11. Ophthalmic Complications — Lagophthalmos & Exposure Keratopathy",
    "12. Paralytic Ectropion & Epiphora",
    "13. Aberrant Regeneration — Synkinesis & Crocodile Tears",
    "14. Management — Ocular Protection",
    "15. Surgical Interventions & Prognosis",
  ];
  s.addText(items.map((t,i) => ({ text: t, options:{
    fontSize: 11.8, color: C.navy, fontFace:"Calibri",
    bullet: false, breakLine: true,
  }})), { x:0.5, y:1.05, w:9.2, h:4.2, valign:"top" });
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — SECTION DIVIDER: ANATOMY
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  sectionBg(s);
  s.addShape(pres.ShapeType.rect, { x:0, y:2.2, w:10, h:0.1, fill:{color:C.teal} });
  s.addText("SECTION 1", { x:0.6, y:1.2, w:8.8, h:0.5, fontSize:14,
    color:C.gold, fontFace:"Calibri", align:"center", charSpacing:6 });
  s.addText("Anatomy of the Facial Nerve", { x:0.6, y:1.7, w:8.8, h:0.9,
    fontSize:34, bold:true, color:C.white, fontFace:"Calibri", align:"center" });
  s.addText("Overview • Nuclei • Course • Branches",
    { x:0.6, y:2.65, w:8.8, h:0.5, fontSize:16, color:C.grey, fontFace:"Calibri", align:"center" });
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — OVERVIEW & FUNCTIONAL COMPONENTS
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Facial Nerve (CN VII) — Overview & Functional Components");
  s.addText([
    subhead("Classification"),
    bullet("Mixed nerve (motor + sensory + parasympathetic)", 0, true),
    bullet("Innervates structures derived from the 2nd branchial arch", 0),
    gap(),
    subhead("Five Functional Components"),
    bullet("1. Special Visceral Efferent (SVE) — largest component", 0, true, C.teal),
    bullet("Supplies all muscles of facial expression, stapedius, stylohyoid, posterior digastric", 1),
    bullet("2. General Visceral Efferent (GVE) — parasympathetic", 0, true, C.teal),
    bullet("Lacrimal gland (via GSPN → pterygopalatine ganglion)", 1),
    bullet("Submandibular & sublingual glands (via chorda tympani)", 1),
    bullet("3. Special Visceral Afferent (SVA) — taste", 0, true, C.teal),
    bullet("Anterior 2/3 of tongue via chorda tympani", 1),
    bullet("Palate & tonsillar fossa via GSPN", 1),
    bullet("4. General Somatic Afferent (GSA) — cutaneous sensation", 0, true, C.teal),
    bullet("EAC skin, conchal auricle (nervus intermedius)", 1),
    bullet("5. General Visceral Afferent (GVA)", 0, true, C.teal),
    bullet("Mucosa of nose, pharynx, palate", 1),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Source: Cummings Otolaryngology, 7e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — NUCLEI & CENTRAL CONNECTIONS
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Nuclei & Central Connections");
  s.addText([
    subhead("Brainstem Nuclei (in pons)"),
    bullet("Motor nucleus (SVE) → facial muscles", 0),
    bullet("Superior salivatory nucleus (GVE) → lacrimal + salivary secretion", 0),
    bullet("Nucleus of the solitary tract (SVA/GVA) → taste + visceral afferents", 0),
    gap(),
    subhead("Central (UMN) vs. Peripheral (LMN) — Critical Distinction"),
    bullet("UMN lesion (above pons): Lower face paralysis only", 0, true, C.red),
    bullet("Upper face (forehead, orbicularis) spared due to bilateral cortical representation", 1),
    bullet("LMN lesion (facial nerve itself): Upper + lower face BOTH affected", 0, true, C.red),
    bullet("Lagophthalmos and brow ptosis are peripheral signs", 1),
    gap(),
    subhead("Cortical Representation"),
    bullet("Lower face motor cortex has mainly contralateral projections", 0),
    bullet("Upper face (including orbicularis oculi) receives bilateral cortical input", 0),
    bullet("This explains why forehead wrinkling and eye closure are preserved in UMN (central) lesions", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Harrison's Principles 22e; Wills Eye Manual 8e; Adams & Victor's Neurology 12e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — COURSE OF THE FACIAL NERVE
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Course of the Facial Nerve — Intracranial to Extracranial");

  // Two-column layout
  // Left column: intracranial/temporal bone
  s.addShape(pres.ShapeType.rect, { x:0.38, y:0.92, w:4.5, h:4.35,
    fill:{color:"E8F4F8"}, line:{color:C.teal, pt:1} });
  s.addText("TEMPORAL BONE COURSE", { x:0.55, y:0.97, w:4.15, h:0.35,
    fontSize:11, bold:true, color:C.teal, fontFace:"Calibri", margin:0 });
  s.addText([
    bullet("Exits pons at cerebellopontine angle (CPA)", 0),
    bullet("Enters internal auditory meatus (IAM) with CN VIII", 0),
    gap(),
    bullet("Fallopian Canal — 3 Segments:", 0, true),
    bullet("① Labyrinthine segment — shortest, narrowest; travels superior to cochlea; ends at geniculate ganglion", 1),
    bullet("② Tympanic (horizontal) segment — along medial wall of middle ear, superior to oval window", 1),
    bullet("③ Mastoid (vertical) segment — turns at 2nd genu, posterior to middle ear, exits at stylomastoid foramen", 1),
    gap(),
    bullet("Geniculate ganglion — sensory ganglion; gives off GSPN (parasympathetics to lacrimal gland)", 0, true, C.teal),
    bullet("Geniculate ganglion separated from middle fossa by only thin bone — dehiscent in ~25% of ears", 0),
  ], { x:0.55, y:1.32, w:4.15, h:3.8, valign:"top" });

  // Right column: extracranial
  s.addShape(pres.ShapeType.rect, { x:5.18, y:0.92, w:4.5, h:4.35,
    fill:{color:"FFF8E7"}, line:{color:C.gold, pt:1} });
  s.addText("EXTRACRANIAL COURSE", { x:5.35, y:0.97, w:4.15, h:0.35,
    fontSize:11, bold:true, color:C.gold, fontFace:"Calibri", margin:0 });
  s.addText([
    bullet("Exits skull at stylomastoid foramen", 0),
    bullet("Gives posterior auricular nerve, branch to stylohyoid & posterior digastric", 0),
    bullet("Enters parotid gland — intimate relationship with parotid", 0),
    bullet("Within parotid → divides into upper & lower trunks", 0),
    bullet("Further branching and anastomosis within gland", 0),
    gap(),
    subhead("5 Terminal Branches (from parotid borders):"),
    bullet("T — Temporal", 0, true, C.navy),
    bullet("Z — Zygomatic", 0, true, C.navy),
    bullet("B — Buccal", 0, true, C.navy),
    bullet("M — Marginal Mandibular", 0, true, C.navy),
    bullet("C — Cervical", 0, true, C.navy),
    bullet("Mnemonic: 'To Zanzibar By Motor Car'", 0, false, C.teal),
  ], { x:5.35, y:1.32, w:4.15, h:3.8, valign:"top" });
  addSource(s, "Sources: Gray's Anatomy for Students; Cummings Otolaryngology 7e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — BRANCHES: TEMPORAL & ZYGOMATIC (OPHTHALMIC RELEVANCE)
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Ophthalmic Branches — Temporal & Zygomatic");
  s.addText([
    subhead("Temporal Branches"),
    bullet("Emerge from upper border of parotid gland", 0),
    bullet("Innervate:", 0),
    bullet("Frontalis muscle (brow elevation)", 1),
    bullet("Upper orbicularis oculi (upper lid closure)", 1),
    bullet("Corrugator supercilii", 1),
    bullet("Procerus", 1),
    bullet("Damage → brow ptosis, inability to wrinkle forehead, impaired upper lid closure", 0, false, C.red),
    gap(),
    subhead("Zygomatic Branches"),
    bullet("Emerge from upper/anterior border of parotid gland", 0),
    bullet("Innervate:", 0),
    bullet("Lower orbicularis oculi (lower lid closure, lacrimal pump)", 1),
    bullet("Zygomaticus major & minor (smile)", 1),
    bullet("Damage → lower lid droop, ectropion, lacrimal pump failure, epiphora", 0, false, C.red),
    bullet("Injury risk during blepharoplasty — dissection below orbicularis oculi risks zygomatic branch", 0, false, C.red),
    gap(),
    subhead("Clinical Pearl"),
    bullet("Both temporal and zygomatic branches must be intact for complete orbicularis oculi function", 0, true, C.teal),
    bullet("Loss of either alone can result in incomplete lid closure and corneal exposure", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Kanski's Clinical Ophthalmology 10e; Scott-Brown's Otorhinolaryngology Vol 2; Dermatology 5e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — GSPN: LACRIMAL GLAND INNERVATION
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Greater Superficial Petrosal Nerve — Lacrimal Innervation");
  s.addText([
    subhead("Pathway of Parasympathetic Secretomotor Fibers to Lacrimal Gland"),
    bullet("Pre-ganglionic parasympathetic fibers arise from Superior Salivatory Nucleus (pons)", 0),
    bullet("Travel with nervus intermedius (sensory root of CN VII)", 0),
    bullet("Reach geniculate ganglion — pre-ganglionic fibers exit as GSPN", 0),
    bullet("GSPN runs along middle cranial fossa floor through hiatus of facial canal", 0),
    bullet("Joins deep petrosal nerve (sympathetic from ICA) → Nerve of Pterygoid Canal (Vidian nerve)", 0),
    bullet("Enters pterygopalatine (sphenopalatine) ganglion — synapse occurs here", 0),
    bullet("Post-ganglionic fibers travel via zygomatic nerve (V2) → zygomaticotemporal branch → lacrimal nerve (V1) → lacrimal gland", 0),
    gap(),
    subhead("Ophthalmic Significance"),
    bullet("Lesion PROXIMAL to geniculate ganglion → decreased lacrimation (dry eye)", 0, true, C.red),
    bullet("Lesion DISTAL to geniculate ganglion → lacrimation relatively preserved", 0, true, C.teal),
    bullet("This localization is clinically useful in Bell's palsy and Ramsay Hunt syndrome", 0),
    bullet("Schirmer's test can be used to assess pre- vs. post-ganglionic lesions", 0),
    gap(),
    subhead("Crocodile Tears (Bogorad Syndrome)"),
    bullet("Aberrant regeneration: parasympathetic fibers originally for salivary glands re-innervate lacrimal gland", 0),
    bullet("Result: excessive tearing when eating (gustatory lacrimation)", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Cummings Otolaryngology 7e; Localization in Clinical Neurology 8e; Adams & Victor's Neurology 12e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — ORBICULARIS OCULI
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Orbicularis Oculi — Anatomy & Ophthalmic Importance");

  s.addShape(pres.ShapeType.rect, { x:0.38, y:0.92, w:4.5, h:4.35,
    fill:{color:"EBF5FB"}, line:{color:C.teal, pt:1} });
  s.addText("ANATOMY", { x:0.55, y:0.97, w:4.15, h:0.35,
    fontSize:11, bold:true, color:C.teal, fontFace:"Calibri", margin:0 });
  s.addText([
    bullet("Elliptical sphincter muscle surrounding orbit", 0),
    bullet("Three parts:", 0, true),
    bullet("Orbital part — voluntary tight eye closure", 1),
    bullet("Preseptal part — gentle blinking", 1),
    bullet("Pretarsal part — reflex blinking, lacrimal pump", 1),
    gap(),
    bullet("Innervated by temporal (upper) and zygomatic (lower) branches of CN VII", 0, true),
    bullet("Supplied by facial (angular) artery branches", 0),
    gap(),
    bullet("Functions:", 0, true),
    bullet("Protective lid closure", 1),
    bullet("Corneal lubrication through blinking", 1),
    bullet("Lacrimal pump (pretarsal): draws tears medially into puncta", 1),
    bullet("Expresses meibomian glands during blinking", 1),
  ], { x:0.55, y:1.32, w:4.15, h:3.8, valign:"top" });

  s.addShape(pres.ShapeType.rect, { x:5.18, y:0.92, w:4.5, h:4.35,
    fill:{color:"FFF0F0"}, line:{color:C.red, pt:1} });
  s.addText("CLINICAL IMPORTANCE", { x:5.35, y:0.97, w:4.15, h:0.35,
    fontSize:11, bold:true, color:C.red, fontFace:"Calibri", margin:0 });
  s.addText([
    bullet("Weakness/paralysis = lagophthalmos", 0, true, C.red),
    bullet("Cornea exposed during blinking & sleep", 1),
    bullet("Inferior cornea most vulnerable", 1),
    gap(),
    bullet("Loss of lacrimal pump → epiphora (overflow tearing despite possible dry eye)", 0),
    gap(),
    bullet("Bell's phenomenon — protective upward rotation of globe on attempted lid closure", 0, true, C.teal),
    bullet("Protective if present; dangerous exposure if absent or inverse", 1),
    gap(),
    bullet("Lower lid tone loss → paralytic ectropion", 0),
    bullet("Punctum displaced laterally → lacrimal drainage failure", 0),
    gap(),
    bullet("Risk from blepharoplasty — zygomatic branch runs just deep to orbicularis; injury causes lower lid palsy", 0, false, C.red),
  ], { x:5.35, y:1.32, w:4.15, h:3.8, valign:"top" });
  addSource(s, "Sources: Kanski's Clinical Ophthalmology 10e; Localization in Clinical Neurology 8e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — SECTION DIVIDER: PALSY
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  sectionBg(s);
  s.addShape(pres.ShapeType.rect, { x:0, y:2.2, w:10, h:0.1, fill:{color:C.gold} });
  s.addText("SECTION 2", { x:0.6, y:1.2, w:8.8, h:0.5, fontSize:14,
    color:C.tealLt, fontFace:"Calibri", align:"center", charSpacing:6 });
  s.addText("Facial Nerve Palsy", { x:0.6, y:1.7, w:8.8, h:0.9,
    fontSize:34, bold:true, color:C.white, fontFace:"Calibri", align:"center" });
  s.addText("Classification  •  Localization  •  Bell's Palsy  •  Ophthalmic Complications",
    { x:0.6, y:2.65, w:8.8, h:0.5, fontSize:14, color:C.grey, fontFace:"Calibri", align:"center" });
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — CLASSIFICATION & LOCALIZATION
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Facial Nerve Palsy — Classification & Lesion Localization");
  s.addText([
    subhead("A. Central (UMN) Lesion — Above Facial Nucleus"),
    bullet("Contralateral lower face weakness only", 0, true),
    bullet("Forehead wrinkling & eye closure preserved (bilateral cortical supply to upper face)", 0),
    bullet("Causes: cortical stroke, internal capsule lesion, tumor, parkinsonism", 0),
    gap(),
    subhead("B. Peripheral (LMN) Lesion — All types affect BOTH upper & lower face"),
    bullet("Brainstem (pons): ipsilateral CN VII + VI palsy ± corticospinal signs", 0, true, C.navy),
    bullet("CPA lesion: CN VII + VIII affected → deafness, tinnitus, dizziness", 0, true, C.navy),
    bullet("Internal auditory meatus: CN VII + VIII", 0, true, C.navy),
    bullet("Proximal to chorda tympani (in middle ear): taste loss + hyperacusis + decreased lacrimation", 0, true, C.navy),
    bullet("Distal to stylomastoid foramen: pure motor palsy (no taste/autonomic loss)", 0, true, C.navy),
    gap(),
    subhead("Topographic Localization by Associated Symptoms"),
    bullet("Decreased lacrimation → lesion proximal to GSPN (geniculate ganglion or above)", 0),
    bullet("Hyperacusis → nerve to stapedius involved (horizontal/mastoid segment)", 0),
    bullet("Taste loss alone (no hyperacusis) → distal to stapedial branch, proximal to chorda tympani", 0),
    bullet("Pure motor → stylomastoid foramen or beyond (e.g., parotid tumor)", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Harrison's Principles 22e; Wills Eye Manual 8e; Adams & Victor's Neurology 12e; Localization in Clinical Neurology 8e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — BELL'S PALSY
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Bell's Palsy — The Most Common Facial Palsy");

  s.addShape(pres.ShapeType.rect, { x:0.38, y:0.92, w:4.55, h:4.35,
    fill:{color:"EAF6FF"}, line:{color:C.teal, pt:1} });
  s.addText("EPIDEMIOLOGY & PATHOPHYSIOLOGY", { x:0.52, y:0.97, w:4.25, h:0.35,
    fontSize:10.5, bold:true, color:C.teal, fontFace:"Calibri", margin:0 });
  s.addText([
    bullet("Incidence: ~25 per 100,000/year (~1 in 60 in a lifetime)", 0),
    bullet("Affects all ages, both sexes equally", 0),
    bullet("Risk factors: pregnancy (3rd trimester), diabetes mellitus, hypertension", 0),
    gap(),
    bullet("Pathophysiology: inflammation + viral-mediated neural edema within bony fallopian canal → nerve compression", 0),
    bullet("HSV-1 reactivation at geniculate ganglion — most evidence", 0, true),
    bullet("VZV — up to 1/3 of cases (Ramsay Hunt spectrum)", 0),
    bullet("Other: CMV, EBV, HIV seroconversion, SARS-CoV-2", 0),
    gap(),
    bullet("MRI: linear gadolinium enhancement from distal IAC through labyrinthine segment + geniculate ganglion", 0),
  ], { x:0.52, y:1.32, w:4.25, h:3.75, valign:"top" });

  s.addShape(pres.ShapeType.rect, { x:5.2, y:0.92, w:4.45, h:4.35,
    fill:{color:"FFF5E6"}, line:{color:C.gold, pt:1} });
  s.addText("CLINICAL FEATURES & PROGNOSIS", { x:5.35, y:0.97, w:4.15, h:0.35,
    fontSize:10.5, bold:true, color:C.gold, fontFace:"Calibri", margin:0 });
  s.addText([
    bullet("Onset: abrupt — max weakness usually within 48 hours (all within 3-4 days)", 0),
    bullet("Retroauricular pain may precede paralysis by 1-2 days", 0),
    bullet("ALL facial muscles affected (both upper and lower face)", 0, true, C.red),
    gap(),
    bullet("Associated features:", 0, true),
    bullet("Taste loss (anterior 2/3 tongue) — chorda tympani involvement", 1),
    bullet("Hyperacusis — stapedius involvement", 1),
    bullet("Decreased lacrimation — GSPN involvement", 1),
    bullet("Lagophthalmos + incomplete eye closure", 1),
    gap(),
    bullet("Prognosis:", 0, true, C.green),
    bullet("~80% recover fully within few weeks to months (Harrison's)", 0, false, C.green),
    bullet("Early motor recovery in first 5-7 days: most favorable sign", 0, false, C.green),
    bullet("Recurrence in ~7% of cases", 0),
    bullet("Denervation on EMG at 10 days → worse prognosis", 0),
  ], { x:5.35, y:1.32, w:4.15, h:3.75, valign:"top" });
  addSource(s, "Sources: Harrison's Principles 22e; Adams & Victor's Neurology 12e; Localization in Clinical Neurology 8e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — OPHTHALMIC COMPLICATIONS: LAGOPHTHALMOS & EXPOSURE KERATOPATHY
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Ophthalmic Complications — Lagophthalmos & Exposure Keratopathy");
  s.addText([
    subhead("Lagophthalmos — Incomplete Lid Closure"),
    bullet("Direct result of orbicularis oculi weakness (temporal + zygomatic branch involvement)", 0),
    bullet("May only manifest during gentle blinking — full forced closure can be intact initially", 0),
    bullet("Nocturnal lagophthalmos — cornea exposed during sleep even when daytime closure seems adequate", 0, false, C.red),
    bullet("Bell's phenomenon: upward rotation of globe on attempted closure — protective if present", 0, true, C.teal),
    bullet("Poor or inverse Bell's phenomenon: severe corneal exposure risk", 0, true, C.red),
    gap(),
    subhead("Exposure Keratopathy — Stages"),
    bullet("Mild: Punctate epithelial erosions (PEE), especially inferior 1/3 of cornea", 0),
    bullet("Moderate: Epithelial breakdown (frank erosion)", 0),
    bullet("Severe: Stromal melting → risk of perforation", 0, false, C.red),
    bullet("Chronic: Inferior fibrovascular pannus with Salzmann nodular degeneration", 0),
    bullet("Secondary bacterial infection can occur at any stage", 0, false, C.red),
    gap(),
    subhead("Paralytic Ectropion"),
    bullet("Orbicularis weakness → lower lid laxity and sag → ectropion", 0),
    bullet("Punctum displaced laterally → lacrimal pump failure → epiphora (despite possible dry eye simultaneously)", 0),
    bullet("Upper and lower lid retraction + brow ptosis (may mimic narrowed palpebral aperture)", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Kanski's Clinical Ophthalmology 10e; Localization in Clinical Neurology 8e; Wills Eye Manual 8e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — ABERRANT REGENERATION
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Aberrant Regeneration of CN VII — Ophthalmic Manifestations");
  s.addText([
    subhead("Synkinesis"),
    bullet("Misdirected regrowth of motor axons following incomplete recovery", 0),
    bullet("Orbicularis oculi ↔ orbicularis oris synkinesis: eye closes when patient smiles or opens mouth", 0, true),
    bullet("Jaw-opening synkinesis: jaw opening → eyelid closure on affected side", 0, true),
    bullet("Implies chronicity of the nerve injury", 0, false, C.grey),
    gap(),
    subhead("'Crocodile Tears' — Bogorad Syndrome"),
    bullet("Parasympathetic fibers originally supplying submandibular/sublingual salivary glands regrow to lacrimal gland", 0),
    bullet("Result: gustatory lacrimation — patient tears excessively when eating or smelling food", 0, true, C.teal),
    bullet("Also called 'paradoxical gustatory lacrimation'", 0),
    bullet("Can be treated with BTX injection into lacrimal gland or anticholinergic eye drops", 0),
    gap(),
    subhead("Other Sequelae"),
    bullet("Hemifacial spasm: continuous diffuse contraction of all facial muscles on affected side", 0),
    bullet("Facial myokymia: rippling worm-like muscle contractions under the skin", 0),
    bullet("Continuous contraction may narrow palpebral fissure and deepen nasolabial fold", 0),
    bullet("Blepharospasm-like activity on the involved side", 0),
    gap(),
    subhead("Frey's Syndrome"),
    bullet("Parasympathetic fibers to parotid re-innervate sweat glands: gustatory sweating over cheek", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Adams & Victor's Neurology 12e; Harrison's Principles 22e; Localization in Clinical Neurology 8e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — DIFFERENTIAL DIAGNOSIS
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Differential Diagnosis of Facial Nerve Palsy");
  s.addText([
    subhead("Infectious"),
    bullet("Bell's palsy (HSV-1 reactivation) — most common", 0, true, C.teal),
    bullet("Ramsay Hunt syndrome — VZV reactivation; vesicular rash in EAC, pinna, palate ± CN VIII symptoms", 0),
    bullet("Lyme disease (Borrelia burgdorferi) — can cause bilateral palsy; ≥10% of cases in endemic areas", 0),
    bullet("Otitis media / mastoiditis — bacterial extension", 0),
    bullet("HIV seroconversion, EBV, CMV, SARS-CoV-2", 0),
    gap(),
    subhead("Neoplastic"),
    bullet("Parotid malignancy — occult tumors can present as acute facial palsy", 0),
    bullet("Acoustic neuroma / vestibular schwannoma at CPA", 0),
    bullet("Temporal bone metastases", 0),
    bullet("Cholesteatoma eroding fallopian canal", 0),
    gap(),
    subhead("Inflammatory / Systemic"),
    bullet("Sarcoidosis (Heerfordt syndrome: uveitis + parotitis + facial palsy)", 0),
    bullet("Guillain-Barre syndrome — ascending motor neuropathy; may cause bilateral facial palsy", 0),
    bullet("Melkersson-Rosenthal syndrome: recurrent facial palsy + facial edema + fissured tongue", 0),
    bullet("Vasculitis, autoimmune (rheumatoid arthritis, SLE)", 0),
    gap(),
    subhead("Traumatic / Iatrogenic"),
    bullet("Temporal bone fracture, birth trauma, parotid surgery", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Harrison's Principles 22e; Wills Eye Manual 8e; Adams & Victor's Neurology 12e; Localization in Clinical Neurology 8e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 16 — OCULAR MANAGEMENT
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Ophthalmic Management — Corneal Protection");
  s.addText([
    subhead("Step-Wise Approach Based on Severity of Exposure"),
    gap(),
    { text:"MILD EXPOSURE KERATITIS", options:{fontSize:13, bold:true, color:C.tealLt, fontFace:"Calibri", breakLine:true} },
    bullet("Preservative-free artificial tears QID", 0),
    bullet("Lubricating ointment (e.g., lacrilube) at bedtime", 0),
    bullet("Lid taping during sleep as alternative", 0),
    gap(),
    { text:"MODERATE EXPOSURE KERATITIS", options:{fontSize:13, bold:true, color:C.gold, fontFace:"Calibri", breakLine:true} },
    bullet("PF artificial tears / gel / ointment every 1-2 hours", 0),
    bullet("Moisture chamber spectacles during day", 0),
    bullet("Tape tarsorrhaphy or moisture chamber with ointment at night", 0),
    bullet("Consider temporary tarsorrhaphy", 0),
    bullet("Botulinum toxin injection into levator to induce temporary ptosis (Kanski)", 0, false, C.teal),
    gap(),
    { text:"SEVERE EXPOSURE KERATITIS", options:{fontSize:13, bold:true, color:C.red, fontFace:"Calibri", breakLine:true} },
    bullet("Temporary or permanent tarsorrhaphy", 0),
    bullet("Gold/platinum weight implantation into upper lid", 0),
    bullet("Platinum preferred: less bulky, better contour, less revision surgery (Kanski)", 0, false, C.teal),
    gap(),
    subhead("Bell's Palsy Systemic Treatment"),
    bullet("Prednisone 60 mg/day × 7 days then taper — increases likelihood of complete recovery (Wills Eye)", 0, true),
    bullet("Antivirals (acyclovir/valacyclovir) with steroids — benefit not definitively established", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Kanski's Clinical Ophthalmology 10e; Wills Eye Manual 8e; Harrison's Principles 22e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 17 — SURGICAL INTERVENTIONS
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Surgical Interventions for Facial Nerve Palsy — Ophthalmic Perspective");
  s.addText([
    subhead("Indications for Surgical Management"),
    bullet("Irreversible facial nerve damage (e.g., post-vestibular schwannoma resection)", 0),
    bullet("No further improvement in Bell's palsy after 6-12 months", 0),
    gap(),
    subhead("Eyelid Surgery"),
    bullet("Medial canthoplasty — eyelids sutured medial to lacrimal puncta; inverts puncta, shortens inner canthal fissure", 0, true),
    bullet("Lateral canthal sling / tarsal strip — corrects residual ectropion, raises lateral canthus", 0, true),
    bullet("Upper eyelid lowering by levator disinsertion", 0, true),
    bullet("Gold/platinum weight implantation in upper lid (platinum preferred)", 0, true),
    bullet("Small lateral tarsorrhaphy — adjunct to lid loading", 0, true),
    gap(),
    subhead("Dynamic Reinnervation Procedures"),
    bullet("Facial nerve grafting (sural nerve, great auricular nerve)", 0),
    bullet("Hypoglossal-facial anastomosis (CN XII to VII reanastomosis)", 0),
    bullet("Temporalis muscle transposition — provides dynamic lid closure", 0),
    bullet("Muscle transfer for upper eyelid reanimation — indicated when orbicularis denervated >18 months", 0),
    gap(),
    subhead("Corneal Neurotization"),
    bullet("For neurotrophic keratopathy — sural nerve graft connecting contralateral supratrochlear nerve to cornea", 0),
    bullet("Sensation returns 6-8 months post-operatively (Kanski)", 0, false, C.teal),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Kanski's Clinical Ophthalmology 10e; Wills Eye Manual 8e; Cummings Otolaryngology 7e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 18 — WORKUP & INVESTIGATIONS
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Workup & Investigations");
  s.addText([
    subhead("When to Investigate (Wills Eye Manual)"),
    bullet("Typical Bell's palsy with appropriate history: imaging NOT required initially", 0),
    bullet("Imaging required if:", 0, true, C.red),
    bullet("Any associated neurologic signs", 1),
    bullet("History of malignancy", 1),
    bullet("Duration >3 months without recovery", 1),
    bullet("CN VI palsy → brain MRI (brainstem)", 1),
    bullet("CN VIII involvement → CPA imaging (acoustic neuroma)", 1),
    bullet("Multiple cranial nerve palsy → skull base / cavernous sinus imaging", 1),
    gap(),
    subhead("Electrophysiology"),
    bullet("Electroneuronography (ENoG): >90% degeneration at 14 days → poor prognosis → consider surgical decompression", 0),
    bullet("EMG: denervation potentials at 10 days → axonal degeneration; delay of 3 months before regeneration", 0),
    gap(),
    subhead("Laboratory Tests"),
    bullet("Lyme disease serology (ELISA then Western blot) in endemic areas", 0),
    bullet("CBC, FTA-ABS, RPR / VDRL (syphilis) depending on clinical suspicion", 0),
    bullet("ACE level + chest X-ray/CT if sarcoidosis suspected", 0),
    bullet("ANA, RF, ANCA if collagen-vascular disease suspected", 0),
    gap(),
    subhead("Ocular-Specific Tests"),
    bullet("Schirmer's test: reduced (<10mm/5min) suggests proximal lesion affecting GSPN", 0),
    bullet("Slit-lamp: corneal staining (fluorescein), assess corneal sensation", 0),
  ], { x:0.38, y:0.95, w:9.3, h:4.45, valign:"top" });
  addSource(s, "Sources: Wills Eye Manual 8e; Harrison's Principles 22e; Adams & Victor's Neurology 12e");
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 19 — SUMMARY TABLE
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  addTitle(s, "Summary — Facial Nerve & Ophthalmology at a Glance");

  const rows = [
    [
      {text:"Structure/Feature", options:{bold:true, color:C.white, fill:C.navy, fontSize:10.5}},
      {text:"CN VII Involvement", options:{bold:true, color:C.white, fill:C.navy, fontSize:10.5}},
      {text:"Ophthalmic Consequence", options:{bold:true, color:C.white, fill:C.navy, fontSize:10.5}},
    ],
    [
      {text:"Orbicularis oculi", options:{bold:false, fontSize:10}},
      {text:"Temporal + Zygomatic branches", options:{fontSize:10}},
      {text:"Lagophthalmos, corneal exposure, paralytic ectropion", options:{fontSize:10}},
    ],
    [
      {text:"Lacrimal gland", options:{fontSize:10}},
      {text:"GSPN → pterygopalatine ganglion", options:{fontSize:10}},
      {text:"Decreased lacrimation (dry eye) in proximal lesions", options:{fontSize:10}},
    ],
    [
      {text:"Lacrimal pump", options:{fontSize:10}},
      {text:"Pretarsal orbicularis (temporal/zygomatic)", options:{fontSize:10}},
      {text:"Epiphora (overflow tearing despite dry eye)", options:{fontSize:10}},
    ],
    [
      {text:"Bell's palsy (acute)", options:{fontSize:10}},
      {text:"All branches (LMN)", options:{fontSize:10}},
      {text:"Lagophthalmos, exposure keratopathy, reduced tears", options:{fontSize:10}},
    ],
    [
      {text:"Ramsay Hunt", options:{fontSize:10}},
      {text:"Geniculate ganglion (VZV)", options:{fontSize:10}},
      {text:"Severe palsy + ear vesicles + CN VIII symptoms", options:{fontSize:10}},
    ],
    [
      {text:"Synkinesis", options:{fontSize:10}},
      {text:"Aberrant axon regeneration", options:{fontSize:10}},
      {text:"Eye closure on smiling (orbicularis-oris synkinesis)", options:{fontSize:10}},
    ],
    [
      {text:"Crocodile tears", options:{fontSize:10}},
      {text:"Aberrant parasympathetic rerouting", options:{fontSize:10}},
      {text:"Gustatory lacrimation (Bogorad syndrome)", options:{fontSize:10}},
    ],
    [
      {text:"Central (UMN) lesion", options:{fontSize:10}},
      {text:"Above facial nucleus", options:{fontSize:10}},
      {text:"Lower face only — eye closure intact", options:{fontSize:10}},
    ],
  ];

  s.addTable(rows, {
    x: 0.35, y: 0.98, w: 9.3, h: 4.35,
    border: {type:"solid", color:C.grey, pt:0.5},
    rowH: 0.47,
    colW: [2.3, 3.2, 3.8],
    fontFace: "Calibri",
    valign: "middle",
    fill: "FFFFFF",
    color: C.navy,
  });
}

// ════════════════════════════════════════════════════════════════════════════════
// SLIDE 20 — CLOSING
// ════════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:C.navy} });
  s.addShape(pres.ShapeType.rect, { x:0, y:2.8, w:10, h:0.08, fill:{color:C.teal} });
  s.addText("Key Takeaways", { x:0.6, y:0.5, w:8.8, h:0.55,
    fontSize:26, bold:true, color:C.gold, fontFace:"Calibri", align:"center", charSpacing:2 });

  const pts = [
    "CN VII is a mixed nerve — motor, parasympathetic, taste, and somatic sensation.",
    "Temporal & zygomatic branches directly supply orbicularis oculi — their loss causes lagophthalmos.",
    "GSPN carries parasympathetics to the lacrimal gland — proximal lesions impair tear production.",
    "Central palsy spares the eye; peripheral palsy affects it — distinguish by forehead/brow involvement.",
    "Bell's palsy is idiopathic (HSV-1); 80% recover fully. Ocular protection is the ophthalmologist's priority.",
    "Exposure keratopathy management is graded: lubricants → tarsorrhaphy → gold/platinum weight implant.",
    "Aberrant regeneration causes synkinesis, crocodile tears, and hemifacial spasm.",
    "Always evaluate Bell's phenomenon — absence dramatically increases corneal risk.",
  ];

  s.addText(pts.map(t => ({ text: t, options: {
    bullet: {char:"▸", color: C.tealLt},
    fontSize: 13, color: C.offwht, fontFace:"Calibri", breakLine:true,
  }})), { x:0.7, y:1.2, w:8.6, h:1.5, valign:"top" });

  s.addText("References", { x:0.6, y:3.0, w:8.8, h:0.35,
    fontSize:12, bold:true, color:C.teal, fontFace:"Calibri" });
  const refs = [
    "Kanski's Clinical Ophthalmology: A Systematic Approach, 10e (Elsevier 2023)",
    "Wills Eye Manual: Office and Emergency Room Diagnosis and Treatment, 8e",
    "Harrison's Principles of Internal Medicine, 22e (McGraw Hill 2025)",
    "Adams and Victor's Principles of Neurology, 12e",
    "Localization in Clinical Neurology, 8e (Brazis et al.)",
    "Cummings Otolaryngology Head & Neck Surgery, 7e",
    "Gray's Anatomy for Students (Elsevier 2023)",
  ];
  s.addText(refs.map((r,i) => ({ text:`${i+1}. ${r}`, options:{
    fontSize:9.5, color:C.grey, fontFace:"Calibri", breakLine:true
  }})), { x:0.6, y:3.35, w:8.8, h:2.1, valign:"top" });
}

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/facial-nerve-ppt/Facial_Nerve_Ophthalmology.pptx" })
  .then(() => console.log("✅  Saved: Facial_Nerve_Ophthalmology.pptx"))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/facial-nerve-ppt && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/facial-nerve-ppt/

Your presentation is ready:

Facial Nerve Ophthalmology

Presentation · PPTX


What's Inside (20 Slides)

The deck uses a professional navy/teal/gold color scheme sourced entirely from standard textbooks (Kanski, Wills Eye Manual, Harrison's, Adams & Victor, Cummings, Gray's, Localization in Clinical Neurology).
SlideTopic
1Title slide
2Table of Contents
3Section Divider — Anatomy
4Functional Components of CN VII (SVE, GVE, SVA, GSA, GVA)
5Nuclei & Central Connections — UMN vs LMN distinction
6Course of Facial Nerve — Fallopian canal segments + 5 terminal branches
7Temporal & Zygomatic branches — direct ophthalmic relevance
8Greater Superficial Petrosal Nerve — full lacrimal innervation pathway + crocodile tears
9Orbicularis Oculi — anatomy, functions, Bell's phenomenon
10Section Divider — Palsy
11Classification & Topographic Localization
12Bell's Palsy — epidemiology, HSV-1 pathophysiology, prognosis (two-column)
13Lagophthalmos, Exposure Keratopathy (graded stages), Paralytic Ectropion
14Aberrant Regeneration — Synkinesis, Bogorad Syndrome, Frey's
15Differential Diagnosis — Infectious / Neoplastic / Inflammatory / Traumatic
16Ocular Management — lubricants → BTX → tarsorrhaphy → lid weights
17Surgical Interventions — canthoplasty, gold/platinum weights, nerve grafts, corneal neurotization
18Investigations — EMG/ENoG, Schirmer's, Lyme, MRI indications
19Summary Table — 9-row reference table across all key correlations
20Key Takeaways + Full References
This is a shared conversation. Sign in to Orris to start your own chat.