Abdominal lump
What aspect of 'abdominal lump' are you looking for? · What is the context?
| "F" | Cause | Examples |
|---|---|---|
| Flatus | Intestinal gas | Aerophagia, IBS, SIBO, lactose intolerance |
| Fat | Adiposity | Obesity, Cushing's syndrome |
| Fluid | Ascites | Cirrhosis, heart failure, malignancy, TB |
| Fetus | Pregnancy | Uterus rising from pelvis at ~12 weeks |
| Feces | Constipation/obstruction | Bowel obstruction, severe constipation |
| Fatal Growth | Neoplasm/mass | Carcinoma, abscess, cyst, organomegaly, AAA |
| Region | Common Causes |
|---|---|
| Right hypochondrium | Hepatomegaly, Riedel's lobe (normal variant), distended gallbladder, hepatic metastases |
| Epigastrium | Gastric carcinoma, pancreatic pseudocyst/tumor, aortic aneurysm (pulsatile) |
| Left hypochondrium | Splenomegaly (lymphoma, portal hypertension, haematological malignancy) |
| Umbilical/periumbilical | Small bowel mass, lymph nodes, aortic aneurysm |
| Right iliac fossa | Appendix mass/abscess, Crohn's disease (doughy mass), caecal carcinoma, iliopsoas abscess, ovarian cyst (female) |
| Left iliac fossa | Sigmoid carcinoma, diverticular mass, ovarian cyst (female) |
| Flanks | Renal mass (descends on inspiration), polycystic kidneys |
| Suprapubic/hypogastric | Bladder distension, uterine fibroid/carcinoma, ovarian mass |
| Diffuse | Ascites, gross organomegaly, mesenteric cyst |
| Test | Use |
|---|---|
| Abdominal X-ray | Dilated bowel loops (obstruction/ileus), calcification (stones, AAA), fecal loading |
| Ultrasound | First-line: detects ascites (as little as 100 mL), hepatosplenomegaly, gallstones, renal masses, abdominal aortic aneurysm |
| CT abdomen/pelvis | Definitive characterization; retroperitoneal nodes, pancreatic lesions, staging malignancy |
| MRI | Liver lesions, soft tissue characterization |
| Finding | Think of |
|---|---|
| Pulsatile expansile epigastric mass | Abdominal aortic aneurysm |
| Non-tender RUQ mass + jaundice | Courvoisier's sign (pancreatic/biliary carcinoma) |
| Doughy RIF mass + diarrhoea | Crohn's disease |
| Ballotable flank mass | Renal cell carcinoma / hydronephrosis |
| Left supraclavicular node (Virchow's) | Gastric/GI metastasis |
| Umbilical nodule | Sister Mary Joseph nodule (metastatic intra-abdominal carcinoma) |
| Shifting dullness + fluid thrill | Ascites |
Treatment and management of acute pancreatitis
"acute pancreatitis"[MeSH Terms] AND "management"[MeSH Terms]
"acute pancreatitis" AND "fluid resuscitation"
Degree of enzyme elevation does NOT correlate with severity. - Rosen's Emergency Medicine
| Grade | Definition | Mortality |
|---|---|---|
| Mild | No organ failure, no local/systemic complications | <1% |
| Moderately Severe | Transient organ failure (<48h) OR local complications | ~5-8% |
| Severe | Persistent organ failure (>48h), single or multi-organ | Up to 30% |
Prophylactic antibiotics are NOT recommended in acute pancreatitis, including in sterile necrotizing pancreatitis.
Diagnosis confirmed (≥2 Atlanta criteria)
|
▼
Aggressive IV LR fluids + IV analgesia
|
▼
Assess severity (BISAP, APACHE II, SIRS criteria)
|
_____|_____
| |
Mild Moderate/Severe
| |
Early oral ICU admission
feeding Enteral nutrition ≤72h
| Monitor organ function
| |
Cholecystectomy Antibiotics ONLY if infected necrosis
same admission or cholangitis
| Intervention | Recommendation |
|---|---|
| IV fluid choice | Lactated Ringer's preferred |
| Opioid analgesia | Safe - morphine concern is a myth |
| Feeding in mild AP | Early oral feeding, low fat |
| Feeding in severe AP | Enteral (NG/NJ) within 24-72h |
| Prophylactic antibiotics | NOT recommended |
| Antibiotics | Only for infected necrosis or cholangitis |
| ERCP | Only if cholangitis or persistent biliary obstruction |
| Cholecystectomy (gallstone AP) | Same admission or within 2 weeks |
| CT imaging | Not routine; after 48-72h if no improvement |
| Necrosectomy | Step-up approach; delay ≥4 weeks if possible |
Make me a presentation for postgraduate class
Which topic should the presentation cover? · What format do you need?
mkdir -p /home/daytona/workspace/acute-pancreatitis-ppt && ls /home/daytona/workspace/acute-pancreatitis-ppt
~/acute-pancreatitis-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Acute Pancreatitis: Treatment & Management";
pres.author = "Postgraduate Medical Education";
// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
navy: "0D2B4E", // dominant dark bg
teal: "1A7A8A", // heading bars / accents
sky: "2DB8CC", // highlights / icons
white: "FFFFFF",
offwhite:"F4F8FA",
amber: "F0A500", // warning / key points
red: "C0392B", // danger / critical
grey: "5A6A7A", // body text on light bg
lightbg: "EBF4F7", // light slide bg
};
// ─── HELPER: section header bar ──────────────────────────────────────────────
function addTopBar(slide, title) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 0.7,
fill: { color: C.teal }, line: { color: C.teal }
});
slide.addText(title.toUpperCase(), {
x: 0.3, y: 0, w: 9.4, h: 0.7,
fontSize: 13, bold: true, color: C.white, valign: "middle", charSpacing: 2, margin: 0
});
}
// ─── HELPER: footer ──────────────────────────────────────────────────────────
function addFooter(slide, text = "Acute Pancreatitis | Postgraduate Class") {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 5.35, w: 10, h: 0.275,
fill: { color: C.navy }, line: { color: C.navy }
});
slide.addText(text, {
x: 0.3, y: 5.35, w: 9.4, h: 0.275,
fontSize: 7.5, color: C.sky, valign: "middle", margin: 0
});
}
// ─── HELPER: colored card ────────────────────────────────────────────────────
function addCard(slide, x, y, w, h, bg, title, bullets, titleColor = C.white, textColor = C.navy) {
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w, h,
fill: { color: bg },
shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.12 }
});
const items = [];
if (title) {
items.push({ text: title, options: { bold: true, color: titleColor, fontSize: 11, breakLine: bullets.length > 0 } });
}
bullets.forEach((b, i) => {
items.push({ text: b, options: { color: textColor, fontSize: 9.5, bullet: { indent: 10 }, breakLine: i < bullets.length - 1 } });
});
slide.addText(items, { x: x + 0.12, y: y + 0.1, w: w - 0.24, h: h - 0.2, valign: "top" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// Full dark bg
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// Teal accent bar left
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.25, h: 5.625, fill: { color: C.sky }, line: { color: C.sky } });
// Decorative circle
s.addShape(pres.shapes.ELLIPSE, { x: 7.2, y: -0.8, w: 3.8, h: 3.8, fill: { color: C.teal, transparency: 75 }, line: { color: C.teal, transparency: 75 } });
s.addShape(pres.shapes.ELLIPSE, { x: 7.8, y: 3.2, w: 2.5, h: 2.5, fill: { color: C.sky, transparency: 80 }, line: { color: C.sky, transparency: 80 } });
s.addText("ACUTE PANCREATITIS", {
x: 0.5, y: 1.1, w: 7, h: 0.85,
fontSize: 34, bold: true, color: C.white, charSpacing: 3
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 2.05, w: 3.5, h: 0.06, fill: { color: C.amber }, line: { color: C.amber } });
s.addText("Treatment & Management", {
x: 0.5, y: 2.2, w: 7, h: 0.55,
fontSize: 18, color: C.sky, italic: true
});
s.addText("Postgraduate Medical Education | 2026", {
x: 0.5, y: 4.7, w: 7, h: 0.4,
fontSize: 11, color: C.grey
});
s.addText([
{ text: "Sources: ", options: { bold: true, color: C.sky, fontSize: 8 } },
{ text: "Rosen's Emergency Medicine 9e · Sleisenger & Fordtran's GI & Liver Disease · Harrison's Principles 22e", options: { color: C.grey, fontSize: 8 } }
], { x: 0.5, y: 5.1, w: 9, h: 0.35 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addTopBar(s, "Overview");
const topics = [
["01", "Epidemiology & Aetiology"],
["02", "Pathophysiology"],
["03", "Diagnosis & Severity Classification"],
["04", "Fluid Resuscitation"],
["05", "Analgesia & Nutrition"],
["06", "Antibiotic Policy"],
["07", "Disease-Specific & ERCP"],
["08", "Complications & Interventions"],
["09", "Management Algorithm"],
["10", "Key Takeaways"],
];
const col1 = topics.slice(0, 5);
const col2 = topics.slice(5);
col1.forEach(([num, title], i) => {
const y = 0.95 + i * 0.82;
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y, w: 0.52, h: 0.52, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(num, { x: 0.4, y, w: 0.52, h: 0.52, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(title, { x: 1.05, y: y + 0.08, w: 3.8, h: 0.38, fontSize: 12, color: C.grey });
});
col2.forEach(([num, title], i) => {
const y = 0.95 + i * 0.82;
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y, w: 0.52, h: 0.52, fill: { color: C.sky }, line: { color: C.sky } });
s.addText(num, { x: 5.3, y, w: 0.52, h: 0.52, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(title, { x: 5.95, y: y + 0.08, w: 3.8, h: 0.38, fontSize: 12, color: C.grey });
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — EPIDEMIOLOGY & AETIOLOGY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addTopBar(s, "01 · Epidemiology & Aetiology");
// Stats row
const stats = [
{ val: "#1", label: "GI cause of\nhospitalisation (USA)" },
{ val: "40-70%", label: "Caused by\ngallstones" },
{ val: "25-35%", label: "Caused by\nalcohol" },
{ val: "≤30%", label: "Mortality in\nsevere cases" },
];
stats.forEach((st, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.shapes.RECTANGLE, {
x, y: 0.85, w: 2.1, h: 1.25,
fill: { color: C.navy },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.15 }
});
s.addText(st.val, { x, y: 0.9, w: 2.1, h: 0.65, fontSize: 22, bold: true, color: C.amber, align: "center" });
s.addText(st.label, { x, y: 1.52, w: 2.1, h: 0.55, fontSize: 8.5, color: C.sky, align: "center" });
});
s.addText("CAUSES", { x: 0.3, y: 2.3, w: 4, h: 0.35, fontSize: 10, bold: true, color: C.teal, charSpacing: 2 });
const causes = [
["Gallstones", "40–70% of cases — most common overall"],
["Alcohol", "25–35% — second most common"],
["Hypertriglyceridaemia", "TG >1000 mg/dL — third most common"],
["Post-ERCP", "5–10% incidence after procedure"],
["Drugs", "Valproate, azathioprine, thiazides, steroids"],
["Rare", "Hypercalcaemia, trauma, autoimmune, viral (mumps, EBV, CMV), hereditary"],
["Idiopathic", "~15–20% — after excluding all known causes"],
];
causes.forEach(([title, desc], i) => {
const y = 2.72 + i * 0.38;
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y, w: 0.08, h: 0.24, fill: { color: C.sky }, line: { color: C.sky } });
s.addText([
{ text: title + " ", options: { bold: true, color: C.navy, fontSize: 9.5 } },
{ text: desc, options: { color: C.grey, fontSize: 9.5 } }
], { x: 0.5, y, w: 9.2, h: 0.34 });
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — PATHOPHYSIOLOGY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
addTopBar(s, "02 · Pathophysiology");
const steps = [
{ x: 0.3, label: "Inciting\nEvent", detail: "Gallstone, alcohol,\ndrug, duct obstruction" },
{ x: 2.55, label: "Acinar Cell\nInjury", detail: "Disruption of\nmembrane trafficking" },
{ x: 4.8, label: "Trypsinogen\nActivation", detail: "Auto-activation →\ntrypsin release" },
{ x: 7.05, label: "Autodigestion\n+ SIRS", detail: "Cytokines, oedema,\nnecrosis, shock" },
];
steps.forEach((st, i) => {
s.addShape(pres.shapes.RECTANGLE, {
x: st.x, y: 0.95, w: 2.0, h: 2.1,
fill: { color: C.teal },
shadow: { type: "outer", color: "000000", blur: 8, offset: 3, angle: 135, opacity: 0.25 }
});
s.addText(st.label, { x: st.x, y: 1.05, w: 2.0, h: 0.75, fontSize: 12, bold: true, color: C.white, align: "center" });
s.addShape(pres.shapes.RECTANGLE, { x: st.x + 0.1, y: 1.82, w: 1.8, h: 0.04, fill: { color: C.amber }, line: { color: C.amber } });
s.addText(st.detail, { x: st.x, y: 1.9, w: 2.0, h: 0.85, fontSize: 9, color: C.sky, align: "center" });
if (i < 3) {
s.addText("→", { x: st.x + 2.05, y: 1.3, w: 0.4, h: 0.5, fontSize: 22, color: C.amber, align: "center" });
}
});
const consequences = [
"Local: oedema, haemorrhage, necrosis, pseudocyst",
"Pulmonary: ARDS, pleural effusion (esp. left-sided, up to 50%)",
"Renal: acute kidney injury from hypoperfusion + inflammatory mediators",
"Cardiovascular: SIRS → septic shock, DIC",
"Metabolic: hyperglycaemia (↓ insulin), hypocalcaemia (↓ albumin + Mg²⁺)",
];
s.addText("SYSTEMIC CONSEQUENCES", { x: 0.3, y: 3.25, w: 5, h: 0.35, fontSize: 10, bold: true, color: C.amber, charSpacing: 2 });
consequences.forEach((c, i) => {
s.addText([
{ text: "▸ ", options: { color: C.sky, fontSize: 9.5 } },
{ text: c, options: { color: C.offwhite, fontSize: 9.5 } }
], { x: 0.3, y: 3.62 + i * 0.35, w: 9.4, h: 0.32 });
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — DIAGNOSIS & SEVERITY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addTopBar(s, "03 · Diagnosis & Severity Classification");
// Diagnosis box
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 0.85, w: 4.4, h: 2.2, fill: { color: C.navy } });
s.addText("ATLANTA CRITERIA (≥2 of 3)", { x: 0.4, y: 0.9, w: 4.2, h: 0.4, fontSize: 10, bold: true, color: C.amber });
const diag = [
"① Epigastric pain characteristic of AP",
"② Serum lipase or amylase ≥3× ULN",
"③ Characteristic findings on CT / MRI",
];
diag.forEach((d, i) => {
s.addText(d, { x: 0.45, y: 1.38 + i * 0.5, w: 4.15, h: 0.42, fontSize: 10.5, color: C.white });
});
// Lipase note
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 3.15, w: 4.4, h: 0.72, fill: { color: C.teal } });
s.addText([
{ text: "Lipase", options: { bold: true, color: C.amber, fontSize: 10 } },
{ text: " preferred over amylase — more sensitive & specific.\nElevated for ", options: { color: C.white, fontSize: 9.5 } },
{ text: "1–2 weeks", options: { bold: true, color: C.amber, fontSize: 9.5 } },
{ text: " vs. 3–5 days. Degree does NOT correlate with severity.", options: { color: C.white, fontSize: 9.5 } },
], { x: 0.4, y: 3.18, w: 4.2, h: 0.68 });
// Severity table
s.addText("REVISED ATLANTA SEVERITY", { x: 4.9, y: 0.85, w: 4.8, h: 0.38, fontSize: 10, bold: true, color: C.teal, charSpacing: 2 });
const rows = [
{ grade: "MILD", bg: "2E7D32", def: "No organ failure\nNo local/systemic complications", mort: "<1%" },
{ grade: "MOD. SEVERE", bg: "F57F17", def: "Transient organ failure (<48h)\nOR local complications", mort: "5–8%" },
{ grade: "SEVERE", bg: C.red, def: "Persistent organ failure (>48h)\nSingle or multi-organ", mort: "≤30%" },
];
rows.forEach((r, i) => {
const y = 1.32 + i * 1.2;
s.addShape(pres.shapes.RECTANGLE, { x: 4.9, y, w: 1.55, h: 1.08, fill: { color: r.bg } });
s.addText(r.grade, { x: 4.9, y, w: 1.55, h: 1.08, fontSize: 9.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 6.48, y, w: 2.65, h: 1.08, fill: { color: C.lightbg } });
s.addText(r.def, { x: 6.52, y, w: 2.58, h: 1.08, fontSize: 9, color: C.navy, valign: "middle" });
s.addShape(pres.shapes.RECTANGLE, { x: 9.16, y, w: 0.74, h: 1.08, fill: { color: C.navy } });
s.addText(r.mort, { x: 9.16, y, w: 0.74, h: 1.08, fontSize: 10, bold: true, color: C.amber, align: "center", valign: "middle", margin: 0 });
});
s.addText("Scoring: BISAP · Ranson's · APACHE II · CT Severity Index", {
x: 4.9, y: 4.95, w: 4.8, h: 0.35, fontSize: 9, color: C.grey, italic: true
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — FLUID RESUSCITATION
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
addTopBar(s, "04 · Fluid Resuscitation — The Cornerstone of Early Management");
const cards = [
{ x: 0.3, y: 0.9, w: 2.9, h: 1.35, bg: C.teal, title: "FLUID OF CHOICE", bullets: ["Lactated Ringer's (LR)", "Reduces SIRS vs. normal saline", "Avoid NS → hyperchloraemic acidosis"] },
{ x: 3.4, y: 0.9, w: 2.9, h: 1.35, bg: "1E5C6B", title: "RATE", bullets: ["250–500 mL/hr initially", "Reassess every 6 hours", "Titrate to clinical response"] },
{ x: 6.5, y: 0.9, w: 3.2, h: 1.35, bg: "15404E", title: "TARGETS", bullets: ["Urine output >0.5 mL/kg/hr", "Heart rate <100 bpm", "MAP >65 mmHg, ↓ BUN & Hct"] },
{ x: 0.3, y: 2.42, w: 4.4, h: 1.4, bg: "1D3557", title: "CAUTION: OVER-RESUSCITATION", bullets: ["Abdominal compartment syndrome", "Pulmonary oedema / ARDS", "Worsens outcomes — do not blindly push fluids", "Colloids have NO proven benefit"] },
{ x: 4.9, y: 2.42, w: 4.8, h: 1.4, bg: "1D3557", title: "MONITORING", bullets: ["Continuous: vitals, urine output, SpO₂", "Serial labs: FBC, BMP, LFTs, CRP, procalcitonin", "Repeat fluid assessment every 6h", "Consider CVP / invasive monitoring in severe AP"] },
];
cards.forEach(c => {
addCard(s, c.x, c.y, c.w, c.h, c.bg, c.title, c.bullets, C.amber, C.sky);
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 4.02, w: 9.4, h: 0.72, fill: { color: C.red } });
s.addText([
{ text: "⚠ KEY POINT: ", options: { bold: true, fontSize: 11, color: C.white } },
{ text: "Aggressive early IV fluid resuscitation with Lactated Ringer's is the single most important intervention in acute pancreatitis.", options: { fontSize: 10.5, color: C.white } }
], { x: 0.45, y: 4.02, w: 9.1, h: 0.72, valign: "middle" });
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — ANALGESIA & NUTRITION
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addTopBar(s, "05 · Analgesia & Nutrition");
// Left: Analgesia
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 0.85, w: 4.4, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("ANALGESIA", { x: 0.3, y: 0.85, w: 4.4, h: 0.42, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
const analg = [
["IV Opioids", "Morphine, hydromorphone, fentanyl — safe and effective"],
["Morphine myth", "Concern about sphincter of Oddi spasm is NOT supported by evidence — do not withhold"],
["NSAIDs", "Ketorolac as adjunct; rectal indomethacin may reduce post-ERCP pancreatitis"],
["Epidural", "Consider in severe AP — specialist setting"],
];
analg.forEach(([title, desc], i) => {
const y = 1.38 + i * 0.6;
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y, w: 0.07, h: 0.38, fill: { color: C.sky }, line: { color: C.sky } });
s.addText([
{ text: title + ": ", options: { bold: true, color: C.navy, fontSize: 10 } },
{ text: desc, options: { color: C.grey, fontSize: 9.5 } }
], { x: 0.48, y, w: 4.18, h: 0.5 });
});
// Right: Nutrition
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y: 0.85, w: 4.7, h: 0.42, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("NUTRITION", { x: 5.0, y: 0.85, w: 4.7, h: 0.42, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y: 1.35, w: 4.7, h: 1.55, fill: { color: C.lightbg } });
s.addText("MILD AP", { x: 5.1, y: 1.38, w: 4.5, h: 0.35, fontSize: 10, bold: true, color: C.teal });
const mildNutr = [
"Early oral feeding as soon as tolerated (even within 24h)",
"Soft / low-fat diet — no need to wait for enzyme normalisation",
"Start clear liquids, advance as tolerated",
];
mildNutr.forEach((t, i) => {
s.addText([
{ text: "✓ ", options: { color: C.teal, fontSize: 9.5 } },
{ text: t, options: { color: C.grey, fontSize: 9.5 } }
], { x: 5.05, y: 1.76 + i * 0.36, w: 4.55, h: 0.33 });
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y: 3.0, w: 4.7, h: 2.0, fill: { color: C.navy } });
s.addText("MODERATE / SEVERE AP", { x: 5.1, y: 3.04, w: 4.5, h: 0.35, fontSize: 10, bold: true, color: C.amber });
const sevNutr = [
"Enteral nutrition strongly preferred over TPN",
"NG or NJ tube — both equally effective (NG easier to place)",
"Start within 24–72 hours of admission",
"Enteral nutrition: ↓ infection, ↓ bacterial translocation, ↓ complications, cheaper",
"TPN only if enteral route contraindicated (ileus, fistula, obstruction)",
"Never keep NPO beyond 24–48h in severe AP",
];
sevNutr.forEach((t, i) => {
s.addText([
{ text: "▸ ", options: { color: C.sky, fontSize: 9 } },
{ text: t, options: { color: C.offwhite, fontSize: 9 } }
], { x: 5.05, y: 3.42 + i * 0.3, w: 4.55, h: 0.28 });
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — ANTIBIOTIC POLICY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addTopBar(s, "06 · Antibiotic Policy");
// BIG NO box
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 0.85, w: 9.4, h: 1.05, fill: { color: C.red } });
s.addText([
{ text: "✗ PROPHYLACTIC ANTIBIOTICS ARE NOT RECOMMENDED ", options: { bold: true, fontSize: 14, color: C.white } },
{ text: "— even in sterile necrotising pancreatitis", options: { fontSize: 13, color: C.white } }
], { x: 0.4, y: 0.85, w: 9.2, h: 1.05, valign: "middle" });
s.addText("Multiple RCTs and meta-analyses have consistently failed to show benefit of prophylactic antibiotics in preventing infected pancreatic necrosis.", {
x: 0.3, y: 2.02, w: 9.4, h: 0.5, fontSize: 10, color: C.grey, italic: true
});
// When to USE
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 2.65, w: 4.55, h: 0.42, fill: { color: "2E7D32" }, line: { color: "2E7D32" } });
s.addText("ANTIBIOTICS ARE INDICATED WHEN:", { x: 0.3, y: 2.65, w: 4.55, h: 0.42, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
const indications = [
"Infected pancreatic necrosis (confirmed or strongly suspected)",
" · Fever + leukocytosis + gas in necrosis on CT",
" · Or: positive FNA culture",
"Concurrent acute cholangitis",
"Other proven bacterial infection (pneumonia, UTI, line sepsis)",
];
indications.forEach((ind, i) => {
s.addText([
{ text: ind.startsWith(" ·") ? "" : "✓ ", options: { color: "2E7D32", fontSize: 9.5, bold: true } },
{ text: ind, options: { color: C.navy, fontSize: 9.5 } }
], { x: 0.3, y: 3.15 + i * 0.37, w: 4.55, h: 0.34 });
});
// Drug choice
s.addShape(pres.shapes.RECTANGLE, { x: 5.15, y: 2.65, w: 4.55, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("DRUG OF CHOICE (INFECTED NECROSIS):", { x: 5.15, y: 2.65, w: 4.55, h: 0.42, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
const drugs = [
["1st line", "Carbapenems (imipenem / meropenem)", "Excellent pancreatic penetration; broad spectrum"],
["2nd line", "Fluoroquinolone + metronidazole", "For penicillin-allergic patients"],
["Avoid", "Aminoglycosides", "Poor pancreatic penetration"],
];
drugs.forEach(([tier, drug, note], i) => {
const y = 3.15 + i * 0.65;
s.addShape(pres.shapes.RECTANGLE, { x: 5.15, y, w: 0.9, h: 0.55, fill: { color: i === 0 ? C.teal : i === 1 ? "1D3557" : C.red } });
s.addText(tier, { x: 5.15, y, w: 0.9, h: 0.55, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText([
{ text: drug + "\n", options: { bold: true, color: C.navy, fontSize: 9.5 } },
{ text: note, options: { color: C.grey, fontSize: 8.5 } }
], { x: 6.12, y, w: 3.5, h: 0.55 });
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — DISEASE-SPECIFIC MANAGEMENT & ERCP
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
addTopBar(s, "07 · Disease-Specific Management & ERCP");
const panels = [
{
x: 0.3, y: 0.85, w: 4.55, h: 4.4, bg: C.teal, title: "GALLSTONE PANCREATITIS",
items: [
["ERCP within 24–72h", "ONLY if concurrent cholangitis or persistent biliary obstruction — NOT routine in mild AP"],
["Gallstones pass spontaneously", "ERCP not needed without obstruction/cholangitis"],
["Cholecystectomy", "Perform during SAME admission (or ≤2 weeks) to prevent recurrence"],
["Recurrence risk", "~25–30% if cholecystectomy is delayed"],
["Prophylactic stent at ERCP", "Reduces post-ERCP pancreatitis risk in high-risk patients"],
["Rectal indomethacin", "Given peri-procedurally significantly reduces post-ERCP pancreatitis"],
]
},
{
x: 5.15, y: 0.85, w: 4.55, h: 2.0, bg: "1A5276", title: "HYPERTRIGLYCERIDAEMIA-INDUCED (TG >1000 mg/dL)",
items: [
["Insulin infusion", "Even in non-diabetics — activates lipoprotein lipase, rapidly lowers TG"],
["Plasmapheresis", "For refractory cases or TG >2000 mg/dL"],
["Long-term", "Fibrates, omega-3, strict dietary fat restriction"],
]
},
{
x: 5.15, y: 3.05, w: 4.55, h: 2.2, bg: "1D3557", title: "ALCOHOL-INDUCED",
items: [
["Alcohol cessation", "Mandatory — reduces risk of recurrence and progression to chronic pancreatitis"],
["Withdrawal monitoring", "Watch for DTs, Wernicke's encephalopathy — thiamine supplementation"],
["Counselling / referral", "Addiction services; relapse prevention"],
["Note", "Enzyme levels may be falsely normal (amylase) early in alcohol-induced AP — use lipase"],
]
},
];
panels.forEach(p => {
s.addShape(pres.shapes.RECTANGLE, {
x: p.x, y: p.y, w: p.w, h: p.h,
fill: { color: p.bg },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.2 }
});
s.addText(p.title, { x: p.x + 0.12, y: p.y + 0.1, w: p.w - 0.24, h: 0.38, fontSize: 10, bold: true, color: C.amber });
p.items.forEach(([k, v], i) => {
s.addText([
{ text: k + ": ", options: { bold: true, color: C.sky, fontSize: 9 } },
{ text: v, options: { color: C.white, fontSize: 9 } }
], { x: p.x + 0.12, y: p.y + 0.54 + i * 0.56, w: p.w - 0.24, h: 0.5 });
});
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — COMPLICATIONS & INTERVENTIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite }, line: { color: C.offwhite } });
addTopBar(s, "08 · Complications & Interventions");
const comps = [
{
title: "PANCREATIC NECROSIS", color: C.navy,
rows: [
"Sterile necrosis → conservative management (supportive care)",
"Infected necrosis → antibiotics + minimally invasive necrosectomy (step-up approach)",
"Step-up: Percutaneous drainage → VARD → open surgery (last resort)",
"Open necrosectomy mortality 30–40%; minimally invasive preferred",
"Delay intervention until necrosis is 'walled-off' (≥3–4 weeks)",
]
},
{
title: "PANCREATIC PSEUDOCYST", color: C.teal,
rows: [
"Most resolve spontaneously — observe",
"Drainage if: symptomatic, growing, infected, causing obstruction",
"Preferred: EUS-guided cyst-gastrostomy or cyst-duodenostomy",
"Avoid premature drainage before maturation",
]
},
{
title: "ABDOMINAL COMPARTMENT SYNDROME", color: "7B1FA2",
rows: [
"Monitor intra-abdominal pressure (IAP >20 mmHg + new organ failure)",
"Reduce fluids, neuromuscular blockade, nasogastric decompression",
"Percutaneous drainage of ascites",
"Surgical decompression if refractory",
]
},
{
title: "ORGAN FAILURE MANAGEMENT", color: C.red,
rows: [
"Pulmonary: O₂ therapy, CPAP/BiPAP, mechanical ventilation for ARDS",
"Renal: renal replacement therapy (haemodialysis/haemofiltration)",
"Cardiovascular: vasopressors (noradrenaline), inotropes for shock",
"DIC: fresh frozen plasma, platelets as needed",
]
},
];
const positions = [
{ x: 0.3, y: 0.85, w: 4.55 },
{ x: 5.15, y: 0.85, w: 4.55 },
{ x: 0.3, y: 3.1, w: 4.55 },
{ x: 5.15, y: 3.1, w: 4.55 },
];
comps.forEach((comp, idx) => {
const pos = positions[idx];
const h = 2.1;
s.addShape(pres.shapes.RECTANGLE, {
x: pos.x, y: pos.y, w: pos.w, h,
fill: { color: comp.color },
shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.13 }
});
s.addText(comp.title, { x: pos.x + 0.12, y: pos.y + 0.08, w: pos.w - 0.24, h: 0.38, fontSize: 9.5, bold: true, color: C.amber });
comp.rows.forEach((row, i) => {
s.addText([
{ text: "▸ ", options: { color: C.sky, fontSize: 9 } },
{ text: row, options: { color: C.white, fontSize: 9 } }
], { x: pos.x + 0.12, y: pos.y + 0.5 + i * 0.32, w: pos.w - 0.24, h: 0.29 });
});
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — MANAGEMENT ALGORITHM
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
addTopBar(s, "09 · Management Algorithm");
// Flow chart
const nodes = [
{ x: 3.5, y: 0.82, w: 3.0, h: 0.65, bg: C.amber, text: "DIAGNOSIS CONFIRMED\n(≥2 Atlanta Criteria)", textColor: C.navy },
{ x: 3.5, y: 1.72, w: 3.0, h: 0.65, bg: C.teal, text: "IV LR + Analgesia\nNPO initially", textColor: C.white },
{ x: 3.5, y: 2.62, w: 3.0, h: 0.65, bg: "1D3557", text: "Assess Severity\n(BISAP / APACHE II)", textColor: C.white },
];
nodes.forEach(n => {
s.addShape(pres.shapes.RECTANGLE, { x: n.x, y: n.y, w: n.w, h: n.h, fill: { color: n.bg } });
s.addText(n.text, { x: n.x, y: n.y, w: n.w, h: n.h, fontSize: 9.5, bold: true, color: n.textColor, align: "center", valign: "middle", margin: 0 });
// arrow down
s.addShape(pres.shapes.RECTANGLE, { x: 4.9, y: n.y + n.h, w: 0.2, h: 0.45, fill: { color: C.sky }, line: { color: C.sky } });
});
// Branch
s.addText("↙", { x: 2.8, y: 3.45, w: 1.0, h: 0.5, fontSize: 28, color: C.sky, align: "center" });
s.addText("↘", { x: 6.2, y: 3.45, w: 1.0, h: 0.5, fontSize: 28, color: C.sky, align: "center" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 3.88, w: 4.0, h: 1.45, fill: { color: "2E7D32" } });
s.addText("MILD", { x: 0.3, y: 3.88, w: 4.0, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
const mild = ["Early oral feeding", "Cholecystectomy same admission (if gallstone AP)", "Discharge when tolerating diet + pain controlled"];
mild.forEach((t, i) => {
s.addText([{ text: "✓ ", options: { color: C.amber, fontSize: 9 } }, { text: t, options: { color: C.white, fontSize: 9 } }],
{ x: 0.4, y: 4.3 + i * 0.33, w: 3.8, h: 0.3 });
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.7, y: 3.88, w: 4.0, h: 1.45, fill: { color: C.red } });
s.addText("MODERATE / SEVERE", { x: 5.7, y: 3.88, w: 4.0, h: 0.38, fontSize: 10.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
const sev = ["ICU admission", "Enteral nutrition within 24–72h", "Antibiotics ONLY for infected necrosis / cholangitis", "Step-up approach for necrosis if needed"];
sev.forEach((t, i) => {
s.addText([{ text: "▸ ", options: { color: C.amber, fontSize: 9 } }, { text: t, options: { color: C.white, fontSize: 9 } }],
{ x: 5.8, y: 4.3 + i * 0.33, w: 3.8, h: 0.3 });
});
addFooter(s);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
// Accent
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.25, h: 5.625, fill: { color: C.amber }, line: { color: C.amber } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("KEY TAKEAWAYS", { x: 0.5, y: 0.25, w: 9, h: 0.65, fontSize: 22, bold: true, color: C.amber, charSpacing: 4 });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.95, w: 5, h: 0.05, fill: { color: C.sky }, line: { color: C.sky } });
const takeaways = [
["Fluid", "Lactated Ringer's is fluid of choice; aggressive early resuscitation is the most critical intervention"],
["Analgesia", "IV opioids are safe; the morphine/sphincter of Oddi concern is a myth"],
["Feeding", "Early oral feeding in mild AP; enteral (NG/NJ) nutrition within 24–72h in severe AP — never prolonged NPO"],
["No prophylactic ABx", "Antibiotics only for infected necrosis or concurrent cholangitis — RCTs show no benefit prophylactically"],
["ERCP", "Only for gallstone AP with cholangitis or persistent biliary obstruction — not routine"],
["Cholecystectomy", "Same admission or within 2 weeks after gallstone AP to prevent ~30% recurrence"],
["Necrosectomy", "Step-up approach; delay ≥4 weeks until 'walled-off'; minimally invasive preferred"],
["Severity", "Persistent organ failure (>48h) = severe AP; mortality up to 30%"],
];
takeaways.forEach(([key, val], i) => {
const y = 1.1 + i * 0.53;
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y, w: 1.4, h: 0.42, fill: { color: i % 2 === 0 ? C.teal : C.sky } });
s.addText(key, { x: 0.5, y, w: 1.4, h: 0.42, fontSize: 9, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(val, { x: 2.05, y, w: 7.7, h: 0.42, fontSize: 9.5, color: C.offwhite, valign: "middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ═══════════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/acute-pancreatitis-ppt/Acute_Pancreatitis_Management.pptx" })
.then(() => console.log("✅ Presentation saved successfully."))
.catch(err => console.error("❌ Error:", err));
cd /home/daytona/workspace/acute-pancreatitis-ppt && node create_ppt.js
addTopBar function uses pres.shapes.RECTANGLE but the pres object might not be scoped correctly. The issue is that pres.shapes is accessed inside a function before pres is in scope. Let me check and fix.node -e "const pptxgen = require('pptxgenjs'); const pres = new pptxgen(); console.log(Object.keys(pres.shapes).slice(0,5)); console.log(pres.ShapeType ? 'ShapeType exists' : 'no ShapeType');"
node -e "const pptxgen = require('pptxgenjs'); const pres = new pptxgen(); console.log('RECTANGLE:', pres.shapes.RECTANGLE); console.log('ELLIPSE:', pres.shapes.ELLIPSE);"
ELLIPSE is undefined. Let me find the correct shape name and fix the script.node -e "const pptxgen = require('pptxgenjs'); const pres = new pptxgen(); const shapes = Object.keys(pres.shapes); const ellipses = shapes.filter(s => s.toLowerCase().includes('ellip') || s.toLowerCase().includes('oval') || s.toLowerCase().includes('circle')); console.log(ellipses);"
OVAL not ELLIPSE. Let me fix all occurrences in the script.~/acute-pancreatitis-ppt/create_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/acute-pancreatitis-ppt/create_ppt.js'
cd /home/daytona/workspace/acute-pancreatitis-ppt && node create_ppt.js
ls -lh /home/daytona/workspace/acute-pancreatitis-ppt/Acute_Pancreatitis_Management.pptx
Acute Pancreatitis Management
Presentation · PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title | Dark navy/teal design with source citations |
| 2 | Overview / Agenda | 10-topic outline with numbered visual tiles |
| 3 | Epidemiology & Aetiology | Stats cards (gallstones 40-70%, alcohol 25-35%, mortality ≤30%) + causes list |
| 4 | Pathophysiology | Dark theme flow: Inciting Event → Acinar Injury → Trypsinogen → Autodigestion/SIRS + systemic consequences |
| 5 | Diagnosis & Severity | Atlanta criteria, lipase vs. amylase, Revised Atlanta severity table (Mild/Mod-Severe/Severe) with mortality |
| 6 | Fluid Resuscitation | LR preference, rates, targets, caution against over-resuscitation - with red warning bar |
| 7 | Analgesia & Nutrition | Opioid myth busted; mild AP (early oral) vs. severe AP (enteral NG/NJ within 72h) |
| 8 | Antibiotic Policy | Bold red "NO prophylactic antibiotics" bar + clear indications + drug choice (carbapenems) |
| 9 | Disease-Specific & ERCP | Gallstones (ERCP criteria, same-admission cholecystectomy), hypertriglyceridaemia, alcohol |
| 10 | Complications | Necrosis step-up, pseudocyst drainage, abdominal compartment syndrome, organ failure |
| 11 | Management Algorithm | Visual flowchart: Diagnosis → Fluids → Severity → Mild vs. Severe pathways |
| 12 | Key Takeaways | 8 colour-coded points for rapid review |