Generate mind map on middle ear and inner ear pathology and disease

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
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/ear-pathology-mindmap

Writing File

~/ear-pathology-mindmap/build.js

const pptxgen = require("pptxgenjs");

let pres = new pptxgen();
pres.layout = 'LAYOUT_WIDE'; // 13.3" x 7.5"
pres.title = 'Middle Ear & Inner Ear Pathology Mind Map';

// ─── COLOR PALETTE ─────────────────────────────────────────────────────────
const C = {
  bg:        "0D1B2A",   // deep navy background
  center:    "E63946",   // red – center node
  midEar:    "2196F3",   // vivid blue – middle ear branch
  innerEar:  "00BFA5",   // teal – inner ear branch
  midSub:    "64B5F6",   // light blue – middle ear sub-nodes
  innerSub:  "80CBC4",   // light teal – inner ear sub-nodes
  detail:    "FFB703",   // amber – detail pills
  lineM:     "2196F3",
  lineI:     "00BFA5",
  white:     "FFFFFF",
  offWhite:  "E8EEF4",
  darkText:  "0D1B2A",
};

// ─── SLIDE 1: TITLE ────────────────────────────────────────────────────────
let s1 = pres.addSlide();
s1.background = { color: C.bg };

// Big gradient bar
s1.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.18, fill:{ color: C.midEar } });
s1.addShape(pres.shapes.RECTANGLE, { x:0, y:7.32, w:13.3, h:0.18, fill:{ color: C.innerEar } });

s1.addText("MIDDLE EAR & INNER EAR", {
  x:0.5, y:1.6, w:12.3, h:1.1,
  fontSize:52, bold:true, color:C.white, align:"center", fontFace:"Calibri",
  glow:{ size:18, opacity:0.4, color:C.midEar }
});
s1.addText("PATHOLOGY & DISEASE", {
  x:0.5, y:2.7, w:12.3, h:1.0,
  fontSize:52, bold:true, color:C.innerEar, align:"center", fontFace:"Calibri"
});
s1.addText("Comprehensive Mind Map", {
  x:0.5, y:3.85, w:12.3, h:0.55,
  fontSize:22, italic:true, color:"AABBCC", align:"center", fontFace:"Calibri"
});
s1.addText("Sources: Cummings Otolaryngology · Scott-Brown's ORL · KJ Lee's Essential Otolaryngology · Rosen's Emergency Medicine", {
  x:0.5, y:6.8, w:12.3, h:0.45,
  fontSize:11, color:"7799BB", align:"center", fontFace:"Calibri"
});

// Decorative ear icon (abstract circles)
s1.addShape(pres.shapes.OVAL, { x:5.9, y:4.6, w:1.5, h:1.5, fill:{color:C.center, transparency:75}, line:{color:C.center, width:2} });
s1.addShape(pres.shapes.OVAL, { x:6.2, y:4.9, w:0.9, h:0.9, fill:{color:C.midEar, transparency:50}, line:{color:C.midEar, width:2} });
s1.addShape(pres.shapes.OVAL, { x:6.4, y:5.1, w:0.5, h:0.5, fill:{color:C.innerEar, transparency:30} });


// ─── HELPER: draw a rounded node ──────────────────────────────────────────
function node(slide, x, y, w, h, label, fillColor, textColor, fontSize, bold) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x, y, w, h,
    fill: { color: fillColor },
    rectRadius: 0.12,
    shadow: { type:"outer", color:"000000", blur:8, offset:3, angle:135, opacity:0.25 }
  });
  slide.addText(label, {
    x, y, w, h,
    fontSize: fontSize || 10,
    bold: bold !== false,
    color: textColor || C.white,
    align:"center", valign:"middle", fontFace:"Calibri",
    margin: 2
  });
}

// ─── HELPER: draw a line ──────────────────────────────────────────────────
function line(slide, x1, y1, x2, y2, color, width) {
  slide.addShape(pres.shapes.LINE, {
    x: x1, y: y1,
    w: x2 - x1,
    h: y2 - y1,
    line: { color: color || C.white, width: width || 1.5, transparency: 40 }
  });
}

// ─── SLIDE 2: MIDDLE EAR MIND MAP ─────────────────────────────────────────
let s2 = pres.addSlide();
s2.background = { color: C.bg };

