Mae a ppt with appendicitis topic. Cover everything about appendicitis, acute,.chronic and sos so

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

mkdir -p /home/daytona/workspace/appendicitis-ppt && ls /home/daytona/workspace/…

Writing File

~/appendicitis-ppt/appendicitis_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Appendicitis - A Comprehensive Overview";

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
  navy:    "0A1628",  // dominant dark
  red:     "C0392B",  // accent / danger
  teal:    "1ABC9C",  // highlight
  white:   "FFFFFF",
  offwhite:"F0F4F8",
  lightBg: "E8F0FE",
  gray:    "4A5568",
  lightGray:"94A3B8",
  yellow:  "F59E0B",
  orange:  "E67E22",
};

// ─── HELPER FUNCTIONS ────────────────────────────────────────────────────────

function titleSlide(title, subtitle) {
  const slide = pres.addSlide();
  // Full dark background
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  // Red accent bar left
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.red } });
  // Decorative teal line
  slide.addShape(pres.ShapeType.rect, { x: 0.18, y: 0, w: 0.06, h: 5.625, fill: { color: C.teal } });
  // Big title
  slide.addText(title, {
    x: 0.5, y: 1.4, w: 9, h: 1.4,
    fontSize: 44, bold: true, color: C.white, fontFace: "Calibri",
    align: "center", valign: "middle",
  });
  // Subtitle
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.5, y: 3.0, w: 9, h: 0.6,
      fontSize: 20, color: C.teal, fontFace: "Calibri",
      align: "center", italic: true,
    });
  }
  // Bottom tag
  slide.addText("Comprehensive Clinical Review  |  Surgery & Emergency Medicine", {
    x: 0, y: 5.1, w: 10, h: 0.4,
    fontSize: 11, color: C.lightGray, align: "center", fontFace: "Calibri",
  });
  return slide;
}

function sectionDivider(title, subtitle) {
  const slide = pres.addSlide();
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.red } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.teal } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.545, w: 10, h: 0.08, fill: { color: C.teal } });
  slide.addText(title, {
    x: 0.5, y: 1.8, w: 9, h: 1.2,
    fontSize: 42, bold: true, color: C.white, fontFace: "Calibri",
    align: "center", valign: "middle",
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 1, y: 3.2, w: 8, h: 0.7,
      fontSize: 20, color: C.white, fontFace: "Calibri",
      align: "center", italic: true,
    });
  }
  return slide;
}

function contentSlide(title, bullets, opts = {}) {
  const slide = pres.addSlide();
  // Light background
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite } });
  // Top navy bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.navy } });
  // Red accent left on bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 0.85, fill: { color: C.red } });
  // Title
  slide.addText(title, {
    x: 0.3, y: 0.0, w: 9.4, h: 0.85,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
    valign: "middle", margin: 0,
  });

  // Build bullet array
  const items = bullets.map((b, i) => {
    if (typeof b === "string") {
      return { text: b, options: { bullet: { type: "bullet" }, breakLine: i < bullets.length - 1, fontSize: opts.fontSize || 17, color: C.gray, fontFace: "Calibri", paraSpaceAfter: 4 } };
    }
    // Object with heading/sub
    return b;
  });
  slide.addText(items, {
    x: 0.35, y: 0.95, w: 9.3, h: 4.5,
    valign: "top",
  });
  return slide;
}

function twoColSlide(title, leftTitle, leftItems, rightTitle, rightItems, leftColor, rightColor) {
  const slide = pres.addSlide();
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.8, fill: { color: C.navy } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 0.8, fill: { color: C.red } });
  slide.addText(title, {
    x: 0.3, y: 0, w: 9.4, h: 0.8,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0,
  });
  // Left column card
  slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.95, w: 4.5, h: 4.4, fill: { color: leftColor || C.navy }, line: { color: leftColor || C.navy } });
  slide.addText(leftTitle, { x: 0.35, y: 1.0, w: 4.3, h: 0.5, fontSize: 15, bold: true, color: C.white, fontFace: "Calibri" });
  const lItems = leftItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < leftItems.length - 1, fontSize: 14, color: C.white, fontFace: "Calibri", paraSpaceAfter: 3 } }));
  slide.addText(lItems, { x: 0.35, y: 1.5, w: 4.2, h: 3.7, valign: "top" });
  // Right column card
  slide.addShape(pres.ShapeType.rect, { x: 5.25, y: 0.95, w: 4.5, h: 4.4, fill: { color: rightColor || C.red }, line: { color: rightColor || C.red } });
  slide.addText(rightTitle, { x: 5.35, y: 1.0, w: 4.3, h: 0.5, fontSize: 15, bold: true, color: C.white, fontFace: "Calibri" });
  const rItems = rightItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < rightItems.length - 1, fontSize: 14, color: C.white, fontFace: "Calibri", paraSpaceAfter: 3 } }));
  slide.addText(rItems, { x: 5.35, y: 1.5, w: 4.2, h: 3.7, valign: "top" });
  return slide;
}

