Make me a presentation on management of acute pancreatic for post graduate clinics
"acute pancreatitis" management guidelines
mkdir -p /home/daytona/workspace/acute-pancreatitis-pptx && ls /home/daytona/wor…
~/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); });
~/acute-pancreatitis-pptx/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/acute-pancreatitis-pptx/build.js'
cat > /home/daytona/workspace/acute-pancreatitis-pptx/build.js << 'ENDOFSCRIPT' …
cd /home/daytona/workspace/acute-pancreatitis-pptx && node build.js 2>&1
ls -lh /home/daytona/workspace/acute-pancreatitis-pptx/Acute_Pancreatitis_PG.ppt…
Acute Pancreatitis PG
Presentation · PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title | Management of Acute Pancreatitis — PG Clinical Review |
| 2 | Agenda | 12-point lecture overview |
| 3 | Definition & Epidemiology | Revised Atlanta 2012 criteria, incidence, mortality, severity categories |
| 4 | Etiology | Two-column: common causes (gallstones, alcohol, HTG, drugs) vs. rare causes |
| 5 | Pathophysiology | Acinar cell cascade, trypsinogen activation, NF-κB/cytokine storm, two-peak mortality |
| 6 | Presentation & Investigations | Clinical signs (Cullen's, Grey Turner's) + full investigation panel |
| 7 | CECT / CTSI | Balthazar grading table + necrosis score table + CTSI severity/mortality matrix |
| 8 | Prognostic Scoring | Ranson criteria (admission + 48 h) + BISAP + APACHE II note |
| 9 | Initial Management | Goal-directed LR fluids, monitoring targets, IV analgesia (morphine warning) |
| 10 | Nutrition | Early EN vs TPN — evidence, NG vs NJ, glycaemic control |
| 11 | Antibiotics & Drugs | No prophylactic antibiotics, indications, carbapenems, pharmacotherapy |
| 12 | ERCP Timing | Cholangitis → urgent ERCP, same-admission cholecystectomy, PEP prophylaxis |
| 13 | Local Complications Table | Revised Atlanta 4-category table (APFC/ANC/Pseudocyst/WON) + management notes |
| 14 | Step-Up Approach | PANTER trial principle, EUS/LAMS drainage, VARD, open surgery as last resort |
| 15 | Systemic Complications & ICU | ARDS/AKI/shock/DIC, abdominal compartment syndrome, ICU bundle |
| 16 | Special Scenarios | HTG-induced AP (insulin, plasmapheresis) + Pregnancy + Recurrent AP workup |
| 17 | Discharge & Follow-Up | Discharge criteria, cholecystectomy timing, PERT, Type 3c diabetes screening |
| 18 | Management Algorithm | Flowchart: suspected AP → diagnosis → mild vs. severe pathways |
| 19 | Key Takeaways | 8 numbered high-yield points for exam/clinical practice |
| 20 | References | IAP/APA 2025, ACG 2024, Revised Atlanta 2012, Schwartz's, Maingot's, Ranson, BISAP |