~/age-presentation/build_age.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// βββ FETCH IMAGES ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const imageUrls = [
"https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Norovirus_4F18_fecal_cryo_lores.jpg/320px-Norovirus_4F18_fecal_cryo_lores.jpg",
"https://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Cholera_bacteria_SEM.jpg/320px-Cholera_bacteria_SEM.jpg",
"https://www.tomwademd.net/wp-content/uploads/2020/06/fig1-e1591252521356.png",
"https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Dehydration.jpg/320px-Dehydration.jpg",
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Cholera_rehydration_nurses.jpg/320px-Cholera_rehydration_nurses.jpg"
];
let images = {};
try {
const raw = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
const arr = JSON.parse(raw);
arr.forEach((img, i) => {
if (img.base64 && !img.error) {
images[i] = img.base64;
}
});
console.log("Images fetched:", Object.keys(images).length);
} catch (e) {
console.log("Image fetch warning:", e.message);
}
// βββ COLORS & HELPERS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const DARK_BG = "0D1B2A"; // deep navy
const MED_BLUE = "1B4F72"; // mid navy
const TEAL = "0E7C86"; // accent teal
const LIGHT_BG = "EAF4F4"; // very light teal for content slides
const WHITE = "FFFFFF";
const ORANGE = "E67E22"; // accent orange / highlight
const GOLD = "F0B429";
const GRAY_TEXT = "4A4A4A";
const SUBTITLE = "A8D8EA";
function addDarkTitle(pres, title, subtitle) {
const slide = pres.addSlide();
slide.background = { color: DARK_BG };
// top accent bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: TEAL } });
// bottom accent bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.545, w: 10, h: 0.08, fill: { color: TEAL } });
// left accent stripe
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.08, w: 0.07, h: 5.465, fill: { color: ORANGE } });
slide.addText(title, {
x: 0.4, y: 1.2, w: 9.2, h: 1.6,
fontSize: 40, bold: true, color: WHITE, fontFace: "Calibri",
align: "left", valign: "middle", margin: 0
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.4, y: 2.95, w: 9.2, h: 0.7,
fontSize: 18, color: SUBTITLE, fontFace: "Calibri",
align: "left", italic: true, margin: 0
});
}
return slide;
}
function addSectionHeader(pres, sectionNum, title, sub) {
const slide = pres.addSlide();
slide.background = { color: MED_BLUE };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: TEAL } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.555, w: 10, h: 0.07, fill: { color: TEAL } });
// circle for section number
slide.addShape(pres.ShapeType.ellipse, { x: 0.45, y: 1.5, w: 1.0, h: 1.0, fill: { color: TEAL } });
slide.addText(sectionNum, {
x: 0.45, y: 1.5, w: 1.0, h: 1.0,
fontSize: 30, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
slide.addText(title, {
x: 1.7, y: 1.55, w: 7.9, h: 0.9,
fontSize: 32, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
if (sub) {
slide.addText(sub, {
x: 1.7, y: 2.6, w: 7.9, h: 0.5,
fontSize: 16, color: SUBTITLE, fontFace: "Calibri", italic: true, margin: 0
});
}
return slide;
}
function addContentSlide(pres, title, bullets, options = {}) {
const slide = pres.addSlide();
slide.background = { color: options.bg || LIGHT_BG };
// top title bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 10, h: 0.04, fill: { color: TEAL } });
slide.addText(title, {
x: 0.3, y: 0, w: 9.4, h: 0.75,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri",
valign: "middle", margin: 0
});
// bullets
const bulletItems = bullets.map((b, i) => {
if (typeof b === "string") {
return { text: b, options: { bullet: { type: "bullet", indent: 15 }, breakLine: true, fontSize: 16, color: GRAY_TEXT, fontFace: "Calibri", paraSpaceAfter: 4 } };
}
// support objects with {text, bold, color, sub}
return {
text: b.text,
options: {
bullet: b.sub ? false : { type: "bullet", indent: b.sub ? 30 : 15 },
indent: b.sub ? 0.4 : 0,
breakLine: true,
fontSize: b.sub ? 14 : 16,
bold: b.bold || false,
color: b.color || GRAY_TEXT,
fontFace: "Calibri",
paraSpaceAfter: b.sub ? 2 : 5
}
};
});
// remove last breakLine
if (bulletItems.length > 0) {
bulletItems[bulletItems.length - 1].options.breakLine = false;
}
const contentH = options.contentH || 4.3;
const contentY = options.contentY || 0.98;
slide.addText(bulletItems, {
x: 0.35, y: contentY, w: options.contentW || 9.3, h: contentH,
valign: "top"
});
// optional footnote/reference
if (options.ref) {
slide.addText(options.ref, {
x: 0.3, y: 5.22, w: 9.4, h: 0.3,
fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
return slide;
}
function addTwoColumnSlide(pres, title, leftTitle, leftBullets, rightTitle, rightBullets, ref) {
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 10, h: 0.04, fill: { color: TEAL } });
slide.addText(title, {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// left column header
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.9, w: 4.4, h: 0.38, fill: { color: TEAL } });
slide.addText(leftTitle, { x: 0.3, y: 0.9, w: 4.4, h: 0.38, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
// right column header
slide.addShape(pres.ShapeType.rect, { x: 5.3, y: 0.9, w: 4.4, h: 0.38, fill: { color: ORANGE } });
slide.addText(rightTitle, { x: 5.3, y: 0.9, w: 4.4, h: 0.38, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
// left bullets
const leftItems = leftBullets.map(b => ({ text: b, options: { bullet: true, breakLine: true, fontSize: 14, color: GRAY_TEXT } }));
if (leftItems.length) leftItems[leftItems.length - 1].options.breakLine = false;
slide.addText(leftItems, { x: 0.3, y: 1.38, w: 4.4, h: 3.9, valign: "top" });
// right bullets
const rightItems = rightBullets.map(b => ({ text: b, options: { bullet: true, breakLine: true, fontSize: 14, color: GRAY_TEXT } }));
if (rightItems.length) rightItems[rightItems.length - 1].options.breakLine = false;
slide.addText(rightItems, { x: 5.3, y: 1.38, w: 4.4, h: 3.9, valign: "top" });
// divider
slide.addShape(pres.ShapeType.line, { x: 4.98, y: 0.9, w: 0, h: 4.4, line: { color: TEAL, width: 1.5 } });
if (ref) {
slide.addText(ref, { x: 0.3, y: 5.22, w: 9.4, h: 0.3, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0 });
}
return slide;
}
// βββ BUILD PRESENTATION ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.author = "Clinical Pharmacy Case Teaching";
pres.title = "Acute Gastroenteritis (AGE) - Clinical Overview";
// ββ SLIDE 1: TITLE ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const slide = addDarkTitle(
pres,
"Acute Gastroenteritis (AGE)",
"Etiology | Pathophysiology | Diagnosis | Management | Pharmacist Role"
);
slide.addText("Clinical Pharmacy Case-Based Teaching β’ Case No. 04", {
x: 0.4, y: 3.8, w: 9.2, h: 0.4,
fontSize: 13, color: GOLD, fontFace: "Calibri", margin: 0
});
slide.addText("References: Goldman-Cecil Medicine 2024 | Yamada's Gastroenterology 7e | Harrison's 22E | Sleisenger & Fordtran GI & Liver Disease | ACG Guidelines 2023", {
x: 0.4, y: 5.15, w: 12.5, h: 0.3,
fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 2: LEARNING OBJECTIVES ββββββββββββββββββββββββββββββββββββββββββββββ
addContentSlide(pres, "Learning Objectives", [
{ text: "Define Acute Gastroenteritis and differentiate from other diarrheal syndromes", bold: true },
{ text: "Recognize common viral, bacterial, and parasitic etiologies", bold: false },
{ text: "Understand the pathophysiology of secretory and inflammatory diarrhea", bold: true },
{ text: "Apply WHO / ACG dehydration assessment criteria at bedside", bold: false },
{ text: "Plan supportive management: ORS, IV fluids, antiemetics, probiotics", bold: true },
{ text: "Identify when antibiotics are and are NOT indicated (ACG 2023)", bold: false },
{ text: "Manage AGE in special populations: T2DM (Metformin hold), chronic alcoholic (Thiamine, Acamprosate)", bold: true },
{ text: "Recognize and manage drug-related problems: ADR reporting, drug switching", bold: false },
], {
ref: "Source: ACG Clinical Guidelines 2023 | ADA Standards of Medical Care 2024 | Yamada's Gastroenterology 7e"
});
// ββ SLIDE 3: WHAT IS AGE? ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("What is Acute Gastroenteritis?", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// Definition box
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.92, w: 12.7, h: 1.05, fill: { color: MED_BLUE }, line: { color: TEAL, width: 2 } });
slide.addText([
{ text: "DEFINITION: ", options: { bold: true, color: GOLD, fontSize: 16 } },
{ text: "Acute inflammation of the gastrointestinal tract characterized by diarrhea (β₯3 unformed stools/day), often with nausea, vomiting, abdominal cramps, and/or fever β lasting < 14 days.", options: { color: WHITE, fontSize: 15 } }
], { x: 0.5, y: 0.98, w: 12.3, h: 0.9, valign: "middle" });
// Three boxes
const boxData = [
{ label: "ACUTE", val: "< 14 days", color: TEAL },
{ label: "PERSISTENT", val: "14 β 29 days", color: ORANGE },
{ label: "CHRONIC", val: "> 29 days", color: "7D3C98" },
];
boxData.forEach((b, i) => {
slide.addShape(pres.ShapeType.rect, { x: 0.3 + i * 2.95, y: 2.15, w: 2.7, h: 0.9, fill: { color: b.color } });
slide.addText([
{ text: b.label + "\n", options: { bold: true, fontSize: 15, color: WHITE, breakLine: true } },
{ text: b.val, options: { fontSize: 13, color: WHITE } }
], { x: 0.3 + i * 2.95, y: 2.15, w: 2.7, h: 0.9, align: "center", valign: "middle" });
});
// Epidemiology bullets
const epiBullets = [
"WHO: diarrhea caused 800,000 deaths (10.5% of all childhood deaths <5 yrs) in 2010",
"USA: ~179 million cases per year; 2nd most common illness after respiratory infections",
"Highest rates in children <5 yrs (1.1 episodes/person/year)",
"70% of cases in USA are viral β Norovirus most common (26%), Rotavirus (18%)",
"51% of ED diarrhea cases have NO identifiable causative pathogen (EBMedicine 2024)"
];
const epiItems = epiBullets.map(b => ({ text: b, options: { bullet: true, breakLine: true, fontSize: 14, color: GRAY_TEXT } }));
epiItems[epiItems.length-1].options.breakLine = false;
slide.addText(epiItems, { x: 0.3, y: 3.25, w: 12.7, h: 2.1, valign: "top" });
slide.addText("Ref: Yamada's Gastroenterology 7e; Goldman-Cecil Medicine 2024; EBMedicine Episode 36 (2024)", {
x: 0.3, y: 5.2, w: 12.7, h: 0.28, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 4: ETIOLOGY βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Etiology β What Causes AGE?", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// Viral column
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.92, w: 3.8, h: 0.4, fill: { color: TEAL } });
slide.addText("π¦ VIRAL (70%)", { x: 0.3, y: 0.92, w: 3.8, h: 0.4, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const viral = ["Norovirus β #1 cause (26%)", "Rotavirus (18%) β prevented by vaccine", "Adenovirus, Astrovirus", "Coronavirus, Bocavirus", "Usually self-limited, < 7 days", "Treatment: supportive only"];
const viralItems = viral.map(v => ({ text: v, options: { bullet: true, breakLine: true, fontSize: 13, color: GRAY_TEXT } }));
viralItems[viralItems.length-1].options.breakLine = false;
slide.addText(viralItems, { x: 0.3, y: 1.42, w: 3.8, h: 3.2 });
// Bacterial column
slide.addShape(pres.ShapeType.rect, { x: 4.75, y: 0.92, w: 3.8, h: 0.4, fill: { color: ORANGE } });
slide.addText("π§« BACTERIAL (15β20%)", { x: 4.75, y: 0.92, w: 3.8, h: 0.4, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const bact = ["Salmonella spp. (5.3%)", "Campylobacter (3%)", "E. coli (ETEC, EHEC O157:H7)", "Shigella spp. (dysentery)", "Clostridioides difficile", "Staph. aureus (preformed toxin)"];
const bactItems = bact.map(v => ({ text: v, options: { bullet: true, breakLine: true, fontSize: 13, color: GRAY_TEXT } }));
bactItems[bactItems.length-1].options.breakLine = false;
slide.addText(bactItems, { x: 4.75, y: 1.42, w: 3.8, h: 3.2 });
// Parasitic column
slide.addShape(pres.ShapeType.rect, { x: 9.2, y: 0.92, w: 3.8, h: 0.4, fill: { color: "7D3C98" } });
slide.addText("π¬ PARASITIC / OTHER", { x: 9.2, y: 0.92, w: 3.8, h: 0.4, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const para = ["Giardia lamblia", "Entamoeba histolytica", "Cryptosporidium parvum", "Cyclospora", "Food-borne toxins (preformed)", "Medications, allergy"];
const paraItems = para.map(v => ({ text: v, options: { bullet: true, breakLine: true, fontSize: 13, color: GRAY_TEXT } }));
paraItems[paraItems.length-1].options.breakLine = false;
slide.addText(paraItems, { x: 9.2, y: 1.42, w: 3.8, h: 3.2 });
// dividers
slide.addShape(pres.ShapeType.line, { x: 4.58, y: 0.92, w: 0, h: 3.6, line: { color: TEAL, width: 1 } });
slide.addShape(pres.ShapeType.line, { x: 9.03, y: 0.92, w: 0, h: 3.6, line: { color: TEAL, width: 1 } });
// image norovirus
if (images[0]) {
slide.addImage({ data: images[0], x: 0.3, y: 4.7, w: 1.5, h: 1.1 });
slide.addText("Norovirus EM (CDC / Wikimedia)", { x: 0.3, y: 5.82, w: 1.5, h: 0.2, fontSize: 8, color: "888888", align: "center" });
}
if (images[1]) {
slide.addImage({ data: images[1], x: 4.75, y: 4.7, w: 1.5, h: 1.1 });
slide.addText("Vibrio cholerae SEM (Wikimedia)", { x: 4.75, y: 5.82, w: 1.5, h: 0.2, fontSize: 8, color: "888888", align: "center" });
}
slide.addText("Ref: EBMedicine 2024; Yamada's Gastroenterology 7e; Goldman-Cecil Medicine 2024", {
x: 0.3, y: 7.22, w: 12.7, h: 0.25, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 5: PATHOPHYSIOLOGY βββββββββββββββββββββββββββββββββββββββββββββββββββ
addContentSlide(pres, "Pathophysiology β How Does AGE Cause Diarrhea?", [
{ text: "TWO MAIN MECHANISMS:", bold: true, color: MED_BLUE },
{ text: "1. SECRETORY DIARRHEA (Watery, large volume):", bold: true, color: TEAL },
{ text: "Pathogens produce enterotoxins β stimulate cAMP/cGMP β β Clβ» secretion into gut lumen β β NaβΊ/HβO absorption β massive watery diarrhea", sub: true },
{ text: "Examples: Cholera (V. cholerae), ETEC, Staph enterotoxin", sub: true },
{ text: "2. INFLAMMATORY / INVASIVE DIARRHEA (Bloody, small volume):", bold: true, color: ORANGE },
{ text: "Direct mucosal invasion β epithelial destruction β inflammatory infiltrate β blood/mucus in stool, fever, severe pain", sub: true },
{ text: "Examples: Shigella, Salmonella, Campylobacter, E. coli O157:H7, C. difficile", sub: true },
{ text: "VIRUS-INDUCED (Osmotic/disruption):", bold: true, color: "7D3C98" },
{ text: "Villous tip enterocytes destroyed β β absorptive surface β unabsorbed solutes draw water into lumen β watery diarrhea", sub: true },
{ text: "Examples: Rotavirus, Norovirus (blunting of villi + β enzymes + gut motility changes)", sub: true },
{ text: "END RESULT: Water and electrolyte loss β DEHYDRATION β hyponatremia, hypokalemia, metabolic acidosis", bold: true, color: "C0392B" },
], {
ref: "Ref: Sleisenger & Fordtran GI & Liver Disease | Yamada's Gastroenterology 7e, Chapter 28 (Cohen MB)",
contentH: 5.8, contentY: 0.88
});
// ββ SLIDE 6: CLINICAL FEATURES βββββββββββββββββββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Clinical Features & Presentation", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// symptom boxes
const symptoms = [
{ icon: "π©", label: "DIARRHEA", desc: "β₯3 stools/day\nNon-bloody (usually)\nHigh volume = viral" },
{ icon: "π€’", label: "NAUSEA /\nVOMITING", desc: "Common with viral\nPrecedes diarrhea\nRisk of aspiration" },
{ icon: "π€", label: "ABDOMINAL\nCRAMPS", desc: "Diffuse or periumbilical\nColic-type\nTenerness mild" },
{ icon: "π‘οΈ", label: "FEVER", desc: "Variable\nHigh fever β bacterial\nAbsent β toxin/viral" },
{ icon: "π§", label: "DEHYDRATION", desc: "Sunken eyes, dry mouth\nSkin turgorβ\nOliguria" },
];
symptoms.forEach((s, i) => {
const col = i < 3 ? i : i - 3;
const row = i < 3 ? 0 : 1;
const x = 0.3 + col * 4.3;
const y = 0.98 + row * 2.5;
slide.addShape(pres.ShapeType.rect, { x, y, w: 4.0, h: 2.1, fill: { color: WHITE }, line: { color: TEAL, width: 1.5 } });
slide.addShape(pres.ShapeType.rect, { x, y, w: 4.0, h: 0.5, fill: { color: TEAL } });
slide.addText(s.icon + " " + s.label, { x, y, w: 4.0, h: 0.5, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
slide.addText(s.desc, { x: x + 0.1, y: y + 0.55, w: 3.8, h: 1.5, fontSize: 12, color: GRAY_TEXT, valign: "top" });
});
slide.addText("β οΈ RED FLAGS requiring urgent evaluation: Bloody stool | High fever >38.5Β°C | Signs of severe dehydration | Immunocompromised | Age extremes | >7 days", {
x: 0.3, y: 5.15, w: 12.7, h: 0.38, fontSize: 13, bold: true, color: WHITE, fontFace: "Calibri",
fill: { color: "C0392B" }, valign: "middle", align: "left"
});
}
// ββ SLIDE 7: DEHYDRATION ASSESSMENT βββββββββββββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Dehydration Assessment (WHO Criteria)", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
const cols = ["Parameter", "No Dehydration", "Some Dehydration", "Severe Dehydration"];
const rows = [
["General condition", "Alert, well", "Restless, irritable", "Lethargic/unconscious"],
["Eyes", "Normal", "Sunken", "Very sunken & dry"],
["Tears", "Present", "Absent", "Absent"],
["Mouth/Tongue", "Moist", "Dry", "Very dry"],
["Thirst", "Normal", "Increased, drinks eagerly", "Unable/drinks poorly"],
["Skin pinch", "Returns quickly", "Returns slowly (< 2 sec)", "Returns very slowly (> 2 sec)"],
["% body weight lost", "< 3%", "3β9%", "> 9%"],
["Action", "ORS at home", "IV/ORS + monitor", "Urgent IV fluids"],
];
const headerColors = ["1B4F72", "27AE60", "E67E22", "C0392B"];
cols.forEach((c, i) => {
slide.addShape(pres.ShapeType.rect, { x: 0.3 + i * 3.17, y: 0.92, w: 3.0, h: 0.38, fill: { color: headerColors[i] } });
slide.addText(c, { x: 0.3 + i * 3.17, y: 0.92, w: 3.0, h: 0.38, fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
});
rows.forEach((row, ri) => {
row.forEach((cell, ci) => {
const bg = ri % 2 === 0 ? WHITE : "F0F0F0";
slide.addShape(pres.ShapeType.rect, { x: 0.3 + ci * 3.17, y: 1.38 + ri * 0.48, w: 3.0, h: 0.47, fill: { color: bg }, line: { color: "CCCCCC", width: 0.5 } });
slide.addText(cell, { x: 0.3 + ci * 3.17, y: 1.38 + ri * 0.48, w: 3.0, h: 0.47, fontSize: 11, color: GRAY_TEXT, align: "center", valign: "middle" });
});
});
slide.addText("OUR PATIENT: Na 133 mEq/L (low), Hb 19.8 g/dL (hemoconcentration), PCV 52% β SOME dehydration. Managed with IV NS + RL @ 60 ml/hr", {
x: 0.3, y: 5.3, w: 12.7, h: 0.3, fontSize: 11, bold: true, color: "C0392B", fontFace: "Calibri", margin: 0
});
slide.addText("Ref: WHO Pocket Book of Hospital Care for Children 2013; ACG Clinical Guidelines 2023", {
x: 0.3, y: 5.62, w: 12.7, h: 0.22, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 8: INVESTIGATIONS ββββββββββββββββββββββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Laboratory Investigations in AGE", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// Case labs highlight
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.92, w: 12.7, h: 0.38, fill: { color: "27AE60" } });
slide.addText("CASE FINDINGS (27/6/26) β Interpretation", { x: 0.3, y: 0.92, w: 12.7, h: 0.38, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const labRows = [
["Hb 19.8 g/dL β", "Hemoconcentration (pseudopolycythemia) β will normalize with rehydration"],
["PCV 52% β, RBC 5.89 Γ 10βΆ/Β΅L", "Confirms dehydration; NOT true polycythemia"],
["WBC 10.3 Γ 10Β³/Β΅L, Neutrophils 70% β", "Mild leukocytosis β bacterial infection pattern"],
["Na 133 mEq/L β (hyponatremia)", "Electrolyte loss from diarrhea β corrected with IV NS"],
["Total Bilirubin 3.9 mg/dL β (Indirect 3.4)", "Predominantly unconjugated β hepatocellular dysfunction (fatty liver + alcohol)"],
["USG: Grade I Fatty Liver + Left Renal Calculi", "Chronic alcohol-related hepatic change; renal calculi β incidental"],
];
labRows.forEach((row, ri) => {
const bg = ri % 2 === 0 ? WHITE : "F5F5F5";
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.42 + ri * 0.48, w: 5.5, h: 0.46, fill: { color: bg }, line: { color: "CCCCCC", width: 0.5 } });
slide.addShape(pres.ShapeType.rect, { x: 5.85, y: 1.42 + ri * 0.48, w: 7.15, h: 0.46, fill: { color: bg }, line: { color: "CCCCCC", width: 0.5 } });
slide.addText(row[0], { x: 0.3, y: 1.42 + ri * 0.48, w: 5.5, h: 0.46, fontSize: 12, bold: true, color: TEAL, valign: "middle" });
slide.addText(row[1], { x: 5.85, y: 1.42 + ri * 0.48, w: 7.15, h: 0.46, fontSize: 12, color: GRAY_TEXT, valign: "middle" });
});
slide.addText("π‘ Routine cultures rarely change acute management. Stool cultures indicated for: bloody diarrhea | fever | immunocompromised | outbreak investigation", {
x: 0.3, y: 4.4, w: 12.7, h: 0.4, fontSize: 12, bold: true, color: WHITE, fill: { color: MED_BLUE }, valign: "middle"
});
slide.addText("Ref: Yamada's Gastroenterology 7e, Chapter 28; Sleisenger & Fordtran GI Disease; ROSEN's Emergency Medicine", {
x: 0.3, y: 5.2, w: 12.7, h: 0.28, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 9: MANAGEMENT OVERVIEW (VIDEO SLIDE) ββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: DARK_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.07, fill: { color: TEAL } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.43, w: 13.3, h: 0.07, fill: { color: TEAL } });
slide.addText("βΆ Watch Before Next Slide", {
x: 0.5, y: 0.2, w: 12.3, h: 0.5, fontSize: 14, bold: true, color: GOLD, fontFace: "Calibri", margin: 0
});
slide.addText("AGE β Diagnosis & Management in the ED", {
x: 0.5, y: 0.85, w: 12.3, h: 0.7, fontSize: 30, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
slide.addText("EBMedicine | Episode 36 | Dr. Brian Geyer β ACG 2016 / IDSA 2017 Guidelines", {
x: 0.5, y: 1.65, w: 12.3, h: 0.38, fontSize: 15, color: SUBTITLE, fontFace: "Calibri", italic: true, margin: 0
});
// YouTube link styled as button
slide.addShape(pres.ShapeType.rect, { x: 3.5, y: 2.35, w: 6.3, h: 0.65, fill: { color: "CC0000" }, line: { color: "CC0000" } });
slide.addText("βΆ https://www.youtube.com/watch?v=1yXkjgJPgMk", {
x: 3.5, y: 2.35, w: 6.3, h: 0.65, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", hyperlink: { url: "https://www.youtube.com/watch?v=1yXkjgJPgMk" }, margin: 0
});
// Khan Academy video
slide.addText("Supplementary β What is Gastroenteritis? (Khan Academy, 410K views):", {
x: 0.5, y: 3.25, w: 12.3, h: 0.35, fontSize: 13, color: SUBTITLE, fontFace: "Calibri", margin: 0
});
slide.addShape(pres.ShapeType.rect, { x: 3.5, y: 3.68, w: 6.3, h: 0.6, fill: { color: "CC0000" } });
slide.addText("βΆ https://www.youtube.com/watch?v=pIDmePznLBo", {
x: 3.5, y: 3.68, w: 6.3, h: 0.6, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", hyperlink: { url: "https://www.youtube.com/watch?v=pIDmePznLBo" }, margin: 0
});
slide.addText("Pediatric AGE Overview β Causes, Pathophysiology, Clinical Features:", {
x: 0.5, y: 4.55, w: 12.3, h: 0.35, fontSize: 13, color: SUBTITLE, fontFace: "Calibri", margin: 0
});
slide.addShape(pres.ShapeType.rect, { x: 3.5, y: 4.98, w: 6.3, h: 0.6, fill: { color: "CC0000" } });
slide.addText("βΆ https://www.youtube.com/watch?v=g2q11MFnPrY", {
x: 3.5, y: 4.98, w: 6.3, h: 0.6, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", hyperlink: { url: "https://www.youtube.com/watch?v=g2q11MFnPrY" }, margin: 0
});
slide.addText("EBMedicine Episode 36 (2024) | Khan Academy NCLEX-RN Series | Paediatrics Overview", {
x: 0.3, y: 6.95, w: 12.7, h: 0.22, fontSize: 9, color: "888888", italic: true, margin: 0
});
}
// ββ SLIDE 10: MANAGEMENT PILLARS ββββββββββββββββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Management of AGE β The 4 Pillars", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
const pillars = [
{
num: "1", title: "REHYDRATION", color: TEAL,
points: ["ORS first line β mild/moderate dehydration", "WHO ORS: Na 75, K 20, Glucose 75, Citrate 10 mEq/L", "IV Normal Saline + Ringer's Lactate for severe dehydration", "Case: NS + RL @ 60 ml/hr", "Monitor electrolytes, urine output", "Goal: restore circulating volume"]
},
{
num: "2", title: "ANTI-EMETICS", color: ORANGE,
points: ["Ondansetron (Emeset) 4 mg IV/oral β 5-HT3 antagonist", "Preferred in adults and children", "Reduces vomiting, helps ORS tolerance", "Avoid: Metoclopramide (EPS risk)", "Duration: 24β48 hours typically"]
},
{
num: "3", title: "PROBIOTICS", color: "27AE60",
points: ["Bifilac (Lactobacillus + Bifidobacterium + Streptococcus)", "2 capsules TID", "Restores gut microbiome", "Reduces diarrheal duration by ~1 day", "Evidence strongest for: Lactobacillus rhamnosus GG", "Safe in most patients"]
},
{
num: "4", title: "ANTIBIOTICS\n(Selected Cases ONLY)", color: "C0392B",
points: ["NOT recommended for routine AGE (ACG 2023)", "Indications: traveler's diarrhea, severely ill, bloody diarrhea, immunocompromised", "Case: Ciprofloxacin β ADR (itching) β switched to Ceftriaxone", "Pharmacist ACG Intervention: Discontinue Ceftriaxone β manage supportively"]
}
];
pillars.forEach((p, i) => {
const x = 0.3 + i * 3.18;
slide.addShape(pres.ShapeType.rect, { x, y: 0.92, w: 3.0, h: 0.42, fill: { color: p.color } });
slide.addText(p.num + " " + p.title, { x, y: 0.92, w: 3.0, h: 0.42, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const bItems = p.points.map(pt => ({ text: pt, options: { bullet: true, breakLine: true, fontSize: 12, color: GRAY_TEXT } }));
bItems[bItems.length - 1].options.breakLine = false;
slide.addText(bItems, { x, y: 1.42, w: 3.0, h: 4.0 });
});
slide.addText("Ref: ACG Clinical Guideline: Acute Diarrheal Infections in Adults 2023 | Sleisenger & Fordtran | Tintinalli's Emergency Medicine", {
x: 0.3, y: 7.22, w: 12.7, h: 0.22, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 11: ANTIBIOTICS β WHEN YES, WHEN NO βββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Antibiotics in AGE β When to Use, When NOT to Use", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// NO column
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.92, w: 6.0, h: 0.42, fill: { color: "C0392B" } });
slide.addText("β DO NOT USE β Routine AGE", { x: 0.3, y: 0.92, w: 6.0, h: 0.42, fontSize: 15, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const no = [
"Non-bloody diarrhea (watery) with no systemic signs",
"Self-limited viral gastroenteritis",
"Mild-to-moderate dehydration without fever",
"Empiric antibiotics NOT recommended β ACG 2023",
"Risks: promotes antimicrobial resistance",
"Risks: C. difficile superinfection",
"Risks: ADRs (as in our case β ciprofloxacin allergy)"
];
const noItems = no.map(v => ({ text: v, options: { bullet: true, breakLine: true, fontSize: 13, color: "C0392B" } }));
noItems[noItems.length-1].options.breakLine = false;
slide.addText(noItems, { x: 0.3, y: 1.44, w: 6.0, h: 3.9 });
// YES column
slide.addShape(pres.ShapeType.rect, { x: 7.0, y: 0.92, w: 6.0, h: 0.42, fill: { color: "27AE60" } });
slide.addText("β
USE β Select Indications", { x: 7.0, y: 0.92, w: 6.0, h: 0.42, fontSize: 15, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const yes = [
"Traveler's diarrhea (severe / fluoroquinolone-suitable)",
"Bloody diarrhea (Shigella, Campylobacter confirmed)",
"Severely ill: fever, high stool frequency, systemic signs",
"Immunocompromised patient",
"Cholera (Azithromycin / Doxycycline)",
"C. difficile infection (Vancomycin PO or Fidaxomicin)",
"After stool culture β guided antibiotic therapy preferred"
];
const yesItems = yes.map(v => ({ text: v, options: { bullet: true, breakLine: true, fontSize: 13, color: "27AE60" } }));
yesItems[yesItems.length-1].options.breakLine = false;
slide.addText(yesItems, { x: 7.0, y: 1.44, w: 6.0, h: 3.9 });
// divider
slide.addShape(pres.ShapeType.line, { x: 6.63, y: 0.92, w: 0, h: 4.3, line: { color: TEAL, width: 1.5 } });
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.6, w: 12.7, h: 0.42, fill: { color: MED_BLUE } });
slide.addText("CASE: Ciprofloxacin caused allergic reaction (itching) β Pharmacist ACG Intervention: Discontinue Ceftriaxone, manage with supportive care", {
x: 0.3, y: 5.6, w: 12.7, h: 0.42, fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
slide.addText("Ref: ACG Clinical Guidelines 2023; Sleisenger & Fordtran GI Disease, Antimicrobial Drugs section; IDSA Guidelines 2017", {
x: 0.3, y: 7.2, w: 12.7, h: 0.22, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 12: SPECIAL POPULATION β T2DM + METFORMIN ββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Special Population: AGE + Type 2 DM β Metformin Safety", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// Mechanism flowchart styled as boxes
const flow = [
{ label: "AGE β DIARRHEA", detail: "Fluid / electrolyte loss\nReduced oral intake", color: TEAL },
{ label: "DEHYDRATION", detail: "Reduced renal perfusion\nβ GFR transiently", color: ORANGE },
{ label: "METFORMIN ACCUMULATION", detail: "Metformin is renally cleared\nβ Plasma levels", color: "C0392B" },
{ label: "LACTIC ACIDOSIS RISK", detail: "Metformin inhibits\nmitochondrial Complex I\nβ Anaerobic glycolysis", color: "6C3483" },
];
flow.forEach((f, i) => {
const x = 0.3 + i * 3.18;
slide.addShape(pres.ShapeType.rect, { x, y: 0.92, w: 2.9, h: 1.1, fill: { color: f.color } });
slide.addText(f.label, { x, y: 0.92, w: 2.9, h: 0.4, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
slide.addText(f.detail, { x, y: 1.35, w: 2.9, h: 0.65, fontSize: 11, color: WHITE, align: "center", valign: "middle" });
if (i < 3) {
slide.addText("β", { x: x + 2.98, y: 0.92, w: 0.35, h: 1.1, fontSize: 22, bold: true, color: ORANGE, align: "center", valign: "middle", margin: 0 });
}
});
// ADA Guideline box
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.22, w: 12.7, h: 0.8, fill: { color: LIGHT_BG }, line: { color: ORANGE, width: 2 } });
slide.addText([
{ text: "ADA 2024 Recommendation: ", options: { bold: true, color: ORANGE, fontSize: 14 } },
{ text: "Hold Metformin temporarily in situations that increase lactic acidosis risk: acute dehydration, serious infection, tissue hypoxia, contrast media use, or trauma. Monitor renal function before restarting.", options: { color: GRAY_TEXT, fontSize: 13 } }
], { x: 0.5, y: 2.28, w: 12.3, h: 0.68, valign: "middle" });
// Pharmacist actions
const pharActions = [
"β
ADA Intervention: Temporarily hold T. Metformin 500mg until rehydration complete",
"β
Monitor capillary blood glucose 4 times daily (fasting, pre-meals, bedtime)",
"β
Alternative glycemic control: sliding-scale insulin if glucose >200 mg/dL",
"β
Restart Metformin only when: dehydration resolved + serum creatinine confirmed normal",
"β
Patient counseling: avoid Metformin if unable to drink adequate fluids during any illness"
];
const pharItems = pharActions.map(v => ({ text: v, options: { bullet: false, breakLine: true, fontSize: 13, color: GRAY_TEXT } }));
pharItems[pharItems.length-1].options.breakLine = false;
slide.addText(pharItems, { x: 0.3, y: 3.18, w: 12.7, h: 2.4, valign: "top" });
slide.addText("Ref: ADA Standards of Medical Care in Diabetes 2024 | Comprehensive Clinical Nephrology 7e (Biguanides chapter) | Rosen's Emergency Medicine", {
x: 0.3, y: 7.2, w: 12.7, h: 0.22, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 13: CHRONIC ALCOHOLIC β THIAMINE + ACAMPROSATE βββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Special Population: AGE + Chronic Alcoholic β Thiamine & Acamprosate", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
// Thiamine panel
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.92, w: 6.2, h: 0.4, fill: { color: TEAL } });
slide.addText("π THIAMINE (Vitamin B1) β 200 mg IV OD", { x: 0.3, y: 0.92, w: 6.2, h: 0.4, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const thiaminePts = [
"Chronic alcohol β poor intake + impaired absorption + β hepatic storage",
"Deficiency β Wernicke's Encephalopathy triad:",
" β’ Confusion / altered mental status",
" β’ Ataxia (gait disturbance)",
" β’ Ophthalmoplegia (lateral gaze palsy / nystagmus)",
"If untreated β Korsakoff Syndrome (only 20% recover) β Harrison's 22E",
"β οΈ NEVER give IV Dextrose without Thiamine first β glucose depletes remaining thiamine β precipitates Wernicke's",
"This patient: no CNS signs (NFND) but prophylactic IV thiamine is STANDARD for all admitted alcoholics"
];
const thItems = thiaminePts.map(v => ({ text: v, options: { bullet: v.startsWith(" ") ? false : true, breakLine: true, fontSize: 12, color: GRAY_TEXT, indent: v.startsWith(" ") ? 0.4 : 0 } }));
thItems[thItems.length-1].options.breakLine = false;
slide.addText(thItems, { x: 0.3, y: 1.42, w: 6.2, h: 3.8 });
// Acamprosate panel
slide.addShape(pres.ShapeType.rect, { x: 6.9, y: 0.92, w: 6.1, h: 0.4, fill: { color: ORANGE } });
slide.addText("π ACAMPROSATE 333 mg β 2 Tabs TID (at Discharge)", { x: 6.9, y: 0.92, w: 6.1, h: 0.4, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const acampPts = [
"Mechanism: Restores GABA / Glutamate balance disrupted by chronic alcohol β reduces craving & post-acute withdrawal",
"FDA-approved for alcohol dependence (along with Disulfiram, Naltrexone)",
"Does NOT cause disulfiram-like reactions",
"Effective in both men and women β Goldman-Cecil Medicine 2024",
"Standard dose: 666 mg (2 Γ 333 mg tabs) TID",
"Contraindicated: severe renal impairment (primarily renal excretion)",
"β οΈ APA Pharmacist Intervention: Initiate ONLY after Normal serum creatinine confirmed",
"Order STAT RFT (Serum Creatinine + BUN) before discharge",
"Combine with alcohol counseling / psychological therapy for best outcomes"
];
const acItems = acampPts.map(v => ({ text: v, options: { bullet: true, breakLine: true, fontSize: 12, color: GRAY_TEXT } }));
acItems[acItems.length-1].options.breakLine = false;
slide.addText(acItems, { x: 6.9, y: 1.42, w: 6.1, h: 3.8 });
slide.addShape(pres.ShapeType.line, { x: 6.63, y: 0.9, w: 0, h: 4.4, line: { color: TEAL, width: 1.5 } });
slide.addText("Ref: Harrison's 22E (Thiamine B1 chapter) | Goldman-Cecil Medicine 2024 (Acamprosate) | Stahl's Psychopharmacology | Textbook of Family Medicine 9e", {
x: 0.3, y: 7.2, w: 12.7, h: 0.22, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 14: PHARMACIST INTERVENTIONS SUMMARY βββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: LIGHT_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.75, fill: { color: MED_BLUE } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 13.3, h: 0.04, fill: { color: TEAL } });
slide.addText("Pharmacist Interventions β Case Summary", {
x: 0.3, y: 0, w: 12.7, h: 0.75, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle", margin: 0
});
const interventions = [
{
tag: "ADR", label: "Day 2 ADR: Ciprofloxacin Allergy", color: "C0392B",
pts: [
"Patient complained of itching β allergic reaction to ciprofloxacin",
"Ciprofloxacin removed immediately",
"Replaced with Inj. Ceftriaxone IV 1g BD (ATD)",
"ADR documented and reported per GMCNILA protocol"
]
},
{
tag: "ACG", label: "ACG Intervention: Stop Antibiotics", color: ORANGE,
pts: [
"Routine diarrhea β empiric antibiotics NOT recommended (ACG 2023)",
"Discontinue Inj. Ceftriaxone completely",
"Manage gastroenteritis supportively: IVF, probiotics, ORS"
]
},
{
tag: "ADA", label: "ADA Intervention: Hold Metformin", color: TEAL,
pts: [
"Dehydration β β renal perfusion β metformin accumulation β lactic acidosis risk",
"Temporarily hold T. Metformin 500mg",
"Monitor CBG 4x daily; Restart after rehydration + normal creatinine"
]
},
{
tag: "APA", label: "APA Intervention: Acamprosate at Discharge", color: "7D3C98",
pts: [
"25-year chronic alcoholic β no relapse prevention pharmacotherapy",
"Initiate T. Acamprosate 333mg 2 tabs TID at discharge",
"Only after confirming normal serum creatinine (order STAT RFT)",
"Combine with psychological counseling"
]
}
];
interventions.forEach((intv, i) => {
const y = 0.95 + i * 1.44;
slide.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.6, h: 1.25, fill: { color: intv.color } });
slide.addText(intv.tag, { x: 0.3, y, w: 1.6, h: 0.5, fontSize: 18, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
slide.addText(intv.label, { x: 0.3, y: y + 0.5, w: 1.6, h: 0.75, fontSize: 10, color: WHITE, align: "center", valign: "middle" });
const ptItems = intv.pts.map(p => ({ text: p, options: { bullet: true, breakLine: true, fontSize: 12, color: GRAY_TEXT } }));
ptItems[ptItems.length-1].options.breakLine = false;
slide.addText(ptItems, { x: 2.1, y, w: 11.0, h: 1.25, valign: "middle" });
slide.addShape(pres.ShapeType.line, { x: 0.3, y: y + 1.28, w: 12.7, h: 0, line: { color: "CCCCCC", width: 0.5 } });
});
slide.addText("Ref: ACG 2023 | ADA 2024 | Goldman-Cecil Medicine 2024 | Harrison's 22E | Comprehensive Clinical Nephrology 7e", {
x: 0.3, y: 7.2, w: 12.7, h: 0.22, fontSize: 9, color: "888888", italic: true, fontFace: "Calibri", margin: 0
});
}
// ββ SLIDE 15: KEY TAKEAWAYS + REFERENCES βββββββββββββββββββββββββββββββββββββ
{
const slide = pres.addSlide();
slide.background = { color: DARK_BG };
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.07, fill: { color: TEAL } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.43, w: 13.3, h: 0.07, fill: { color: TEAL } });
slide.addText("Key Takeaways", {
x: 0.4, y: 0.15, w: 12.5, h: 0.55, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.8, w: 12.7, h: 0.04, fill: { color: TEAL } });
const takes = [
"π΅ AGE = β₯3 unformed stools/day + nausea/vomiting/cramps < 14 days; 70% viral (Norovirus #1)",
"π΅ Rehydration is the cornerstone β ORS for mild/moderate, IV NS+RL for severe dehydration",
"π΅ Elevated Hb in diarrhea = hemoconcentration, NOT true polycythemia β will normalize with rehydration",
"π΅ Empiric antibiotics are NOT recommended for routine AGE (ACG 2023) β supportive care is gold standard",
"π΅ Always hold Metformin during acute dehydration in T2DM β lactic acidosis risk (ADA 2024)",
"π΅ All admitted chronic alcoholics need prophylactic IV Thiamine β prevents Wernicke's encephalopathy",
"π΅ Never give IV Glucose/Dextrose to a known alcoholic WITHOUT giving Thiamine first",
"π΅ Acamprosate 666 mg TID for alcohol dependence β initiate at discharge after confirming normal RFT",
"π΅ Document all ADRs promptly β guide future antibiotic choices (fluoroquinolone allergy noted here)",
];
const takeItems = takes.map(t => ({ text: t, options: { bullet: false, breakLine: true, fontSize: 13.5, color: WHITE, paraSpaceAfter: 3 } }));
takeItems[takeItems.length-1].options.breakLine = false;
slide.addText(takeItems, { x: 0.4, y: 1.0, w: 12.5, h: 4.9, valign: "top" });
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 6.0, w: 12.7, h: 0.04, fill: { color: TEAL } });
slide.addText("REFERENCES", { x: 0.3, y: 6.1, w: 12.7, h: 0.3, fontSize: 11, bold: true, color: GOLD, fontFace: "Calibri", margin: 0 });
const refs = [
"1. Goldman L, Cooney K. Goldman-Cecil Medicine. 27th ed. Philadelphia: Elsevier; 2024.",
"2. Yamada T et al. Yamada's Textbook of Gastroenterology. 7th ed. Wiley-Blackwell; 2022.",
"3. Loscalzo J et al. Harrison's Principles of Internal Medicine. 22nd ed. McGraw-Hill; 2025.",
"4. Feldman M et al. Sleisenger & Fordtran's GI and Liver Disease. 11th ed. Elsevier; 2021.",
"5. ACG Clinical Guideline: Acute Diarrheal Infections in Adults. Am J Gastroenterol. 2023.",
"6. ADA Standards of Medical Care in Diabetes. Diabetes Care. 2024;47(Suppl 1).",
"7. Geyer B. Episode 36 β AGE in the ED. EBMedicine.net. 2024.",
];
const refText = refs.join(" | ");
slide.addText(refText, {
x: 0.3, y: 6.45, w: 12.7, h: 1.0, fontSize: 9, color: "AAAAAA", italic: true, fontFace: "Calibri", valign: "top"
});
}
// ββ SAVE ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pres.writeFile({ fileName: "/home/daytona/workspace/age-presentation/AGE_Clinical_Presentation.pptx" })
.then(() => console.log("β
DONE: AGE_Clinical_Presentation.pptx saved."))
.catch(err => console.error("β ERROR:", err));