// Title bar
s2.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.45, fill:{color:C.midEar} });
s2.addText("MIDDLE EAR PATHOLOGY", {
  x:0.1, y:0.04, w:13.1, h:0.38,
  fontSize:18, bold:true, color:C.white, fontFace:"Calibri"
});

// CENTER NODE
node(s2, 5.4, 3.2, 2.5, 0.85, "MIDDLE EAR\nPATHOLOGY", C.center, C.white, 13, true);

// ── BRANCH 1: OTITIS MEDIA (top-left)
line(s2, 5.4, 3.45, 3.8, 1.5, C.midEar, 2);
node(s2, 2.8, 1.1, 2.0, 0.72, "OTITIS MEDIA", C.midEar, C.white, 11, true);
// sub-nodes
line(s2, 2.8, 1.46, 1.0, 0.85, C.midSub, 1.2);
node(s2, 0.0, 0.55, 2.2, 0.6, "Acute OM (AOM)\nS. pneumoniae, H. flu, M. cat.", C.midSub, C.darkText, 8, false);
line(s2, 2.8, 1.46, 0.9, 1.55, C.midSub, 1.2);
node(s2, 0.0, 1.3, 2.0, 0.6, "OM with Effusion\n(Glue Ear / Serous)", C.midSub, C.darkText, 8, false);
line(s2, 2.8, 1.46, 1.0, 2.25, C.midSub, 1.2);
node(s2, 0.0, 2.0, 2.1, 0.6, "Chronic Suppurative OM\n(CSOM) – tubo-tympanic / atticoantral", C.midSub, C.darkText, 7.5, false);
line(s2, 2.8, 1.46, 1.9, 2.9, C.midSub, 1.2);
node(s2, 0.8, 2.75, 1.8, 0.55, "Bullous Myringitis\n(viral / Mycoplasma)", C.midSub, C.darkText, 8, false);

// ── BRANCH 2: CHOLESTEATOMA (top-right)
line(s2, 7.9, 3.45, 9.5, 1.5, C.midEar, 2);
node(s2, 8.5, 1.1, 2.3, 0.72, "CHOLESTEATOMA", C.midEar, C.white, 11, true);
line(s2, 10.8, 1.46, 11.0, 0.6, C.midSub, 1.2);
node(s2, 10.8, 0.3, 2.4, 0.55, "Congenital: TM intact,\nno prior infection", C.midSub, C.darkText, 8, false);
line(s2, 10.8, 1.46, 11.0, 1.4, C.midSub, 1.2);
node(s2, 10.8, 1.1, 2.4, 0.55, "Acquired: pars flaccida /\npars tensa retraction", C.midSub, C.darkText, 8, false);
line(s2, 10.8, 1.46, 11.0, 2.15, C.midSub, 1.2);
node(s2, 10.8, 1.9, 2.4, 0.55, "Complications: SNHL,\nfacial palsy, intracranial", C.midSub, C.darkText, 8, false);
line(s2, 10.8, 1.46, 11.0, 2.85, C.midSub, 1.2);
node(s2, 10.8, 2.65, 2.4, 0.55, "Rx: CWU vs CWD surgery,\nendoscopic approach", C.midSub, C.darkText, 8, false);

// ── BRANCH 3: TYMPANIC MEMBRANE DISORDERS (left)
line(s2, 5.4, 3.62, 3.3, 3.62, C.midEar, 2);
node(s2, 1.7, 3.28, 2.6, 0.72, "TM DISORDERS", C.midEar, C.white, 11, true);
line(s2, 1.7, 3.64, 0.5, 2.95, C.midSub, 1.2);
node(s2, 0.0, 2.65, 1.9, 0.55, "Perforation:\nTrauma / OM", C.midSub, C.darkText, 8, false);
line(s2, 1.7, 3.64, 0.4, 3.64, C.midSub, 1.2);
node(s2, 0.0, 3.38, 1.9, 0.55, "Myringosclerosis /\nTympanosclerosis", C.midSub, C.darkText, 8, false);
line(s2, 1.7, 3.64, 0.5, 4.35, C.midSub, 1.2);
node(s2, 0.0, 4.1, 1.9, 0.55, "Atelectasis /\nRetraction Pocket", C.midSub, C.darkText, 8, false);

