Csom

Reading File
Finding Sources
Searching PubMed

"chronic suppurative otitis media" AND management

Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Here is a comprehensive overview of Chronic Suppurative Otitis Media (CSOM):

Chronic Suppurative Otitis Media (CSOM)

Definition

CSOM is a persistent, chronic inflammation of the middle ear and mastoid, characterized by a perforated tympanic membrane with recurrent or continuous mucopurulent otorrhea for more than 2-6 weeks. It represents a common and preventable cause of hearing loss, particularly in low-resource settings.

Epidemiology & Risk Factors

  • Most common in children under 2 years and in areas with limited healthcare access and low socioeconomic status
  • Higher incidence in certain populations: Native Americans, Inuit, Native Australians, and Native New Zealanders (likely genetic predisposition)
  • Risk factors include:
    • Multiple prior episodes of acute otitis media (AOM)
    • AOM in the first few months of life
    • Chronic secretory otitis media
    • Eustachian tube dysfunction
    • Poor nutrition and living conditions
(KJ Lee's Essential Otolaryngology, p. 445)

Types / Classification

TypeFeatures
Tubotympanic (safe/benign)Retraction/perforation confined to pars tensa; central perforation; mucopurulent discharge; no cholesteatoma
Atticoantral (unsafe/dangerous)Involves pars flaccida; marginal or attic perforation; cholesteatoma commonly present; risk of serious complications

Pathophysiology

CSOM begins with Eustachian tube dysfunction, which leads to:
  1. Negative middle ear pressure - tympanic membrane (TM) retraction
  2. Chronic middle ear effusion (serous or purulent)
  3. Bacterial infection - inflammatory mediators - mucosal edema and granulation tissue
  4. Sub-mucosal gland formation converts mucosa to secretory type, perpetuating the effusion
  5. Granulation tissue enzymes degrade the TM's collagen skeleton
  6. Progressive TM weakening - retraction pockets - perforation
  7. Deep retraction pockets set the stage for cholesteatoma formation
An important modern concept is biofilm formation: sessile bacteria within an impenetrable matrix escape phagocytosis and humoral immunity, show increased antibiotic resistance, and elicit persistent host inflammation. Biofilms are often polymicrobial and may be adherent to respiratory epithelium, within mucus, or intracellular. (KJ Lee's Essential Otolaryngology; Shambaugh Surgery of the Ear)

Microbiology

Common organisms in CSOM:
  • Pseudomonas aeruginosa (most common in chronic cases)
  • Staphylococcus aureus
  • Streptococcus pneumoniae, H. influenzae, Moraxella catarrhalis (particularly if AOM-related)
  • Anaerobes
  • Fungi (Candida spp.) - candida grows in 10% of ears with purulent otorrhea, and in up to 35% of ears treated with topical ciprofloxacin for 3 weeks
(Cummings Otolaryngology; Textbook of Family Medicine 9e)

Clinical Features

Symptoms

  • Intermittent or continuous otorrhea - sometimes foul-smelling
  • Hearing loss (conductive, sometimes sensorineural)
  • Otalgia and headache are uncommon - if present, suspect intracranial complication or malignancy
  • Vertigo - suspect labyrinthitis or fistula

Signs (on otomicroscopy)

  • Tympanic membrane perforation (central in tubotympanic; marginal/attic in atticoantral type)
  • Mucopurulent discharge - may obscure TM
  • Granulation tissue, polyps in the EAC
  • Evidence of scutal or ossicular erosion
  • Cholesteatoma (pearly white debris, typically attic)
(Shambaugh Surgery of the Ear, pp. 527-528)

Audiological Assessment

  • Mandatory full audiometric evaluation
  • Conductive hearing loss is most common
  • Conductive loss >30 dB suggests ossicular chain erosion
  • Sensorineural hearing loss (SNHL) may also be present (5-33 dB range in studies) - document preoperatively
  • Note: hearing can occasionally be preserved even with ossicular erosion if cholesteatoma transmits sound directly to the oval window

Complications

IntratemporalIntracranial
Acute/coalescent mastoiditisMeningitis
Facial nerve paralysisBrain abscess
LabyrinthitisEpidural abscess
Subperiosteal abscessSubdural abscess
Labyrinthine fistulaSigmoid sinus thrombophlebitis
Cholesteatoma
(Textbook of Family Medicine 9e, p. 407)

Management

Medical (First-line, without cholesteatoma)

  1. Aural toilet (microsuction/cleaning) - removes debris and discharge, aids topical drug penetration
  2. Topical antibiotics - fluoroquinolone ototopicals (e.g., ciprofloxacin/ofloxacin) are first-line and superior to systemic antibiotics per Cochrane review; safe for use in the middle ear
    • Avoid aminoglycoside ototopicals when possible (ototoxicity risk); reserve for cases where benefit outweighs risk
  3. Aural toilet with acetic acid solution (1:1 white vinegar:distilled water) - clears debris and provides antisepsis
  4. Systemic antibiotics - for severe cases, copious drainage impeding topical treatment, or suspected complications
  5. Culture and sensitivity - guides antibiotic selection (especially for resistant organisms)
  6. Dry-ear precautions

Surgical

Indicated when:
  • Cholesteatoma is present (near-absolute indication)
  • Medical treatment fails repeatedly
  • Symptoms suggestive of complications (vertigo, facial weakness, headache)
  • Persistent TM perforation after resolution of active infection
Surgical priorities (in order):
  1. Eradication of disease
  2. Prevention of recurrence
  3. Preservation or restoration of hearing
Procedures:
  • Tympanoplasty (myringoplasty): TM repair; ear should ideally be dry 3-4 weeks before surgery; >90% success for TM perforation repair
  • Mastoidectomy:
    • Canal wall-up (CWU): preserves posterior EAC; easier aftercare; risk of residual cholesteatoma
    • Canal wall-down (CWD): removes posterior EAC wall; better exposure; open cavity requires lifelong monitoring and debridement
  • Ossiculoplasty: reconstruction of ossicular chain, may be staged
(Shambaugh Surgery of the Ear, pp. 528-529; Cummings Otolaryngology; Harrison's Principles, 22e)

Recent Evidence (2025 Cochrane Reviews)

Three Cochrane systematic reviews published in June 2025 directly address CSOM treatment:
These reinforce the guideline that topical fluoroquinolones are superior to systemic antibiotics for CSOM management.

Summary Points

  • CSOM = TM perforation + chronic mucopurulent otorrhea (>2-6 weeks)
  • Two types: tubotympanic (safe) vs. atticoantral (unsafe/cholesteatoma risk)
  • Pathogenesis hinges on ET dysfunction + bacterial biofilms
  • Main bugs: Pseudomonas aeruginosa, S. aureus, anaerobes
  • First-line treatment: aural toilet + topical fluoroquinolone
  • Surgery for cholesteatoma, failed medical treatment, or complications
  • Audiometry is mandatory in all patients

Ppt on this

Reading File
Reading File
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"

Running Command

mkdir -p /home/daytona/workspace/csom-ppt

Writing File

~/csom-ppt/generate.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Chronic Suppurative Otitis Media (CSOM)";
pres.author = "Orris Medical";

// ─── COLOR PALETTE ───────────────────────────────────────────────
// Deep teal (dominant), pale mist (bg), gold accent, white text
const C = {
  dark:    "0A2E3D",   // deep navy-teal (title bg, header bars)
  mid:     "0E5B73",   // mid teal (section headers)
  accent:  "F0A500",   // amber/gold accent
  light:   "E8F4F8",   // very pale teal bg
  white:   "FFFFFF",
  body:    "1A3A4A",   // dark teal for body text
  muted:   "5A7F8E",   // muted teal for subtext
  red:     "C0392B",   // danger / complication red
  green:   "1A7A4A",   // safe/tubotympanic green
  orange:  "E67E22",   // unsafe/atticoantral orange
};

// ─── HELPERS ─────────────────────────────────────────────────────
function darkSlide(slide) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.dark }, line: { color: C.dark }
  });
}

