Make me a presentation on management of acute pancreatic for post graduate clinics

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Now let me read the key textbook sections on acute pancreatitis management from the best sources:
Reading File
Reading File
Reading File
Reading File
Reading File
Searching PubMed

"acute pancreatitis" management guidelines

Excellent - I have the IAP/APA 2025 guidelines and ACG 2024 guidelines, plus rich textbook content. Now let me read more management content and then build the presentation:
Reading File
I now have comprehensive content. Let me build the full presentation:
Running Command

mkdir -p /home/daytona/workspace/acute-pancreatitis-pptx && ls /home/daytona/workspace/acute-pancreatitis-pptx/

Writing File

~/acute-pancreatitis-pptx/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "Management of Acute Pancreatitis";
pres.author = "Postgraduate Clinic";

// ── COLOUR PALETTE ──────────────────────────────────────────────────────────
const C = {
  navy:   "0A1628",   // dominant dark
  teal:   "0E7C7B",   // primary accent
  gold:   "F4A828",   // secondary accent
  slate:  "2C3E50",   // mid-dark body
  ice:    "EBF5F5",   // content bg light
  white:  "FFFFFF",
  red:    "C0392B",
  orange: "E67E22",
  green:  "1A9E5C",
  grey:   "7F8C8D",
  lightgrey: "ECF0F1",
};

// ── HELPERS ──────────────────────────────────────────────────────────────────
function titleSlide(title, subtitle) {
  const sl = pres.addSlide();
  // dark gradient-effect bg
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.08, fill: { color: C.teal } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 7.42, w: "100%", h: 0.08, fill: { color: C.gold } });
  // decorative circle
  sl.addShape(pres.ShapeType.ellipse, { x: 9.5, y: -1, w: 4, h: 4, fill: { color: C.teal }, line: { color: C.teal }, transparency: 70 });

  sl.addText(title, {
    x: 0.7, y: 1.6, w: 11, h: 2.0,
    fontSize: 40, bold: true, color: C.white, fontFace: "Calibri",
    align: "left", valign: "middle",
  });
  if (subtitle) {
    sl.addText(subtitle, {
      x: 0.7, y: 3.8, w: 10, h: 0.7,
      fontSize: 20, color: C.gold, fontFace: "Calibri", align: "left",
    });
  }
  sl.addText("IAP/APA 2025 • ACG 2024 • Schwartz's Surgery • Maingot's Abdominal Operations", {
    x: 0.7, y: 6.8, w: 11, h: 0.4,
    fontSize: 11, color: C.grey, fontFace: "Calibri", align: "left",
  });
  return sl;
}

function sectionDivider(title, subtitle) {
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.teal } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: "100%", fill: { color: C.gold } });
  sl.addShape(pres.ShapeType.ellipse, { x: 8, y: 3.5, w: 6, h: 6, fill: { color: C.navy }, transparency: 80 });
  sl.addText(title, {
    x: 0.6, y: 2.3, w: 11.5, h: 1.4,
    fontSize: 36, bold: true, color: C.white, fontFace: "Calibri",
  });
  if (subtitle) {
    sl.addText(subtitle, {
      x: 0.6, y: 3.9, w: 11.5, h: 0.8,
      fontSize: 18, color: C.lightgrey, fontFace: "Calibri",
    });
  }
  return sl;
}

function contentSlide(title, bullets, opts = {}) {
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.white } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.85, fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: "100%", h: 0.06, fill: { color: C.gold } });

  sl.addText(title, {
    x: 0.3, y: 0.1, w: 12.7, h: 0.75,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  const items = bullets.map((b, i) => {
    if (b.startsWith("##")) {
      return { text: b.replace("## ", ""), options: { bold: true, color: C.teal, fontSize: 14, bullet: false, breakLine: true, paraSpaceBefore: 8 } };
    }
    if (b.startsWith("!")) {
      return { text: b.replace("! ", ""), options: { bold: true, color: C.red, fontSize: 13, bullet: { type: "number" }, breakLine: true } };
    }
    return { text: b, options: { color: C.slate, fontSize: 13, bullet: { indent: 20 }, breakLine: true } };
  });

  sl.addText(items, {
    x: 0.4, y: 1.05, w: opts.w || 12.5, h: opts.h || 5.8,
    fontFace: "Calibri", valign: "top",
  });
  return sl;
}

function twoColSlide(title, leftTitle, leftBullets, rightTitle, rightBullets) {
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.white } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.85, fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: "100%", h: 0.06, fill: { color: C.gold } });

  sl.addText(title, {
    x: 0.3, y: 0.1, w: 12.7, h: 0.75,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // left col
  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.05, w: 5.9, h: 5.9, fill: { color: C.ice }, line: { color: C.teal, width: 1.5 } });
  sl.addText(leftTitle, { x: 0.5, y: 1.1, w: 5.6, h: 0.45, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri" });
  const lItems = leftBullets.map(b => ({ text: b, options: { color: C.slate, fontSize: 12.5, bullet: { indent: 18 }, breakLine: true } }));
  sl.addText(lItems, { x: 0.5, y: 1.58, w: 5.5, h: 5.2, fontFace: "Calibri", valign: "top" });

  // right col
  sl.addShape(pres.ShapeType.rect, { x: 7.1, y: 1.05, w: 5.9, h: 5.9, fill: { color: C.ice }, line: { color: C.gold, width: 1.5 } });
  sl.addText(rightTitle, { x: 7.3, y: 1.1, w: 5.6, h: 0.45, fontSize: 14, bold: true, color: C.orange, fontFace: "Calibri" });
  const rItems = rightBullets.map(b => ({ text: b, options: { color: C.slate, fontSize: 12.5, bullet: { indent: 18 }, breakLine: true } }));
  sl.addText(rItems, { x: 7.3, y: 1.58, w: 5.5, h: 5.2, fontFace: "Calibri", valign: "top" });

  return sl;
}

function tableSlide(title, tableData, colWidths, opts = {}) {
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.white } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.85, fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: "100%", h: 0.06, fill: { color: C.gold } });
  sl.addText(title, {
    x: 0.3, y: 0.1, w: 12.7, h: 0.75,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });
  sl.addTable(tableData, {
    x: 0.3, y: 1.05, w: 13, h: opts.h || 5.9,
    colW: colWidths,
    fontSize: 12, fontFace: "Calibri",
    border: { type: "solid", pt: 0.5, color: "CCCCCC" },
    autoPage: false,
  });
  return sl;
}

// ── HEADER ROW HELPER ────────────────────────────────────────────────────────
function hdr(text, colspan) {
  return { text, options: { bold: true, color: C.white, fill: C.navy, align: "center", colspan } };
}
function cell(text, fill, color, bold) {
  return { text, options: { fill: fill || C.white, color: color || C.slate, bold: !!bold, align: "left", valign: "middle" } };
}
function cellC(text, fill, color, bold) {
  return { text, options: { fill: fill || C.white, color: color || C.slate, bold: !!bold, align: "center", valign: "middle" } };
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════
titleSlide(
  "Management of\nAcute Pancreatitis",
  "A Postgraduate Clinical Review"
);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ═══════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: "100%", fill: { color: C.teal } });

  sl.addText("Lecture Overview", {
    x: 0.5, y: 0.4, w: 12, h: 0.7,
    fontSize: 28, bold: true, color: C.white, fontFace: "Calibri",
  });

  const topics = [
    "1.  Definition, Epidemiology & Burden",
    "2.  Etiology & Pathophysiology",
    "3.  Clinical Presentation & Diagnosis",
    "4.  Severity Classification (Atlanta / RAC)",
    "5.  Prognostic Scoring Systems",
    "6.  Initial Management & Resuscitation",
    "7.  Nutritional Support",
    "8.  Pharmacotherapy & Antibiotics",
    "9.  ERCP Timing in Gallstone Pancreatitis",
    "10. Local Complications & Interventions",
    "11. Systemic Complications & ICU Care",
    "12. Special Scenarios & Discharge Planning",
  ];
  const items = topics.map(t => ({ text: t, options: { color: C.ice, fontSize: 14, bullet: false, breakLine: true, paraSpaceBefore: 5 } }));
  sl.addText(items, { x: 0.5, y: 1.3, w: 12.3, h: 5.8, fontFace: "Calibri", valign: "top" });
}

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 1 DIVIDER
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider("Section 1", "Definition, Epidemiology & Etiology");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 — DEFINITION & EPIDEMIOLOGY
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Definition & Epidemiology", [
  "## Definition (Revised Atlanta Classification 2012)",
  "Acute inflammatory disease of the pancreas, diagnosed by ≥2 of 3 criteria:",
  "Abdominal pain consistent with AP (acute-onset severe constant epigastric pain, often radiating to the back)",
  "Serum amylase or lipase > 3× upper limit of normal",
  "Characteristic imaging findings on CT / MRI",
  "## Epidemiology",
  "Incidence: 13–45 per 100,000 population per year (increasing globally)",
  "Commonest GI cause of hospital admission in many countries",
  "Mortality: Overall < 3% (mild); severe AP carries 20–30% mortality",
  "80% mild (interstitial edematous); 20% moderate–severe (necrotizing)",
  "## Atlanta Severity Classification",
  "Mild AP: No organ failure, no local or systemic complications",
  "Moderately severe AP: Transient organ failure (<48 h) AND/OR local complications",
  "Severe AP: Persistent organ failure (>48 h) — single or multi-organ",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 — ETIOLOGY (two-col)