// ── BRANCH 4: MASTOIDITIS (bottom-left)
line(s2, 5.4, 3.85, 3.8, 5.2, C.midEar, 2);
node(s2, 2.8, 5.0, 2.0, 0.72, "MASTOIDITIS", C.midEar, C.white, 11, true);
line(s2, 2.8, 5.36, 1.0, 4.8, C.midSub, 1.2);
node(s2, 0.0, 4.55, 2.2, 0.55, "Acute Coalescent\nMastoiditis (AOM compl.)", C.midSub, C.darkText, 8, false);
line(s2, 2.8, 5.36, 0.9, 5.55, C.midSub, 1.2);
node(s2, 0.0, 5.3, 2.0, 0.55, "Bezold's Abscess\n(neck extension)", C.midSub, C.darkText, 8, false);
line(s2, 2.8, 5.36, 1.0, 6.25, C.midSub, 1.2);
node(s2, 0.0, 6.0, 2.1, 0.55, "CT scan: bony erosion;\nRx: IV abx + mastoidectomy", C.midSub, C.darkText, 7.5, false);

// ── BRANCH 5: OTOSCLEROSIS (right)
line(s2, 7.9, 3.62, 9.5, 3.62, C.midEar, 2);
node(s2, 9.5, 3.28, 2.3, 0.72, "OTOSCLEROSIS", C.midEar, C.white, 11, true);
line(s2, 11.8, 3.64, 11.9, 2.95, C.midSub, 1.2);
node(s2, 10.9, 2.65, 2.3, 0.55, "Fixation of stapes\nfootplate (CHL)", C.midSub, C.darkText, 8, false);
line(s2, 11.8, 3.64, 11.9, 3.62, C.midSub, 1.2);
node(s2, 10.9, 3.35, 2.3, 0.55, "AD inheritance,\nFemale > Male", C.midSub, C.darkText, 8, false);
line(s2, 11.8, 3.64, 11.9, 4.35, C.midSub, 1.2);
node(s2, 10.9, 4.1, 2.3, 0.55, "Rx: Stapedectomy /\nStapedotomy; Hearing aid", C.midSub, C.darkText, 8, false);

// ── BRANCH 6: COMPLICATIONS (bottom-right)
line(s2, 7.9, 3.85, 9.5, 5.2, C.midEar, 2);
node(s2, 8.5, 5.0, 2.5, 0.72, "COMPLICATIONS", C.midEar, C.white, 11, true);
line(s2, 10.7, 5.36, 11.0, 4.65, C.midSub, 1.2);
node(s2, 10.8, 4.4, 2.4, 0.55, "Intracranial: meningitis,\nbrain abscess, lateral sinus thrombosis", C.midSub, C.darkText, 7, false);
line(s2, 10.7, 5.36, 11.0, 5.36, C.midSub, 1.2);
node(s2, 10.8, 5.1, 2.4, 0.55, "Extracranial: mastoiditis,\nfacial nerve palsy", C.midSub, C.darkText, 8, false);
line(s2, 10.7, 5.36, 11.0, 6.1, C.midSub, 1.2);
node(s2, 10.8, 5.85, 2.4, 0.55, "Labyrinthine fistula\n(lateral SCC, 10-15%)", C.midSub, C.darkText, 8, false);

// ── BRANCH 7: EUSTACHIAN TUBE DYSFUNCTION (bottom)
line(s2, 6.65, 4.05, 6.65, 5.2, C.midEar, 2);
node(s2, 5.5, 5.2, 2.3, 0.72, "EUSTACHIAN TUBE\nDYSFUNCTION", C.midEar, C.white, 9, true);
line(s2, 6.65, 5.92, 5.5, 6.55, C.midSub, 1.2);
node(s2, 4.2, 6.35, 2.2, 0.55, "Obstructive ETD: OM,\naural fullness, retraction", C.midSub, C.darkText, 8, false);
line(s2, 6.65, 5.92, 7.8, 6.55, C.midSub, 1.2);
node(s2, 7.5, 6.35, 2.2, 0.55, "Patulous ETD: autophony,\nbreathing-synchronous\ntinnitus", C.midSub, C.darkText, 7.5, false);

// Footnote
s2.addText("CHL = Conductive Hearing Loss  |  CWU = Canal Wall Up  |  CWD = Canal Wall Down  |  SCC = Semicircular Canal", {
  x:0.2, y:7.15, w:12.9, h:0.3,
  fontSize:8, color:"7799BB", fontFace:"Calibri", align:"center"
});


// ─── SLIDE 3: INNER EAR MIND MAP ──────────────────────────────────────────
let s3 = pres.addSlide();
s3.background = { color: C.bg };

