help me generate a 20 slide ppt on duodenal ulcer

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

mkdir -p /home/daytona/workspace/duodenal-ulcer-ppt && ls /home/daytona/workspac…

Writing File

~/duodenal-ulcer-ppt/generate.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Medical Education";
pres.title = "Duodenal Ulcer";

// ─── DESIGN TOKENS ───────────────────────────────────────────────────────────
const C = {
  navy:      "0D2B55",   // dominant dark background
  teal:      "1B7A8A",   // accent bars / headers
  gold:      "E8B84B",   // highlight / accent
  white:     "FFFFFF",
  lightGray: "E8EEF4",
  midGray:   "6B8BA4",
  darkText:  "0D2B55",
  subText:   "2C4A6E",
};

const FONTS = { head: "Calibri", body: "Calibri" };

// ─── HELPERS ─────────────────────────────────────────────────────────────────

function titleSlide(slide, title, subtitle) {
  // full-bleed dark background
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  // gold accent bar left
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.25, h: 5.625, fill: { color: C.gold } });
  // teal accent strip at bottom
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 10, h: 0.2, fill: { color: C.teal } });

  slide.addText(title, {
    x: 0.6, y: 1.5, w: 8.8, h: 1.4,
    fontSize: 44, bold: true, color: C.white,
    fontFace: FONTS.head, align: "center", valign: "middle",
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.6, y: 3.0, w: 8.8, h: 0.8,
      fontSize: 22, color: C.gold, fontFace: FONTS.body, align: "center",
    });
  }
  slide.addText("Sources: Schwartz's Principles of Surgery 11e | Current Surgical Therapy 14e | Goldman-Cecil Medicine", {
    x: 0.6, y: 4.9, w: 8.8, h: 0.3,
    fontSize: 9, color: "6B8BA4", fontFace: FONTS.body, align: "center",
  });
}

function sectionDivider(slide, label) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.teal } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.18, fill: { color: C.gold } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.44, w: 10, h: 0.18, fill: { color: C.gold } });
  slide.addText(label, {
    x: 0.5, y: 1.8, w: 9, h: 2.0,
    fontSize: 40, bold: true, color: C.white,
    fontFace: FONTS.head, align: "center", valign: "middle",
  });
}

function contentSlide(slide, title, bullets, opts = {}) {
  // header bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.98, w: 10, h: 0.05, fill: { color: C.gold } });
  // slide number accent
  slide.addShape(pres.ShapeType.rect, { x: 9.5, y: 0, w: 0.5, h: 1.0, fill: { color: C.teal } });

  slide.addText(title, {
    x: 0.3, y: 0.1, w: 9.0, h: 0.8,
    fontSize: 22, bold: true, color: C.white,
    fontFace: FONTS.head, valign: "middle",
  });

  const items = bullets.map((b, i) => {
    if (typeof b === "string") {
      return { text: b, options: { bullet: { code: "2022" }, color: C.darkText, fontSize: opts.fontSize || 16, fontFace: FONTS.body, breakLine: i < bullets.length - 1, paraSpaceBefore: 4 } };
    }
    // sub-bullet object {text, sub}
    return { text: b.text, options: { bullet: { code: "2022" }, color: C.darkText, fontSize: opts.fontSize || 16, fontFace: FONTS.body, bold: b.bold || false, breakLine: true, paraSpaceBefore: 4 } };
  });

  slide.addText(items, {
    x: 0.4, y: 1.15, w: 9.2, h: 4.2,
    valign: "top",
  });
}