function lightSlide(slide) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.light }, line: { color: C.light }
  });
}

function accentBar(slide, w = 10, h = 0.06, x = 0, y = 5.565) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x, y, w, h, fill: { color: C.accent }, line: { color: C.accent }
  });
}

function sectionLabel(slide, text, x = 0.4, y = 0.22) {
  slide.addText(text, {
    x, y, w: 9.2, h: 0.32,
    fontSize: 9, bold: true, color: C.accent, charSpacing: 2,
    fontFace: "Calibri", margin: 0
  });
}

function slideTitle(slide, title, x = 0.4, y = 0.55) {
  slide.addText(title, {
    x, y, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.dark,
    fontFace: "Calibri", margin: 0
  });
}

function headerBar(slide, title) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 1.1,
    fill: { color: C.dark }, line: { color: C.dark }
  });
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 1.05, w: 10, h: 0.06,
    fill: { color: C.accent }, line: { color: C.accent }
  });
  slide.addText(title, {
    x: 0.4, y: 0.15, w: 9.2, h: 0.8,
    fontSize: 24, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0
  });
}

function card(slide, x, y, w, h, fillColor, shadowOn = true) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x, y, w, h,
    fill: { color: fillColor },
    line: { color: fillColor },
    rectRadius: 0.12,
    shadow: shadowOn ? { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.12 } : undefined
  });
}