// Title bar
s3.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.45, fill:{color:C.innerEar} });
s3.addText("INNER EAR PATHOLOGY", {
  x:0.1, y:0.04, w:13.1, h:0.38,
  fontSize:18, bold:true, color:C.white, fontFace:"Calibri"
});

// CENTER NODE
node(s3, 5.4, 3.2, 2.5, 0.85, "INNER EAR\nPATHOLOGY", "008080", C.white, 13, true);

// ── BRANCH 1: MENIERE DISEASE (top-left)
line(s3, 5.4, 3.45, 3.8, 1.5, C.innerEar, 2);
node(s3, 2.5, 1.1, 2.35, 0.72, "MÉNIÈRE DISEASE", C.innerEar, C.white, 11, true);
line(s3, 2.5, 1.46, 0.8, 0.6, C.innerSub, 1.2);
node(s3, 0.0, 0.32, 2.4, 0.55, "Endolymphatic hydrops;\nEpisodic vertigo + SNHL + tinnitus + aural fullness", C.innerSub, C.darkText, 7, false);
line(s3, 2.5, 1.46, 0.7, 1.5, C.innerSub, 1.2);
node(s3, 0.0, 1.25, 2.2, 0.55, "Stages: early (fluctuating\nhearing), late (permanent SNHL)", C.innerSub, C.darkText, 7.5, false);
line(s3, 2.5, 1.46, 0.9, 2.3, C.innerSub, 1.2);
node(s3, 0.0, 2.05, 2.4, 0.55, "Rx: low-salt diet, diuretics,\nIT gentamicin, endolymphatic\nsac surgery", C.innerSub, C.darkText, 7, false);
line(s3, 2.5, 1.46, 1.6, 2.9, C.innerSub, 1.2);
node(s3, 0.5, 2.75, 2.0, 0.55, "Electrocochleography:\nSP:AP ratio > 0.4", C.innerSub, C.darkText, 7.5, false);

// ── BRANCH 2: VESTIBULAR SCHWANNOMA (top-right)
line(s3, 7.9, 3.45, 9.5, 1.5, C.innerEar, 2);
node(s3, 8.6, 1.1, 2.7, 0.72, "VESTIBULAR SCHWANNOMA\n(Acoustic Neuroma)", C.innerEar, C.white, 9.5, true);
line(s3, 11.3, 1.46, 11.0, 0.5, C.innerSub, 1.2);
node(s3, 10.8, 0.22, 2.4, 0.55, "Most common IAC/CPA tumor;\n1:100,000 incidence", C.innerSub, C.darkText, 7.5, false);
line(s3, 11.3, 1.46, 11.1, 1.4, C.innerSub, 1.2);
node(s3, 10.8, 1.12, 2.4, 0.55, "Antoni A (fibrillary) &\nAntoni B (reticular) histology", C.innerSub, C.darkText, 7.5, false);
line(s3, 11.3, 1.46, 11.1, 2.2, C.innerSub, 1.2);
node(s3, 10.8, 1.95, 2.4, 0.55, "Asymmetric SNHL, tinnitus,\nimbalance; MRI + Gd = gold std.", C.innerSub, C.darkText, 7.5, false);
line(s3, 11.3, 1.46, 11.1, 2.9, C.innerSub, 1.2);
node(s3, 10.8, 2.65, 2.4, 0.55, "Rx: observe / stereotactic\nradiosurgery / microsurgery", C.innerSub, C.darkText, 7.5, false);

// ── BRANCH 3: BPPV (left)
line(s3, 5.4, 3.62, 3.3, 3.62, C.innerEar, 2);
node(s3, 1.9, 3.28, 2.4, 0.72, "BPPV", C.innerEar, C.white, 12, true);
line(s3, 1.9, 3.64, 0.5, 2.9, C.innerSub, 1.2);
node(s3, 0.0, 2.65, 2.0, 0.55, "Otolith debris in\nposterior SCC (most common)", C.innerSub, C.darkText, 8, false);
line(s3, 1.9, 3.64, 0.4, 3.64, C.innerSub, 1.2);
node(s3, 0.0, 3.38, 2.1, 0.55, "Dix-Hallpike test (+)\nUpbeat-torsional nystagmus", C.innerSub, C.darkText, 8, false);
line(s3, 1.9, 3.64, 0.5, 4.35, C.innerSub, 1.2);
node(s3, 0.0, 4.1, 2.0, 0.55, "Rx: Epley maneuver\n(canalith repositioning)", C.innerSub, C.darkText, 8, false);