// ═══════════════════════════════════════════════════════════════════════════
twoColSlide(
  "Etiology of Acute Pancreatitis",
  "Common Causes (>80%)",
  [
    "Gallstones (biliary) — 40–70%",
    "Alcohol — 25–35%",
    "Idiopathic — 10–15%",
    "Hypertriglyceridemia (TG > 1000 mg/dL)",
    "Post-ERCP — 3–5% of all procedures",
    "Medications (azathioprine, valproate, didanosine, furosemide)",
  ],
  "Less Common / Rare Causes",
  [
    "Hypercalcaemia (hyperparathyroidism)",
    "Pancreatic divisum",
    "Sphincter of Oddi dysfunction",
    "Trauma / blunt abdominal injury",
    "Autoimmune pancreatitis (IgG4-related)",
    "Ampullary / pancreatic tumours",
    "Hereditary: PRSS1, SPINK1, CFTR mutations",
    "Infections: mumps, CMV, HIV",
    "Ischaemia / vasculitis",
  ]
);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 — PATHOPHYSIOLOGY
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Pathophysiology — Key Mechanisms", [
  "## Acinar Cell Injury (Common Final Pathway)",
  "Premature trypsinogen activation → trypsin overwhelms protective mechanisms",
  "Lysosomal (cathepsin B) and zymogen granule colocalization — critical initiating event",
  "Cytosolic Ca²⁺ rise required for colocalization and NF-κB activation",
  "## Local Cascade",
  "Trypsin activates other zymogens → autodigestion of pancreatic parenchyma",
  "Acinar cell necrosis → neutrophil recruitment → amplified inflammation",
  "Pancreatic microvascular failure → hypoperfusion → necrosis",
  "Interstitial edematous pancreatitis (no necrosis) vs. Necrotizing pancreatitis",
  "## Systemic Cascade (SIRS → MOF)",
  "NF-κB activation → pro-inflammatory cytokines (TNF-α, IL-1β, IL-6, PAF)",
  "Mesenteric lymph bypasses liver → systemic inflammatory spread",
  "Cytokine storm → ARDS, AKI, cardiovascular failure, DIC",
  "Two-peak mortality pattern: early SIRS/MOF vs. late septic complications",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 2 DIVIDER
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider("Section 2", "Clinical Presentation, Diagnosis & Severity Scoring");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 — CLINICAL FEATURES & DIAGNOSIS
// ═══════════════════════════════════════════════════════════════════════════
twoColSlide(
  "Clinical Presentation & Diagnosis",
  "Clinical Features",
  [
    "Severe, constant epigastric pain — radiation to back",
    "Nausea, vomiting (common)",
    "Low-grade fever",
    "Tachycardia, tachypnea, hypotension (severe)",
    "Abdominal guarding / peritonism",
    "Cullen's sign — periumbilical ecchymosis",
    "Grey Turner's sign — flank ecchymosis",
    "Tetany (hypocalcaemia)",
    "Jaundice (if biliary aetiology)",
  ],
  "Investigations",
  [
    "Serum lipase — more specific (preferred); >3× ULN",
    "Serum amylase — peaks 2–12 h; normalises by 3–5 days",
    "LFTs, bilirubin, ALP — biliary aetiology",
    "FBC, CRP (>150 mg/L at 48 h → severe)",
    "BUN/creatinine, blood glucose, calcium",
    "ABG — if respiratory compromise",
    "USS abdomen — gallstones, CBD dilation",
    "CECT — if diagnosis uncertain OR at 48–72 h if severe",
    "MRCP — if suspected choledocholithiasis",
  ]
);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 — CECT SCORING
// ═══════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.white } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.85, fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: "100%", h: 0.06, fill: { color: C.gold } });
  sl.addText("CECT: Balthazar Grading & CT Severity Index (CTSI)", {
    x: 0.3, y: 0.1, w: 12.7, h: 0.75,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Balthazar table
  sl.addText("Balthazar Grade", { x: 0.3, y: 1.05, w: 6, h: 0.4, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri" });
  sl.addTable([
    [cellC("Grade", C.teal, C.white, true), cellC("CT Finding", C.teal, C.white, true), cellC("Points", C.teal, C.white, true)],
    [cellC("A"), cell("Normal pancreas"), cellC("0")],
    [cellC("B"), cell("Focal / diffuse enlargement"), cellC("1")],
    [cellC("C"), cell("Peripancreatic fat inflammation"), cellC("2")],
    [cellC("D"), cell("Single fluid collection"), cellC("3")],
    [cellC("E"), cell("≥2 fluid collections or gas"), cellC("4")],
  ], { x: 0.3, y: 1.5, w: 6, h: 2.8, colW: [1.2, 3.5, 1.3], fontSize: 12, fontFace: "Calibri",
    border: { type: "solid", pt: 0.5, color: "CCCCCC" } });

  sl.addText("Necrosis Score", { x: 7.0, y: 1.05, w: 6, h: 0.4, fontSize: 14, bold: true, color: C.orange, fontFace: "Calibri" });
  sl.addTable([
    [cellC("Necrosis", C.orange, C.white, true), cellC("Points", C.orange, C.white, true)],
    [cell("No necrosis"), cellC("0")],
    [cell("< 30%"), cellC("2")],
    [cell("30–50%"), cellC("4")],
    [cell("> 50%"), cellC("6")],
  ], { x: 7.0, y: 1.5, w: 5.8, h: 2.8, colW: [4, 1.8], fontSize: 12, fontFace: "Calibri",
    border: { type: "solid", pt: 0.5, color: "CCCCCC" } });

  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.55, w: 12.5, h: 0.06, fill: { color: C.teal } });
  sl.addText("CTSI = Balthazar points + Necrosis points (max 10)", {
    x: 0.3, y: 4.7, w: 12.5, h: 0.4, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri",
  });
  sl.addTable([
    [cellC("CTSI Score", C.navy, C.white, true), cellC("Severity", C.navy, C.white, true), cellC("Morbidity", C.navy, C.white, true), cellC("Mortality", C.navy, C.white, true)],
    [cellC("0–3"), cell("Mild"), cellC("8%"), cellC("3%")],
    [cellC("4–6"), cell("Moderate"), cellC("35%"), cellC("6%")],
    [cellC("7–10", C.red, C.white), cell("Severe", C.red, C.white), cellC("92%", C.red, C.white), cellC("17%", C.red, C.white)],
  ], { x: 0.3, y: 5.2, w: 12.5, h: 1.6, colW: [3, 3.5, 3, 3], fontSize: 12, fontFace: "Calibri",
    border: { type: "solid", pt: 0.5, color: "CCCCCC" } });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 — SEVERITY SCORING (Ranson & BISAP)
// ═══════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.white } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.85, fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: "100%", h: 0.06, fill: { color: C.gold } });
  sl.addText("Prognostic Scoring: Ranson Criteria & BISAP", {
    x: 0.3, y: 0.1, w: 12.7, h: 0.75,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Ranson
  sl.addText("Ranson Criteria", { x: 0.3, y: 1.0, w: 7, h: 0.4, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri" });
  sl.addTable([
    [hdr("On Admission", 1), hdr("At 48 Hours", 1)],
    [cell("Age > 55 years"), cell("Haematocrit fall > 10%")],
    [cell("WBC > 16,000/mm³"), cell("BUN rise > 5 mg/dL")],
    [cell("Blood glucose > 200 mg/dL"), cell("Serum Ca²⁺ < 8 mg/dL")],
    [cell("LDH > 350 IU/L"), cell("PaO₂ < 60 mmHg")],
    [cell("AST > 250 IU/L"), cell("Base deficit > 4 mEq/L")],
    [cell(""), cell("Fluid sequestration > 6 L")],
  ], { x: 0.3, y: 1.45, w: 7.5, h: 3.2, colW: [3.7, 3.8], fontSize: 12, fontFace: "Calibri",
    border: { type: "solid", pt: 0.5, color: "CCCCCC" } });

  sl.addText("Score ≥3 → severe disease (mortality 10–15%); Score ≥5 → mortality > 40%", {
    x: 0.3, y: 4.75, w: 7.5, h: 0.5, fontSize: 11.5, italic: true, color: C.grey, fontFace: "Calibri",
  });

  // BISAP
  sl.addText("BISAP Score (1 point each)", { x: 8.3, y: 1.0, w: 5, h: 0.4, fontSize: 14, bold: true, color: C.orange, fontFace: "Calibri" });
  sl.addTable([
    [hdr("BISAP Parameter", 1)],
    [cell("B — BUN > 25 mg/dL")],
    [cell("I — Impaired mental status")],
    [cell("S — SIRS criteria ≥2")],
    [cell("A — Age > 60 years")],
    [cell("P — Pleural effusion on imaging")],
  ], { x: 8.3, y: 1.45, w: 4.9, h: 2.5, colW: [4.9], fontSize: 12, fontFace: "Calibri",
    border: { type: "solid", pt: 0.5, color: "CCCCCC" } });

  sl.addText("BISAP ≥3 → severe AP; Mortality up to 22%", {
    x: 8.3, y: 4.0, w: 4.9, h: 0.4, fontSize: 11.5, italic: true, color: C.grey, fontFace: "Calibri",
  });

  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.3, w: 12.5, h: 0.06, fill: { color: C.gold } });
  sl.addText("APACHE II ≥8 also identifies severe AP with ≥25% mortality. Best used in ICU settings.", {
    x: 0.3, y: 5.5, w: 12.5, h: 0.4, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri",
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 3 DIVIDER
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider("Section 3", "Initial Management & Resuscitation");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 — INITIAL MANAGEMENT
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Initial Management — First 24 Hours", [
  "## Admission & Triage",
  "All patients with suspected AP should be admitted to hospital",
  "Mild AP → General ward; Moderate–Severe → HDU/ICU",
  "Reassess at 24 h and 48 h — severity can escalate",
  "## IV Fluid Resuscitation (Goal-Directed)",
  "Aggressive IV fluid resuscitation — cornerstone of early management",
  "Preferred: Lactated Ringer's (LR) — reduces systemic inflammation vs. normal saline (ACG 2024 / IAP 2025)",
  "Rate: 250–500 mL/h titrated to clinical response (HR, MAP, urine output)",
  "Target: UO > 0.5 mL/kg/h; BUN decrease; haematocrit 35–44%",
  "Avoid: Over-resuscitation → abdominal compartment syndrome",
  "## Pain Management",
  "Priority — early adequate analgesia",
  "IV NSAIDs (e.g. metamizole 2 g/8 h IV) for mild pain",
  "Opioid analgesia for severe pain: buprenorphine, pentazocine, pethidine",
  "! Morphine avoided — risk of sphincter of Oddi spasm",
  "Thoracic epidural analgesia may reduce complications in severe AP",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 — NUTRITION
// ═══════════════════════════════════════════════════════════════════════════
twoColSlide(
  "Nutritional Support in Acute Pancreatitis",
  "Key Principles",
  [
    "Gut rest is OUTDATED — early enteral nutrition is preferred",
    "Enteral route maintains gut barrier, reduces bacterial translocation",
    "Reduces infectious complications and mortality (vs. TPN)",
    "Start EN within 24–48 h if tolerated",
    "Mild AP — resume oral diet (low-fat) as soon as pain improves & appetite returns",
    "Severe AP — early nasojejunal (NJ) or nasogastric (NG) tube feeding",
    "NJ vs NG — both are acceptable (IAP/APA 2025)",
  ],
  "Parenteral Nutrition (TPN)",
  [
    "Reserve TPN only when enteral route is not feasible",
    "Enteral feeding within 72 h of onset is preferred over TPN",
    "Indications for TPN:",
    "  ↳ Ileus preventing enteral feeding",
    "  ↳ Fistulas preventing enteral access",
    "  ↳ Bowel obstruction",
    "Monitor for hyperglycaemia — tight glycaemic control",
    "Supplemental glutamine may be considered in TPN",
  ]
);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 — ANTIBIOTICS & PHARMACOTHERAPY
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Antibiotics & Pharmacotherapy", [
  "## Antibiotics — Current Evidence (ACG 2024 / IAP 2025)",
  "! Prophylactic antibiotics are NOT recommended in sterile AP or sterile necrosis",
  "Multiple RCTs and meta-analyses showed no benefit from prophylactic antibiotics",
  "Antibiotics indicated ONLY when:",
  "  ↳ Infected necrotizing pancreatitis (confirmed or strongly suspected)",
  "  ↳ Extra-pancreatic infection (cholangitis, pneumonia, UTI, bacteraemia)",
  "## Antibiotic Choice for Infected Necrosis",
  "Carbapenems (imipenem/meropenem) — excellent pancreatic penetration",
  "Fluoroquinolones (ciprofloxacin) + metronidazole — alternative",
  "Duration: guided by clinical response and source control",
  "## Other Pharmacotherapy",
  "Antifungals: consider if prolonged antibiotics, immunosuppression, or fungal infection suspected",
  "Somatostatin / octreotide — evidence does NOT support routine use",
  "Protease inhibitors (gabexate, nafamostat) — insufficient evidence for routine use",
  "Proton pump inhibitors — use only for stress ulcer prophylaxis in critically ill",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 4 DIVIDER
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider("Section 4", "Biliary Pancreatitis, Local Complications & Interventions");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 12 — ERCP IN BILIARY PANCREATITIS
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("ERCP Timing in Gallstone (Biliary) Pancreatitis", [
  "## Indications for Urgent ERCP (within 24 h)",
  "Acute cholangitis complicating gallstone pancreatitis — URGENT ERCP",
  "Obstructive jaundice with CBD stone on imaging — ERCP within 24–48 h",
  "## Mild Biliary AP Without Cholangitis",
  "Urgent ERCP does NOT reduce complications — not routinely recommended",
  "However, persistent biliary obstruction warrants early ERCP",
  "## Cholecystectomy",
  "Same-admission laparoscopic cholecystectomy for mild biliary AP (reduces recurrence)",
  "For severe AP — defer cholecystectomy until inflammation resolves (≥6 weeks)",
  "Cholecystectomy should be performed before discharge in mild AP (ACG 2024)",
  "## Prevention of Post-ERCP Pancreatitis",
  "Rectal indomethacin (100 mg) — reduces post-ERCP pancreatitis risk",
  "Prophylactic pancreatic stent placement — high-risk patients",
  "Wire-guided cannulation technique preferred over contrast injection",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 13 — LOCAL COMPLICATIONS TABLE
// ═══════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.white } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.85, fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: "100%", h: 0.06, fill: { color: C.gold } });
  sl.addText("Revised Atlanta Classification — Local Complications", {
    x: 0.3, y: 0.1, w: 12.7, h: 0.75,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  sl.addTable([
    [hdr("Timing", 1), hdr("<4 weeks — No Defined Wall", 2), hdr(">4 weeks — Defined Wall", 2)],
    [hdr("Content", 1), hdr("Without Infection", 1), hdr("With Infection", 1), hdr("Without Infection", 1), hdr("With Infection", 1)],
    [
      cell("Fluid only", C.ice),
      cell("Acute Pancreatic Fluid Collection (APFC)", C.ice),
      cell("Infected APFC", C.ice),
      cell("Pseudocyst", C.ice),
      cell("Infected Pseudocyst", C.ice),
    ],
    [
      cell("Solid ± Fluid", C.lightgrey),
      cell("Acute Necrotic Collection (ANC)", C.lightgrey),
      cell("Infected ANC", C.lightgrey),
      cell("Walled-Off Necrosis (WON)", C.lightgrey),
      cell("Infected WON", C.lightgrey),
    ],
  ], {
    x: 0.3, y: 1.05, w: 12.8, h: 2.8,
    colW: [2, 2.7, 2.5, 2.7, 2.9],
    fontSize: 12, fontFace: "Calibri",
    border: { type: "solid", pt: 0.5, color: "CCCCCC" },
  });

  sl.addText("Key Points", { x: 0.3, y: 4.1, w: 12.5, h: 0.4, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri" });
  const notes = [
    "APFCs and ANCs occur in the first 4 weeks; most APFCs resolve spontaneously — drainage NOT indicated",
    "Pseudocysts develop after 4 weeks; asymptomatic pseudocysts → observe; symptomatic → drainage (endoscopic preferred)",
    "WON = pancreatic necrosis + defined wall after 4 weeks; infected WON = indication for intervention",
    "Diagnosis of infected necrosis: CT-guided FNA (gas in collection is pathognomonic) + clinical deterioration",
  ];
  const noteItems = notes.map(n => ({ text: n, options: { color: C.slate, fontSize: 12.5, bullet: { indent: 18 }, breakLine: true } }));
  sl.addText(noteItems, { x: 0.4, y: 4.55, w: 12.5, h: 2.5, fontFace: "Calibri", valign: "top" });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 14 — MANAGEMENT OF NECROSIS & INTERVENTION
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Management of Pancreatic Necrosis & Infected Collections", [
  "## Principle: Step-Up Approach (IAP/APA 2025 / ACG 2024)",
  "Delay intervention as long as possible — preferably ≥4 weeks (for WON to mature)",
  "Conservative management with antibiotics for 2–4 weeks before intervention",
  "## Step 1 — Percutaneous/Endoscopic Drainage",
  "EUS-guided transmural drainage (cystogastrostomy / cystoduodenostomy) — PREFERRED for WON",
  "Percutaneous catheter drainage — if WON not accessible endoscopically",
  "Lumen-apposing metal stents (LAMS) — increasingly used for EUS drainage",
  "## Step 2 — Minimally Invasive Necrosectomy",
  "Video-assisted retroperitoneal debridement (VARD)",
  "Endoscopic necrosectomy (direct endoscopy through stent tract)",
  "Repeated lavage sessions often required for infected WON",
  "## Step 3 — Open Surgical Necrosectomy (reserved)",
  "Only if minimally invasive approaches fail",
  "High morbidity and mortality — last resort",
  "Open necrosectomy: minimal access retroperitoneal, laparoscopic, or open laparotomy",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SECTION 5 DIVIDER
// ═══════════════════════════════════════════════════════════════════════════
sectionDivider("Section 5", "Systemic Complications, ICU Care & Special Scenarios");

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 15 — SYSTEMIC COMPLICATIONS
// ═══════════════════════════════════════════════════════════════════════════
twoColSlide(
  "Systemic Complications & ICU Management",
  "Major Systemic Complications",
  [
    "ARDS / ALI — most common organ failure",
    "  ↳ Mechanical ventilation, lung-protective strategy",
    "Acute Kidney Injury (AKI)",
    "  ↳ Aggressive fluid resuscitation, avoid nephrotoxins",
    "  ↳ RRT if persistent oliguria/anuria",
    "Cardiovascular failure / shock",
    "  ↳ Vasopressors (noradrenaline first-line)",
    "Disseminated Intravascular Coagulation (DIC)",
    "Hypocalcaemia — calcium gluconate IV",
    "Hyperglycaemia — insulin infusion (target 7.8–10 mmol/L)",
    "Paralytic ileus",
    "Splenic / portal vein thrombosis",
  ],
  "ICU Care Priorities",
  [
    "Early organ support — do not delay ICU transfer",
    "Continuous monitoring: A-line, CVP, urinary catheter",
    "SOFA score monitoring — serial assessment",
    "Modified fluid resuscitation after first 48 h — avoid fluid overload",
    "DVT prophylaxis (LMWH) once haemorrhagic risk assessed",
    "Stress ulcer prophylaxis (PPI / H₂ blocker)",
    "Enteral nutrition via NGT/NJT",
    "Abdominal compartment syndrome:",
    "  ↳ Bladder pressure monitoring",
    "  ↳ Decompressive laparotomy if IAP > 20 mmHg + new organ failure",
  ]
);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 16 — VASCULAR & HAEMORRHAGIC COMPLICATIONS
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Vascular & Haemorrhagic Complications", [
  "## Pseudoaneurysm (PA)",
  "Complicates 1–2% of severe AP — erosion of peripancreatic vessels",
  "Splenic artery most common (65%); also gastroduodenal, pancreaticoduodenal arteries",
  "Presentation: sudden haematocrit drop, expanding collection, haemobilia",
  "Diagnosis: CECT with angiography",
  "Management: Angioembolisation — first-line; surgery if embolisation fails",
  "## Splenic / Portal / Mesenteric Vein Thrombosis",
  "Complicates 1–24% of severe AP",
  "Splenic vein thrombosis most common → left-sided (segmental) portal hypertension",
  "Anticoagulation for symptomatic portal vein thrombosis",
  "## Haemorrhagic Pancreatitis",
  "Haemorrhage into retroperitoneum or peritoneal cavity",
  "Massive haemorrhage: embolisation or surgical control",
  "Requires surgical assessment if haemodynamically unstable",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 17 — SPECIAL SCENARIOS
// ═══════════════════════════════════════════════════════════════════════════
twoColSlide(
  "Special Clinical Scenarios",
  "Hypertriglyceridaemia-Induced AP",
  [
    "TG > 1000 mg/dL — significant risk; >2000 mg/dL — severe",
    "Management:",
    "  ↳ Insulin infusion (activates lipoprotein lipase)",
    "  ↳ Heparin infusion (short-term, controversial)",
    "  ↳ Plasmapheresis/apheresis — rapid TG reduction",
    "  ↳ Restrict fat intake once feeding resumes",
    "Long-term: fibrates (gemfibrozil), omega-3s, diet",
    "Avoid oestrogen, thiazides, retinoids (precipitants)",
  ],
  "Pregnancy & Recurrent AP",
  [
    "Biliary AP most common in pregnancy",
    "MRCP preferred (avoid radiation)",
    "ERCP + sphincterotomy if choledocholithiasis",
    "Cholecystectomy deferred to second trimester or post-partum",
    "LR fluid preferred — safe in pregnancy",
    "",
    "Recurrent Acute Pancreatitis:",
    "  ↳ Investigate for genetic causes (PRSS1, SPINK1, CFTR)",
    "  ↳ Autoimmune: IgG4, ANA, serology",
    "  ↳ MRCP / EUS for structural lesions",
    "  ↳ Risk of progression to chronic pancreatitis",
  ]
);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 18 — DISCHARGE & FOLLOW-UP
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("Discharge Criteria & Follow-Up", [
  "## Discharge Criteria (Mild AP)",
  "Oral intake tolerated (low-fat diet) without pain",
  "Significant improvement in pain and inflammatory markers",
  "Absence of complications requiring continued hospital care",
  "Afebrile and haemodynamically stable",
  "## Cholecystectomy Timing",
  "Mild biliary AP → same admission or within 2 weeks of discharge (reduces recurrence from 30% to <1%)",
  "Severe/necrotising AP → defer until resolution (minimum 6–8 weeks)",
  "## Follow-Up",
  "4–6 week review: repeat imaging (USS/CT) for fluid collections",
  "Assess for exocrine pancreatic insufficiency: steatorrhoea, weight loss → PERT (pancreatic enzyme replacement)",
  "Screen for new-onset diabetes mellitus (Type 3c diabetes)",
  "Counsel on alcohol cessation, dietary modification, weight management",
  "## Long-Term Risk",
  "Recurrence risk: 20–35% if underlying cause not addressed",
  "Progression to chronic pancreatitis in 10–20% (especially alcohol-related)",
]);

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 19 — MANAGEMENT ALGORITHM
// ═══════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.white } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.85, fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: "100%", h: 0.06, fill: { color: C.gold } });
  sl.addText("Management Algorithm — Acute Pancreatitis", {
    x: 0.3, y: 0.1, w: 12.7, h: 0.75,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Box helper
  function box(sl, x, y, w, h, text, fill, color, fontSize) {
    sl.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill: { color: fill || C.teal }, line: { color: fill || C.teal }, rectRadius: 0.08 });
    sl.addText(text, { x: x + 0.06, y, w: w - 0.12, h, fontSize: fontSize || 11, color: color || C.white, fontFace: "Calibri", bold: true, align: "center", valign: "middle" });
  }
  function arrow(sl, x, y, w, h) {
    sl.addShape(pres.ShapeType.line, { x, y, w, h, line: { color: C.grey, width: 1.5 } });
  }

  box(sl, 5.2, 1.05, 3, 0.55, "SUSPECTED ACUTE PANCREATITIS", C.navy, C.white, 10);
  arrow(sl, 6.7, 1.6, 0, 0.3);
  box(sl, 4.5, 1.95, 4.5, 0.55, "Confirm Diagnosis (Pain + Lipase/Amylase >3×ULN ± CT)", C.slate, C.white, 10);
  arrow(sl, 6.7, 2.5, 0, 0.3);
  box(sl, 4.5, 2.85, 4.5, 0.55, "Admit + Severity Assessment\n(Ranson, BISAP, APACHE II, CTSI)", C.teal, C.white, 10);

  // Two branches
  arrow(sl, 5.2, 3.4, -1.8, 0);   // left
  arrow(sl, 8.1, 3.4, 1.8, 0);    // right

  box(sl, 2.0, 3.4, 3, 0.7, "MILD AP\n(no organ failure, no necrosis)", C.green, C.white, 10);
  box(sl, 8.5, 3.4, 3.8, 0.7, "MODERATE–SEVERE AP\n(organ failure / necrosis)", C.red, C.white, 10);

  // Mild branch
  sl.addText([
    { text: "• LR fluids 250–500 mL/h\n• Analgesia\n• Oral diet when tolerated\n• Treat underlying cause\n• Cholecystectomy (biliary)", options: { color: C.slate, fontSize: 10, breakLine: false } }
  ], { x: 1.8, y: 4.2, w: 3.4, h: 1.8, fontFace: "Calibri" });

  // Severe branch
  sl.addText([
    { text: "• HDU / ICU admission\n• Aggressive LR resuscitation\n• Early enteral nutrition\n• CECT at 48–72 h\n• Antibiotics ONLY if infected\n• Step-up approach for necrosis\n• ERCP if cholangitis / obstruction", options: { color: C.slate, fontSize: 10, breakLine: false } }
  ], { x: 8.5, y: 4.2, w: 4.5, h: 2.2, fontFace: "Calibri" });

  sl.addText("Key: Both pathways require early aggressive IV fluid resuscitation and multimodal analgesia within the first hours.", {
    x: 0.3, y: 6.8, w: 12.8, h: 0.5, fontSize: 11, italic: true, color: C.grey, fontFace: "Calibri",
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 20 — KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.06, fill: { color: C.teal } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 7.44, w: "100%", h: 0.06, fill: { color: C.gold } });

  sl.addText("Key Takeaways", {
    x: 0.5, y: 0.2, w: 12.5, h: 0.7,
    fontSize: 26, bold: true, color: C.gold, fontFace: "Calibri",
  });

  const points = [
    ["01", "Diagnose with ≥2 of: pain + lipase/amylase >3×ULN + imaging. CT only needed if uncertain."],
    ["02", "Aggressive goal-directed IV fluid resuscitation with Lactated Ringer's is the cornerstone of early care."],
    ["03", "Severity stratification at admission and 48 h (Ranson/BISAP/APACHE II/CTSI) guides triage."],
    ["04", "Early enteral nutrition (within 24–48 h) is superior to TPN — start via NG or NJ tube in severe AP."],
    ["05", "Prophylactic antibiotics are NOT indicated in sterile necrotising pancreatitis — evidence does not support use."],
    ["06", "Step-up approach for infected necrosis: antibiotics → EUS/percutaneous drainage → minimally invasive necrosectomy."],
    ["07", "Biliary AP with cholangitis → urgent ERCP. Mild biliary AP → same-admission cholecystectomy."],
    ["08", "New IAP/APA 2025 & ACG 2024 guidelines endorse delayed intervention (≥4 weeks) for infected WON."],
  ];

  points.forEach(([num, text], i) => {
    const y = 1.1 + i * 0.78;
    sl.addShape(pres.ShapeType.ellipse, { x: 0.3, y: y, w: 0.55, h: 0.55, fill: { color: C.teal } });
    sl.addText(num, { x: 0.3, y: y, w: 0.55, h: 0.55, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addText(text, { x: 1.0, y: y + 0.04, w: 12, h: 0.5, fontSize: 12, color: C.ice, fontFace: "Calibri", valign: "middle" });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 21 — REFERENCES
// ═══════════════════════════════════════════════════════════════════════════
contentSlide("References & Guidelines", [
  "## Clinical Guidelines",
  "IAP/APA/EPC/IPC/JPS Working Group. Revised Guidelines on Acute Pancreatitis 2025. Pancreatology. 2025 Sep. [PMID: 40651900]",
  "Tenner S, Vege SS, Sheth SG, et al. American College of Gastroenterology Guidelines: Management of Acute Pancreatitis. Am J Gastroenterol. 2024. [PMID: 38857482]",
  "UK Working Party on Acute Pancreatitis. UK Guidelines for the Management of Acute Pancreatitis. Gut. 2005;54(Suppl III):1–9.",
  "Banks PA et al. Classification of acute pancreatitis — 2012: revision of the Atlanta classification. Gut. 2013;62(1):102–11.",
  "## Textbooks",
  "Schwartz's Principles of Surgery, 11th Edition — Chapter 33: Pancreas",
  "Maingot's Abdominal Operations, 12th Edition — Chapter 55: Complications of Acute Pancreatitis",
  "Sleisenger and Fordtran's Gastrointestinal and Liver Disease, 11th Edition",
  "Sabiston Textbook of Surgery: The Biological Basis of Modern Surgical Practice",
  "## Scoring Systems",
  "Ranson JH. Etiological and prognostic factors in human acute pancreatitis. Am J Gastroenterol. 1979.",
  "Wu BU et al. The early prediction of mortality in acute pancreatitis (BISAP). Gut. 2008;57(12):1608–14.",
  "Balthazar EJ et al. Acute pancreatitis: value of CT in establishing prognosis. Radiology. 1990.",
]);

// ── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/acute-pancreatitis-pptx/Acute_Pancreatitis_PG.pptx" })
  .then(() => console.log("DONE: Presentation saved."))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Editing File

~/acute-pancreatitis-pptx/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/acute-pancreatitis-pptx/build.js'
I need to overwrite the entire file. Let me use execute to write it directly:
Running Command

cat > /home/daytona/workspace/acute-pancreatitis-pptx/build.js << 'ENDOFSCRIPT' const pptxgen = require("pptxgenjs"); const pres = new pptxgen(); pres.layout = "LAYOUT_WIDE"; pres.title = "Management of Acute Pancreatitis"; const C = { navy: "0A1628", teal: "0E7C7B", gold: "F4A828", slate: "2C3E50", ice: "EBF5F5", white: "FFFFFF", red: "C0392B", orange: "E67E22", green: "1A9E5C", grey: "7F8C8D", lightgrey: "ECF0F1", }; function titleSlide(title, subtitle) { const sl = pres.addSlide(); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} }); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:0.08, fill:{color:C.teal} }); sl.addShape(pres.ShapeType.rect, { x:0, y:7.42, w:"100%", h:0.08, fill:{color:C.gold} }); sl.addShape(pres.ShapeType.ellipse, { x:9.5, y:-1, w:4, h:4, fill:{color:C.teal}, line:{color:C.teal}, transparency:70 }); sl.addText(title, { x:0.7, y:1.6, w:11, h:2.0, fontSize:40, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" }); if (subtitle) sl.addText(subtitle, { x:0.7, y:3.8, w:10, h:0.7, fontSize:20, color:C.gold, fontFace:"Calibri", align:"left" }); sl.addText("IAP/APA 2025 \u2022 ACG 2024 \u2022 Schwartz's Surgery \u2022 Maingot's Abdominal Operations", { x:0.7, y:6.8, w:11, h:0.4, fontSize:11, color:C.grey, fontFace:"Calibri", align:"left" }); } function sectionDiv(title, subtitle) { const sl = pres.addSlide(); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.teal} }); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.12, h:"100%", fill:{color:C.gold} }); sl.addShape(pres.ShapeType.ellipse, { x:8, y:3.5, w:6, h:6, fill:{color:C.navy}, transparency:80 }); sl.addText(title, { x:0.6, y:2.3, w:11.5, h:1.4, fontSize:36, bold:true, color:C.white, fontFace:"Calibri" }); if (subtitle) sl.addText(subtitle, { x:0.6, y:3.9, w:11.5, h:0.8, fontSize:18, color:C.lightgrey, fontFace:"Calibri" }); } function addHeader(sl, title) { sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.white} }); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:0.85, fill:{color:C.navy} }); sl.addShape(pres.ShapeType.rect, { x:0, y:0.85, w:"100%", h:0.06, fill:{color:C.gold} }); sl.addText(title, { x:0.3, y:0.1, w:12.7, h:0.75, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", valign:"middle" }); } function makeBullets(bullets) { return bullets.map(b => { if (b.startsWith("##")) return { text:b.replace("## ",""), options:{bold:true,color:C.teal,fontSize:14,bullet:false,breakLine:true,paraSpaceBefore:8} }; if (b.startsWith("!!")) return { text:b.replace("!! ",""), options:{bold:true,color:C.red,fontSize:13,bullet:{indent:20},breakLine:true} }; return { text:b, options:{color:C.slate,fontSize:13,bullet:{indent:20},breakLine:true} }; }); } function contentSlide(title, bullets, opts={}) { const sl = pres.addSlide(); addHeader(sl, title); sl.addText(makeBullets(bullets), { x:0.4, y:1.05, w:opts.w||12.5, h:opts.h||5.8, fontFace:"Calibri", valign:"top" }); return sl; } function twoColSlide(title, lTitle, lBullets, rTitle, rBullets) { const sl = pres.addSlide(); addHeader(sl, title); sl.addShape(pres.ShapeType.rect, { x:0.3, y:1.05, w:5.9, h:5.9, fill:{color:C.ice}, line:{color:C.teal,width:1.5} }); sl.addText(lTitle, { x:0.5, y:1.1, w:5.6, h:0.45, fontSize:14, bold:true, color:C.teal, fontFace:"Calibri" }); sl.addText(lBullets.map(b=>({text:b,options:{color:C.slate,fontSize:12.5,bullet:{indent:18},breakLine:true}})), { x:0.5, y:1.58, w:5.5, h:5.2, fontFace:"Calibri", valign:"top" }); sl.addShape(pres.ShapeType.rect, { x:7.1, y:1.05, w:5.9, h:5.9, fill:{color:C.ice}, line:{color:C.gold,width:1.5} }); sl.addText(rTitle, { x:7.3, y:1.1, w:5.6, h:0.45, fontSize:14, bold:true, color:C.orange, fontFace:"Calibri" }); sl.addText(rBullets.map(b=>({text:b,options:{color:C.slate,fontSize:12.5,bullet:{indent:18},breakLine:true}})), { x:7.3, y:1.58, w:5.5, h:5.2, fontFace:"Calibri", valign:"top" }); return sl; } function hdr(text) { return {text,options:{bold:true,color:C.white,fill:C.navy,align:"center"}}; } function cell(text,fill,color,bold) { return {text,options:{fill:fill||C.white,color:color||C.slate,bold:!!bold,align:"left",valign:"middle"}}; } function cellC(text,fill,color,bold) { return {text,options:{fill:fill||C.white,color:color||C.slate,bold:!!bold,align:"center",valign:"middle"}}; } // ---- SLIDE 1: TITLE ---- titleSlide("Management of\nAcute Pancreatitis", "A Postgraduate Clinical Review"); // ---- SLIDE 2: AGENDA ---- { const sl = pres.addSlide(); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} }); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.12, h:"100%", fill:{color:C.teal} }); sl.addText("Lecture Overview", { x:0.5, y:0.4, w:12, h:0.7, fontSize:28, bold:true, color:C.white, fontFace:"Calibri" }); const topics = [ "1. Definition, Epidemiology & Burden", "2. Etiology & Pathophysiology", "3. Clinical Presentation & Diagnosis", "4. Severity Classification (Revised Atlanta)", "5. Prognostic Scoring Systems (Ranson, BISAP, CTSI)", "6. Initial Management & IV Fluid Resuscitation", "7. Nutritional Support", "8. Antibiotics & Pharmacotherapy", "9. ERCP Timing in Gallstone Pancreatitis", "10. Local Complications & Step-Up Interventions", "11. Systemic Complications & ICU Care", "12. Discharge, Follow-Up & Special Scenarios", ]; sl.addText(topics.map(t=>({text:t,options:{color:C.ice,fontSize:14,bullet:false,breakLine:true,paraSpaceBefore:6}})), { x:0.5, y:1.3, w:12.3, h:5.8, fontFace:"Calibri", valign:"top" }); } // ---- SECTION 1 ---- sectionDiv("Section 1", "Definition, Epidemiology & Etiology"); // ---- SLIDE 3: DEFINITION & EPIDEMIOLOGY ---- contentSlide("Definition & Epidemiology", [ "## Definition (Revised Atlanta Classification 2012)", "Acute inflammatory disease of the pancreas diagnosed by \u22652 of 3 criteria:", "Abdominal pain consistent with AP (acute onset, severe, constant epigastric, often radiating to back)", "Serum amylase or lipase > 3\u00d7 upper limit of normal", "Characteristic imaging findings on CT or MRI", "## Epidemiology", "Incidence: 13\u201345 per 100,000 per year (increasing globally)", "Most common GI cause of hospital admission in many countries", "Overall mortality <3%; severe AP carries 20\u201330% mortality", "80% mild interstitial edematous AP; 20% moderate\u2013severe necrotising AP", "## Revised Atlanta Severity Categories", "Mild AP: No organ failure, no local or systemic complications", "Moderately Severe AP: Transient organ failure (<48 h) and/or local complications", "Severe AP: Persistent organ failure (>48 h), single or multi-organ", ]); // ---- SLIDE 4: ETIOLOGY ---- twoColSlide( "Etiology of Acute Pancreatitis", "Common Causes (>80% of cases)", [ "Gallstones (biliary) \u2014 40\u201370%", "Alcohol \u2014 25\u201335%", "Idiopathic \u2014 10\u201315%", "Hypertriglyceridaemia (TG >1000 mg/dL)", "Post-ERCP \u2014 3\u20135% of all procedures", "Medications: azathioprine, valproate, L-asparaginase, furosemide, didanosine", "Hypercalcaemia (hyperparathyroidism)", ], "Uncommon / Rare Causes", [ "Pancreas divisum", "Sphincter of Oddi dysfunction", "Blunt abdominal trauma", "Autoimmune pancreatitis (IgG4-related)", "Ampullary or pancreatic neoplasms", "Hereditary: PRSS1, SPINK1, CFTR mutations", "Infections: mumps, CMV, HIV, coxsackievirus", "Ischaemia / vasculitis / radiation", "Duodenal obstruction (annular pancreas)", ] ); // ---- SLIDE 5: PATHOPHYSIOLOGY ---- contentSlide("Pathophysiology", [ "## Common Final Pathway: Premature Trypsinogen Activation", "Lysosomal (cathepsin B) and zymogen granule colocalization inside acinar cells", "Trypsinogen \u2192 trypsin by cathepsin B; overwhelms SPINK1 and other protective mechanisms", "Sustained cytosolic Ca\u00b2\u207a rise required for colocalization and NF-\u03baB activation", "## Local Cascade", "Trypsin activates other zymogens \u2192 autodigestion of pancreatic parenchyma", "Acinar necrosis \u2192 neutrophil recruitment \u2192 amplified local inflammation", "Pancreatic microvascular failure \u2192 hypoperfusion \u2192 necrotising pancreatitis", "Interstitial edematous AP (no necrosis) vs. Necrotising AP (parenchymal necrosis)", "## Systemic Cascade (SIRS \u2192 MOF)", "NF-\u03baB \u2192 cytokines (TNF-\u03b1, IL-1\u03b2, IL-6, PAF) \u2192 systemic inflammatory cascade", "Mesenteric lymph bypasses hepatic clearance \u2192 promotes organ failure", "Two-peak mortality: early SIRS/MOF (first week) vs. late septic complications (week 2+)", ]); // ---- SECTION 2 ---- sectionDiv("Section 2", "Clinical Presentation, Diagnosis & Severity Scoring"); // ---- SLIDE 6: PRESENTATION & INVESTIGATIONS ---- twoColSlide( "Clinical Presentation & Investigations", "Clinical Features", [ "Severe constant epigastric pain \u2014 radiation to back", "Nausea and vomiting", "Tachycardia, tachypnoea, hypotension (severe)", "Abdominal guarding / peritonism", "Cullen's sign \u2014 periumbilical ecchymosis", "Grey Turner's sign \u2014 flank ecchymosis", "Tetany from hypocalcaemia", "Jaundice (biliary aetiology)", "Pleural effusion (left-sided, severe AP)", ], "Key Investigations", [ "Serum lipase \u2014 preferred (more specific); >3\u00d7 ULN", "Serum amylase \u2014 peaks 2\u201312 h; normalises 3\u20135 days", "LFTs, bilirubin, ALP \u2014 biliary aetiology", "FBC, CRP (>150 mg/L at 48 h \u2192 severe)", "BUN/creatinine, glucose, calcium, TG", "ABG \u2014 if respiratory compromise", "USS abdomen \u2014 gallstones, CBD dilation", "CECT \u2014 if diagnosis uncertain OR at 48\u201372 h in severe AP", "MRCP \u2014 suspected choledocholithiasis", "EUS \u2014 occult biliary cause, safe in pregnancy", ] ); // ---- SLIDE 7: CECT / CTSI ---- { const sl = pres.addSlide(); addHeader(sl, "CECT: Balthazar Grade & CT Severity Index (CTSI)"); sl.addText("Balthazar Grade", { x:0.3, y:1.05, w:6, h:0.4, fontSize:14, bold:true, color:C.teal, fontFace:"Calibri" }); sl.addTable([ [cellC("Grade",C.teal,C.white,true), cellC("CT Finding",C.teal,C.white,true), cellC("Points",C.teal,C.white,true)], [cellC("A"), cell("Normal pancreas"), cellC("0")], [cellC("B"), cell("Focal/diffuse pancreatic enlargement"), cellC("1")], [cellC("C"), cell("Pancreatic inflammation, peripancreatic fat stranding"), cellC("2")], [cellC("D"), cell("Single fluid collection"), cellC("3")], [cellC("E"), cell("\u22652 fluid collections or gas in/adjacent to pancreas"), cellC("4")], ], { x:0.3, y:1.5, w:7, h:3.0, colW:[1.3,4.5,1.2], fontSize:12, fontFace:"Calibri", border:{type:"solid",pt:0.5,color:"CCCCCC"} }); sl.addText("Necrosis Score", { x:8.0, y:1.05, w:5, h:0.4, fontSize:14, bold:true, color:C.orange, fontFace:"Calibri" }); sl.addTable([ [cellC("Degree of Necrosis",C.orange,C.white,true), cellC("Points",C.orange,C.white,true)], [cell("No necrosis"), cellC("0")], [cell("< 30%"), cellC("2")], [cell("30\u201350%"), cellC("4")], [cell("> 50%"), cellC("6")], ], { x:8.0, y:1.5, w:5.3, h:2.2, colW:[3.8,1.5], fontSize:12, fontFace:"Calibri", border:{type:"solid",pt:0.5,color:"CCCCCC"} }); sl.addShape(pres.ShapeType.rect, { x:0.3, y:4.7, w:12.8, h:0.05, fill:{color:C.teal} }); sl.addText("CTSI = Balthazar Points + Necrosis Points (max 10)", { x:0.3, y:4.85, w:12.8, h:0.4, fontSize:14, bold:true, color:C.teal, fontFace:"Calibri" }); sl.addTable([ [cellC("CTSI",C.navy,C.white,true), cellC("Severity",C.navy,C.white,true), cellC("Morbidity",C.navy,C.white,true), cellC("Mortality",C.navy,C.white,true)], [cellC("0\u20133"), cell("Mild"), cellC("8%"), cellC("3%")], [cellC("4\u20136"), cell("Moderate"),cellC("35%"), cellC("6%")], [cellC("7\u201310",C.red,C.white), cell("Severe",C.red,C.white), cellC("92%",C.red,C.white), cellC("17%",C.red,C.white)], ], { x:0.3, y:5.35, w:12.8, h:1.6, colW:[3,3.5,3.2,3.1], fontSize:12, fontFace:"Calibri", border:{type:"solid",pt:0.5,color:"CCCCCC"} }); } // ---- SLIDE 8: SCORING (Ranson + BISAP) ---- { const sl = pres.addSlide(); addHeader(sl, "Prognostic Scoring Systems"); sl.addText("Ranson Criteria", { x:0.3, y:1.0, w:7.5, h:0.4, fontSize:14, bold:true, color:C.teal, fontFace:"Calibri" }); sl.addTable([ [hdr("On Admission"), hdr("At 48 Hours")], [cell("Age > 55 years"), cell("Haematocrit fall > 10%")], [cell("WBC > 16,000/mm\u00b3"), cell("BUN rise > 5 mg/dL")], [cell("Blood glucose > 200 mg/dL"), cell("Serum Ca\u00b2\u207a < 8 mg/dL")], [cell("LDH > 350 IU/L"), cell("PaO\u2082 < 60 mmHg")], [cell("AST > 250 IU/L"), cell("Base deficit > 4 mEq/L")], [cell(""), cell("Fluid sequestration > 6 L")], ], { x:0.3, y:1.45, w:7.5, h:3.0, colW:[3.7,3.8], fontSize:12, fontFace:"Calibri", border:{type:"solid",pt:0.5,color:"CCCCCC"} }); sl.addText("Score \u22653 \u2192 severe (mortality 10\u201315%) | Score \u22655 \u2192 mortality >40%", { x:0.3, y:4.55, w:7.5, h:0.4, fontSize:11.5, italic:true, color:C.grey, fontFace:"Calibri" }); sl.addText("BISAP Score", { x:8.3, y:1.0, w:4.9, h:0.4, fontSize:14, bold:true, color:C.orange, fontFace:"Calibri" }); sl.addTable([ [hdr("BISAP Parameter (1 point each)")], [cell("B \u2014 BUN > 25 mg/dL")], [cell("I \u2014 Impaired mental status")], [cell("S \u2014 SIRS criteria \u22652 present")], [cell("A \u2014 Age > 60 years")], [cell("P \u2014 Pleural effusion on imaging")], ], { x:8.3, y:1.45, w:4.9, h:2.5, colW:[4.9], fontSize:12, fontFace:"Calibri", border:{type:"solid",pt:0.5,color:"CCCCCC"} }); sl.addText("BISAP \u22653 \u2192 severe AP; mortality up to 22%", { x:8.3, y:4.05, w:4.9, h:0.4, fontSize:11.5, italic:true, color:C.grey, fontFace:"Calibri" }); sl.addShape(pres.ShapeType.rect, { x:0.3, y:5.1, w:12.8, h:0.05, fill:{color:C.gold} }); sl.addText("Also: APACHE II \u22658 identifies severe AP | SOFA score for organ failure in ICU | Persistent SIRS at 48 h independently predicts mortality", { x:0.3, y:5.25, w:12.8, h:0.55, fontSize:12, bold:true, color:C.teal, fontFace:"Calibri" }); } // ---- SECTION 3 ---- sectionDiv("Section 3", "Initial Management, Fluids, Nutrition & Antibiotics"); // ---- SLIDE 9: INITIAL MANAGEMENT ---- contentSlide("Initial Management \u2014 First 24\u201348 Hours", [ "## Admission & Triage", "All patients with suspected AP should be admitted to hospital", "Mild AP \u2192 general ward; Moderate-Severe AP \u2192 HDU/ICU", "Reassess at 24 h and 48 h \u2014 severity can escalate", "## IV Fluid Resuscitation (Cornerstone of Early Management)", "Preferred fluid: Lactated Ringer's (LR) solution \u2014 reduces SIRS vs. normal saline (ACG 2024, IAP/APA 2025)", "Rate: 250\u2013500 mL/h initially, titrated to clinical response", "Targets: HR <100 bpm, MAP 65\u201385 mmHg, urine output >0.5 mL/kg/h, haematocrit 35\u201344%", "Reassess every 6 h; reduce rate once targets achieved to avoid fluid overload", "!! Avoid over-resuscitation \u2192 abdominal compartment syndrome, ARDS worsening", "## Analgesia", "Priority: early and adequate analgesia", "IV NSAIDs (e.g. metamizole 2 g/8 h) for mild pain", "IV opioids for severe pain: buprenorphine, pethidine, pentazocine", "!! Morphine avoided \u2014 risk of sphincter of Oddi spasm", ]); // ---- SLIDE 10: NUTRITION ---- twoColSlide( "Nutritional Support", "Enteral Nutrition (Preferred)", [ "Gut rest is OUTDATED \u2014 early EN is standard of care", "EN preserves gut mucosal barrier; reduces bacterial translocation", "Reduces infectious complications and mortality vs. TPN (meta-analyses)", "Start EN within 24\u201348 h of admission", "Mild AP: resume oral low-fat diet as soon as appetite returns (often within 24\u201348 h)", "Severe AP: NG or NJ tube feeding", "NJ vs NG \u2014 both acceptable; NG feasible if no ileus", "Semi-elemental or polymeric formula \u2014 both suitable", "Avoid high-fat feeds in hypertriglyceridaemia-induced AP", ], "Parenteral Nutrition (TPN)", [ "Reserve TPN ONLY when enteral route is not feasible", "Indications for TPN:", " \u2192 Prolonged ileus preventing EN", " \u2192 Enteric fistula preventing access", " \u2192 Bowel obstruction", "Add TPN only after failed EN trial of 48\u201372 h", "Monitor: blood glucose (target 7.8\u201310 mmol/L)", "Supplemental glutamine may be beneficial in TPN", "Avoid total fasting \u2014 even trophic feeds help", ] ); // ---- SLIDE 11: ANTIBIOTICS ---- contentSlide("Antibiotics & Pharmacotherapy", [ "## Antibiotics \u2014 Current Evidence (IAP/APA 2025, ACG 2024)", "!! Prophylactic antibiotics are NOT recommended in sterile AP or sterile necrosis", "Multiple RCTs and Cochrane meta-analyses: no reduction in infection, organ failure, or mortality", "Antibiotics ONLY indicated when:", " \u2192 Infected necrotising pancreatitis (confirmed or strongly suspected)", " \u2192 Extra-pancreatic infection: cholangitis, UTI, pneumonia, bacteraemia", "## Antibiotic Choice for Infected Necrosis", "Carbapenems (imipenem / meropenem) \u2014 excellent pancreatic tissue penetration (first-line)", "Fluoroquinolone (ciprofloxacin) + metronidazole \u2014 alternative; monitor local resistance", "Duration: guided by clinical response and source control; minimum 2\u20134 weeks", "## Other Pharmacotherapy", "Antifungals: consider with prolonged antibiotics, immunosuppression, or Candida growth", "Somatostatin / octreotide, protease inhibitors: insufficient evidence for routine use", "Proton pump inhibitors: only for stress ulcer prophylaxis in critically ill patients", "Insulin infusion: titrate to target glycaemia 7.8\u201310 mmol/L", ]); // ---- SECTION 4 ---- sectionDiv("Section 4", "Biliary Pancreatitis, Local Complications & Interventions"); // ---- SLIDE 12: ERCP ---- contentSlide("ERCP Timing in Gallstone (Biliary) Pancreatitis", [ "## Urgent ERCP (within 24 h) \u2014 Indications", "Acute cholangitis complicating gallstone pancreatitis \u2014 URGENT ERCP + sphincterotomy", "Persistent biliary obstruction (progressive jaundice / CBD stone) \u2014 ERCP within 24\u201348 h", "## Mild Biliary AP Without Cholangitis", "Urgent ERCP does NOT reduce complications \u2014 not routinely recommended (ACG 2024)", "Proceed to cholecystectomy \u2014 definitive treatment", "## Cholecystectomy Timing", "Mild biliary AP: same-admission laparoscopic cholecystectomy (reduces recurrence from 30% to <1%)", "Severe/necrotising AP: defer cholecystectomy until inflammation resolves (\u22656 weeks)", "## Prevention of Post-ERCP Pancreatitis", "Rectal indomethacin 100 mg before or immediately after ERCP \u2014 standard prophylaxis", "Prophylactic pancreatic duct stenting \u2014 in high-risk patients (prior PEP, difficult cannulation)", "Wire-guided cannulation preferred over contrast injection technique", "Peri-procedural fluids (aggressive hydration with LR) may further reduce PEP risk", ]); // ---- SLIDE 13: LOCAL COMPLICATIONS TABLE ---- { const sl = pres.addSlide(); addHeader(sl, "Revised Atlanta Classification \u2014 Local Complications of AP"); sl.addTable([ [hdr(""), hdr("<4 weeks \u2014 No Defined Wall"), hdr("<4 weeks \u2014 No Defined Wall"), hdr(">4 weeks \u2014 Defined Wall"), hdr(">4 weeks \u2014 Defined Wall")], [ {text:"Content",options:{bold:true,color:C.navy,fill:C.lightgrey,align:"center"}}, {text:"Without Infection",options:{bold:true,color:C.navy,fill:C.lightgrey,align:"center"}}, {text:"With Infection",options:{bold:true,color:C.navy,fill:C.lightgrey,align:"center"}}, {text:"Without Infection",options:{bold:true,color:C.navy,fill:C.lightgrey,align:"center"}}, {text:"With Infection",options:{bold:true,color:C.navy,fill:C.lightgrey,align:"center"}}, ], [ cell("Fluid Only",C.ice), cell("Acute Pancreatic Fluid Collection (APFC)",C.ice), cell("Infected APFC",C.ice), cell("Pseudocyst",C.ice), cell("Infected Pseudocyst",C.ice), ], [ cell("Solid \u00b1 Fluid",C.lightgrey), cell("Acute Necrotic Collection (ANC)",C.lightgrey), cell("Infected ANC",C.lightgrey), cell("Walled-Off Necrosis (WON)",C.lightgrey), cell("Infected WON",C.lightgrey), ], ], { x:0.3, y:1.05, w:12.8, h:2.8, colW:[1.9,2.5,2.5,2.5,3.4], fontSize:11.5, fontFace:"Calibri", border:{type:"solid",pt:0.5,color:"CCCCCC"}, }); sl.addText("Management Principles", { x:0.3, y:4.1, w:12.5, h:0.4, fontSize:14, bold:true, color:C.teal, fontFace:"Calibri" }); const pts = [ "APFCs and ANCs (<4 weeks): most resolve spontaneously; drainage NOT indicated unless symptomatic or infected", "Pseudocysts (>4 weeks): asymptomatic \u2192 observe; symptomatic \u2192 endoscopic cystogastrostomy (preferred over surgery)", "WON: delay intervention until \u22654 weeks for maturation; infected WON is the primary indication for necrosectomy", "Infected necrosis confirmed by: gas on CT (pathognomonic) or CT-guided FNA + clinical deterioration despite antibiotics", ]; sl.addText(pts.map(p=>({text:p,options:{color:C.slate,fontSize:12.5,bullet:{indent:18},breakLine:true}})), { x:0.4, y:4.55, w:12.5, h:2.4, fontFace:"Calibri", valign:"top" }); } // ---- SLIDE 14: STEP-UP APPROACH ---- contentSlide("Step-Up Approach for Infected Pancreatic Necrosis", [ "## Principle: Minimal Intervention, Maximum Delay", "Delay intervention as long as possible \u2014 preferably \u22654 weeks (WON maturation)", "Conservative management with antibiotics for 2\u20134 weeks before any intervention", "Step-up significantly reduces complications vs. upfront open surgery (PANTER RCT)", "## Step 1 \u2014 Endoscopic / Percutaneous Drainage", "EUS-guided transmural drainage (cystogastrostomy / cystoduodenostomy) \u2014 PREFERRED", "Lumen-apposing metal stents (LAMS) \u2014 increasingly used for EUS-guided drainage", "Percutaneous catheter drainage (PCD) \u2014 if WON not accessible endoscopically", "## Step 2 \u2014 Minimally Invasive Necrosectomy", "Endoscopic direct necrosectomy (through LAMS tract)", "Video-assisted retroperitoneal debridement (VARD)", "Repeated lavage sessions usually required", "## Step 3 \u2014 Open Surgical Necrosectomy (Last Resort)", "Reserved for failure of minimally invasive approaches", "Options: open laparotomy, laparoscopic, minimal-access retroperitoneal debridement", ]); // ---- SECTION 5 ---- sectionDiv("Section 5", "Systemic Complications, ICU Management & Follow-Up"); // ---- SLIDE 15: SYSTEMIC COMPLICATIONS ---- twoColSlide( "Systemic Complications & ICU Management", "Organ Failure & Complications", [ "ARDS / ALI \u2014 most common organ failure", " \u2192 Lung-protective mechanical ventilation", "Acute Kidney Injury (AKI)", " \u2192 Aggressive fluids, avoid nephrotoxins, RRT if needed", "Cardiovascular failure / shock", " \u2192 Vasopressors: noradrenaline first-line", "Disseminated Intravascular Coagulation (DIC)", "Hypocalcaemia \u2192 IV calcium gluconate", "Hyperglycaemia \u2192 insulin infusion protocol", "Paralytic ileus \u2192 conservative, early EN", "Splenic / portal vein thrombosis", "Abdominal Compartment Syndrome (IAP >20 mmHg + organ failure)", ], "ICU Care Bundle", [ "Early ICU/HDU transfer \u2014 do not delay", "Continuous monitoring: arterial line, CVP, urinary catheter", "Serial SOFA scoring \u2014 track organ failure", "Goal-directed fluid reassessment every 6 h", "DVT prophylaxis: LMWH once haemorrhagic risk assessed", "Stress ulcer prophylaxis: PPI or H\u2082 blocker", "Enteral nutrition via NGT/NJT", "Abdominal compartment syndrome:", " \u2192 Bladder pressure monitoring", " \u2192 Decompressive laparotomy if IAP >20 mmHg + new organ failure", "Early specialist involvement: GI surgery, interventional radiology, GI endoscopy", ] ); // ---- SLIDE 16: SPECIAL SCENARIOS ---- twoColSlide( "Special Clinical Scenarios", "Hypertriglyceridaemia-Induced AP", [ "TG >1000 mg/dL \u2014 significant risk; >2000 mg/dL \u2014 severe/life-threatening", "Acute Management:", " \u2192 Insulin infusion (activates lipoprotein lipase) \u2014 first-line", " \u2192 Heparin infusion (short-term, controversial, limited evidence)", " \u2192 Plasmapheresis/apheresis \u2014 rapidly reduces TG, consider if severe", " \u2192 Restrict fat intake once feeding resumes", "Long-term: fenofibrates, omega-3 fatty acids, dietary modification", "Avoid precipitants: oestrogens, thiazides, retinoids, alcohol", ], "Pregnancy & Recurrent AP", [ "Biliary AP most common in pregnancy (cholelithiasis risk increased)", "MRCP preferred \u2014 avoids ionising radiation", "ERCP + sphincterotomy if choledocholithiasis confirmed", "Cholecystectomy: second trimester or post-partum preferred", "LR fluid resuscitation \u2014 safe in pregnancy", "", "Recurrent AP \u2014 Investigate:", " \u2192 Genetic causes: PRSS1, SPINK1, CFTR mutations", " \u2192 Autoimmune: IgG4, ANA, ANCA", " \u2192 MRCP / EUS for structural lesions", " \u2192 Sphincter of Oddi manometry if others excluded", "Risk of progression to chronic pancreatitis: 10\u201320%", ] ); // ---- SLIDE 17: DISCHARGE & FOLLOW-UP ---- contentSlide("Discharge Criteria & Long-Term Follow-Up", [ "## Discharge Criteria", "Tolerating oral low-fat diet without pain recurrence", "Significant improvement in pain and inflammatory markers (CRP trending down)", "Afebrile and haemodynamically stable", "No complications requiring continued hospital care", "## Cholecystectomy Timing", "Mild biliary AP: same-admission or within 2 weeks of discharge (reduces recurrence from 30% to <1%)", "Severe/necrotising AP: defer \u22656\u20138 weeks until complete resolution", "## Outpatient Follow-Up", "4\u20136 week review with repeat imaging (USS or CT) for residual fluid collections", "Assess for exocrine pancreatic insufficiency: steatorrhoea, weight loss \u2192 PERT (pancreatic enzyme replacement therapy)", "Screen for new-onset diabetes (Type 3c diabetes): HbA1c at 3 months post-discharge", "Counsel: alcohol cessation, dietary modification, weight management, smoking cessation", "## Long-Term Risk Stratification", "Recurrence: 20\u201335% if underlying cause not addressed", "Progression to chronic pancreatitis: 10\u201320% (especially alcohol-related or hereditary)", ]); // ---- SLIDE 18: MANAGEMENT ALGORITHM ---- { const sl = pres.addSlide(); addHeader(sl, "Clinical Management Algorithm \u2014 Acute Pancreatitis"); function box(x,y,w,h,text,fill,color,fs) { sl.addShape(pres.ShapeType.roundRect, { x,y,w,h, fill:{color:fill||C.teal}, line:{color:fill||C.teal}, rectRadius:0.08 }); sl.addText(text, { x:x+0.05, y, w:w-0.1, h, fontSize:fs||11, color:color||C.white, fontFace:"Calibri", bold:true, align:"center", valign:"middle" }); } function arr(x,y,w,h) { sl.addShape(pres.ShapeType.line, { x,y,w,h, line:{color:C.grey,width:1.5} }); } box(4.8, 1.1, 3.7, 0.55, "SUSPECTED ACUTE PANCREATITIS", C.navy, C.white, 11); arr(6.65, 1.65, 0, 0.3); box(4.0, 1.98, 5.3, 0.55, "Confirm Diagnosis (Pain + Lipase/Amylase >3\u00d7ULN \u00b1 CT)", C.slate, C.white, 11); arr(6.65, 2.53, 0, 0.3); box(4.0, 2.86, 5.3, 0.55, "Admit + IV LR Fluids + Analgesia + Severity Scoring", C.teal, C.white, 11); arr(4.7, 3.41, -1.7, 0); arr(8.6, 3.41, 1.7, 0); box(1.5, 3.41, 3.0, 0.65, "MILD AP\n(no organ failure, no necrosis)", C.green, C.white, 11); box(8.8, 3.41, 3.7, 0.65, "MODERATE\u2013SEVERE AP\n(organ failure / necrosis)", C.red, C.white, 11); sl.addText([ {text:"\u2022 Oral diet when tolerated (24\u201348 h)\n\u2022 Treat underlying cause\n\u2022 Cholecystectomy (biliary AP)\n\u2022 Discharge with follow-up", options:{color:C.slate,fontSize:11,breakLine:false}} ], { x:1.3, y:4.2, w:3.5, h:2.0, fontFace:"Calibri" }); sl.addText([ {text:"\u2022 HDU / ICU admission\n\u2022 Aggressive LR resuscitation\n\u2022 Early enteral nutrition (24\u201348 h)\n\u2022 CECT at 48\u201372 h\n\u2022 Antibiotics ONLY if infected\n\u2022 ERCP if cholangitis / obstruction\n\u2022 Step-up approach for necrosis", options:{color:C.slate,fontSize:11,breakLine:false}} ], { x:8.8, y:4.2, w:4.3, h:2.5, fontFace:"Calibri" }); sl.addText("Both pathways require: early goal-directed IV fluid resuscitation with LR, multimodal analgesia, and continuous severity reassessment at 24 h and 48 h.", { x:0.3, y:7.1, w:12.8, h:0.4, fontSize:10.5, italic:true, color:C.grey, fontFace:"Calibri", }); } // ---- SLIDE 19: KEY TAKEAWAYS ---- { const sl = pres.addSlide(); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} }); sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:0.06, fill:{color:C.teal} }); sl.addShape(pres.ShapeType.rect, { x:0, y:7.44, w:"100%", h:0.06, fill:{color:C.gold} }); sl.addText("Key Takeaways", { x:0.5, y:0.15, w:12.5, h:0.75, fontSize:26, bold:true, color:C.gold, fontFace:"Calibri" }); const pts = [ ["01","Diagnose with \u22652 of 3: pain + lipase/amylase >3\u00d7ULN + imaging. CT required only when diagnosis is uncertain."], ["02","Early aggressive IV Lactated Ringer's resuscitation is the single most important intervention in AP."], ["03","Severity stratification at admission AND 48 h using Ranson/BISAP/APACHE II/CTSI guides triage and escalation."], ["04","Early enteral nutrition (within 24\u201348 h via NG or NJ tube) is superior to TPN in moderate\u2013severe AP."], ["05","Prophylactic antibiotics have NO role in sterile AP or sterile necrosis \u2014 evidence consistently negative."], ["06","Infected necrosis: step-up approach (antibiotics \u2192 EUS/PCD drainage \u2192 minimally invasive necrosectomy)."], ["07","Biliary AP + cholangitis \u2192 urgent ERCP within 24 h. Mild biliary AP \u2192 same-admission cholecystectomy."], ["08","IAP/APA 2025 & ACG 2024 endorse LR fluids, delayed intervention (\u22654 weeks), and early EN as standard."], ]; pts.forEach(([num,text],i) => { const y = 1.1 + i * 0.78; sl.addShape(pres.ShapeType.ellipse, { x:0.3, y, w:0.55, h:0.55, fill:{color:C.teal} }); sl.addText(num, { x:0.3, y, w:0.55, h:0.55, fontSize:12, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" }); sl.addText(text, { x:1.0, y:y+0.05, w:12.2, h:0.48, fontSize:12, color:C.ice, fontFace:"Calibri", valign:"middle" }); }); } // ---- SLIDE 20: REFERENCES ---- contentSlide("References & Guidelines", [ "## Clinical Guidelines", "IAP/APA/EPC/IPC/JPS Working Group. Revised Guidelines on Acute Pancreatitis 2025. Pancreatology. 2025 Sep. [PMID: 40651900]", "Tenner S, Vege SS, Sheth SG et al. ACG Guidelines: Management of Acute Pancreatitis. Am J Gastroenterol. 2024. [PMID: 38857482]", "Banks PA et al. Classification of acute pancreatitis \u2014 2012 (Revised Atlanta). Gut. 2013;62:102\u2013111.", "Working Group IAP/APA. IAP/APA Evidence-Based Guidelines for AP. Pancreatology. 2013;13(4):1\u201315.", "## Textbooks", "Schwartz's Principles of Surgery, 11th Edition \u2014 Chapter 33: The Pancreas", "Maingot's Abdominal Operations, 12th Edition \u2014 Chapter 55: Complications of Acute Pancreatitis", "Sleisenger and Fordtran's Gastrointestinal and Liver Disease, 11th Edition", "Sabiston Textbook of Surgery, 21st Edition \u2014 Pancreas", "## Scoring Systems", "Ranson JH. Prognostic factors in acute pancreatitis. Am J Gastroenterol. 1979.", "Wu BU et al. BISAP: early prediction of mortality in AP. Gut. 2008;57:1608\u20131614.", "Balthazar EJ et al. CTSI in acute pancreatitis. Radiology. 1990;174:331\u2013336.", ]); // ---- WRITE FILE ---- pres.writeFile({ fileName: "/home/daytona/workspace/acute-pancreatitis-pptx/Acute_Pancreatitis_PG.pptx" }) .then(() => console.log("DONE")) .catch(e => { console.error("ERROR:", e); process.exit(1); }); ENDOFSCRIPT echo "Script written"

Running Command

cd /home/daytona/workspace/acute-pancreatitis-pptx && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/acute-pancreatitis-pptx/Acute_Pancreatitis_PG.pptx

Your presentation is ready:

Acute Pancreatitis PG

Presentation · PPTX


What's inside (20 slides, LAYOUT_WIDE 16:9)

The deck uses a navy/teal/gold clinical colour scheme designed for a postgraduate audience. Here is the full slide map:
#SlideContent
1TitleManagement of Acute Pancreatitis — PG Clinical Review
2Agenda12-point lecture overview
3Definition & EpidemiologyRevised Atlanta 2012 criteria, incidence, mortality, severity categories
4EtiologyTwo-column: common causes (gallstones, alcohol, HTG, drugs) vs. rare causes
5PathophysiologyAcinar cell cascade, trypsinogen activation, NF-κB/cytokine storm, two-peak mortality
6Presentation & InvestigationsClinical signs (Cullen's, Grey Turner's) + full investigation panel
7CECT / CTSIBalthazar grading table + necrosis score table + CTSI severity/mortality matrix
8Prognostic ScoringRanson criteria (admission + 48 h) + BISAP + APACHE II note
9Initial ManagementGoal-directed LR fluids, monitoring targets, IV analgesia (morphine warning)
10NutritionEarly EN vs TPN — evidence, NG vs NJ, glycaemic control
11Antibiotics & DrugsNo prophylactic antibiotics, indications, carbapenems, pharmacotherapy
12ERCP TimingCholangitis → urgent ERCP, same-admission cholecystectomy, PEP prophylaxis
13Local Complications TableRevised Atlanta 4-category table (APFC/ANC/Pseudocyst/WON) + management notes
14Step-Up ApproachPANTER trial principle, EUS/LAMS drainage, VARD, open surgery as last resort
15Systemic Complications & ICUARDS/AKI/shock/DIC, abdominal compartment syndrome, ICU bundle
16Special ScenariosHTG-induced AP (insulin, plasmapheresis) + Pregnancy + Recurrent AP workup
17Discharge & Follow-UpDischarge criteria, cholecystectomy timing, PERT, Type 3c diabetes screening
18Management AlgorithmFlowchart: suspected AP → diagnosis → mild vs. severe pathways
19Key Takeaways8 numbered high-yield points for exam/clinical practice
20ReferencesIAP/APA 2025, ACG 2024, Revised Atlanta 2012, Schwartz's, Maingot's, Ranson, BISAP
Sources used: Schwartz's Principles of Surgery (11e), Maingot's Abdominal Operations, Sleisenger & Fordtran, IAP/APA Revised Guidelines 2025 (PMID: 40651900), ACG Guidelines 2024 (PMID: 38857482).
This is a shared conversation. Sign in to Orris to start your own chat.