function twoColSlide(slide, title, leftTitle, leftBullets, rightTitle, rightBullets) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.98, w: 10, h: 0.05, fill: { color: C.gold } });
  slide.addText(title, {
    x: 0.3, y: 0.1, w: 9.2, h: 0.8,
    fontSize: 22, bold: true, color: C.white, fontFace: FONTS.head, valign: "middle",
  });

  // left column header
  slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.1, w: 4.3, h: 0.35, fill: { color: C.teal } });
  slide.addText(leftTitle, { x: 0.3, y: 1.1, w: 4.3, h: 0.35, fontSize: 13, bold: true, color: C.white, fontFace: FONTS.head, align: "center", valign: "middle" });
  const lItems = leftBullets.map((b, i) => ({
    text: b, options: { bullet: { code: "2022" }, color: C.darkText, fontSize: 14, fontFace: FONTS.body, breakLine: i < leftBullets.length - 1, paraSpaceBefore: 3 }
  }));
  slide.addText(lItems, { x: 0.3, y: 1.5, w: 4.3, h: 3.9, valign: "top" });

  // right column header
  slide.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.1, w: 4.5, h: 0.35, fill: { color: C.gold } });
  slide.addText(rightTitle, { x: 5.2, y: 1.1, w: 4.5, h: 0.35, fontSize: 13, bold: true, color: C.navy, fontFace: FONTS.head, align: "center", valign: "middle" });
  const rItems = rightBullets.map((b, i) => ({
    text: b, options: { bullet: { code: "2022" }, color: C.darkText, fontSize: 14, fontFace: FONTS.body, breakLine: i < rightBullets.length - 1, paraSpaceBefore: 3 }
  }));
  slide.addText(rItems, { x: 5.2, y: 1.5, w: 4.5, h: 3.9, valign: "top" });
}

function tableSlide(slide, title, headers, rows) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.98, w: 10, h: 0.05, fill: { color: C.gold } });
  slide.addText(title, {
    x: 0.3, y: 0.1, w: 9.2, h: 0.8,
    fontSize: 22, bold: true, color: C.white, fontFace: FONTS.head, valign: "middle",
  });

  const tableData = [
    headers.map(h => ({ text: h, options: { bold: true, color: C.white, fill: C.teal, align: "center", fontSize: 13, fontFace: FONTS.head } })),
    ...rows.map((row, ri) => row.map(cell => ({
      text: cell,
      options: { color: C.darkText, fill: ri % 2 === 0 ? "EBF3F8" : C.white, fontSize: 12, fontFace: FONTS.body }
    })))
  ];

  slide.addTable(tableData, { x: 0.3, y: 1.15, w: 9.4, h: 4.2, colW: Array(headers.length).fill(9.4 / headers.length), border: { pt: 0.5, color: "C0D4E8" }, autoPage: false });
}

// ─── SLIDES ───────────────────────────────────────────────────────────────────

// SLIDE 1 – Title
let sl = pres.addSlide();
titleSlide(sl, "Duodenal Ulcer", "Pathophysiology • Clinical Features • Diagnosis • Management");

// SLIDE 2 – Learning Objectives
sl = pres.addSlide();
contentSlide(sl, "Learning Objectives", [
  "Define peptic ulcer disease (PUD) and distinguish duodenal from gastric ulcer",
  "Describe the epidemiology and global burden of duodenal ulcer",
  "Explain the pathophysiology - acid-peptic imbalance, H. pylori, and NSAIDs",
  "Identify the major risk factors and etiology",
  "Recognize the clinical presentation and symptoms",
  "Outline the diagnostic approach including EGD and H. pylori testing",
  "Detail medical management including PPI therapy and H. pylori eradication",
  "Discuss surgical indications and operative options for complications",
  "Describe the major complications: perforation, bleeding, obstruction",
  "Understand prognosis and prevention strategies",
]);

// SLIDE 3 – Definition & Epidemiology
sl = pres.addSlide();
contentSlide(sl, "Definition & Epidemiology", [
  "Peptic ulcers are focal defects in gastric or duodenal mucosa extending into submucosa or deeper - caused by an imbalance between mucosal defense and acid/peptic injury",
  "Duodenal ulcers (DU) are the most common form - typically located in the duodenal bulb (first part of duodenum)",
  "Prevalence: ~2% in the US general population; lifetime cumulative prevalence ~10%, peaking at age 70",
  "Estimated economic burden exceeds $8 billion per year in the US (lost productivity + healthcare costs)",
  "Hospitalization mortality: 3.7% for duodenal ulcer vs 2.1% for gastric ulcer (National Inpatient Sample)",
  "Age-adjusted hospitalization rate: 56.5 per 100,000 - down 21% over the past decade",
  "Decrease in elective surgery predated widespread PPI use and likely reflects declining H. pylori prevalence",
  "Emergency surgery rates and ulcer-related mortality have NOT decreased as dramatically",
]);

// SLIDE 4 – Section Divider: Etiology & Pathophysiology
sl = pres.addSlide();
sectionDivider(sl, "Etiology & Pathophysiology");