// ── BRANCH 4: VESTIBULAR NEURITIS / LABYRINTHITIS (bottom-left)
line(s3, 5.4, 3.85, 3.8, 5.2, C.innerEar, 2);
node(s3, 2.5, 5.0, 2.5, 0.72, "VESTIBULAR NEURITIS /\nLABYRINTHITIS", C.innerEar, C.white, 9.5, true);
line(s3, 2.5, 5.36, 0.8, 4.75, C.innerSub, 1.2);
node(s3, 0.0, 4.5, 2.4, 0.55, "VN: acute vertigo, no hearing\nloss; HSV-1 reactivation", C.innerSub, C.darkText, 7.5, false);
line(s3, 2.5, 5.36, 0.7, 5.5, C.innerSub, 1.2);
node(s3, 0.0, 5.25, 2.3, 0.55, "Labyrinthitis: vertigo +\nSNHL (bacterial / viral)", C.innerSub, C.darkText, 7.5, false);
line(s3, 2.5, 5.36, 0.9, 6.2, C.innerSub, 1.2);
node(s3, 0.0, 5.95, 2.4, 0.55, "Head impulse test (+);\nRx: vestibular rehab ± steroids", C.innerSub, C.darkText, 7.5, false);

// ── BRANCH 5: SENSORINEURAL HEARING LOSS (right)
line(s3, 7.9, 3.62, 9.5, 3.62, C.innerEar, 2);
node(s3, 9.5, 3.28, 2.6, 0.72, "SENSORINEURAL\nHEARING LOSS", C.innerEar, C.white, 10, true);
line(s3, 12.1, 3.64, 11.9, 2.85, C.innerSub, 1.2);
node(s3, 10.9, 2.6, 2.3, 0.55, "Noise-induced NIHL:\n4 kHz notch on audiogram", C.innerSub, C.darkText, 7.5, false);
line(s3, 12.1, 3.64, 11.9, 3.62, C.innerSub, 1.2);
node(s3, 10.9, 3.35, 2.3, 0.55, "Sudden SNHL: >30 dB in\n3 freqs over 3 days; Rx: steroids", C.innerSub, C.darkText, 7.5, false);
line(s3, 12.1, 3.64, 11.9, 4.4, C.innerSub, 1.2);
node(s3, 10.9, 4.15, 2.3, 0.55, "Presbycusis: age-related,\nbilateral, high-freq first", C.innerSub, C.darkText, 7.5, false);
line(s3, 12.1, 3.64, 11.9, 5.15, C.innerSub, 1.2);
node(s3, 10.9, 4.9, 2.3, 0.55, "Ototoxicity: aminoglycosides,\nloop diuretics, cisplatin", C.innerSub, C.darkText, 7.5, false);

// ── BRANCH 6: INNER EAR INFECTIONS & FISTULA (bottom-right)
line(s3, 7.9, 3.85, 9.5, 5.2, C.innerEar, 2);
node(s3, 8.6, 5.0, 2.7, 0.72, "PERILYMPH FISTULA\n& INFECTIONS", C.innerEar, C.white, 10, true);
line(s3, 11.3, 5.36, 11.1, 4.65, C.innerSub, 1.2);
node(s3, 10.8, 4.4, 2.4, 0.55, "PLF: round/oval window tear;\ntrauma, Valsalva; fluctuating SNHL + vertigo", C.innerSub, C.darkText, 7, false);
line(s3, 11.3, 5.36, 11.1, 5.5, C.innerSub, 1.2);
node(s3, 10.8, 5.25, 2.4, 0.55, "Suppurative labyrinthitis:\nbacterial (from meningitis/OM)\n→ total SNHL", C.innerSub, C.darkText, 7, false);
line(s3, 11.3, 5.36, 11.1, 6.3, C.innerSub, 1.2);
node(s3, 10.8, 6.05, 2.4, 0.55, "Autoimmune inner ear\ndisease (AIED): bilateral\nSNHL; Rx: steroids", C.innerSub, C.darkText, 7, false);