function bullet(text, sub = false) {
  return {
    text,
    options: {
      bullet: sub ? { indent: 20 } : true,
      fontSize: sub ? 12 : 13.5,
      color: C.body,
      bold: false,
      breakLine: true
    }
  };
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);

  // Gold left strip
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 0.18, h: 5.625,
    fill: { color: C.accent }, line: { color: C.accent }
  });

  // Ear icon silhouette area (decorative circle)
  s.addShape(pres.shapes.OVAL, {
    x: 7.2, y: 0.5, w: 2.5, h: 2.5,
    fill: { color: C.mid }, line: { color: C.mid }
  });
  s.addText("👂", {
    x: 7.4, y: 0.7, w: 2.1, h: 2.1,
    fontSize: 68, align: "center", valign: "middle"
  });

  s.addText("CHRONIC SUPPURATIVE", {
    x: 0.5, y: 1.0, w: 6.5, h: 0.55,
    fontSize: 13, bold: true, color: C.accent,
    charSpacing: 4, fontFace: "Calibri", margin: 0
  });
  s.addText("Otitis Media", {
    x: 0.5, y: 1.5, w: 6.5, h: 1.1,
    fontSize: 52, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0
  });
  s.addText("CSOM", {
    x: 0.5, y: 2.55, w: 6.5, h: 0.65,
    fontSize: 36, bold: true, color: C.accent,
    fontFace: "Calibri", margin: 0
  });
  s.addText("Definition · Pathophysiology · Diagnosis · Management · Complications", {
    x: 0.5, y: 3.35, w: 6.5, h: 0.45,
    fontSize: 11, color: C.muted, italic: true,
    fontFace: "Calibri", margin: 0
  });

  // Sources credit
  s.addText("Sources: Cummings Otolaryngology · KJ Lee's Essential Otolaryngology · Shambaugh Surgery of the Ear · Cochrane 2025", {
    x: 0.5, y: 5.1, w: 9.2, h: 0.35,
    fontSize: 8, color: C.muted, italic: true,
    fontFace: "Calibri", margin: 0
  });
  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 2 — DEFINITION & OVERVIEW
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Definition & Overview");

  // Definition card
  card(s, 0.35, 1.25, 9.3, 1.2, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 1.25, w: 0.12, h: 1.2,
    fill: { color: C.accent }, line: { color: C.accent }
  });
  s.addText("CSOM is a persistent chronic inflammation of the middle ear and mastoid, characterized by a perforated tympanic membrane with recurrent or continuous mucopurulent otorrhea lasting > 2–6 weeks.", {
    x: 0.6, y: 1.32, w: 8.9, h: 1.05,
    fontSize: 13.5, color: C.body, italic: true,
    fontFace: "Calibri", valign: "middle"
  });

  // Key facts row
  const facts = [
    { icon: "🌍", val: "Leading cause", sub: "of preventable\nhearing loss" },
    { icon: "👶", val: "Peak: < 2 yrs", sub: "Most common in\nyoung children" },
    { icon: "⚠️", val: "> 2–6 weeks", sub: "Duration of\notorrhea" },
    { icon: "🕳️", val: "TM Perforation", sub: "Hallmark\nfinding" },
  ];
  facts.forEach((f, i) => {
    const x = 0.35 + i * 2.35;
    card(s, x, 2.65, 2.15, 2.55, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 2.65, w: 2.15, h: 0.08,
      fill: { color: C.mid }, line: { color: C.mid }
    });
    s.addText(f.icon, { x, y: 2.7, w: 2.15, h: 0.7, fontSize: 28, align: "center" });
    s.addText(f.val, {
      x, y: 3.42, w: 2.15, h: 0.4,
      fontSize: 12.5, bold: true, color: C.dark, align: "center", fontFace: "Calibri"
    });
    s.addText(f.sub, {
      x, y: 3.82, w: 2.15, h: 0.65,
      fontSize: 10, color: C.muted, align: "center", fontFace: "Calibri"
    });
  });
  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 3 — TYPES / CLASSIFICATION
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Classification of CSOM");

  // Tubotympanic
  card(s, 0.35, 1.25, 4.45, 3.9, "EBF5FB");
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 1.25, w: 4.45, h: 0.45,
    fill: { color: C.green }, line: { color: C.green }
  });
  s.addText("TUBOTYMPANIC  (Safe)", {
    x: 0.4, y: 1.27, w: 4.3, h: 0.42,
    fontSize: 13, bold: true, color: C.white, align: "center",
    fontFace: "Calibri", margin: 0
  });
  s.addText([
    { text: "Synonyms: Benign / Mucosal type", options: { bold: true, breakLine: true, color: C.body } },
    { text: " ", options: { breakLine: true } },
    { text: "• Central (pars tensa) perforation", options: { breakLine: true, color: C.body } },
    { text: "• Mucopurulent / mucoid otorrhea", options: { breakLine: true, color: C.body } },
    { text: "• No cholesteatoma", options: { breakLine: true, color: C.body } },
    { text: "• Conductive hearing loss", options: { breakLine: true, color: C.body } },
    { text: "• ET dysfunction is key driver", options: { breakLine: true, color: C.body } },
    { text: " ", options: { breakLine: true } },
    { text: "Prognosis: Generally favorable with treatment", options: { color: C.green, bold: true, breakLine: false } },
  ], {
    x: 0.5, y: 1.75, w: 4.1, h: 3.2,
    fontSize: 12.5, fontFace: "Calibri", valign: "top"
  });

  // Atticoantral
  card(s, 5.2, 1.25, 4.45, 3.9, "FDF3E7");
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.2, y: 1.25, w: 4.45, h: 0.45,
    fill: { color: C.orange }, line: { color: C.orange }
  });
  s.addText("ATTICOANTRAL  (Unsafe)", {
    x: 5.25, y: 1.27, w: 4.3, h: 0.42,
    fontSize: 13, bold: true, color: C.white, align: "center",
    fontFace: "Calibri", margin: 0
  });
  s.addText([
    { text: "Synonyms: Dangerous / Squamous type", options: { bold: true, breakLine: true, color: C.body } },
    { text: " ", options: { breakLine: true } },
    { text: "• Marginal / attic perforation", options: { breakLine: true, color: C.body } },
    { text: "• Foul-smelling, scanty otorrhea", options: { breakLine: true, color: C.body } },
    { text: "• Cholesteatoma commonly present", options: { breakLine: true, color: C.orange, bold: true } },
    { text: "• Ossicular erosion common", options: { breakLine: true, color: C.body } },
    { text: "• High risk of complications", options: { breakLine: true, color: C.body } },
    { text: " ", options: { breakLine: true } },
    { text: "Prognosis: Requires surgery", options: { color: C.red, bold: true, breakLine: false } },
  ], {
    x: 5.35, y: 1.75, w: 4.1, h: 3.2,
    fontSize: 12.5, fontFace: "Calibri", valign: "top"
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 4 — EPIDEMIOLOGY & RISK FACTORS
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Epidemiology & Risk Factors");

  // Epidemiology left column
  card(s, 0.35, 1.25, 4.45, 3.9, C.white);
  s.addText("EPIDEMIOLOGY", {
    x: 0.5, y: 1.32, w: 4.1, h: 0.38,
    fontSize: 11, bold: true, color: C.mid, charSpacing: 2,
    fontFace: "Calibri", margin: 0
  });
  s.addText([
    bullet("Most common in children < 2 years old"),
    bullet("Prevalent in low-resource settings"),
    bullet("Leading preventable cause of hearing loss worldwide"),
    bullet("High-risk populations:"),
    bullet("Native Americans, Inuit, Aboriginal Australians, Māori", true),
    bullet("Genetic predisposition suspected", true),
    bullet("Strong association with multiple prior AOM episodes"),
  ], {
    x: 0.5, y: 1.72, w: 4.1, h: 3.3,
    fontFace: "Calibri", valign: "top"
  });

  // Risk factors right column
  card(s, 5.2, 1.25, 4.45, 3.9, C.white);
  s.addText("RISK FACTORS", {
    x: 5.35, y: 1.32, w: 4.1, h: 0.38,
    fontSize: 11, bold: true, color: C.mid, charSpacing: 2,
    fontFace: "Calibri", margin: 0
  });
  const risks = [
    "🔴  Recurrent acute otitis media (AOM)",
    "🔴  AOM in first few months of life",
    "🔴  Chronic secretory otitis media",
    "🔴  Eustachian tube dysfunction",
    "🔴  Craniofacial abnormalities (cleft palate)",
    "🔴  Poor nutrition / overcrowded living",
    "🔴  Lack of breastfeeding",
    "🔴  Immunodeficiency states",
  ];
  s.addText(risks.map((r, i) => ({
    text: r,
    options: { breakLine: i < risks.length - 1, color: C.body, fontSize: 12.5 }
  })), {
    x: 5.35, y: 1.72, w: 4.1, h: 3.3,
    fontFace: "Calibri", valign: "top"
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 5 — PATHOPHYSIOLOGY
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Pathophysiology");

  const steps = [
    { n: "1", title: "ET Dysfunction", desc: "Negative ME pressure\n→ TM retraction" },
    { n: "2", title: "Effusion", desc: "Serous → purulent\nmiddle ear effusion" },
    { n: "3", title: "Infection", desc: "Bacterial biofilms;\nchronic inflammation" },
    { n: "4", title: "Mucosal Change", desc: "Submucosal glands;\nsecretory mucosa" },
    { n: "5", title: "TM Weakening", desc: "Enzyme degradation\nof collagen skeleton" },
    { n: "6", title: "Perforation", desc: "Retraction pockets\n→ TM perforation" },
    { n: "7", title: "Cholesteatoma", desc: "Deep pockets +\nsquamous migration" },
  ];

  // Draw cascade boxes
  steps.forEach((st, i) => {
    const x = 0.28 + i * 1.35;
    const y = 1.25;
    // circle number
    s.addShape(pres.shapes.OVAL, {
      x: x + 0.27, y: y, w: 0.52, h: 0.52,
      fill: { color: C.mid }, line: { color: C.mid }
    });
    s.addText(st.n, {
      x: x + 0.27, y: y, w: 0.52, h: 0.52,
      fontSize: 14, bold: true, color: C.white,
      align: "center", valign: "middle", margin: 0
    });
    // Card
    card(s, x, y + 0.58, 1.2, 2.4, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: y + 0.58, w: 1.2, h: 0.06,
      fill: { color: C.mid }, line: { color: C.mid }
    });
    s.addText(st.title, {
      x, y: y + 0.66, w: 1.2, h: 0.48,
      fontSize: 10.5, bold: true, color: C.dark,
      align: "center", fontFace: "Calibri"
    });
    s.addText(st.desc, {
      x, y: y + 1.15, w: 1.2, h: 1.7,
      fontSize: 9.5, color: C.muted, align: "center",
      fontFace: "Calibri", valign: "top"
    });
    // Arrow
    if (i < steps.length - 1) {
      s.addShape(pres.shapes.RECTANGLE, {
        x: x + 1.2, y: y + 1.48, w: 0.14, h: 0.06,
        fill: { color: C.accent }, line: { color: C.accent }
      });
    }
  });

  // Biofilm callout
  card(s, 0.35, 4.22, 9.3, 1.0, "FFF8E7");
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 4.22, w: 0.1, h: 1.0,
    fill: { color: C.accent }, line: { color: C.accent }
  });
  s.addText("⚗️  BIOFILM KEY CONCEPT: ", {
    x: 0.55, y: 4.3, w: 2.2, h: 0.4,
    fontSize: 11, bold: true, color: C.orange, fontFace: "Calibri", margin: 0
  });
  s.addText("Sessile bacteria encased in oligopolysaccharide matrix escape phagocytosis, show up to 1000× antibiotic resistance, produce efflux pumps, and are often polymicrobial — making CSOM notoriously difficult to eradicate medically.", {
    x: 2.7, y: 4.3, w: 6.7, h: 0.75,
    fontSize: 10.5, color: C.body, fontFace: "Calibri"
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 6 — MICROBIOLOGY
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Microbiology");

  const bugs = [
    { org: "Pseudomonas aeruginosa", note: "Most common in chronic CSOM", color: C.red, pct: "38%" },
    { org: "Staphylococcus aureus", note: "Including MRSA strains", color: C.orange, pct: "30%" },
    { org: "Streptococcus pneumoniae", note: "More common in AOM-associated", color: C.mid, pct: "12%" },
    { org: "H. influenzae / M. catarrhalis", note: "Acute-on-chronic exacerbations", color: C.muted, pct: "10%" },
    { org: "Anaerobes", note: "Bacteroides, Peptostreptococcus", color: "6A4C93", pct: "6%" },
    { org: "Candida / Fungal", note: "35% after topical ciprofloxacin × 3 wks", color: "2E7D32", pct: "4%" },
  ];

  bugs.forEach((b, i) => {
    const col = i < 3 ? 0 : 1;
    const row = i < 3 ? i : i - 3;
    const x = col === 0 ? 0.35 : 5.2;
    const y = 1.3 + row * 1.32;
    card(s, x, y, 4.45, 1.15, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 0.08, h: 1.15,
      fill: { color: b.color }, line: { color: b.color }
    });
    // Percentage badge
    s.addShape(pres.shapes.OVAL, {
      x: x + 3.8, y: y + 0.1, w: 0.5, h: 0.5,
      fill: { color: b.color }, line: { color: b.color }
    });
    s.addText(b.pct, {
      x: x + 3.8, y: y + 0.1, w: 0.5, h: 0.5,
      fontSize: 8.5, bold: true, color: C.white,
      align: "center", valign: "middle", margin: 0
    });
    s.addText(b.org, {
      x: x + 0.2, y: y + 0.1, w: 3.5, h: 0.45,
      fontSize: 12, bold: true, color: b.color,
      fontFace: "Calibri", margin: 0, italic: true
    });
    s.addText(b.note, {
      x: x + 0.2, y: y + 0.57, w: 3.5, h: 0.45,
      fontSize: 10.5, color: C.body, fontFace: "Calibri", margin: 0
    });
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 7 — CLINICAL FEATURES
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Clinical Features");

  // Symptoms left
  card(s, 0.35, 1.25, 4.3, 3.9, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 1.25, w: 4.3, h: 0.42,
    fill: { color: C.mid }, line: { color: C.mid }
  });
  s.addText("SYMPTOMS", {
    x: 0.4, y: 1.27, w: 4.2, h: 0.38,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri",
    align: "center", margin: 0
  });
  s.addText([
    { text: "✅  Intermittent / continuous otorrhea", options: { color: C.body, breakLine: true } },
    { text: "      (may be foul-smelling)", options: { color: C.muted, italic: true, fontSize: 11, breakLine: true } },
    { text: "✅  Hearing loss (conductive > SNHL)", options: { color: C.body, breakLine: true } },
    { text: " ", options: { breakLine: true } },
    { text: "⚠️  Otalgia / headache = RED FLAG", options: { color: C.red, bold: true, breakLine: true } },
    { text: "      (suspect intracranial complication)", options: { color: C.muted, italic: true, fontSize: 11, breakLine: true } },
    { text: "⚠️  Vertigo = RED FLAG", options: { color: C.red, bold: true, breakLine: true } },
    { text: "      (suspect labyrinthitis / fistula)", options: { color: C.muted, italic: true, fontSize: 11, breakLine: true } },
    { text: " ", options: { breakLine: true } },
    { text: "❌  No fever typically (unlike AOM)", options: { color: C.body, breakLine: false } },
  ], {
    x: 0.5, y: 1.72, w: 4.0, h: 3.35,
    fontSize: 12.5, fontFace: "Calibri", valign: "top"
  });

  // Signs right
  card(s, 4.85, 1.25, 4.8, 3.9, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 4.85, y: 1.25, w: 4.8, h: 0.42,
    fill: { color: C.mid }, line: { color: C.mid }
  });
  s.addText("SIGNS (Otomicroscopy)", {
    x: 4.9, y: 1.27, w: 4.7, h: 0.38,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri",
    align: "center", margin: 0
  });
  s.addText([
    { text: "🔬  TM perforation (central = tubotympanic;\n        attic/marginal = atticoantral)", options: { color: C.body, breakLine: true } },
    { text: "🔬  Mucopurulent discharge in EAC", options: { color: C.body, breakLine: true } },
    { text: "🔬  Granulation tissue / polyps", options: { color: C.body, breakLine: true } },
    { text: "🔬  Ossicular / scutal erosion", options: { color: C.body, breakLine: true } },
    { text: "🔬  Pearly white debris = cholesteatoma", options: { color: C.orange, bold: true, breakLine: true } },
    { text: "🔬  TM retraction pockets", options: { color: C.body, breakLine: true } },
    { text: " ", options: { breakLine: true } },
    { text: "Audiometry mandatory in all patients!", options: { color: C.mid, bold: true, breakLine: false } },
  ], {
    x: 5.0, y: 1.72, w: 4.5, h: 3.35,
    fontSize: 12.5, fontFace: "Calibri", valign: "top"
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 8 — AUDIOLOGICAL ASSESSMENT
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Audiological Assessment");

  const items = [
    { icon: "🎧", title: "Pure Tone Audiometry (PTA)", desc: "Mandatory in ALL patients.\nDocuments degree & type of hearing loss before any treatment.", color: C.mid },
    { icon: "📉", title: "Conductive Hearing Loss", desc: "Most common finding.\n>30 dB air–bone gap suggests ossicular chain erosion.", color: C.orange },
    { icon: "🌀", title: "Sensorineural Hearing Loss", desc: "SNHL of 5–33 dB may co-exist.\nDocument preoperatively — important for surgical consent.", color: C.red },
    { icon: "🦴", title: "Ossicular Erosion Clue", desc: "Hearing may be preserved even with ossicular erosion if cholesteatoma directly transmits sound to oval window.", color: "6A4C93" },
    { icon: "📊", title: "Tympanometry", desc: "Type B flat curve = perforation or effusion.\nHelps differentiate from intact TM with effusion (AOM).", color: C.green },
    { icon: "🎤", title: "Speech Discrimination", desc: "Useful in children to quantify functional impact.\nPoor scores may indicate cochlear involvement.", color: C.muted },
  ];

  items.forEach((item, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.35 + col * 3.12;
    const y = 1.28 + row * 1.98;
    card(s, x, y, 3.0, 1.82, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 3.0, h: 0.06,
      fill: { color: item.color }, line: { color: item.color }
    });
    s.addText(item.icon, { x, y: y + 0.06, w: 3.0, h: 0.55, fontSize: 22, align: "center" });
    s.addText(item.title, {
      x: x + 0.1, y: y + 0.6, w: 2.8, h: 0.42,
      fontSize: 11, bold: true, color: item.color,
      fontFace: "Calibri", align: "center"
    });
    s.addText(item.desc, {
      x: x + 0.1, y: y + 1.0, w: 2.8, h: 0.75,
      fontSize: 9.5, color: C.body,
      fontFace: "Calibri", align: "center"
    });
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 9 — MANAGEMENT: MEDICAL
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Management — Medical Treatment");

  const steps = [
    {
      num: "1",
      title: "Aural Toilet",
      bullets: [
        "Microsuction / dry mopping to clear discharge",
        "Removes debris → improves topical drug penetration",
        "Acetic acid 1:1 (white vinegar : distilled water) for antisepsis",
        "Cornerstone of all medical management"
      ],
      color: C.mid,
    },
    {
      num: "2",
      title: "Topical Fluoroquinolones",
      bullets: [
        "FIRST-LINE: ciprofloxacin / ofloxacin otic drops",
        "Superior to systemic antibiotics (Cochrane 2025)",
        "Safe for middle ear use — no ototoxicity",
        "Cover Pseudomonas & S. aureus",
        "Avoid aminoglycosides (ototoxic risk)"
      ],
      color: C.green,
    },
    {
      num: "3",
      title: "Systemic Antibiotics",
      bullets: [
        "Reserved for: severe cases, copious drainage,\nor failed topical treatment",
        "Cover Pseudomonas (ciprofloxacin oral)",
        "IV antibiotics if systemic sepsis signs",
        "Culture & sensitivity guides selection"
      ],
      color: C.orange,
    },
  ];

  steps.forEach((st, i) => {
    const x = 0.3 + i * 3.22;
    card(s, x, 1.22, 3.1, 3.98, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 1.22, w: 3.1, h: 0.5,
      fill: { color: st.color }, line: { color: st.color }
    });
    s.addShape(pres.shapes.OVAL, {
      x: x + 0.1, y: 1.22, w: 0.5, h: 0.5,
      fill: { color: C.white }, line: { color: C.white }
    });
    s.addText(st.num, {
      x: x + 0.1, y: 1.22, w: 0.5, h: 0.5,
      fontSize: 16, bold: true, color: st.color,
      align: "center", valign: "middle", margin: 0
    });
    s.addText(st.title, {
      x: x + 0.65, y: 1.29, w: 2.35, h: 0.4,
      fontSize: 13, bold: true, color: C.white,
      fontFace: "Calibri", margin: 0, valign: "middle"
    });
    s.addText(st.bullets.map((b, bi) => ({
      text: "• " + b,
      options: { breakLine: bi < st.bullets.length - 1, color: C.body, fontSize: 12 }
    })), {
      x: x + 0.15, y: 1.8, w: 2.85, h: 3.3,
      fontFace: "Calibri", valign: "top"
    });
  });

  // Note bar
  card(s, 0.35, 5.22, 9.3, 0.28, "E8F4F8");
  s.addText("📌  Cochrane 2025 (3 Systematic Reviews): Topical antibiotics > systemic antibiotics for CSOM. Topical quinolones are safe and effective first-line therapy.", {
    x: 0.5, y: 5.24, w: 9.1, h: 0.25,
    fontSize: 9.5, color: C.mid, italic: true, fontFace: "Calibri"
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 10 — MANAGEMENT: SURGICAL
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Management — Surgical Treatment");

  // Indications
  card(s, 0.35, 1.22, 9.3, 1.0, "FFF3E0");
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 1.22, w: 0.1, h: 1.0,
    fill: { color: C.orange }, line: { color: C.orange }
  });
  s.addText("SURGICAL INDICATIONS: ", {
    x: 0.55, y: 1.28, w: 2.0, h: 0.4,
    fontSize: 11, bold: true, color: C.orange, fontFace: "Calibri", margin: 0
  });
  s.addText("Cholesteatoma (near-absolute)  |  Failed medical therapy  |  Complications (vertigo, facial palsy, headache)  |  Persistent TM perforation after infection resolves", {
    x: 2.5, y: 1.28, w: 7.0, h: 0.75,
    fontSize: 11, color: C.body, fontFace: "Calibri"
  });

  // Three priorities
  const prios = ["1  Eradicate disease", "2  Prevent recurrence", "3  Restore hearing"];
  prios.forEach((p, i) => {
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x: 0.35 + i * 3.12, y: 2.35, w: 3.0, h: 0.52,
      fill: { color: C.dark }, line: { color: C.dark }, rectRadius: 0.1
    });
    s.addText(p, {
      x: 0.35 + i * 3.12, y: 2.35, w: 3.0, h: 0.52,
      fontSize: 13, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri"
    });
  });
  s.addText("Surgical Priorities:", {
    x: 9.4, y: 2.4, w: 0.5, h: 0.45,
    fontSize: 9, color: C.muted, italic: true, fontFace: "Calibri"
  });

  // Procedures
  const procs = [
    {
      title: "Myringoplasty\n/ Tympanoplasty",
      bullets: [
        "TM repair — ear dry ≥3–4 wks pre-op",
        ">90% success for TM perforation",
        "Ossiculoplasty if ossicular damage",
        "May be staged procedure"
      ],
      color: C.green
    },
    {
      title: "Canal Wall-Up\nMastoidectomy (CWU)",
      bullets: [
        "Preserves posterior EAC wall",
        "Easier aftercare, no restrictions",
        "Risk: residual cholesteatoma",
        "May need planned 2nd-look surgery"
      ],
      color: C.mid
    },
    {
      title: "Canal Wall-Down\nMastoidectomy (CWD)",
      bullets: [
        "Removes posterior canal wall",
        "Better exposure, lower recurrence",
        "Open cavity: lifetime monitoring",
        "Used for extensive cholesteatoma"
      ],
      color: C.orange
    },
  ];

  procs.forEach((pr, i) => {
    const x = 0.35 + i * 3.12;
    card(s, x, 3.0, 3.0, 2.3, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 3.0, w: 3.0, h: 0.45,
      fill: { color: pr.color }, line: { color: pr.color }
    });
    s.addText(pr.title, {
      x, y: 3.0, w: 3.0, h: 0.45,
      fontSize: 11, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri"
    });
    s.addText(pr.bullets.map((b, bi) => ({
      text: "• " + b,
      options: { breakLine: bi < pr.bullets.length - 1, color: C.body, fontSize: 11 }
    })), {
      x: x + 0.12, y: 3.5, w: 2.75, h: 1.72,
      fontFace: "Calibri", valign: "top"
    });
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 11 — COMPLICATIONS
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  headerBar(s, "Complications of CSOM");

  // Intratemporal
  card(s, 0.35, 1.25, 4.45, 3.95, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 1.25, w: 4.45, h: 0.45,
    fill: { color: C.orange }, line: { color: C.orange }
  });
  s.addText("INTRATEMPORAL", {
    x: 0.4, y: 1.27, w: 4.35, h: 0.42,
    fontSize: 14, bold: true, color: C.white,
    align: "center", fontFace: "Calibri", margin: 0
  });
  const intra = [
    "🦻  Conductive Hearing Loss",
    "🌀  Acute / Coalescent Mastoiditis",
    "😵  Labyrinthitis / SNHL",
    "💉  Labyrinthine Fistula",
    "😶  Facial Nerve Paralysis",
    "🦠  Subperiosteal Abscess",
    "💎  Cholesteatoma Formation",
    "👁️  Petrositis (Gradenigo Syndrome)",
  ];
  s.addText(intra.map((t, i) => ({
    text: t,
    options: { breakLine: i < intra.length - 1, color: C.body, fontSize: 12.5 }
  })), {
    x: 0.55, y: 1.78, w: 4.1, h: 3.35,
    fontFace: "Calibri", valign: "top"
  });

  // Intracranial
  card(s, 5.2, 1.25, 4.45, 3.95, C.white);
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.2, y: 1.25, w: 4.45, h: 0.45,
    fill: { color: C.red }, line: { color: C.red }
  });
  s.addText("INTRACRANIAL  ⚠️", {
    x: 5.25, y: 1.27, w: 4.35, h: 0.42,
    fontSize: 14, bold: true, color: C.white,
    align: "center", fontFace: "Calibri", margin: 0
  });
  const intra2 = [
    "🧠  Meningitis",
    "🧠  Brain Abscess",
    "🩸  Epidural Abscess",
    "🩸  Subdural Abscess",
    "🩸  Sigmoid Sinus Thrombophlebitis",
    "💀  Otitic Hydrocephalus",
    " ",
    "⚡  Otalgia + Headache = RED FLAG\n       → Immediate investigation",
  ];
  s.addText(intra2.map((t, i) => ({
    text: t,
    options: {
      breakLine: i < intra2.length - 1,
      color: i === intra2.length - 1 ? C.red : C.body,
      fontSize: 12.5,
      bold: i === intra2.length - 1
    }
  })), {
    x: 5.35, y: 1.78, w: 4.15, h: 3.35,
    fontFace: "Calibri", valign: "top"
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 12 — SUMMARY / KEY POINTS
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);

  // Gold accent strip
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 0.08,
    fill: { color: C.accent }, line: { color: C.accent }
  });

  s.addText("KEY TAKEAWAYS", {
    x: 0.5, y: 0.2, w: 9, h: 0.4,
    fontSize: 11, bold: true, color: C.accent, charSpacing: 4,
    fontFace: "Calibri", margin: 0
  });
  s.addText("CSOM — Clinical Pearls", {
    x: 0.5, y: 0.6, w: 9, h: 0.65,
    fontSize: 28, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0
  });

  const points = [
    { n: "01", text: "CSOM = TM perforation + mucopurulent otorrhea > 2–6 weeks", col: C.accent },
    { n: "02", text: "Tubotympanic (safe): central perforation, no cholesteatoma", col: C.green },
    { n: "03", text: "Atticoantral (unsafe): attic/marginal perforation + cholesteatoma → surgery", col: C.orange },
    { n: "04", text: "Key pathogen: Pseudomonas aeruginosa; biofilms drive antibiotic resistance", col: C.red },
    { n: "05", text: "First-line: Aural toilet + topical fluoroquinolone (ciprofloxacin/ofloxacin)", col: C.mid },
    { n: "06", text: "Otalgia/headache/vertigo = RED FLAGS → suspect complications", col: C.red },
    { n: "07", text: "Cochrane 2025: Topical > systemic antibiotics for CSOM", col: C.accent },
    { n: "08", text: "Surgery for cholesteatoma, failed medical treatment, or complications", col: "A0CFDD" },
  ];

  points.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.35 : 5.2;
    const y = 1.38 + row * 1.02;
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 0.5, h: 0.82,
      fill: { color: p.col }, line: { color: p.col }
    });
    s.addText(p.n, {
      x, y, w: 0.5, h: 0.82,
      fontSize: 13, bold: true, color: C.dark,
      align: "center", valign: "middle", margin: 0
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x: x + 0.5, y, w: 4.3, h: 0.82,
      fill: { color: "132E3D" }, line: { color: "132E3D" }
    });
    s.addText(p.text, {
      x: x + 0.6, y, w: 4.1, h: 0.82,
      fontSize: 11.5, color: C.white,
      fontFace: "Calibri", valign: "middle"
    });
  });

  accentBar(s);
}

// ══════════════════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/csom-ppt/CSOM_Presentation.pptx" })
  .then(() => console.log("✅  CSOM_Presentation.pptx created successfully"))
  .catch(err => { console.error("❌  Error:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/csom-ppt && node generate.js 2>&1

Your presentation is ready!

CSOM Presentation

Presentation · PPTX


12 slides with a deep teal + amber color scheme, covering:
SlideContent
1Title slide
2Definition & Overview (key stats cards)
3Classification - Tubotympanic (safe) vs. Atticoantral (unsafe)
4Epidemiology & Risk Factors
5Pathophysiology (7-step cascade + biofilm callout)
6Microbiology (organism cards with prevalence badges)
7Clinical Features - Symptoms & Signs
8Audiological Assessment
9Medical Management (with Cochrane 2025 note)
10Surgical Management (indications + procedures)
11Complications - Intratemporal vs. Intracranial
12Key Takeaways summary
This is a shared conversation. Sign in to Orris to start your own chat.