You remember the ppt you just created for me on abdominal abscess
ls /home/daytona/workspace/ 2>/dev/null && echo "---" && ls /home/daytona/workspace/abdominal* 2>/dev/null || echo "No abdominal folder"
mkdir -p /home/daytona/workspace/abdominal-abscess-ppt
~/abdominal-abscess-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Abdominal Abscess";
pres.author = "Medical Education";
// === COLOR PALETTE ===
// Deep navy dominates; teal as accent; soft ivory for text fields; crimson for highlights
const C = {
navy: "0D2137",
navyMid: "163352",
teal: "1D7A8A",
tealLight: "3FAFC0",
crimson: "C0392B",
amber: "E67E22",
white: "FFFFFF",
offWhite: "F0F4F8",
lightGray: "BCC8D4",
darkText: "0D2137",
yellow: "F9E04B",
};
// === HELPERS ===
function addSectionHeader(slide, title, sub) {
// Full-bleed dark background
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
// Left accent bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.1, h: 5.625, fill: { color: C.teal } });
// Decorative circle
slide.addShape(pres.ShapeType.ellipse, { x: 7.5, y: -1, w: 4, h: 4, fill: { color: C.navyMid }, line: { color: C.teal, width: 2 } });
slide.addText(title, {
x: 0.5, y: 1.8, w: 6.5, h: 1.2,
fontSize: 38, bold: true, color: C.white, fontFace: "Calibri",
charSpacing: 1, valign: "middle"
});
if (sub) {
slide.addText(sub, {
x: 0.5, y: 3.1, w: 7, h: 0.7,
fontSize: 18, color: C.tealLight, fontFace: "Calibri", italic: true
});
}
}
function addSlideTitle(slide, title, accent) {
// Top header bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.navy } });
// Accent underline
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.85, w: 10, h: 0.06, fill: { color: accent || C.teal } });
slide.addText(title, {
x: 0.35, y: 0, w: 9.3, h: 0.85,
fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
valign: "middle", margin: 0
});
}
function addContentBox(slide, x, y, w, h, items, opts = {}) {
// Box background
slide.addShape(pres.ShapeType.rect, {
x, y, w, h,
fill: { color: opts.bgColor || C.offWhite },
line: { color: opts.borderColor || C.teal, width: opts.borderWidth || 1.5 },
shadow: opts.shadow ? { type: "outer", color: "888888", blur: 4, offset: 2, angle: 45, opacity: 0.3 } : undefined
});
const textItems = items.map((item, i) => [
{ text: " " + item, options: { bullet: { code: "2022" }, color: opts.textColor || C.darkText, fontSize: opts.fontSize || 14, fontFace: "Calibri", breakLine: i < items.length - 1, paraSpaceAfter: 4 } }
]).flat();
slide.addText(textItems, { x: x + 0.15, y: y + 0.15, w: w - 0.3, h: h - 0.3, valign: "top", margin: 0 });
}
function addLabeledBox(slide, x, y, w, headerTxt, items, headerColor, bodyColor) {
const hH = 0.42;
const bH = 0.38 * items.length + 0.15;
slide.addShape(pres.ShapeType.rect, { x, y, w, h: hH, fill: { color: headerColor || C.teal } });
slide.addText(headerTxt, { x: x + 0.1, y, w: w - 0.2, h: hH, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
slide.addShape(pres.ShapeType.rect, { x, y: y + hH, w, h: bH, fill: { color: bodyColor || C.offWhite }, line: { color: headerColor || C.teal, width: 1 } });
const textItems = items.map((item, i) => ({ text: " \u2022 " + item, options: { color: C.darkText, fontSize: 12, fontFace: "Calibri", breakLine: i < items.length - 1, paraSpaceAfter: 3 } }));
slide.addText(textItems, { x: x + 0.1, y: y + hH + 0.08, w: w - 0.2, h: bH - 0.15, valign: "top", margin: 0 });
return y + hH + bH;
}
// =====================================================================
// SLIDE 1 — TITLE SLIDE
// =====================================================================
{
const s = pres.addSlide();
// Split background
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 6.2, y: 0, w: 3.8, h: 5.625, fill: { color: C.navyMid } });
// Teal diagonal accent
s.addShape(pres.ShapeType.rect, { x: 0, y: 4.8, w: 10, h: 0.08, fill: { color: C.teal } });
// Large decorative circles
s.addShape(pres.ShapeType.ellipse, { x: 6.0, y: -0.8, w: 5, h: 5, fill: { color: "112844" }, line: { color: C.teal, width: 1.5 } });
s.addShape(pres.ShapeType.ellipse, { x: 7.5, y: 3.2, w: 2.5, h: 2.5, fill: { color: "0A1E30" }, line: { color: C.tealLight, width: 1 } });
s.addText("ABDOMINAL ABSCESS", {
x: 0.5, y: 1.2, w: 6, h: 1.3,
fontSize: 40, bold: true, color: C.white, fontFace: "Calibri",
charSpacing: 2
});
s.addShape(pres.ShapeType.rect, { x: 0.5, y: 2.55, w: 3.5, h: 0.05, fill: { color: C.teal } });
s.addText("A Comprehensive Clinical Review", {
x: 0.5, y: 2.65, w: 5.5, h: 0.55,
fontSize: 18, color: C.tealLight, fontFace: "Calibri", italic: true
});
s.addText("Pathophysiology | Diagnosis | Management", {
x: 0.5, y: 3.35, w: 5.8, h: 0.45,
fontSize: 13, color: C.lightGray, fontFace: "Calibri", charSpacing: 1
});
s.addText("Based on Sleisenger & Fordtran's GI & Liver Disease\nBailey & Love's Short Practice of Surgery, 28th Ed.", {
x: 0.5, y: 4.9, w: 6, h: 0.6,
fontSize: 10, color: C.lightGray, fontFace: "Calibri", italic: true
});
}
// =====================================================================
// SLIDE 2 — OVERVIEW / OUTLINE
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Lecture Outline", C.teal);
const topics = [
["01", "Definition & Overview"],
["02", "Pathophysiology"],
["03", "Etiology & Risk Factors"],
["04", "Bacteriology"],
["05", "Clinical Features"],
["06", "Diagnosis & Imaging"],
["07", "Management"],
["08", "Specific Abscess Types"],
["09", "Complications & Prognosis"],
["10", "Key Points"],
];
const cols = [
topics.slice(0, 5),
topics.slice(5)
];
cols.forEach((col, ci) => {
col.forEach((item, ri) => {
const x = 0.5 + ci * 4.8;
const y = 1.1 + ri * 0.82;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.4, h: 0.7, fill: { color: ci === 0 ? C.navy : C.navyMid }, line: { color: C.teal, width: 1 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 0.55, h: 0.7, fill: { color: C.teal } });
s.addText(item[0], { x, y, w: 0.55, h: 0.7, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addText(item[1], { x: x + 0.6, y, w: 3.75, h: 0.7, fontSize: 13, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
});
});
}
// =====================================================================
// SLIDE 3 — DEFINITION
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Definition & Overview");
// Main definition box
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.05, w: 9.2, h: 1.35, fill: { color: C.navy }, line: { color: C.teal, width: 2 } });
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.05, w: 0.08, h: 1.35, fill: { color: C.teal } });
s.addText([
{ text: "Intra-abdominal abscess (IAA)", options: { bold: true, color: C.yellow, fontSize: 15 } },
{ text: " is a localized abdominal infection arising in the background of infectious peritonitis. It represents a collection of pus enclosed within a cavity formed by the destruction of tissues and is most commonly associated with secondary peritonitis due to bowel perforation.", options: { color: C.white, fontSize: 14 } }
], { x: 0.6, y: 1.1, w: 8.9, h: 1.25, valign: "middle", fontFace: "Calibri", margin: 5 });
// Three boxes: Primary / Secondary / Tertiary peritonitis
const periTypes = [
{ label: "Primary Peritonitis", color: C.teal, text: "Spontaneous bacterial peritonitis — NOT usually associated with abscess formation" },
{ label: "Secondary Peritonitis", color: C.amber, text: "GI tract inflammatory process (bowel perforation) — most common cause of IAA" },
{ label: "Tertiary Peritonitis", color: C.crimson, text: "Persistent/recurrent infection >48h after treatment of secondary peritonitis — may be associated with IAA" },
];
periTypes.forEach((p, i) => {
const x = 0.4 + i * 3.1;
const y = 2.55;
s.addShape(pres.ShapeType.rect, { x, y, w: 2.9, h: 0.45, fill: { color: p.color } });
s.addText(p.label, { x, y, w: 2.9, h: 0.45, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x, y: y + 0.45, w: 2.9, h: 1.1, fill: { color: C.offWhite }, line: { color: p.color, width: 1.5 } });
s.addText(p.text, { x: x + 0.1, y: y + 0.5, w: 2.7, h: 1.0, fontSize: 11.5, color: C.darkText, fontFace: "Calibri", valign: "top" });
});
s.addText("Abscesses in solid organs (hepatic, splenic, pancreatic) are categorized separately.", {
x: 0.4, y: 4.4, w: 9.2, h: 0.45,
fontSize: 11, color: C.teal, fontFace: "Calibri", italic: true
});
}
// =====================================================================
// SLIDE 4 — PATHOPHYSIOLOGY
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Pathophysiology");
// Flow arrows
const steps = [
{ icon: "1", title: "Bacterial Entry", text: "Perforation of intestinal wall → bacteria enter peritoneal cavity" },
{ icon: "2", title: "Lymphatic Clearance", text: "Diaphragmatic function drives lymphatic drainage → RES destruction of bacteria" },
{ icon: "3", title: "Inflammatory Response", text: "PMN invasion, splanchnic blood flow ↑, protein & fluid exudation into peritoneal cavity" },
{ icon: "4", title: "Fibrin Deposition", text: "Fibrinogen + procoagulatory effects → fibrin entrapment → bacteria localization" },
{ icon: "5", title: "Abscess Formation", text: "Peritoneal compartmentalization → abscess = controlled containment of infection" },
];
steps.forEach((step, i) => {
const x = 0.35 + i * 1.9;
const y = 1.1;
// Circle
s.addShape(pres.ShapeType.ellipse, { x: x + 0.5, y, w: 0.7, h: 0.7, fill: { color: C.teal } });
s.addText(step.icon, { x: x + 0.5, y, w: 0.7, h: 0.7, fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
// Arrow (except last)
if (i < steps.length - 1) {
s.addShape(pres.ShapeType.rect, { x: x + 1.25, y: y + 0.28, w: 0.45, h: 0.14, fill: { color: C.tealLight } });
}
// Box
s.addShape(pres.ShapeType.rect, { x, y: y + 0.75, w: 1.7, h: 1.0, fill: { color: C.navy } });
s.addText(step.title, { x, y: y + 0.78, w: 1.7, h: 0.38, fontSize: 11, bold: true, color: C.tealLight, fontFace: "Calibri", align: "center", valign: "middle", margin: 3 });
s.addText(step.text, { x, y: y + 1.18, w: 1.7, h: 0.6, fontSize: 10, color: C.lightGray, fontFace: "Calibri", align: "center", valign: "top", margin: 3 });
});
// Adverse effects note
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 3.1, w: 9.3, h: 0.48, fill: { color: "FFF3CD" }, line: { color: C.amber, width: 1.5 } });
s.addText([
{ text: "⚠ Adverse effects: ", options: { bold: true, color: C.amber, fontSize: 12 } },
{ text: "Excessive lymphatic clearance → sepsis; fluid exudation → hypovolemia; opsonin dilution; fibrin entrapment impairs antibiotic penetration & phagocytic migration.", options: { color: "5D4037", fontSize: 12 } }
], { x: 0.45, y: 3.12, w: 9.1, h: 0.44, valign: "middle", fontFace: "Calibri", margin: 0 });
// Adjuvant substances
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 3.73, w: 9.3, h: 1.45, fill: { color: C.offWhite }, line: { color: C.teal, width: 1 } });
s.addText("Adjuvant Substances That Foster Abscess Formation:", { x: 0.5, y: 3.77, w: 9, h: 0.38, fontSize: 12.5, bold: true, color: C.navy, fontFace: "Calibri" });
const adjuvants = [
"Hemoglobin — provides iron as bacterial nutrient",
"Barium / fecal particulate — blocks lymphatic vessels",
"Necrotic tissue — impairs bacterial killing",
"Gossypiboma (retained sponges) — important preventable cause",
];
s.addText(adjuvants.map((a, i) => ({ text: " \u2022 " + a, options: { color: C.darkText, fontSize: 11.5, fontFace: "Calibri", breakLine: i < adjuvants.length - 1, paraSpaceAfter: 2 } })),
{ x: 0.5, y: 4.17, w: 9, h: 0.9, valign: "top", margin: 0 });
}
// =====================================================================
// SLIDE 5 — ETIOLOGY & RISK FACTORS
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Etiology & Risk Factors");
// Causes column
addLabeledBox(s, 0.4, 1.1, 4.4, "Common Causes", [
"Appendicitis (8% post-appendicectomy)",
"Diverticulitis",
"Bowel perforation (peptic ulcer, trauma)",
"Post-operative (anastomotic leak, spillage)",
"Crohn disease",
"Pancreatitis",
"Neoplastic disease",
"Cholecystectomy / invasive procedures",
], C.teal);
// Risk factors column
addLabeledBox(s, 5.2, 1.1, 4.4, "Host Risk Factors", [
"Diabetes mellitus",
"Malnutrition",
"Advancing age",
"Pre-existing organ dysfunction",
"Underlying malignancy",
"Blood transfusion",
"Chronic glucocorticoid use",
"Pre-op azathioprine (for IBD)",
], C.crimson);
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 4.72, w: 9.2, h: 0.47, fill: { color: C.navyMid } });
s.addText([
{ text: "Note: ", options: { bold: true, color: C.tealLight, fontSize: 12 } },
{ text: "Anti-TNF-α therapy for IBD within 12 weeks before surgery does NOT significantly increase IAA incidence (recent large studies).", options: { color: C.lightGray, fontSize: 12 } }
], { x: 0.55, y: 4.74, w: 9, h: 0.43, valign: "middle", fontFace: "Calibri", margin: 0 });
}
// =====================================================================
// SLIDE 6 — BACTERIOLOGY
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Bacteriology");
// Two-panel layout
// Community-acquired
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.05, w: 4.4, h: 0.48, fill: { color: C.teal } });
s.addText("Community-Acquired IAA", { x: 0.4, y: 1.05, w: 4.4, h: 0.48, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.53, w: 4.4, h: 2.7, fill: { color: C.navy } });
const commOrgs = [
["E. coli", "Initial predominant organism; causes early bacteremia"],
["Bacteroides fragilis", "Predominant in established abscess; 8 capsular polysaccharides with zwitterionic structure promote abscess"],
["Polymicrobial synergy", "E. coli creates anaerobic environment → B. fragilis thrives"],
["Other anaerobes", "Peptostreptococcus, Fusobacterium, Clostridium spp."],
];
commOrgs.forEach(([org, desc], i) => {
const y = 1.6 + i * 0.62;
s.addText([
{ text: org + ": ", options: { bold: true, color: C.tealLight, fontSize: 12 } },
{ text: desc, options: { color: C.lightGray, fontSize: 11.5 } }
], { x: 0.55, y, w: 4.1, h: 0.58, fontFace: "Calibri", valign: "top", margin: 2 });
});
// Hospital / ICU
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.05, w: 4.4, h: 0.48, fill: { color: C.crimson } });
s.addText("Hospital / ICU-Acquired IAA", { x: 5.2, y: 1.05, w: 4.4, h: 0.48, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.53, w: 4.4, h: 2.7, fill: { color: C.navy } });
s.addText("Broad-spectrum antibiotics alter flora in ICU patients (APACHE II >15)", { x: 5.35, y: 1.58, w: 4.1, h: 0.48, fontSize: 11.5, color: C.lightGray, fontFace: "Calibri", italic: true });
const icuOrgs = [
["Candida spp.", "41%"],
["Enterococcus spp.", "31%"],
["Enterobacter spp.", "21%"],
["S. epidermidis", "21%"],
["E. coli", "17% only"],
["Bacteroides spp.", "7% only"],
];
icuOrgs.forEach(([org, pct], i) => {
const y = 2.12 + i * 0.34;
const barW = parseFloat(pct) / 100 * 2.8;
s.addShape(pres.ShapeType.rect, { x: 5.35, y: y + 0.05, w: barW, h: 0.22, fill: { color: C.crimson }, transparency: 30 });
s.addText(org, { x: 5.35, y: y + 0.04, w: 2.8, h: 0.24, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "middle", margin: 3 });
s.addText(pct, { x: 8.25, y: y + 0.04, w: 1.2, h: 0.24, fontSize: 11, bold: true, color: C.amber, fontFace: "Calibri", valign: "middle" });
});
// 38% monomicrobial note
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 4.3, w: 4.4, h: 0.5, fill: { color: "5D1010" } });
s.addText("38% of ICU cases are monomicrobial infections", { x: 5.3, y: 4.32, w: 4.2, h: 0.46, fontSize: 11.5, bold: true, color: C.yellow, fontFace: "Calibri", valign: "middle" });
s.addText("Source: Sleisenger & Fordtran's GI & Liver Disease", {
x: 0.4, y: 5.3, w: 6, h: 0.25, fontSize: 9, color: C.teal, fontFace: "Calibri", italic: true
});
}
// =====================================================================
// SLIDE 7 — CLINICAL FEATURES
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Clinical Features");
// Classic tetrad
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.05, w: 9.2, h: 0.5, fill: { color: C.navy } });
s.addText([
{ text: "Classic Tetrad: ", options: { bold: true, color: C.tealLight, fontSize: 13.5 } },
{ text: "Abdominal pain | Fever | Shaking chills | Palpable abdominal mass", options: { color: C.white, fontSize: 13.5 } }
], { x: 0.55, y: 1.07, w: 9, h: 0.46, valign: "middle", fontFace: "Calibri", margin: 0 });
s.addText("(This tetrad is NOT commonly seen in practice — maintain high clinical suspicion)", {
x: 0.4, y: 1.58, w: 9.2, h: 0.3, fontSize: 11, color: C.crimson, fontFace: "Calibri", italic: true
});
// Symptoms / Signs
const sympt = ["Malaise, lethargy — failure to recover from surgery as expected", "Anorexia and weight loss", "Sweating +/- rigors", "Abdominal/pelvic pain", "Nausea and vomiting"];
const signs = ["Fever (spiking/swinging pyrexia)", "Tachycardia", "Localised abdominal tenderness", "Palpable mass (including on pelvic exam)"];
addLabeledBox(s, 0.4, 1.93, 4.4, "Symptoms", sympt, C.teal);
addLabeledBox(s, 5.2, 1.93, 4.4, "Signs", signs, C.crimson);
// Location-specific features
const locFeats = [
{ loc: "Subphrenic", feat: "Shoulder-tip pain, hiccoughs, pleurisy" },
{ loc: "Pelvic", feat: "Diarrhoea, mucus, tenesmus, rectal urgency" },
{ loc: "Lesser sac / Perigastric", feat: "Nausea, early satiety" },
{ loc: "Interloop", feat: "Ileus, obstructive symptoms, vomiting, distension" },
];
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 3.98, w: 9.2, h: 0.35, fill: { color: C.navyMid } });
s.addText("Location-Specific Clinical Features:", { x: 0.5, y: 4.0, w: 9, h: 0.31, fontSize: 12, bold: true, color: C.tealLight, fontFace: "Calibri", valign: "middle", margin: 0 });
locFeats.forEach((lf, i) => {
const x = 0.4 + (i % 2) * 4.8;
const y = 4.36 + Math.floor(i / 2) * 0.52;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.4, h: 0.46, fill: { color: C.offWhite }, line: { color: C.teal, width: 1 } });
s.addText([
{ text: lf.loc + ": ", options: { bold: true, color: C.teal, fontSize: 11.5 } },
{ text: lf.feat, options: { color: C.darkText, fontSize: 11.5 } }
], { x: x + 0.1, y: y + 0.02, w: 4.2, h: 0.42, valign: "middle", fontFace: "Calibri", margin: 2 });
});
}
// =====================================================================
// SLIDE 8 — DIAGNOSIS & IMAGING
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Diagnosis & Imaging");
// CT — gold standard
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.05, w: 6.0, h: 0.42, fill: { color: C.teal } });
s.addText("CT Scan — Gold Standard", { x: 0.4, y: 1.05, w: 6.0, h: 0.42, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.47, w: 6.0, h: 2.1, fill: { color: C.navy } });
const ctPoints = [
"Optimized with oral AND intravenous contrast",
"Classic appearance: rim-enhancing fluid collection with gas",
"Multidetector helical CT → coronal/sagittal reformats for complex collections",
"Can diagnose: associated bowel obstruction, pylephlebitis, fistula",
"Guides percutaneous drainage placement",
];
ctPoints.forEach((pt, i) => {
s.addText(" \u2022 " + pt, { x: 0.5, y: 1.52 + i * 0.39, w: 5.8, h: 0.37, fontSize: 12, color: C.lightGray, fontFace: "Calibri", valign: "middle" });
});
// Other modalities
s.addShape(pres.ShapeType.rect, { x: 6.7, y: 1.05, w: 2.9, h: 0.42, fill: { color: C.navyMid } });
s.addText("Other Modalities", { x: 6.7, y: 1.05, w: 2.9, h: 0.42, fontSize: 13, bold: true, color: C.tealLight, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
const otherMods = [
["Ultrasound", "Useful in paediatric/pregnant patients; non-specific; guides drainage"],
["MRI", "Excellent soft tissue contrast; used when CT contraindicated"],
["Radio-labelled WBC scan", "Reserved for suspected but unlocalized abscess"],
["Serial imaging", "Monitor treatment response or progression"],
];
otherMods.forEach(([mod, desc], i) => {
const y = 1.52 + i * 0.82;
s.addShape(pres.ShapeType.rect, { x: 6.7, y, w: 2.9, h: 0.78, fill: { color: i % 2 === 0 ? C.navy : C.navyMid } });
s.addText([
{ text: mod + "\n", options: { bold: true, color: C.tealLight, fontSize: 12, breakLine: true } },
{ text: desc, options: { color: C.lightGray, fontSize: 11 } }
], { x: 6.8, y: y + 0.05, w: 2.7, h: 0.68, fontFace: "Calibri", valign: "top", margin: 3 });
});
// Lab investigations
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 3.63, w: 6.0, h: 0.38, fill: { color: C.amber } });
s.addText("Laboratory Investigations", { x: 0.4, y: 3.63, w: 6.0, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 4.01, w: 6.0, h: 1.18, fill: { color: "FFF8E7" }, line: { color: C.amber, width: 1 } });
const labs = [
"FBC: Leukocytosis (neutrophilia)",
"CRP / ESR: Elevated (serial CRP useful to monitor response)",
"Blood cultures: Before antibiotics",
"LFTs: If hepatic/biliary source suspected",
"Pus culture & sensitivity: From drainage specimen",
];
s.addText(labs.map((l, i) => ({ text: " \u2022 " + l, options: { color: C.darkText, fontSize: 11.5, fontFace: "Calibri", breakLine: i < labs.length - 1, paraSpaceAfter: 2 } })),
{ x: 0.5, y: 4.05, w: 5.8, h: 1.1, valign: "top", margin: 0 });
s.addText("Surgical exploration should be considered when imaging fails to show collection but IAA is strongly suspected (especially with continuing ileus).", {
x: 0.4, y: 5.25, w: 9.2, h: 0.35, fontSize: 10.5, color: C.crimson, fontFace: "Calibri", italic: true
});
}
// =====================================================================
// SLIDE 9 — MANAGEMENT
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Management");
// Three pillars
const pillars = [
{ title: "Antibiotics", color: C.teal, items: ["Broad-spectrum IV antibiotics — start empirically", "Cover gram-negatives, anaerobes, enterococci", "Community-acquired: piperacillin-tazobactam OR carbapenems ± metronidazole", "ICU/nosocomial: must cover Candida, Enterococcus, resistant GNRs", "De-escalate based on culture/sensitivity results", "CRP monitoring for treatment response"] },
{ title: "Percutaneous Drainage", color: C.amber, items: ["Mainstay of treatment for collections >5 cm", "Image-guided: CT or ultrasound-guided", "Most successful: unilocular collection via transabdominal route", "Multifocal/loculated: less amenable to percutaneous drainage", "Transgluteal approach: painful, poorly tolerated", "Overall success rate: ~80%"] },
{ title: "Surgical Intervention", color: C.crimson, items: ["Indicated when: percutaneous drainage fails, sepsis worsens or fails to improve", "Laparoscopic lavage OR open laparotomy", "Access all peritoneal cavity regions", "Drain all residual collections", "Address source (resect bowel, repair fistula)", "Should only be by experienced surgeon — matted bowel is challenging"] },
];
pillars.forEach((p, i) => {
const x = 0.35 + i * 3.1;
s.addShape(pres.ShapeType.rect, { x, y: 1.05, w: 2.9, h: 0.48, fill: { color: p.color } });
s.addText(p.title, { x, y: 1.05, w: 2.9, h: 0.48, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x, y: 1.53, w: 2.9, h: 3.55, fill: { color: C.navy } });
p.items.forEach((item, j) => {
s.addText(" \u2022 " + item, { x: x + 0.05, y: 1.58 + j * 0.56, w: 2.8, h: 0.54, fontSize: 10.5, color: C.lightGray, fontFace: "Calibri", valign: "top" });
});
});
// Size guide
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 5.12, w: 9.3, h: 0.37, fill: { color: C.navyMid } });
s.addText([
{ text: "Size Guidance: ", options: { bold: true, color: C.tealLight, fontSize: 12 } },
{ text: "<3 cm: antibiotics alone (often successful) | 3–5 cm: may trial antibiotics | >5 cm: drainage required (medical management fails ~34%) | Large/pelvic abscesses: higher recurrence", options: { color: C.lightGray, fontSize: 12 } }
], { x: 0.45, y: 5.14, w: 9.1, h: 0.33, valign: "middle", fontFace: "Calibri", margin: 0 });
}
// =====================================================================
// SLIDE 10 — SPECIFIC ABSCESS TYPES
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Specific Abscess Types");
const types = [
{
name: "Subphrenic Abscess",
color: C.teal,
points: ["Between diaphragm and liver/spleen", "Common post-upper GI/biliary surgery", "Presents with shoulder-tip pain, hiccoughs, pleural effusion", "Right subphrenic (hepatic bed) most common", "CT diagnosis; percutaneous drainage"],
},
{
name: "Pelvic Abscess",
color: C.crimson,
points: ["Pelvic recesses — pouch of Douglas", "Post-appendicectomy, pelvic surgery, PID", "Presents with diarrhoea, mucus, tenesmus", "Pelvic exam: tender boggy mass per rectum/vagina", "US or CT guided drainage; transrectal/transvaginal approach"],
},
{
name: "Diverticular Abscess",
color: C.amber,
points: ["10–25% of hospitalized diverticulitis patients", "May be pericolic, pelvic, or retroperitoneal (Hinchey I-II)", "Small <3 cm: antibiotics alone", "Larger: image-guided percutaneous drainage", "Recurrence risk post-drainage: 15–25%", "Large >5 cm & pelvic abscesses: higher recurrence"],
},
{
name: "Postoperative Abscess",
color: C.navyMid,
points: ["Due to: spillage, hematoma contamination, anastomotic leak", "Presents 5–7 days post-op: spiking fever, malaise, ileus", "Check: interloop, paracolic, pelvic, subphrenic sites", "Ileus >4–5 days + fever = continuing intra-abdominal sepsis"],
},
];
types.forEach((t, i) => {
const x = 0.35 + (i % 2) * 4.85;
const y = 1.05 + Math.floor(i / 2) * 2.22;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 0.42, fill: { color: t.color } });
s.addText(t.name, { x, y, w: 4.55, h: 0.42, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x, y: y + 0.42, w: 4.55, h: 1.72, fill: { color: C.navy } });
t.points.forEach((pt, j) => {
s.addText(" \u2022 " + pt, { x: x + 0.05, y: y + 0.48 + j * 0.31, w: 4.45, h: 0.29, fontSize: 10.5, color: C.lightGray, fontFace: "Calibri", valign: "top" });
});
});
}
// =====================================================================
// SLIDE 11 — COMPLICATIONS
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "Complications & Prognosis");
const comps = [
{ title: "Sepsis & Septic Shock", icon: "!", color: C.crimson, text: "Excessive lymphatic bacterial clearance; systemic inflammatory response; multi-organ failure if untreated" },
{ title: "Pylephlebitis", icon: "V", color: C.amber, text: "Portal vein septic thrombophlebitis; causes multiple hepatic abscesses; presents with high fever, rigors, jaundice" },
{ title: "Fistula Formation", icon: "F", color: C.teal, text: "Enterocutaneous or enteric fistulas; high-output → electrolyte imbalance; most close spontaneously with conservative management" },
{ title: "SMV Thrombosis", icon: "T", color: C.navyMid, text: "Superior mesenteric vein thrombosis (seen on CT); mesenteric ischemia risk; requires anticoagulation" },
{ title: "Adhesive Obstruction", icon: "A", color: "5E35B1", text: "Most common late complication post-surgery; single band adhesion often responsible; may require laparotomy" },
{ title: "Recurrence", icon: "R", color: "00796B", text: "After percutaneous drainage: 15–25%; large (>5 cm) and pelvic abscesses at higher risk; consider elective surgery" },
];
comps.forEach((c, i) => {
const x = 0.35 + (i % 3) * 3.15;
const y = 1.1 + Math.floor(i / 3) * 2.1;
s.addShape(pres.ShapeType.rect, { x, y, w: 2.95, h: 1.9, fill: { color: C.navy }, line: { color: c.color, width: 2 } });
s.addShape(pres.ShapeType.ellipse, { x: x + 0.1, y: y + 0.1, w: 0.55, h: 0.55, fill: { color: c.color } });
s.addText(c.icon, { x: x + 0.1, y: y + 0.1, w: 0.55, h: 0.55, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addText(c.title, { x: x + 0.7, y: y + 0.12, w: 2.2, h: 0.52, fontSize: 12, bold: true, color: c.color, fontFace: "Calibri", valign: "middle" });
s.addText(c.text, { x: x + 0.1, y: y + 0.72, w: 2.75, h: 1.1, fontSize: 11, color: C.lightGray, fontFace: "Calibri", valign: "top", margin: 3 });
});
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 5.28, w: 9.3, h: 0.3, fill: { color: C.navyMid } });
s.addText("Emergency surgery 30-day mortality for Hinchey III/IV diverticulitis: 5.1% overall; >50% in high-risk patients (age >80, Cr >1.2, ASA 4/5, albumin <2.5 g/dL)", {
x: 0.45, y: 5.3, w: 9.1, h: 0.26, fontSize: 10, color: C.lightGray, fontFace: "Calibri", valign: "middle", margin: 0
});
}
// =====================================================================
// SLIDE 12 — KEY POINTS (SUMMARY)
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0.88, w: 10, h: 0.06, fill: { color: C.teal } });
s.addShape(pres.ShapeType.ellipse, { x: 7.5, y: 3.5, w: 4, h: 4, fill: { color: C.navyMid } });
s.addShape(pres.ShapeType.ellipse, { x: -1, y: -1, w: 3, h: 3, fill: { color: C.navyMid } });
s.addText("Key Points", { x: 0.4, y: 0.05, w: 6, h: 0.82, fontSize: 30, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 2, valign: "middle", margin: 0 });
const keyPoints = [
["Definition", "IAA = localized pus collection, mostly from secondary peritonitis (bowel perforation). Abscess = controlled containment of infection."],
["Pathophysiology", "Bacteria → PMN response → fibrin deposition → localization. Adjuvant substances (hemoglobin, barium, necrotic tissue) promote abscess formation."],
["Key Organisms", "Community: E. coli + B. fragilis (polymicrobial synergy). ICU: Candida (41%), Enterococcus (31%), Enterobacter (21%)."],
["Diagnosis", "CT with IV + oral contrast is gold standard. Classic CT: rim-enhancing collection with gas. US for paediatric/pregnant."],
["Management", "<3 cm: antibiotics alone. >5 cm: percutaneous drainage (80% success). Failed drainage → surgical lavage."],
["Complications", "Sepsis, pylephlebitis, fistulas, SMV thrombosis, recurrence (15–25% post-drainage)."],
];
keyPoints.forEach(([label, text], i) => {
const x = 0.35 + (i % 2) * 4.85;
const y = 1.05 + Math.floor(i / 2) * 1.43;
const colors = [C.teal, C.amber, C.crimson];
const c = colors[Math.floor(i / 2)];
s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 1.32, fill: { color: C.navyMid }, line: { color: c, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 1.3, h: 0.38, fill: { color: c } });
s.addText(label, { x, y, w: 1.3, h: 0.38, fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addText(text, { x: x + 0.1, y: y + 0.42, w: 4.35, h: 0.84, fontSize: 11.5, color: C.lightGray, fontFace: "Calibri", valign: "top", margin: 3 });
});
}
// =====================================================================
// SLIDE 13 — REFERENCES
// =====================================================================
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite } });
addSlideTitle(s, "References", C.teal);
const refs = [
"Sleisenger MH, Fordtran JS. Sleisenger and Fordtran's Gastrointestinal and Liver Disease, 11th Edition. Chapter 29: Abdominal Abscess. Elsevier, 2021.",
"Williams NS, Bulstrode CJK, O'Connell PR. Bailey and Love's Short Practice of Surgery, 28th Edition. Chapter 65 & 76. CRC Press, 2023.",
"Tintinalli JE, et al. Tintinalli's Emergency Medicine: A Comprehensive Study. Chapter 7 (Intra-abdominal Abscess). McGraw-Hill, 2020.",
"Mulholland MW, et al. Mulholland and Greenfield's Surgery: Scientific Principles and Practice, 7th Edition. Chapter 69. Wolters Kluwer, 2021.",
"Onderdonk AB, et al. Experimental intraabdominal abscesses in rats: quantitative bacteriology of infected animals. Infect Immun. 1974.",
"Sartelli M, et al. WSES guidelines for the management of intra-abdominal infections — Update 2021. World J Emerg Surg. 2021.",
];
refs.forEach((ref, i) => {
const y = 1.1 + i * 0.67;
s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 0.35, h: 0.5, fill: { color: i % 2 === 0 ? C.teal : C.navy } });
s.addText(String(i + 1), { x: 0.4, y, w: 0.35, h: 0.5, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 0.78, y, w: 8.85, h: 0.5, fill: { color: i % 2 === 0 ? C.offWhite : "E8EDF2" } });
s.addText(ref, { x: 0.88, y: y + 0.04, w: 8.6, h: 0.44, fontSize: 11, color: C.darkText, fontFace: "Calibri", valign: "middle" });
});
}
// =====================================================================
// WRITE FILE
// =====================================================================
pres.writeFile({ fileName: "/home/daytona/workspace/abdominal-abscess-ppt/Abdominal_Abscess.pptx" })
.then(() => console.log("SUCCESS: Abdominal_Abscess.pptx written."))
.catch(e => console.error("ERROR:", e));
cd /home/daytona/workspace/abdominal-abscess-ppt && node create_ppt.js 2>&1
ls -lh /home/daytona/workspace/abdominal-abscess-ppt/Abdominal_Abscess.pptx
Abdominal Abscess
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title slide |
| 2 | Lecture outline |
| 3 | Definition & Overview (primary / secondary / tertiary peritonitis) |
| 4 | Pathophysiology (5-step flow diagram + adjuvant substances) |
| 5 | Etiology & Risk Factors (two-column layout) |
| 6 | Bacteriology (community-acquired vs ICU-acquired with organism percentages) |
| 7 | Clinical Features (classic tetrad + location-specific symptoms) |
| 8 | Diagnosis & Imaging (CT gold standard + other modalities + labs) |
| 9 | Management (antibiotics / percutaneous drainage / surgery + size guide) |
| 10 | Specific Abscess Types (subphrenic, pelvic, diverticular, postoperative) |
| 11 | Complications & Prognosis |
| 12 | Key Points summary |
| 13 | References |