// ── BRANCH 7: TINNITUS & OTHER (bottom)
line(s3, 6.65, 4.05, 6.65, 5.2, C.innerEar, 2);
node(s3, 5.55, 5.2, 2.2, 0.72, "TINNITUS &\nOTHER", C.innerEar, C.white, 10, true);
line(s3, 6.65, 5.92, 5.5, 6.55, C.innerSub, 1.2);
node(s3, 4.3, 6.35, 2.0, 0.55, "Subjective: cochlear/\nretrocochlear origin", C.innerSub, C.darkText, 8, false);
line(s3, 6.65, 5.92, 7.8, 6.55, C.innerSub, 1.2);
node(s3, 7.5, 6.35, 2.2, 0.55, "Objective: vascular, palatal\nmyoclonus, patulous ET", C.innerSub, C.darkText, 8, false);
line(s3, 6.65, 5.92, 6.65, 7.1, C.innerSub, 1.2);
node(s3, 5.8, 6.92, 1.7, 0.4, "Cochlear implant\nfor profound SNHL", C.innerSub, C.darkText, 7, false);

// Footnote
s3.addText("BPPV = Benign Paroxysmal Positional Vertigo  |  SNHL = Sensorineural Hearing Loss  |  IAC = Internal Auditory Canal  |  CPA = Cerebellopontine Angle  |  PLF = Perilymph Fistula", {
  x:0.2, y:7.15, w:12.9, h:0.3,
  fontSize:8, color:"7799BB", fontFace:"Calibri", align:"center"
});


// ─── SLIDE 4: CLINICAL SUMMARY TABLE ──────────────────────────────────────
let s4 = pres.addSlide();
s4.background = { color: C.bg };

s4.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:13.3, h:0.45, fill:{color:"E63946"} });
s4.addText("CLINICAL QUICK REFERENCE", {
  x:0.1, y:0.04, w:13.1, h:0.38,
  fontSize:18, bold:true, color:C.white, fontFace:"Calibri"
});

const rows = [
  [
    { text:"Disease", options:{bold:true, color:C.white} },
    { text:"Key Features", options:{bold:true, color:C.white} },
    { text:"Investigations", options:{bold:true, color:C.white} },
    { text:"Treatment", options:{bold:true, color:C.white} }
  ],
  ["Acute OM", "TM bulging, pain, fever; S. pneumoniae/H. flu", "Clinical dx; tympanometry", "Amoxicillin; observation if mild/mod"],
  ["Cholesteatoma", "Foul discharge, marginal perforation, CHL", "CT temporal bone; MRI DWI for recurrence", "CWU or CWD mastoidectomy"],
  ["Otosclerosis", "Progressive CHL, Carhart notch, tinnitus", "Audiometry; CT stapes fixation", "Stapedectomy / stapedotomy"],
  ["Mastoiditis", "Post-auricular swelling, displaced pinna, fever", "CT: bony erosion, periosteal abscess", "IV antibiotics + mastoidectomy"],
  ["Ménière Disease", "Episodic vertigo + SNHL + tinnitus + fullness", "Electrocochleography (SP:AP >0.4); audiogram", "Low-salt diet; diuretics; IT gentamicin/steroid"],
  ["BPPV", "Brief positional vertigo, Dix-Hallpike (+)", "Clinical; no imaging usually needed", "Epley canalith repositioning"],
  ["Vestibular Neuritis", "Acute sustained vertigo, no hearing loss, HIT (+)", "Caloric testing; MRI to exclude stroke", "Vestibular rehab; short steroid course"],
  ["Sudden SNHL", ">30 dB drop in ≥3 frequencies over ≤3 days", "Audiogram; MRI + Gd to rule out schwannoma", "Oral steroids (1 mg/kg/d) ± IT dex"],
  ["Vestibular Schwannoma", "Asymmetric SNHL, tinnitus, imbalance", "MRI + Gd (gold standard); ABR", "Observe / radiosurgery (12–13 Gy) / microsurgery"],
  ["Presbycusis", "Bilateral progressive high-freq SNHL, elderly", "Audiogram: bilateral symmetric sloping loss", "Hearing aids; cochlear implant if profound"],
  ["Ototoxicity", "SNHL after aminoglycosides/cisplatin/furosemide", "Audiometric monitoring", "Prevention; dose adjustment; cochlear implant"],
];

s4.addTable(rows, {
  x: 0.3, y: 0.55, w: 12.7, h: 6.75,
  colW: [1.8, 3.5, 3.0, 4.4],
  rowH: 0.54,
  fontFace: "Calibri",
  fontSize: 8.5,
  color: C.offWhite,
  fill: { color: "152535" },
  border: { type:"solid", pt:0.5, color:"2A4A6A" },
  align: "left",
  valign: "middle",
  autoPage: false,
});