// SLIDE 5 – Etiology: The Big Three
sl = pres.addSlide();
contentSlide(sl, "Etiology: Major Causes", [
  "H. pylori infection: present in up to 90% of duodenal ulcer patients - single most important cause",
  "NSAID use (including aspirin): impairs prostaglandin synthesis, weakens mucosal defense",
  "Cigarette smoking: increases acid secretion, impairs mucosal healing, promotes H. pylori colonization",
  "Combined H. pylori + NSAID + smoking: likely accounts for >90% of serious PUD complications in the US",
  "Zollinger-Ellison syndrome (gastrinoma): autonomous hypergastrinemia → massive acid hypersecretion",
  "Other rare causes: antral G-cell hyperfunction/hyperplasia, systemic mastocytosis",
  "Physiologic stress ulcers (Curling's ulcer - burns; Cushing's ulcer - CNS injury): acute, stress-related",
  "Medications: all NSAIDs, cocaine; psychologic stress also implicated",
]);

// SLIDE 6 – Pathophysiology
sl = pres.addSlide();
contentSlide(sl, "Pathophysiology of Duodenal Ulcer", [
  "Core principle: imbalance between aggressive factors and mucosal defense mechanisms",
  "Aggressive factors: acid, pepsin, H. pylori, NSAIDs, bile salts, stress",
  "Defense factors: mucus-bicarbonate layer, prostaglandins, mucosal blood flow, epithelial restitution",
  "Acid secretion abnormalities in DU patients:",
  "  - Higher mean basal acid output (BAO) and maximal acid output (MAO) vs. controls",
  "  - Increased acid response to gastrin, histamine, and other secretagogues",
  "  - Often inappropriately 'normal' fasting gastrin despite higher parietal cell mass sensitivity",
  "  - Faster gastric emptying → increased acid load per unit time delivered to duodenum",
  "Decreased duodenal bicarbonate secretion + duodenal gastric metaplasia impair buffering",
  "H. pylori disrupts mucus layer, triggers inflammation, raises gastrin, lowers somatostatin",
]);

// SLIDE 7 – H. pylori Role
sl = pres.addSlide();
twoColSlide(sl,
  "Role of H. pylori in Duodenal Ulcer",
  "How H. pylori Causes DU",
  [
    "Gram-negative spiral bacterium that colonizes gastric antrum",
    "Produces urease → converts urea to NH3, buffering local pH and evading acid",
    "Triggers chronic active gastritis → antral predominant infection",
    "Raises gastrin secretion from G-cells; suppresses somatostatin from D-cells",
    "Net effect: increased acid secretion into duodenum",
    "Mucosal invasion by CagA+ strains → epithelial damage and inflammation",
    "Metaplastic gastric-type epithelium in duodenum colonized by H. pylori → ulceration",
  ],
  "H. pylori Eradication Effect",
  [
    "Eradication dramatically reduces DU recurrence (from ~80% to <10% at 1 year)",
    "Ranitidine + antibiotics vs. ranitidine alone: recurrence drops from ~70% to <5%",
    "Eradication is the cornerstone of definitive DU management",
    "Confirms causative role: treating infection heals mucosal disease",
    "Failure to eradicate is the most common reason for refractory ulcer",
    "Test-of-cure recommended 4 weeks post-treatment",
  ]
);

// SLIDE 8 – Clinical Features
sl = pres.addSlide();
sectionDivider(sl, "Clinical Presentation");

// SLIDE 9 – Symptoms
sl = pres.addSlide();
contentSlide(sl, "Clinical Presentation of Duodenal Ulcer", [
  "Classic symptom: epigastric pain - burning or gnawing in character",
  "Pain pattern: typically occurs 2-3 hours after meals (when stomach empties) and at night (2-4 AM)",
  "RELIEF with food or antacids - distinguishing feature vs. gastric ulcer (which may worsen with eating)",
  "\"Hunger pain\" - patients may describe pain resembling severe hunger pangs",
  "Nausea may accompany pain; vomiting uncommon unless outlet obstruction present",
  "Pain may radiate to the back (especially if posterior wall penetration is present)",
  "Chronic course with periods of remission and relapse over months to years",
  "20-30% of patients are ASYMPTOMATIC - especially NSAID users (blunted pain response)",
  "Many patients present for the first time with a complication (bleeding, perforation)",
  "Weight loss is UNCOMMON in DU (unlike gastric ulcer/malignancy) - appetite usually preserved",
]);