function tableSlide(title, tableRows, colWidths) {
  const slide = pres.addSlide();
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.8, fill: { color: C.navy } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 0.8, fill: { color: C.red } });
  slide.addText(title, { x: 0.3, y: 0, w: 9.4, h: 0.8, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
  slide.addTable(tableRows, {
    x: 0.3, y: 0.95, w: 9.4, h: 4.5,
    colW: colWidths || [4, 5.4],
    border: { type: "solid", pt: 0.5, color: "B0C4DE" },
    fontFace: "Calibri",
  });
  return slide;
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – Cover
// ════════════════════════════════════════════════════════════════════════════
titleSlide("APPENDICITIS", "Acute • Chronic • Special Populations • Surgery");

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – Outline
// ════════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 5.625, fill: { color: C.teal } });
  slide.addText("Lecture Outline", { x: 0.35, y: 0.2, w: 9, h: 0.6, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri" });
  const topics = [
    "1.  Overview & Epidemiology",
    "2.  Anatomy & Embryology",
    "3.  Pathophysiology & Bacteriology",
    "4.  Acute Appendicitis — Clinical Features",
    "5.  Scoring Systems (Alvarado, AIR, PAS)",
    "6.  Investigations & Imaging",
    "7.  Differential Diagnosis",
    "8.  Management — Non-Perforated",
    "9.  Perforated / Complicated Appendicitis",
    "10. Chronic & Recurrent Appendicitis",
    "11. Special Populations (Pediatric, Elderly, Pregnancy)",
    "12. Complications & Outcomes",
  ];
  const items = topics.map((t, i) => ({ text: t, options: { bullet: false, breakLine: i < topics.length - 1, fontSize: 16, color: C.white, fontFace: "Calibri", paraSpaceAfter: 2 } }));
  slide.addText(items, { x: 0.5, y: 0.9, w: 9, h: 4.5, valign: "top" });
}

// ════════════════════════════════════════════════════════════════════════════
// SECTION 1 – OVERVIEW & EPIDEMIOLOGY
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 1", "Overview & Epidemiology");

contentSlide("Overview & Epidemiology", [
  "Most common urgent/emergent general surgical operation in the United States",
  "Accounts for ~300,000 hospitalizations annually in the USA",
  "Lifetime risk: 6–7% of the general population",
  "Peak incidence: second decade of life (teens and young adults)",
  "Males slightly more affected than females overall",
  "Less common in developing countries — possibly linked to low-fiber, high-fat Western diet",
  "First formal description by Reginald Heber Fitz (Harvard, 1886)",
  "McBurney's classic muscle-splitting incision described in 1894",
  "First laparoscopic appendectomy performed by Kurt Semm in 1982",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 2 – ANATOMY
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 2", "Anatomy & Embryology");

contentSlide("Anatomy & Embryology", [
  "Midgut organ — first identified at 8 weeks of gestation as a small outpouching of the cecum",
  "Becomes elongated/tubular as cecum rotates medially; fixed in right lower quadrant",
  "Length: 2–20 cm (average 9 cm); diameter 6–7 mm when normal",
  "Mucosa: colonic-type columnar epithelium, neuroendocrine cells, mucin-producing goblet cells",
  "Submucosa contains lymphoid tissue — possible immune role (GALT)",
  "Evidence supports role as reservoir for 'good' intestinal bacteria — aids microbiome recolonization",
  "Blood supply: appendiceal artery (branch of ileocolic artery — terminal branch of SMA)",
  "Lymphatic drainage to ileocolic lymph nodes",
  "Position variants: retrocecal (most common ~65%), pelvic/preileal/postileal",
  "McBurney's point: junction of lateral 1/3 and medial 2/3 of a line from ASIS to umbilicus",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 3 – PATHOPHYSIOLOGY
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 3", "Pathophysiology & Bacteriology");

contentSlide("Pathophysiology", [
  "Core mechanism: luminal obstruction → increased intraluminal pressure → ischemia → necrosis → perforation",
  "Causes of obstruction:",
  "   • Fecaliths (hardened stool — most common in adults)",
  "   • Lymphoid hyperplasia (most common in children)",
  "   • Neoplasms (mucinous adenocarcinoma, carcinoid)",
  "   • Foreign bodies — vegetable matter, barium, parasites (Ascaris, pinworm)",
  "Ongoing mucus secretion + bacterial gas production → distention",
  "Distention impairs venous drainage → mucosal ischemia → full-thickness ischemia",
  "Bacterial overgrowth distal to obstruction → large inoculum on perforation",
  "Perforation → periappendiceal abscess OR diffuse peritonitis",
]);

contentSlide("Bacteriology of Appendicitis", [
  "Flora within appendix mirrors colonic flora — polymicrobial infection",
  "Antibiotic coverage must address both Gram-negative organisms AND anaerobes",
  "Common isolates in perforated appendicitis:",
  "   • Escherichia coli (most common Gram-negative)",
  "   • Bacteroides fragilis (most common anaerobe)",
  "   • Enterococci",
  "   • Pseudomonas aeruginosa",
  "   • Klebsiella pneumoniae",
  "Empiric antibiotics: 2nd-generation cephalosporin (e.g., cefoxitin) or piperacillin-tazobactam",
  "Duration: 24–48 h post-op for non-perforated; 4–5 days for perforated",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 4 – ACUTE APPENDICITIS
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 4", "Acute Appendicitis — Clinical Presentation");

contentSlide("Classic Clinical Presentation", [
  "Symptom sequence (highly characteristic):",
  "   1. Periumbilical/central abdominal colicky pain (visceral) — poorly localized",
  "   2. Anorexia, nausea, vomiting (follow pain onset)",
  "   3. Pain migrates to right lower quadrant (somatic — parietal peritoneum irritation)",
  "   4. Low-grade fever (38–38.5°C)",
  "Duration of symptoms at presentation: typically 24–72 hours",
  "Migration of pain is one of the most reliable historical findings",
  "Diarrhea or urinary symptoms may occur with pelvic appendix",
  "Atypical presentations more common in elderly, very young, pregnant women, and immunocompromised",
]);

twoColSlide(
  "Physical Examination Signs",
  "Key Signs",
  [
    "McBurney's point tenderness (RLQ)",
    "Rebound tenderness (Blumberg sign)",
    "Guarding / rigidity",
    "Rovsing's sign: RLQ pain on palpation of LLQ",
    "Psoas sign: pain on right hip extension (retrocecal appendix)",
    "Obturator sign: pain on internal rotation of right hip (pelvic appendix)",
    "Dunphy's sign: increased pain with cough",
  ],
  "Lab Findings",
  [
    "Leukocytosis: WBC 10,000–18,000/mm³ (most common)",
    "Left shift (neutrophilia)",
    "CRP elevated (sensitive but non-specific)",
    "Urinalysis: may show mild pyuria/hematuria if appendix near ureter",
    "Normal WBC does NOT exclude appendicitis",
    "Elevated WBC >18,000 suggests perforation",
    "Procalcitonin elevated in complicated disease",
  ],
  C.navy, "0D6B72"
);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 5 – SCORING SYSTEMS
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 5", "Clinical Scoring Systems");

tableSlide("Alvarado Score (MANTRELS)", [
  [
    { text: "Feature", options: { bold: true, color: C.white, fill: { color: C.navy }, fontSize: 14 } },
    { text: "Points", options: { bold: true, color: C.white, fill: { color: C.navy }, fontSize: 14 } },
  ],
  [{ text: "Migration of pain to RLQ", options: { fontSize: 14 } }, { text: "1", options: { fontSize: 14 } }],
  [{ text: "Anorexia / urinary acetone", options: { fontSize: 14 } }, { text: "1", options: { fontSize: 14 } }],
  [{ text: "Nausea / Vomiting", options: { fontSize: 14 } }, { text: "1", options: { fontSize: 14 } }],
  [{ text: "Tenderness in RLQ", options: { fontSize: 14 } }, { text: "2", options: { fontSize: 14 } }],
  [{ text: "Rebound tenderness", options: { fontSize: 14 } }, { text: "1", options: { fontSize: 14 } }],
  [{ text: "Elevated temperature (>37.3°C)", options: { fontSize: 14 } }, { text: "1", options: { fontSize: 14 } }],
  [{ text: "Leukocytosis (WBC >10,000)", options: { fontSize: 14 } }, { text: "2", options: { fontSize: 14 } }],
  [{ text: "TOTAL", options: { bold: true, fontSize: 14 } }, { text: "10", options: { bold: true, fontSize: 14 } }],
  [{ text: "Score 1–4: Low probability — discharge / observe", options: { italic: true, color: "2E8B57", fontSize: 13 } }, { text: "", options: {} }],
  [{ text: "Score 5–6: Equivocal — observe / imaging", options: { italic: true, color: C.orange, fontSize: 13 } }, { text: "", options: {} }],
  [{ text: "Score 7–10: High probability — surgical referral / OR", options: { italic: true, color: C.red, fontSize: 13 } }, { text: "", options: {} }],
], [7, 2.4]);

contentSlide("Other Scoring Systems", [
  "Appendicitis Inflammatory Response (AIR) Score — validated in children AND adults:",
  "   • Components: vomiting, RLQ pain, rebound/muscular defence, WBC, CRP, temperature",
  "   • AUC 0.90 — slightly superior to Alvarado in some studies",
  "",
  "Pediatric Appendicitis Score (Samuel Score / PAS):",
  "   • Scored out of 10 — similar components to Alvarado",
  "   • Specifically validated for children ages 2–18",
  "   • Useful when combined with ultrasound",
  "",
  "Adult Appendicitis Score (AAS):",
  "   • Uses WBC + CRP + clinical findings",
  "   • Low risk (<5): safe for discharge without imaging",
  "",
  "Note: No scoring system replaces clinical judgment — used as adjunct tools",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 6 – INVESTIGATIONS & IMAGING
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 6", "Investigations & Imaging");

contentSlide("Laboratory Investigations", [
  "CBC: Leukocytosis in ~80% (WBC usually 10,000–18,000/mm³); normal WBC does not exclude",
  "CRP: Elevated (>10 mg/L) — more sensitive in later disease (>24 h); used in AIR/AAS scores",
  "Urinalysis: Sterile pyuria/hematuria if appendix near ureter/bladder",
  "Urine pregnancy test (β-hCG): Mandatory in ALL females of childbearing age",
  "Blood cultures: Indicated in sepsis/perforated appendicitis",
  "Procalcitonin: Elevated in complicated appendicitis — poor discriminator for simple disease",
  "Metabolic panel: Assess dehydration, electrolyte status",
  "Liver function tests / amylase: If hepatobiliary or pancreatic pathology suspected in DDx",
]);

contentSlide("Imaging Modalities", [
  "Plain X-ray (AXR): Low sensitivity/specificity — may show fecalith (<15%); not recommended routinely",
  "",
  "Ultrasound (USS):",
  "   • First-line in children, pregnant women, fertile-age females",
  "   • Findings: non-compressible appendix >6 mm, periappendiceal free fluid",
  "   • Sensitivity ~75–85%; specificity ~85–95% in skilled hands",
  "   • Retrocecal appendix can be missed; poor visualization in obese patients",
  "",
  "CT Abdomen/Pelvis (contrast):",
  "   • Preferred in adults when US non-diagnostic or equivocal",
  "   • Gold standard: sensitivity ~94–98%, specificity ~95%",
  "   • Findings: thickened appendix >7 mm, periappendiceal fat stranding, fecalith, free fluid",
  "   • Can identify abscess, phlegmon, perforation, alternative diagnoses",
  "",
  "MRI:",
  "   • Used in pregnancy (avoids radiation) and pediatric patients when US non-diagnostic",
  "   • High sensitivity/specificity comparable to CT without ionizing radiation",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 7 – DIFFERENTIAL DIAGNOSIS
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 7", "Differential Diagnosis");

tableSlide("Differential Diagnosis by Population", [
  [
    { text: "Population", options: { bold: true, color: C.white, fill: { color: C.navy }, fontSize: 14 } },
    { text: "Key Differential Diagnoses", options: { bold: true, color: C.white, fill: { color: C.navy }, fontSize: 14 } },
  ],
  [{ text: "All patients", options: { fontSize: 13 } }, { text: "Mesenteric adenitis, right ureteric colic, UTI, IBD (Crohn's ileitis), Meckel's diverticulitis, caecal carcinoma", options: { fontSize: 13 } }],
  [{ text: "Children", options: { fontSize: 13 } }, { text: "Mesenteric adenitis (post-viral), intussusception, Meckel's diverticulitis, Henoch-Schönlein purpura, testicular torsion (males), gastroenteritis", options: { fontSize: 13 } }],
  [{ text: "Women of childbearing age", options: { fontSize: 13 } }, { text: "Ectopic pregnancy (must exclude!), ovarian torsion, ruptured ovarian cyst, mittelschmerz, PID/salpingitis, endometriosis, tubo-ovarian abscess", options: { fontSize: 13 } }],
  [{ text: "Elderly", options: { fontSize: 13 } }, { text: "Acute diverticulitis, perforated caecal carcinoma, sigmoid volvulus, ischaemic colitis, psoas abscess", options: { fontSize: 13 } }],
  [{ text: "Immunocompromised / neutropenic", options: { fontSize: 13 } }, { text: "Typhlitis (neutropenic enterocolitis) — must differentiate; CMV colitis", options: { fontSize: 13 } }],
  [{ text: "Pregnant", options: { fontSize: 13 } }, { text: "Physiologic round ligament pain, placental abruption, HELLP, cholecystitis, pyelonephritis, ovarian torsion", options: { fontSize: 13 } }],
], [3, 6.4]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 8 – MANAGEMENT
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 8", "Management of Acute Appendicitis");

contentSlide("Preoperative Management", [
  "IV access + IV fluid resuscitation (correct dehydration from fever/vomiting)",
  "Keep patient NBM (nil by mouth)",
  "IV antibiotics: Start BEFORE surgery",
  "   • Non-perforated: 2nd-gen cephalosporin (e.g., cefoxitin) or co-amoxiclav",
  "   • Perforated/complicated: piperacillin-tazobactam or meropenem",
  "Analgesia: IV opioids — does NOT mask examination (avoid withholding)",
  "Antiemetics as needed",
  "DVT prophylaxis (LMWH + TED stockings)",
  "Urinary catheter if very unwell or prolonged operation anticipated",
  "Consent: discuss laparoscopic vs open; risks of conversion, wound infection, ileus",
]);

twoColSlide(
  "Appendectomy — Laparoscopic vs Open",
  "Laparoscopic (Preferred)",
  [
    "3 ports: umbilical (10 mm), + 2 RLQ/suprapubic",
    "Appendix delivered via umbilical port",
    "Mesoappendix divided with diathermy / LigaSure",
    "Base ligated with endoloop or stapler",
    "Less postop pain, faster recovery",
    "Better visualization of pelvis / all 4 quadrants",
    "Shorter hospital stay",
    "Lower wound infection rate",
    "Preferred in obese and fertile-age females",
  ],
  "Open (Gridiron / Lanz Incision)",
  [
    "Muscle-splitting incision at McBurney's point",
    "Indicated if: perforation + dense adhesions, no laparoscopic expertise, hemodynamically unstable",
    "Lanz incision: more cosmetically acceptable (transverse RIF)",
    "Appendix located, base ligated and divided",
    "Mesoappendix divided and ligated",
    "Wound left open in perforated cases (to reduce SSI)",
    "Longer recovery but remains gold standard when necessary",
  ],
  "1A237E", "0D6B72"
);

contentSlide("Antibiotics-Only (Non-operative) Management", [
  "Growing evidence that selected patients with uncomplicated acute appendicitis can be managed non-operatively with antibiotics alone",
  "Success rate ~70–80% in the short term",
  "The APPAC trial (Finland) and CODA trial (USA) demonstrated non-inferiority of antibiotics vs surgery at 1 year in uncomplicated appendicitis",
  "However: 20–30% of antibiotic-only patients require appendectomy within 1 year",
  "   • Of these, ~60% have appendicolith — higher failure rate",
  "Antibiotic regimen: IV ertapenem or piperacillin-tazobactam × 3 days, then oral amoxicillin-clavulanate × 7–10 days",
  "Contraindications: fecalith on imaging, perforated appendicitis, peritonitis, sepsis",
  "SHARED DECISION MAKING — patient preference is paramount",
  "Suitable for: adults, uncomplicated disease, no fecalith, accepts risk of recurrence",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 9 – PERFORATED APPENDICITIS
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 9", "Perforated & Complicated Appendicitis");

contentSlide("Perforated Appendicitis", [
  "Occurs in ~20–30% of cases (higher in children <5 yrs and elderly)",
  "Signs suggesting perforation:",
  "   • Fever >38.5°C, WBC >18,000/mm³",
  "   • Diffuse peritonism or localised mass/abscess in RIF",
  "   • CT: free air, periappendiceal abscess, extraluminal fecalith",
  "Management options:",
  "   1. Emergency appendectomy (laparoscopic or open) — for generalised peritonitis / systemic toxicity",
  "   2. Interval appendectomy approach (for contained abscess/phlegmon):",
  "      - Percutaneous CT/USS-guided drainage of abscess if >3 cm",
  "      - IV broad-spectrum antibiotics × 4–7 days",
  "      - Interval appendectomy at 6–8 weeks (outpatient setting)",
  "   3. If extraluminal fecalith on CT: retrieve fecalith at time of appendectomy",
  "Children <4–5 years: tend NOT to localize infection — typically require early surgery",
]);

contentSlide("Appendiceal Abscess & Phlegmon", [
  "Appendiceal mass = phlegmon or abscess formed when omentum/bowel walls off perforated appendix",
  "Phlegmon: inflammatory mass without a discrete cavity — typically managed conservatively (antibiotics)",
  "Appendiceal abscess: discrete pus collection — image-guided percutaneous drainage preferred",
  "Indication for immediate surgery despite abscess: generalised peritonitis, intestinal obstruction, systemic sepsis",
  "Post-drainage: broad-spectrum IV antibiotics, monitor closely",
  "Interval (delayed) appendectomy at 6–8 weeks:",
  "   • Controversial — some studies show low recurrence rate without elective appendectomy",
  "   • Most surgeons still recommend interval appendectomy (avoids ~15–20% recurrence risk)",
  "Colonoscopy should be performed before interval appendectomy in patients >40 years (exclude caecal carcinoma)",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 10 – CHRONIC APPENDICITIS
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 10", "Chronic & Recurrent Appendicitis");

contentSlide("Chronic & Recurrent Appendicitis", [
  "Uncommon entity — often misdiagnosed (less well-recognized than acute appendicitis)",
  "Definition: recurrent episodes of right lower quadrant pain not associated with febrile illness",
  "Imaging findings: appendicolith or dilated appendix on CT/USS without active inflammation",
  "Cause: repeated incomplete self-limiting obstruction of the appendix lumen",
  "",
  "Clinical features:",
  "   • Episodic RLQ pain lasting hours to days — self-resolving",
  "   • Mild nausea; no high fever",
  "   • Attacks vary in frequency and intensity",
  "   • Patients often report resolution of symptoms with prior antibiotic courses",
  "",
  "Diagnosis of exclusion — must rule out IBD, IBS, ovarian pathology, urolithiasis, Meckel's",
  "Treatment: elective laparoscopic appendectomy — results in resolution of symptoms in majority",
  "Histology may show chronic inflammatory changes, fibrosis, or endometriosis of appendix",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 11 – SPECIAL POPULATIONS
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 11", "Special Populations");

contentSlide("Appendicitis in Children", [
  "~1 in 8 children undergo workup for suspected appendicitis",
  "Perforation rates: 51–100% in infants/toddlers; lower in school-age children",
  "Neonates: may present with abdominal distension, lethargy/irritability only",
  "Young children: often cannot localize pain; viral syndromes coexist — diagnosis difficult",
  "Use Pediatric Appendicitis Score (PAS) as adjunct",
  "Imaging: Ultrasound first (avoid radiation) → MRI if US non-diagnostic → CT if still unclear",
  "In girls: exclude ovarian pathology (cyst, torsion) with USS before operating",
  "Perforated appendicitis in children: percutaneous drainage + IV antibiotics (if localised abscess)",
  "Children <4 yrs: poorly localise infection → favour early surgery",
  "Non-operative management: ~80% short-term success but high 1-yr failure rate — use cautiously",
]);

contentSlide("Appendicitis in Pregnancy", [
  "Most common surgical emergency in pregnant patients",
  "Incidence: same as non-pregnant women; but delays in diagnosis → higher perforation rates",
  "Pregnant women with perforation: near 2× increase in sepsis, septic shock, transfusion, pneumonia, bowel obstruction",
  "First half of pregnancy: presentation similar to non-pregnant women",
  "Second/third trimester: appendix displaced upward — atypical location of pain",
  "   • In third trimester, only <25% of patients have appendix displaced from RLQ",
  "   • Displaced abdominal wall may mask peritoneal signs",
  "WBC physiologically elevated in pregnancy — interpret cautiously",
  "Imaging: Ultrasound first; MRI preferred if US non-diagnostic (avoids radiation)",
  "CT: Use if MRI unavailable and diagnosis uncertain — fetal risk of delayed diagnosis > radiation risk",
  "Treatment: Appendectomy (laparoscopic preferred in all trimesters); general anaesthesia is safe",
  "Obstetric team involvement essential; fetal monitoring peri-operatively",
]);

contentSlide("Appendicitis in the Elderly", [
  "Higher morbidity and mortality compared with younger patients",
  "Atypical presentations common — blunted immune response → less pain, lower fever, less leukocytosis",
  "Perforation rate significantly higher (often 50–70%) due to delayed presentation/diagnosis",
  "Differential diagnosis broadened: diverticulitis, caecal carcinoma, sigmoid volvulus, ischaemic colitis",
  "Colonoscopy or CT colonography recommended before interval appendectomy (exclude underlying malignancy)",
  "Consider CECT abdomen in all elderly patients with unexplained RLQ pain",
  "Management: same principles as adults — IV antibiotics, appendectomy; higher anaesthetic risk",
  "Post-op complications more common: wound infection, pneumonia, ileus, DVT",
]);

contentSlide("Appendicitis in Immunocompromised Patients", [
  "Includes: HIV/AIDS, transplant recipients on immunosuppression, chemotherapy patients (neutropenia)",
  "Blunted inflammatory response — even more atypical presentations",
  "Risk of mistaking typhlitis (neutropenic enterocolitis) for appendicitis in neutropenic patients",
  "Typhlitis vs Appendicitis on CT: typhlitis shows caecal wall thickening without a discrete dilated appendix",
  "Higher risk of perforation and septic complications",
  "Antibiotic coverage must be broad — cover fungal organisms in severely immunocompromised",
  "Incidental appendectomy during other procedures: indicated in patients undergoing chemotherapy where examination will be unreliable",
  "Surgical decision: lower threshold for operation in neutropenic patients despite higher risk",
]);

// ════════════════════════════════════════════════════════════════════════════
// SECTION 12 – COMPLICATIONS & OUTCOMES
// ════════════════════════════════════════════════════════════════════════════
sectionDivider("SECTION 12", "Complications & Outcomes");

tableSlide("Complications of Appendicitis & Appendectomy", [
  [
    { text: "Complication", options: { bold: true, color: C.white, fill: { color: C.navy }, fontSize: 14 } },
    { text: "Details", options: { bold: true, color: C.white, fill: { color: C.navy }, fontSize: 14 } },
  ],
  [{ text: "Wound infection (SSI)", options: { fontSize: 13 } }, { text: "Most common; 5–10% simple, 20–40% perforated; reduced with prophylactic antibiotics", options: { fontSize: 13 } }],
  [{ text: "Intra-abdominal abscess", options: { fontSize: 13 } }, { text: "Pelvic, subhepatic, or paracolic; CT-guided drainage; common after perforated appendicitis", options: { fontSize: 13 } }],
  [{ text: "Ileus / SBO", options: { fontSize: 13 } }, { text: "Post-operative ileus common; adhesive SBO (small bowel obstruction) — long-term complication", options: { fontSize: 13 } }],
  [{ text: "Stump appendicitis", options: { fontSize: 13 } }, { text: "Inflammation of residual appendiceal stump if insufficiently resected — rare but important diagnosis", options: { fontSize: 13 } }],
  [{ text: "Faecal fistula", options: { fontSize: 13 } }, { text: "Rare; usually resolves spontaneously; if persists, suspect IBD or malignancy", options: { fontSize: 13 } }],
  [{ text: "Right iliac fossa abscess", options: { fontSize: 13 } }, { text: "If untreated or incompletely drained perforation", options: { fontSize: 13 } }],
  [{ text: "Pylephlebitis", options: { fontSize: 13 } }, { text: "Septic portal vein thrombophlebitis — rare but life-threatening; IV antibiotics ± anticoagulation", options: { fontSize: 13 } }],
  [{ text: "Death", options: { fontSize: 13 } }, { text: "Non-perforated <0.1%; perforated ~1–4%; higher in elderly and immunocompromised", options: { fontSize: 13 } }],
], [3.4, 6]);

contentSlide("Negative Appendectomy & Outcomes", [
  "Negative appendectomy rate: historically 15–20% (now <5% with CT/MRI)",
  "Even if no appendicitis found: thorough laparoscopic exploration of peritoneum is mandatory",
  "Normal appendix found at operation: typically still removed to prevent future diagnostic confusion",
  "",
  "Appendix microbiome — emerging evidence:",
  "   • Post-appendectomy patients have worse outcomes in recurrent Clostridioides difficile infection",
  "   • Epidemiologic link between appendectomy before age 20 and prostate cancer development",
  "",
  "Incidental appendectomy: NOT routinely recommended (risk of adhesions > future appendicitis risk)",
  "   • Exception: during cytoreductive surgery for ovarian malignancy, pediatric chemotherapy patients, patients traveling to remote areas",
  "",
  "Overall mortality: <0.1% for non-perforated; increased in elderly/co-morbid patients",
]);

// ════════════════════════════════════════════════════════════════════════════
// FINAL SLIDE – Summary
// ════════════════════════════════════════════════════════════════════════════
{
  const slide = pres.addSlide();
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.teal } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.545, w: 10, h: 0.08, fill: { color: C.red } });
  slide.addText("Key Takeaways", {
    x: 0.5, y: 0.15, w: 9, h: 0.65, fontSize: 26, bold: true, color: C.teal, fontFace: "Calibri", align: "center",
  });
  const points = [
    "Appendicitis = most common surgical emergency; lifetime risk 6–7%; peaks in 2nd decade",
    "Core mechanism: luminal obstruction → ischemia → perforation (fecalith > lymphoid hyperplasia)",
    "Classic triad: periumbilical pain migrating to RLQ + anorexia + fever",
    "Use Alvarado/AIR scoring as adjunct; CT is gold standard imaging in adults",
    "Treatment: laparoscopic appendectomy is definitive; antibiotics-only is an option in selected uncomplicated cases",
    "Perforated appendicitis: emergency surgery OR interval approach (drain + delayed appendectomy)",
    "Chronic appendicitis: episodic RLQ pain + appendicolith; treat with elective appendectomy",
    "Special populations: higher perforation risk in children <5 yr, elderly, and pregnant; use USS/MRI to minimize radiation",
    "Complications: wound infection > intra-abdominal abscess > ileus > stump appendicitis",
  ];
  const items = points.map((p, i) => ({ text: p, options: { bullet: { type: "bullet" }, breakLine: i < points.length - 1, fontSize: 14.5, color: C.white, fontFace: "Calibri", paraSpaceAfter: 3 } }));
  slide.addText(items, { x: 0.5, y: 0.9, w: 9, h: 4.5, valign: "top" });
}

// ─── WRITE FILE ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/appendicitis-ppt/Appendicitis_Complete.pptx" })
  .then(() => console.log("SUCCESS: Appendicitis_Complete.pptx created"))
  .catch(e => console.error("ERROR:", e));
Running Command

cd /home/daytona/workspace/appendicitis-ppt && node appendicitis_ppt.js

Running Command

ls -lh /home/daytona/workspace/appendicitis-ppt/Appendicitis_Complete.pptx

Your presentation is ready! Here it is:

Appendicitis Complete

Presentation · PPTX


What's inside (23 slides across 12 sections):
#SectionSlides
1Cover + Outline2
2Overview & Epidemiology1
3Anatomy & Embryology1
4Pathophysiology & Bacteriology2
5Acute Appendicitis — Clinical Presentation & Signs2
6Scoring Systems (Alvarado table, AIR, PAS, AAS)2
7Investigations & Imaging (labs + USS/CT/MRI)2
8Differential Diagnosis by population (table)1
9Management — preop, laparoscopic vs open, antibiotics-only3
10Perforated & Complicated Appendicitis2
11Chronic & Recurrent Appendicitis1
12Special Populations — Pediatric, Pregnancy, Elderly, Immunocompromised4
13Complications (table) + Outcomes2
14Key Takeaways Summary1
Design: Navy/red/teal color scheme with dark header bars on each slide, two-column comparison cards, and formatted tables. Content sourced from Sabiston's Surgery, Schwartz's Principles of Surgery, Bailey & Love, and Rosen's Emergency Medicine.
This is a shared conversation. Sign in to Orris to start your own chat.