// re-color header row
s4.addShape(pres.shapes.RECTANGLE, { x:0.3, y:0.55, w:12.7, h:0.54, fill:{color:"1A3A5C"} });
s4.addText([
  { text:"Disease", options:{bold:true, color:C.white} },
], { x:0.35, y:0.58, w:1.75, h:0.48, fontSize:9, fontFace:"Calibri", valign:"middle" });
s4.addText("Key Features", { x:2.15, y:0.58, w:3.45, h:0.48, fontSize:9, bold:true, color:C.white, fontFace:"Calibri", valign:"middle" });
s4.addText("Investigations", { x:5.65, y:0.58, w:2.95, h:0.48, fontSize:9, bold:true, color:C.white, fontFace:"Calibri", valign:"middle" });
s4.addText("Treatment", { x:8.65, y:0.58, w:4.35, h:0.48, fontSize:9, bold:true, color:C.white, fontFace:"Calibri", valign:"middle" });

// Alternate row shading is handled in table fill; add light dividers
s4.addText("Sources: Cummings Otolaryngology · Scott-Brown's ORL Vol 2 · KJ Lee's Essential Otolaryngology · Rosen's EM", {
  x:0.2, y:7.22, w:12.9, h:0.25,
  fontSize:8, color:"5577AA", fontFace:"Calibri", align:"center"
});


// ─── WRITE FILE ────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/ear-pathology-mindmap/Ear_Pathology_MindMap.pptx";
pres.writeFile({ fileName: outPath })
  .then(() => console.log("✅  Saved:", outPath))
  .catch(e => { console.error("❌  Error:", e.message); process.exit(1); });
Running Command

cd /home/daytona/workspace/ear-pathology-mindmap && node build.js 2>&1

The file built successfully. Here is your comprehensive mind map:

Ear Pathology MindMap

Presentation · PPTX


What's Inside (4 slides, deep navy theme)

Slide 1 - Title

Bold visual intro with a designed color palette: red center, blue (middle ear), teal (inner ear).

Slide 2 - Middle Ear Pathology Mind Map

Radial layout with 7 branches from a central "Middle Ear Pathology" node:
BranchKey Content
Otitis MediaAOM (S. pneumoniae, H. flu, M. catarrhalis), OME/Glue ear, CSOM (tubo-tympanic/atticoantral), Bullous myringitis
CholesteatomaCongenital vs acquired, pars flaccida/tensa retraction, complications (SNHL, facial palsy, intracranial), CWU vs CWD surgery
TM DisordersPerforation, myringosclerosis/tympanosclerosis, atelectasis/retraction pocket
MastoiditisAcute coalescent, Bezold's abscess, CT findings, IV abx + mastoidectomy
OtosclerosisStapes footplate fixation, AD inheritance, female > male, stapedectomy
ComplicationsIntracranial (meningitis, brain abscess, lateral sinus thrombosis), labyrinthine fistula (10-15% of CSOM)
Eustachian Tube DysfunctionObstructive vs patulous ETD

Slide 3 - Inner Ear Pathology Mind Map

7 branches from central "Inner Ear Pathology" node:
BranchKey Content
Ménière DiseaseEndolymphatic hydrops, the classic tetrad, SP:AP ratio >0.4, IT gentamicin/steroids
Vestibular SchwannomaMost common IAC/CPA tumor, Antoni A & B histology, MRI + Gd gold standard, observe/radiosurgery/microsurgery
BPPVOtolith debris in posterior SCC, Dix-Hallpike test, Epley maneuver
Vestibular Neuritis / LabyrinthitisHSV-1 reactivation, HIT test, VN (no hearing loss) vs labyrinthitis (hearing loss)
SNHLNIHL (4 kHz notch), sudden SNHL (steroids), presbycusis, ototoxicity (aminoglycosides/cisplatin)
Perilymph Fistula & InfectionsRound/oval window tear, suppurative labyrinthitis, autoimmune inner ear disease (AIED)
Tinnitus & OtherSubjective vs objective, cochlear implant indications

Slide 4 - Clinical Quick Reference Table

12-row table covering every disease with: key features, investigations, and treatment - sourced from Cummings Otolaryngology, Scott-Brown's ORL, KJ Lee's Essential Otolaryngology, and Rosen's Emergency Medicine.
This is a shared conversation. Sign in to Orris to start your own chat.