// SLIDE 10 – Diagnosis
sl = pres.addSlide();
contentSlide(sl, "Diagnostic Approach", [
  "Esophagogastroduodenoscopy (EGD): Gold standard - direct visualization, confirms location and depth",
  "Biopsy of duodenal ulcer: NOT routinely required (malignancy in duodenum is rare)",
  "Gastric biopsies: ALWAYS take if gastric ulcer present - biopsy to rule out malignancy",
  "Barium upper GI series: alternative if EGD unavailable; less sensitive for small/flat ulcers",
  "H. pylori testing - non-invasive options:",
  "  - Urea Breath Test (UBT): highly accurate, good for initial diagnosis and test-of-cure",
  "  - Fecal antigen test: accurate, easy to perform, useful for test-of-cure",
  "  - Serology: detects IgG; cannot distinguish active vs. past infection - not preferred",
  "H. pylori testing - invasive (via EGD biopsy):",
  "  - Rapid urease test (CLO test): fast, specific, inexpensive",
  "  - Histology: definitive, also detects gastritis; gold standard for diagnosis",
  "  - Culture and RT-PCR: used for antibiotic resistance testing",
  "Fasting serum gastrin: obtain if ZES suspected (multiple ulcers, refractory disease, diarrhea)",
]);

// SLIDE 11 – Medical Management
sl = pres.addSlide();
sectionDivider(sl, "Medical Management");

// SLIDE 12 – Medical Tx
sl = pres.addSlide();
contentSlide(sl, "Medical Management of Duodenal Ulcer", [
  "Mainstays: acid suppression + H. pylori eradication + elimination of causative agents",
  "PPI therapy: first-line acid suppression (omeprazole, pantoprazole, esomeprazole, etc.)",
  "  - Heal ulcers in 4-8 weeks in >90% of patients",
  "  - Long-term PPIs NOT indicated unless ongoing NSAID/aspirin/anticoagulant use required",
  "H. pylori eradication: treat ALL H. pylori positive DU patients - reduces recurrence from ~80% to <10%",
  "NSAID cessation: remove offending agent whenever possible",
  "Smoking cessation: reduces ulcer recurrence and improves healing",
  "Antacids: symptomatic relief only, not used as primary therapy",
  "H2-receptor antagonists (ranitidine, famotidine): second-line; less effective than PPIs",
  "Misoprostol: prostaglandin analog - used for NSAID ulcer prophylaxis (not primary DU treatment)",
  "Sucralfate: mucosal protective agent; used as adjunctive therapy",
  "Evaluation for ZES (gastrinoma) in appropriate clinical context",
]);

// SLIDE 13 – H. pylori Eradication Regimens
sl = pres.addSlide();
tableSlide(sl, "H. pylori Eradication Regimens (10-14 days)",
  ["Regimen", "Components", "Notes"],
  [
    ["Clarithromycin Triple Therapy", "PPI + Clarithromycin + Amoxicillin (or Metronidazole)", "First-line; avoid in areas with >15% clarithromycin resistance"],
    ["Bismuth Quadruple Therapy", "PPI + Bismuth + Tetracycline + Nitroimidazole", "Preferred if clarithromycin resistance suspected; also used as salvage"],
    ["Sequential Therapy", "PPI + Amoxicillin (5-7 days) → PPI + Clarithromycin + Nitroimidazole (5-7 days)", "May overcome amoxicillin-resistant strains; 10-14 days total"],
    ["Hybrid Therapy", "PPI + Amoxicillin (7 days) → PPI + Amoxicillin + Clarithromycin + Nitroimidazole (7 days)", "Combines sequential and concomitant approaches"],
    ["Levofloxacin Triple Therapy", "PPI + Levofloxacin + Amoxicillin", "Salvage therapy; check local fluoroquinolone resistance rates"],
  ]
);

// SLIDE 14 – Complications Overview
sl = pres.addSlide();
sectionDivider(sl, "Complications of Duodenal Ulcer");

// SLIDE 15 – Perforation
sl = pres.addSlide();
contentSlide(sl, "Complication 1: Perforation", [
  "Most common indication for emergency surgery in DU",
  "Presentation: sudden-onset severe epigastric pain - patient can often pinpoint the exact time",
  "Examination: board-like rigidity, generalised peritonitis, patient lies still",
  "Vitals: early tachycardia; later fever, tachypnea; hypotension is a LATE ominous finding",
  "Diagnosis: upright CXR shows free air under diaphragm (pneumoperitoneum) in 85-90% of cases",
  "CT abdomen: nearly always shows extraluminal air and free peritoneal fluid - highly sensitive",
  "Mortality: up to 30% in modern series - increased significantly with delay in surgery",
  "Management: prompt IV fluids, IV antibiotics, and SURGERY",
  "Operation: laparotomy or laparoscopy + peritoneal washout (5-10 L) + omental patch (Graham patch)",
  "Graham patch: omentum applied over perforation with Lembert sutures into healthy duodenum",
  "Stable, sealed perforation without peritonitis: rare candidate for non-operative management",
]);

// SLIDE 16 – Bleeding Duodenal Ulcer
sl = pres.addSlide();
contentSlide(sl, "Complication 2: Upper GI Bleeding", [
  "Most common complication of DU; leading cause of upper GI bleeding overall",
  "Presentation: haematemesis, melena, or coffee-ground emesis; occasionally haematochezia (brisk bleeding)",
  "Posterior DU bleeds by eroding the gastroduodenal artery (GDA)",
  "Rockall Score: used to stratify re-bleeding and mortality risk (clinical + endoscopic criteria)",
  "Initial management: IV access, fluid resuscitation, blood transfusion, IV PPI (high-dose infusion)",
  "Endoscopic therapy (1st line): injection epinephrine + thermal coagulation or haemoclip placement",
  "High-risk endoscopic stigmata: active arterial bleeding, visible vessel, adherent clot",
  "Interventional radiology: angiography + embolisation for failed endoscopic haemostasis",
  "Surgery (last resort): oversewing of bleeding vessel (ligation of GDA); consider vagotomy/pyloroplasty",
  "H. pylori eradication after haemostasis reduces re-bleeding recurrence dramatically",
]);

// SLIDE 17 – Gastric Outlet Obstruction
sl = pres.addSlide();
contentSlide(sl, "Complication 3: Gastric Outlet Obstruction", [
  "Now a rare complication due to early detection and treatment of DU",
  "Caused by fibrosis and scarring from chronic DU in the duodenal bulb/pyloric region",
  "Acute obstruction: oedema around an acute ulcer (may resolve with medical therapy)",
  "Chronic obstruction: fixed fibrotic stenosis - requires intervention",
  "Presentation: recurrent vomiting (often undigested food), early satiety, weight loss, abdominal distension",
  "Succussion splash: positive in advanced obstruction",
  "Metabolic: hypochloraemic, hypokalaemic metabolic alkalosis (loss of HCl in vomit)",
  "Diagnosis: EGD (defines anatomy) + CT abdomen (rules out malignancy)",
  "Management:",
  "  - NG decompression, IV fluid/electrolyte replacement, IV PPI",
  "  - Endoscopic balloon dilation: first-line for benign pyloric stenosis",
  "  - Surgery (gastrojejunostomy or antrectomy): if dilation fails or recurs",
]);

// SLIDE 18 – Surgical Treatment
sl = pres.addSlide();
twoColSlide(sl,
  "Surgical Treatment of Peptic Ulcer Disease",
  "Indications for Surgery",
  [
    "Perforation (most common)",
    "Uncontrolled haemorrhage not amenable to endoscopy/IR",
    "Gastric outlet obstruction refractory to dilation",
    "Intractable ulcer (refractory to maximal medical therapy)",
    "Suspicion of malignancy",
    "ZES not controllable medically",
  ],
  "Surgical Options",
  [
    "Omental (Graham) patch: for perforation - plug hole with omentum",
    "Oversewing of bleeding vessel (GDA ligation): for bleeding DU",
    "Truncal vagotomy + pyloroplasty: reduces acid; drainage procedure required",
    "Truncal vagotomy + antrectomy (Billroth I or II): most definitive; lowest recurrence",
    "Highly selective vagotomy (parietal cell vagotomy): lowest complication rate; higher recurrence",
    "Gastrojejunostomy: for obstruction (bypass) - simple, effective",
    "NB: with H. pylori eradication, elective surgery for DU is now very rare",
  ]
);

// SLIDE 19 – Prognosis & Prevention
sl = pres.addSlide();
contentSlide(sl, "Prognosis & Prevention", [
  "With H. pylori eradication: DU recurrence drops from ~80% at 1 year to <10%",
  "Without eradication or removal of causative agent: ~80% recur within 1 year",
  "Uncomplicated DU treated appropriately: excellent long-term prognosis",
  "Complicated DU (perforation/bleeding): mortality 10-30% depending on comorbidities and delay",
  "Prevention strategies:",
  "  - H. pylori screening and treatment in high-risk populations",
  "  - PPI co-prescription for all patients on chronic NSAIDs, aspirin, or anticoagulants",
  "  - Smoking cessation counselling",
  "  - Avoid unnecessary NSAID use; switch to selective COX-2 inhibitors where appropriate (with PPI)",
  "  - Test-of-cure for H. pylori eradication: UBT or fecal antigen 4+ weeks after completion",
  "  - Surveillance EGD not routinely required for duodenal ulcers (unlike gastric ulcers)",
]);

// SLIDE 20 – Summary
sl = pres.addSlide();
slide = sl;
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.25, h: 5.625, fill: { color: C.gold } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.43, w: 10, h: 0.2, fill: { color: C.teal } });

slide.addText("Key Takeaways", {
  x: 0.6, y: 0.25, w: 9, h: 0.6,
  fontSize: 28, bold: true, color: C.gold, fontFace: FONTS.head, align: "center",
});

const summaryPoints = [
  { text: "H. pylori & NSAIDs account for >90% of duodenal ulcers", options: { bullet: { code: "25CF" }, color: C.white, fontSize: 15, fontFace: FONTS.body, breakLine: true, paraSpaceBefore: 6 }},
  { text: "Classic symptom: epigastric pain relieved by food, worse 2-3 hrs post-meal and at night", options: { bullet: { code: "25CF" }, color: C.white, fontSize: 15, fontFace: FONTS.body, breakLine: true, paraSpaceBefore: 6 }},
  { text: "EGD is the gold standard for diagnosis; always test for H. pylori", options: { bullet: { code: "25CF" }, color: C.white, fontSize: 15, fontFace: FONTS.body, breakLine: true, paraSpaceBefore: 6 }},
  { text: "Medical management: PPI + H. pylori eradication + remove offending agents", options: { bullet: { code: "25CF" }, color: C.white, fontSize: 15, fontFace: FONTS.body, breakLine: true, paraSpaceBefore: 6 }},
  { text: "H. pylori eradication reduces recurrence from ~80% to <10% at 1 year", options: { bullet: { code: "25CF" }, color: C.gold, fontSize: 15, bold: true, fontFace: FONTS.body, breakLine: true, paraSpaceBefore: 6 }},
  { text: "Complications: perforation (Graham patch), bleeding (endoscopy first), obstruction (dilation/surgery)", options: { bullet: { code: "25CF" }, color: C.white, fontSize: 15, fontFace: FONTS.body, breakLine: true, paraSpaceBefore: 6 }},
  { text: "Prevention: co-prescribe PPIs with NSAIDs; screen & treat H. pylori; smoking cessation", options: { bullet: { code: "25CF" }, color: C.white, fontSize: 15, fontFace: FONTS.body, breakLine: false, paraSpaceBefore: 6 }},
];

slide.addText(summaryPoints, { x: 0.6, y: 0.95, w: 9.0, h: 4.3, valign: "top" });

slide.addText("Sources: Schwartz's Principles of Surgery 11e | Current Surgical Therapy 14e | Goldman-Cecil Medicine", {
  x: 0.6, y: 5.28, w: 8.8, h: 0.2,
  fontSize: 9, color: C.midGray, fontFace: FONTS.body, align: "center",
});

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/duodenal-ulcer-ppt/Duodenal_Ulcer.pptx" })
  .then(() => console.log("SUCCESS: /home/daytona/workspace/duodenal-ulcer-ppt/Duodenal_Ulcer.pptx"))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
You've run out of free credits. Sign up for a free account to continue using Orris.
This is a shared conversation. Sign in to Orris to start your own chat.