Detailed ppt on CKD for medical students
ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/ckd-ppt
~/ckd-ppt/ckd.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Chronic Kidney Disease";
pres.author = "Medical Education";
// === COLOR PALETTE ===
const C = {
navy: "0A2342", // dominant dark
teal: "1A6B72", // supporting mid
tealMid: "1E8A93",
tealLight:"2BB5C0",
accent: "E8A838", // warm amber accent
accentSoft:"F4C76A",
white: "FFFFFF",
light: "EAF6F7", // very pale teal bg
lightGray:"F4F4F4",
midGray: "8C9BAD",
darkGray:"3A4A5A",
red: "D64045",
orange: "E07B39",
green: "2E8B57",
textDark:"1C2B3A",
};
// =====================================================
// HELPER FUNCTIONS
// =====================================================
function addBgRect(slide, color) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color } });
}
function sectionDivider(slide, title, subtitle) {
addBgRect(slide, C.navy);
// Left accent bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: C.accent } });
// Horizontal line
slide.addShape(pres.ShapeType.rect, { x: 0.35, y: 2.8, w: 9.3, h: 0.04, fill: { color: C.tealLight } });
slide.addText(title, {
x: 0.35, y: 1.6, w: 9.3, h: 1.0,
fontSize: 36, bold: true, color: C.white, fontFace: "Calibri", align: "left", valign: "middle"
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.35, y: 2.9, w: 9.3, h: 0.8,
fontSize: 18, color: C.tealLight, fontFace: "Calibri", align: "left", italic: true
});
}
}
function contentSlide(title, contentFn) {
const slide = pres.addSlide();
addBgRect(slide, C.white);
// Top header bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.72, fill: { color: C.navy } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.72, w: 10, h: 0.06, fill: { color: C.accent } });
slide.addText(title, {
x: 0.3, y: 0, w: 9.4, h: 0.72,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
contentFn(slide);
// Slide footer
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.175, fill: { color: C.light } });
slide.addText("Chronic Kidney Disease | Medical Education", {
x: 0.3, y: 5.45, w: 9.4, h: 0.175,
fontSize: 7.5, color: C.midGray, fontFace: "Calibri", valign: "middle"
});
return slide;
}
function bullet(text, opts = {}) {
return {
text,
options: {
bullet: { code: "2022" },
breakLine: true,
fontSize: opts.fontSize || 14,
color: opts.color || C.textDark,
bold: opts.bold || false,
indentLevel: opts.indent || 0,
fontFace: "Calibri",
...opts.extra
}
};
}
function subBullet(text, opts = {}) {
return bullet(text, { indent: 1, fontSize: 12.5, color: C.teal, ...opts });
}
function keyVal(key, val, color) {
return [
{ text: key + ": ", options: { bold: true, color: color || C.navy, fontSize: 13.5, fontFace: "Calibri" } },
{ text: val, options: { bold: false, color: C.textDark, fontSize: 13.5, breakLine: true, fontFace: "Calibri" } }
];
}
function colBox(slide, x, y, w, h, headerText, headerColor, bodyFn) {
// background
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: C.lightGray }, line: { color: C.midGray, width: 0.5 } });
// header
slide.addShape(pres.ShapeType.rect, { x, y, w, h: 0.38, fill: { color: headerColor || C.teal } });
slide.addText(headerText, {
x, y, w, h: 0.38,
fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
});
bodyFn(x, y + 0.4, w, h - 0.42);
}
// =====================================================
// SLIDE 1 — TITLE
// =====================================================
{
const slide = pres.addSlide();
addBgRect(slide, C.navy);
// decorative blocks
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.accent } });
slide.addShape(pres.ShapeType.rect, { x: 9.82, y: 0, w: 0.18, h: 5.625, fill: { color: C.tealLight } });
slide.addShape(pres.ShapeType.rect, { x: 0.18, y: 4.6, w: 9.64, h: 1.025, fill: { color: C.teal } });
slide.addText("CHRONIC KIDNEY DISEASE", {
x: 0.4, y: 0.9, w: 9.2, h: 1.2,
fontSize: 42, bold: true, color: C.white, fontFace: "Calibri", align: "center", charSpacing: 2
});
slide.addShape(pres.ShapeType.rect, { x: 2.5, y: 2.18, w: 5, h: 0.06, fill: { color: C.accent } });
slide.addText("A Comprehensive Guide for Medical Students", {
x: 0.4, y: 2.35, w: 9.2, h: 0.65,
fontSize: 19, color: C.tealLight, fontFace: "Calibri", align: "center", italic: true
});
slide.addText("Based on: Harrison's Principles of Internal Medicine 22E (2025)\nComprehensive Clinical Nephrology 7th Ed · Brenner & Rector's The Kidney", {
x: 0.4, y: 3.15, w: 9.2, h: 0.75,
fontSize: 11, color: C.accentSoft, fontFace: "Calibri", align: "center"
});
slide.addText("Pathophysiology · Classification · Clinical Features · Complications · Management", {
x: 0.4, y: 4.65, w: 9.2, h: 0.6,
fontSize: 13, color: C.white, fontFace: "Calibri", align: "center"
});
}
// =====================================================
// SLIDE 2 — LEARNING OBJECTIVES
// =====================================================
contentSlide("Learning Objectives", slide => {
const items = [
"Define CKD and understand the KDIGO CGA classification system",
"Identify the five GFR stages (G1-G5) and three albuminuria categories (A1-A3)",
"Describe the pathophysiology including the hyperfiltration-sclerosis cycle",
"Recognize the major causes of CKD and their relative prevalence",
"List and explain the systemic complications of CKD across all organ systems",
"Outline an evidence-based management approach including RAS blockade, diet, and dialysis indications",
"Understand renal replacement therapy options: hemodialysis, peritoneal dialysis, and transplantation",
];
const bullets = items.map((t, i) => ({
text: `${i + 1}. ${t}`,
options: { breakLine: true, fontSize: 14, color: C.textDark, fontFace: "Calibri", spaceBefore: 4 }
}));
bullets[bullets.length - 1].options.breakLine = false;
slide.addText(bullets, { x: 0.4, y: 0.95, w: 9.2, h: 4.35, valign: "top" });
// icon strip bottom
slide.addShape(pres.ShapeType.rect, { x: 0.4, y: 0.88, w: 0.08, h: 4.4, fill: { color: C.accent } });
});
// =====================================================
// SLIDE 3 — SECTION: DEFINITION & EPIDEMIOLOGY
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "01 Definition & Epidemiology", "What is CKD, and how big is the problem?");
}
// =====================================================
// SLIDE 4 — DEFINITION
// =====================================================
contentSlide("Definition of CKD", slide => {
// Two-column layout
// Left box
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.92, w: 5.9, h: 2.7, fill: { color: C.light }, line: { color: C.tealLight, width: 1 } });
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.92, w: 5.9, h: 0.4, fill: { color: C.teal } });
slide.addText("KDIGO 2012 Definition", { x: 0.3, y: 0.92, w: 5.9, h: 0.4, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
{ text: "Abnormalities of kidney structure or function, present for ", options: { fontSize: 13.5, color: C.textDark, fontFace: "Calibri" } },
{ text: "> 3 months", options: { fontSize: 13.5, bold: true, color: C.navy, fontFace: "Calibri" } },
{ text: ", with implications for health.", options: { fontSize: 13.5, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "\nMarkers of kidney damage include:", options: { fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri", breakLine: true } },
{ text: " • Albuminuria (ACR ≥ 30 mg/g)\n • Urine sediment abnormalities\n • Electrolyte disorders from tubular dysfunction\n • Abnormal histology or imaging\n • History of kidney transplantation\n • Decreased GFR (< 60 mL/min/1.73 m²)", options: { fontSize: 12.5, color: C.textDark, fontFace: "Calibri" } }
], { x: 0.45, y: 1.38, w: 5.65, h: 2.2, valign: "top" });
// Right box
slide.addShape(pres.ShapeType.rect, { x: 6.5, y: 0.92, w: 3.2, h: 2.7, fill: { color: "FFF8EC" }, line: { color: C.accent, width: 1 } });
slide.addShape(pres.ShapeType.rect, { x: 6.5, y: 0.92, w: 3.2, h: 0.4, fill: { color: C.accent } });
slide.addText("Key Criteria", { x: 6.5, y: 0.92, w: 3.2, h: 0.4, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
{ text: "Duration: ", options: { bold: true, fontSize: 13, color: C.navy, fontFace: "Calibri" } },
{ text: "> 3 months\n", options: { fontSize: 13, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "GFR < 60: ", options: { bold: true, fontSize: 13, color: C.navy, fontFace: "Calibri" } },
{ text: "Alone sufficient\n", options: { fontSize: 13, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "GFR ≥ 60: ", options: { bold: true, fontSize: 13, color: C.navy, fontFace: "Calibri" } },
{ text: "Requires damage marker\n", options: { fontSize: 13, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "Classification: ", options: { bold: true, fontSize: 13, color: C.navy, fontFace: "Calibri" } },
{ text: "CGA system\n(Cause + GFR + Albuminuria)", options: { fontSize: 13, color: C.textDark, fontFace: "Calibri" } }
], { x: 6.6, y: 1.38, w: 3.0, h: 2.1, valign: "top" });
// Bottom epidemiology bar
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.8, w: 9.4, h: 1.45, fill: { color: C.navy } });
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.8, w: 9.4, h: 0.34, fill: { color: C.teal } });
slide.addText("Global Burden", { x: 0.3, y: 3.8, w: 9.4, h: 0.34, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const stats = [
{ v: "~10-14%", l: "Adults globally\nhave CKD" },
{ v: "~20M+", l: "Americans\naffected" },
{ v: "#12", l: "Leading cause\nof death" },
{ v: "6% (S1+2)", l: "US adult\nprevalence" },
{ v: "4.5% (S3+4)", l: "Advanced\nstages US" },
];
stats.forEach((s, i) => {
const x = 0.5 + i * 1.85;
slide.addText(s.v, { x, y: 4.17, w: 1.65, h: 0.55, fontSize: 20, bold: true, color: C.accent, fontFace: "Calibri", align: "center" });
slide.addText(s.l, { x, y: 4.72, w: 1.65, h: 0.48, fontSize: 9.5, color: C.white, fontFace: "Calibri", align: "center" });
});
});
// =====================================================
// SLIDE 5 — SECTION: CLASSIFICATION
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "02 Classification – KDIGO CGA System", "GFR categories · Albuminuria categories · Cause");
}
// =====================================================
// SLIDE 6 — GFR STAGES
// =====================================================
contentSlide("GFR Categories (G1 – G5)", slide => {
const stages = [
{ g: "G1", gfr: "≥ 90", label: "Normal or High", color: "2E8B57", desc: "Asymptomatic; kidney damage must be present" },
{ g: "G2", gfr: "60 – 89", label: "Mildly Decreased", color: "6AAB3C", desc: "Asymptomatic; usually found incidentally" },
{ g: "G3a", gfr: "45 – 59", label: "Mildly-Mod Decreased", color: "E8C53A", desc: "Complications begin; monitor BP, anemia, PTH" },
{ g: "G3b", gfr: "30 – 44", label: "Mod-Severely Decreased", color: "E8A838", desc: "Referral to nephrology; manage complications" },
{ g: "G4", gfr: "15 – 29", label: "Severely Decreased", color: "D64045", desc: "Prepare for renal replacement therapy (RRT)" },
{ g: "G5", gfr: "< 15", label: "Kidney Failure (ESKD)", color: "8B0000", desc: "Dialysis or transplant required; uremic syndrome" },
];
const yStart = 1.0;
const rowH = 0.7;
// Headers
const headers = ["Stage", "eGFR (mL/min/1.73 m²)", "Description", "Clinical Notes"];
const widths = [0.7, 2.2, 2.3, 4.3];
const xStarts = [0.25, 0.97, 3.19, 5.51];
headers.forEach((h, i) => {
slide.addShape(pres.ShapeType.rect, { x: xStarts[i], y: yStart - 0.36, w: widths[i], h: 0.36, fill: { color: C.navy } });
slide.addText(h, { x: xStarts[i], y: yStart - 0.36, w: widths[i], h: 0.36, fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
});
stages.forEach((s, i) => {
const y = yStart + i * rowH;
const bg = i % 2 === 0 ? "FFFFFF" : "F2F8F9";
slide.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 9.55, h: rowH, fill: { color: bg }, line: { color: "D5E0E3", width: 0.5 } });
// Color indicator
slide.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 0.7, h: rowH, fill: { color: s.color } });
slide.addText(s.g, { x: 0.25, y, w: 0.7, h: rowH, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(s.gfr, { x: 0.97, y, w: 2.2, h: rowH, fontSize: 13, bold: true, color: C.textDark, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(s.label, { x: 3.19, y, w: 2.3, h: rowH, fontSize: 12, color: C.textDark, fontFace: "Calibri", align: "left", valign: "middle", margin: [0, 0, 0, 4] });
slide.addText(s.desc, { x: 5.51, y, w: 4.3, h: rowH, fontSize: 11.5, color: C.darkGray, fontFace: "Calibri", align: "left", valign: "middle", margin: [0, 0, 0, 4] });
});
slide.addText("Normal annual GFR decline with aging: ~1 mL/min/year after age 30 (peak GFR ~120 mL/min/1.73 m²) — Harrison's 22E", {
x: 0.25, y: 5.2, w: 9.55, h: 0.22,
fontSize: 9, color: C.midGray, fontFace: "Calibri", italic: true
});
});
// =====================================================
// SLIDE 7 — ALBUMINURIA CATEGORIES + HEAT MAP
// =====================================================
contentSlide("Albuminuria Categories & KDIGO Heat Map", slide => {
// Albuminuria box
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 4.0, h: 2.0, fill: { color: C.light }, line: { color: C.tealLight, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 4.0, h: 0.36, fill: { color: C.teal } });
slide.addText("Albuminuria Categories (ACR)", {
x: 0.25, y: 0.88, w: 4.0, h: 0.36, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
});
const aCats = [
{ cat: "A1", val: "< 30 mg/g", label: "Normal to Mildly Increased", color: "2E8B57" },
{ cat: "A2", val: "30–300 mg/g", label: "Moderately Increased", color: "E8A838" },
{ cat: "A3", val: "> 300 mg/g", label: "Severely Increased", color: "D64045" },
];
aCats.forEach((a, i) => {
const y = 1.28 + i * 0.49;
slide.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.45, h: 0.42, fill: { color: a.color } });
slide.addText(a.cat, { x: 0.3, y, w: 0.45, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(`${a.val} | ${a.label}`, { x: 0.82, y: y + 0.03, w: 3.35, h: 0.38, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", valign: "middle" });
});
// Heat map explanation
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.0, w: 4.0, h: 2.2, fill: { color: "FFF8EC" }, line: { color: C.accent, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.0, w: 4.0, h: 0.36, fill: { color: C.accent } });
slide.addText("Heat Map Risk Zones", { x: 0.25, y: 3.0, w: 4.0, h: 0.36, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const riskZones = [
{ color: "2E8B57", label: "Green (Low risk): G1-G2 + A1" },
{ color: "F4C76A", label: "Yellow (Moderately increased risk)" },
{ color: "E8A838", label: "Orange (High risk)" },
{ color: "D64045", label: "Red (Very high / highest risk): G4-G5 + A3" },
];
riskZones.forEach((z, i) => {
const y = 3.43 + i * 0.46;
slide.addShape(pres.ShapeType.rect, { x: 0.4, y: y + 0.04, w: 0.32, h: 0.32, fill: { color: z.color } });
slide.addText(z.label, { x: 0.82, y, w: 3.35, h: 0.42, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", valign: "middle" });
});
// Right side - CGA system
slide.addShape(pres.ShapeType.rect, { x: 4.6, y: 0.88, w: 5.1, h: 4.32, fill: { color: "F4F7FA" }, line: { color: C.navy, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 4.6, y: 0.88, w: 5.1, h: 0.36, fill: { color: C.navy } });
slide.addText("CGA Classification System", { x: 4.6, y: 0.88, w: 5.1, h: 0.36, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
{ text: "C ", options: { bold: true, fontSize: 18, color: C.accent, fontFace: "Calibri" } },
{ text: "= Cause", options: { bold: true, fontSize: 15, color: C.navy, fontFace: "Calibri" } },
{ text: "\nClassify by systemic disease & anatomical location\n(e.g., diabetic nephropathy → glomerular)\n", options: { fontSize: 12, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "\nG ", options: { bold: true, fontSize: 18, color: C.teal, fontFace: "Calibri" } },
{ text: "= GFR Category (G1-G5)", options: { bold: true, fontSize: 15, color: C.navy, fontFace: "Calibri" } },
{ text: "\nEstimated using CKD-EPI equation (creatinine ± cystatin C)\nRace-free equations now recommended\n", options: { fontSize: 12, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "\nA ", options: { bold: true, fontSize: 18, color: C.red, fontFace: "Calibri" } },
{ text: "= Albuminuria Category (A1-A3)", options: { bold: true, fontSize: 15, color: C.navy, fontFace: "Calibri" } },
{ text: "\nSpot urine ACR (first-morning preferred)\nAbnormal if ACR > 2.5 mg/mmol (M) or > 3.5 mg/mmol (F)\n\nExample: \"IgA nephropathy, G3b A3\"\n→ IgA nephropathy, eGFR 34, ACR 367 mg/g", options: { fontSize: 12, color: C.textDark, fontFace: "Calibri" } },
], { x: 4.8, y: 1.3, w: 4.8, h: 3.78, valign: "top" });
});
// =====================================================
// SLIDE 8 — SECTION: ETIOLOGY
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "03 Etiology & Risk Factors", "Common causes and predisposing factors for CKD");
}
// =====================================================
// SLIDE 9 — CAUSES OF CKD
// =====================================================
contentSlide("Major Causes of CKD", slide => {
const causes = [
{ rank: "1", name: "Diabetic Nephropathy", pct: "~44%", color: C.red, desc: "Predominantly T2DM; leading cause in US/Europe. Nodular glomerulosclerosis (Kimmelstiel-Wilson)" },
{ rank: "2", name: "Hypertensive Nephrosclerosis", pct: "~28%", color: C.orange, desc: "Arteriolar nephrosclerosis; often overlaps with primary glomerulopathy" },
{ rank: "3", name: "Glomerulonephritis", pct: "~10%", color: C.teal, desc: "IgA nephropathy, FSGS, membranous, lupus nephritis, ANCA vasculitis" },
{ rank: "4", name: "Polycystic Kidney Disease", pct: "~5%", color: "8B4513", desc: "ADPKD (PKD1/PKD2 genes); most common monogenic kidney disease" },
{ rank: "5", name: "Other / Unknown", pct: "~13%", color: C.midGray, desc: "Obstructive, tubulointerstitial, congenital, HIV/HBV/HCV-associated" },
];
causes.forEach((c, i) => {
const y = 0.95 + i * 0.87;
slide.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 0.55, h: 0.7, fill: { color: c.color } });
slide.addText(c.rank, { x: 0.25, y, w: 0.55, h: 0.7, fontSize: 20, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addShape(pres.ShapeType.rect, { x: 0.82, y, w: 9.0, h: 0.7, fill: { color: i % 2 === 0 ? "FFFFFF" : C.lightGray }, line: { color: "D5E0E3", width: 0.4 } });
slide.addText(`${c.name}`, { x: 0.95, y: y + 0.04, w: 2.6, h: 0.35, fontSize: 13.5, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle" });
slide.addShape(pres.ShapeType.rect, { x: 0.95, y: y + 0.4, w: 0.8, h: 0.22, fill: { color: c.color } });
slide.addText(c.pct, { x: 0.95, y: y + 0.38, w: 0.8, h: 0.24, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(c.desc, { x: 3.65, y: y + 0.06, w: 5.95, h: 0.58, fontSize: 12, color: C.darkGray, fontFace: "Calibri", valign: "middle" });
});
});
// =====================================================
// SLIDE 10 — RISK FACTORS
// =====================================================
contentSlide("Risk Factors for CKD", slide => {
const categories = [
{
title: "Non-Communicable Disease",
color: C.red,
items: ["Diabetes mellitus (T1 & T2)", "Hypertension", "Obesity / Increased BMI", "Autoinflammatory disease\n(lupus, vasculitis, cancer immunotherapy)", "Nephrotoxic exposures"]
},
{
title: "Communicable Disease",
color: C.orange,
items: ["HIV infection (HIVAN)", "SARS-CoV-2", "Streptococcal infection", "Mycobacterial infection", "HBV, HCV"]
},
{
title: "Demographic / Genetic",
color: C.teal,
items: ["Age (GFR declines ~1 mL/min/yr)", "Male sex", "APOL1 variants (African ancestry)", "Family history of CKD", "ADPKD1/2, COL4A3-A5 mutations"]
},
{
title: "Other Risk Factors",
color: C.navy,
items: ["Prior acute kidney injury (AKI)", "Premature birth / SGA", "Tobacco use", "Sedentary lifestyle", "Preeclampsia, kidney donation"]
},
];
const cols = [0.25, 2.7, 5.15, 7.6];
const colW = 2.3;
categories.forEach((cat, i) => {
const x = cols[i];
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w: colW, h: 4.35, fill: { color: C.lightGray }, line: { color: "D5E0E3", width: 0.6 } });
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w: colW, h: 0.4, fill: { color: cat.color } });
slide.addText(cat.title, { x, y: 0.88, w: colW, h: 0.4, fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const bulletsArr = cat.items.map((t, j) => ({
text: `• ${t}`,
options: { breakLine: j < cat.items.length - 1, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", spaceBefore: 3 }
}));
slide.addText(bulletsArr, { x: x + 0.1, y: 1.35, w: colW - 0.2, h: 3.75, valign: "top" });
});
slide.addText("Genetic risk may account for up to 20% of adult-onset CKD — Harrison's 22E, 2025", {
x: 0.25, y: 5.25, w: 9.5, h: 0.18,
fontSize: 9, color: C.midGray, fontFace: "Calibri", italic: true
});
});
// =====================================================
// SLIDE 11 — SECTION: PATHOPHYSIOLOGY
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "04 Pathophysiology", "How initial injury leads to progressive nephron loss");
}
// =====================================================
// SLIDE 12 — PATHOPHYSIOLOGY
// =====================================================
contentSlide("Pathophysiology of CKD Progression", slide => {
// Flow diagram boxes
const steps = [
{ title: "Initial Injury", text: "Diabetes, HTN, GN,\nobstruction, toxins", color: C.red },
{ title: "Nephron Loss", text: "Critical mass of\nglomeruli lost\n(> 50%)", color: C.orange },
{ title: "Compensatory\nHyperfiltration", text: "Remaining nephrons\nhypertrophy; RAS\nactivated; ↑ TGF-β", color: C.teal },
{ title: "Maladaptive\nSclerosis", text: "↑ Intraglomerular\npressure → podocyte\ninjury → proteinuria", color: C.navy },
{ title: "ESKD", text: "Progressive GFR\ndecline; uremic\nsyndrome", color: "8B0000" },
];
const xStarts = [0.2, 2.15, 4.1, 6.05, 8.0];
const w = 1.75;
steps.forEach((s, i) => {
const x = xStarts[i];
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 1.85, fill: { color: s.color } });
slide.addText(s.title, { x, y: 0.92, w, h: 0.5, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addShape(pres.ShapeType.rect, { x: x + 0.1, y: 1.46, w: w - 0.2, h: 0.04, fill: { color: "FFFFFF" } });
slide.addText(s.text, { x, y: 1.52, w, h: 1.2, fontSize: 11, color: C.white, fontFace: "Calibri", align: "center", valign: "top" });
if (i < steps.length - 1) {
slide.addText("→", { x: x + w, y: 1.4, w: 0.4, h: 0.5, fontSize: 22, bold: true, color: C.accent, fontFace: "Calibri", align: "center" });
}
});
// Mechanistic details
slide.addShape(pres.ShapeType.rect, { x: 0.2, y: 2.9, w: 9.6, h: 2.28, fill: { color: "F4F7FA" }, line: { color: C.navy, width: 0.7 } });
slide.addShape(pres.ShapeType.rect, { x: 0.2, y: 2.9, w: 9.6, h: 0.36, fill: { color: C.navy } });
slide.addText("Key Mechanisms", { x: 0.2, y: 2.9, w: 9.6, h: 0.36, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const mechs = [
{ title: "RAS Activation", desc: "Intrarenal angiotensin II → intraglomerular HTN; TGF-β1 promotes fibrosis" },
{ title: "Proteinuria", desc: "Tubular reabsorption of filtered proteins → inflammatory cytokines → tubulointerstitial fibrosis" },
{ title: "Uremic Toxins", desc: "Accumulated organic acids, phenols, indoxyl sulfate → systemic inflammation and CVD" },
{ title: "FGF-23 / Klotho Axis", desc: "FGF-23 rises early in CKD; Klotho deficiency → vascular calcification, LVH, secondary hyperparathyroidism" },
];
const mw = 2.3;
mechs.forEach((m, i) => {
const x = 0.35 + i * 2.4;
slide.addText(`${m.title}\n`, { x, y: 3.32, w: mw, h: 0.3, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri" });
slide.addText(m.desc, { x, y: 3.6, w: mw, h: 1.45, fontSize: 10.5, color: C.textDark, fontFace: "Calibri", valign: "top" });
});
});
// =====================================================
// SLIDE 13 — SECTION: CLINICAL FEATURES
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "05 Clinical Features & Uremic Syndrome", "Signs, symptoms, and laboratory findings");
}
// =====================================================
// SLIDE 14 — CLINICAL FEATURES BY STAGE
// =====================================================
contentSlide("Clinical Features by CKD Stage", slide => {
const data = [
{ stage: "G1–G2", gfr: "≥60", features: "Usually asymptomatic\nFound on routine labs\nMicroalbuminuria detectable\nNormal or mild BP elevation", color: "2E8B57" },
{ stage: "G3a–G3b", gfr: "30–59", features: "Fatigue, mild anemia\nNocturia (loss of concentrating ability)\n↑ PTH; early ↑ FGF-23\nHypertension becomes prominent\n± Mild hyperphosphatemia", color: "E8A838" },
{ stage: "G4", gfr: "15–29", features: "Moderate anemia (normochromic, normocytic)\nMetabolic acidosis\nHyperkalemia risk\nSecondary hyperparathyroidism\nRenal osteodystrophy begins\nPrepare for RRT", color: "D64045" },
{ stage: "G5 (ESKD)", gfr: "<15", features: "Uremic syndrome:\n • Anorexia, nausea, vomiting\n • Encephalopathy, asterixis, seizures\n • Pericarditis (uremic)\n • Pruritus, uremic frost\n • Volume overload\nRequires dialysis/transplant", color: "8B0000" },
];
const xP = [0.22, 2.72, 5.22, 7.72];
const w = 2.4;
data.forEach((d, i) => {
const x = xP[i];
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 4.35, fill: { color: "FAFAFA" }, line: { color: "D5E0E3", width: 0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 0.7, fill: { color: d.color } });
slide.addText(d.stage, { x, y: 0.88, w, h: 0.38, fontSize: 15, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(`eGFR ${d.gfr} mL/min/1.73m²`, { x, y: 1.26, w, h: 0.3, fontSize: 10, color: "F4F4F4", fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(d.features, { x: x + 0.1, y: 1.65, w: w - 0.2, h: 3.45, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", valign: "top" });
});
});
// =====================================================
// SLIDE 15 — SECTION: COMPLICATIONS
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "06 Systemic Complications", "Cardiovascular · Hematologic · Bone · Metabolic");
}
// =====================================================
// SLIDE 16 — COMPLICATIONS OVERVIEW
// =====================================================
contentSlide("Systemic Complications of CKD", slide => {
const comps = [
{
system: "Cardiovascular",
icon: "♥",
color: C.red,
items: [
"Leading cause of death in CKD",
"Hypertension (fluid + RAAS overactivation)",
"LV hypertrophy (pressure + volume overload)",
"Accelerated atherosclerosis",
"Uremic pericarditis (G5)",
"CKD-specific risks: anemia, FGF-23, hyperphosphatemia, inflammation"
]
},
{
system: "Hematologic",
icon: "⚗",
color: C.orange,
items: [
"Normocytic normochromic anemia",
"↓ EPO production (peritubular cells)",
"Iron deficiency (↑ hepcidin)",
"Reduced RBC survival",
"Platelet dysfunction → bleeding risk",
"Treat: IV iron + ESA (erythropoietin)",
]
},
{
system: "Bone & Mineral",
icon: "🦴",
color: "8B4513",
items: [
"CKD-MBD (Mineral Bone Disorder)",
"↑ FGF-23 (earliest change)",
"↓ 1,25(OH)₂D₃ (calcitriol)",
"Secondary hyperparathyroidism (↑ PTH)",
"Hyperphosphatemia, hypocalcemia",
"Renal osteodystrophy (osteitis fibrosa cystica)"
]
},
{
system: "Metabolic / Other",
icon: "⚙",
color: C.teal,
items: [
"Metabolic acidosis (↓ NH₄⁺ excretion)",
"Hyperkalemia (esp. with RAS blockade)",
"Hypervolemia / pulmonary edema",
"Hyponatremia (dilutional)",
"Uremic neuropathy (peripheral & autonomic)",
"Malnutrition; protein-energy wasting"
]
},
];
const cols = [0.22, 2.65, 5.1, 7.53];
const w = 2.25;
comps.forEach((c, i) => {
const x = cols[i];
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 4.35, fill: { color: "FAFAFA" }, line: { color: "D5E0E3", width: 0.6 } });
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 0.5, fill: { color: c.color } });
slide.addText(`${c.system}`, { x, y: 0.88, w, h: 0.5, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const bullArr = c.items.map((t, j) => ({
text: `• ${t}`,
options: { breakLine: j < c.items.length - 1, fontSize: 11, color: C.textDark, fontFace: "Calibri", spaceBefore: 2.5 }
}));
slide.addText(bullArr, { x: x + 0.1, y: 1.44, w: w - 0.18, h: 3.7, valign: "top" });
});
});
// =====================================================
// SLIDE 17 — CKD-MBD DETAIL
// =====================================================
contentSlide("CKD-Mineral Bone Disorder (CKD-MBD)", slide => {
// Pathway flow
slide.addText("Pathophysiologic Cascade", {
x: 0.3, y: 0.88, w: 9.4, h: 0.32,
fontSize: 14, bold: true, color: C.navy, fontFace: "Calibri"
});
const chain = [
{ t: "↓ Nephron Mass", c: C.red },
{ t: "↓ 1α-Hydroxylase\n→ ↓ Calcitriol", c: C.orange },
{ t: "↑ Phosphate\nRetention", c: "8B4513" },
{ t: "↑ FGF-23\n(Earliest marker)", c: C.teal },
{ t: "↑ PTH\n(2° HPT)", c: C.navy },
{ t: "Osteitis\nFibrosa Cystica", c: "8B0000" },
];
chain.forEach((c, i) => {
const x = 0.2 + i * 1.62;
slide.addShape(pres.ShapeType.rect, { x, y: 1.25, w: 1.5, h: 0.8, fill: { color: c.c } });
slide.addText(c.t, { x, y: 1.25, w: 1.5, h: 0.8, fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
if (i < chain.length - 1) {
slide.addText("→", { x: x + 1.5, y: 1.5, w: 0.12, h: 0.35, fontSize: 14, bold: true, color: C.accent, fontFace: "Calibri", align: "center" });
}
});
// Consequences
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.25, w: 4.5, h: 2.85, fill: { color: "FFF8EC" }, line: { color: C.accent, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.25, w: 4.5, h: 0.36, fill: { color: C.accent } });
slide.addText("Bone Consequences", { x: 0.3, y: 2.25, w: 4.5, h: 0.36, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
bullet("Osteitis fibrosa cystica (high-turnover)"),
bullet("Adynamic bone disease (low-turnover)"),
bullet("Osteomalacia (↓ mineralization)"),
bullet("Mixed uremic osteodystrophy"),
subBullet("Risk of fracture, bone pain, deformity"),
subBullet("'Brown tumors' (advanced HPT)"),
], { x: 0.4, y: 2.65, w: 4.3, h: 2.38, valign: "top" });
// Treatment
slide.addShape(pres.ShapeType.rect, { x: 5.1, y: 2.25, w: 4.6, h: 2.85, fill: { color: C.light }, line: { color: C.teal, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 5.1, y: 2.25, w: 4.6, h: 0.36, fill: { color: C.teal } });
slide.addText("Management of CKD-MBD", { x: 5.1, y: 2.25, w: 4.6, h: 0.36, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
bullet("Dietary phosphate restriction"),
bullet("Phosphate binders: calcium carbonate,\n sevelamer, lanthanum carbonate"),
bullet("Active Vitamin D: calcitriol / paricalcitol"),
bullet("Cinacalcet (calcimimetic) for secondary HPT"),
bullet("Correct acidosis (↑ mineral dissolution)"),
subBullet("Target: Ca, P, PTH within normal ranges"),
subBullet("Parathyroidectomy if refractory"),
], { x: 5.2, y: 2.65, w: 4.4, h: 2.38, valign: "top" });
});
// =====================================================
// SLIDE 18 — SECTION: DIAGNOSIS
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "07 Diagnosis & Investigations", "How to evaluate a patient with suspected CKD");
}
// =====================================================
// SLIDE 19 — INVESTIGATIONS
// =====================================================
contentSlide("Diagnostic Approach & Investigations", slide => {
const cols2 = [
{
title: "Blood Tests",
color: C.navy,
items: [
"Serum creatinine → calculate eGFR (CKD-EPI)",
"Cystatin C (more accurate in certain populations)",
"BUN / Urea",
"Electrolytes: Na, K, HCO₃⁻, Cl",
"Calcium, Phosphate, PTH",
"FBC: Hb, MCV (normocytic anemia)",
"Lipid profile",
"HbA1c, fasting glucose",
"LFTs, albumin (nutritional status)",
"Serology: ANA, ANCA, anti-GBM, C3/C4,\n SPEP, HIV, HBV, HCV"
]
},
{
title: "Urine Tests",
color: C.teal,
items: [
"Urine dipstick: protein, blood, glucose, pH",
"Spot ACR (albumin-to-creatinine ratio)",
"Urine microscopy: RBC casts (GN),\n granular/waxy casts (advanced CKD)",
"24-hr urine: protein, creatinine clearance",
"Urine protein electrophoresis",
]
},
{
title: "Imaging & Biopsy",
color: C.orange,
items: [
"Renal ultrasound (1st line):\n • Small echogenic kidneys → CKD\n • Large kidneys → infiltrative, DM, amyloid",
"Doppler USS: renal artery stenosis",
"CT/MRI (if US inconclusive, mass/stones)",
"Renal biopsy (gold standard for diagnosis):\n • If cause unclear\n • Unexpected rapid progression\n • Proteinuria > 1 g/day without clear etiology",
]
},
];
const xP = [0.22, 3.55, 6.88];
const w = 3.15;
cols2.forEach((c, i) => {
const x = xP[i];
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 4.35, fill: { color: C.lightGray }, line: { color: "D5E0E3", width: 0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 0.4, fill: { color: c.color } });
slide.addText(c.title, { x, y: 0.88, w, h: 0.4, fontSize: 13.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const bullArr = c.items.map((t, j) => ({
text: `• ${t}`,
options: { breakLine: j < c.items.length - 1, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", spaceBefore: 2.5 }
}));
slide.addText(bullArr, { x: x + 0.1, y: 1.34, w: w - 0.2, h: 3.8, valign: "top" });
});
});
// =====================================================
// SLIDE 20 — SECTION: MANAGEMENT
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "08 Management", "Slowing progression · Managing complications · RRT");
}
// =====================================================
// SLIDE 21 — GENERAL MANAGEMENT
// =====================================================
contentSlide("General Management Principles", slide => {
const pillars = [
{
title: "Treat Underlying Cause",
color: C.red,
items: ["Optimize glycemic control (HbA1c < 7%)", "Treat glomerulonephritis (steroids, CYC)", "Remove nephrotoxins", "Treat urinary obstruction"]
},
{
title: "Blood Pressure Control",
color: C.orange,
items: ["Target: < 130/80 mmHg (KDIGO 2021)", "1st line: ACE inhibitor or ARB", "Especially if proteinuric (↓ efferent tone)", "Add CCB/thiazide as needed"]
},
{
title: "RAS Blockade",
color: C.teal,
items: ["ACEi / ARB = cornerstone", "↓ Proteinuria, slow progression", "Avoid in bilateral RAS, pregnancy", "Monitor K⁺ and creatinine carefully"]
},
{
title: "SGLT-2 Inhibitors",
color: C.navy,
items: ["Dapagliflozin, Canagliflozin", "↓ eGFR decline & ESKD risk ~40%", "Benefit independent of diabetes", "DAPA-CKD, CREDENCE, EMPA-KIDNEY trials"]
},
];
const xs = [0.22, 2.62, 5.02, 7.42];
const w = 2.3;
pillars.forEach((p, i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 2.8, fill: { color: "FAFAFA" }, line: { color: "D5E0E3", width: 0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y: 0.88, w, h: 0.5, fill: { color: p.color } });
slide.addText(p.title, { x, y: 0.88, w, h: 0.5, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const bullArr = p.items.map((t, j) => ({
text: `• ${t}`,
options: { breakLine: j < p.items.length - 1, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", spaceBefore: 2.5 }
}));
slide.addText(bullArr, { x: x + 0.1, y: 1.44, w: w - 0.2, h: 2.25, valign: "top" });
});
// Diet section
slide.addShape(pres.ShapeType.rect, { x: 0.22, y: 3.82, w: 9.55, h: 1.32, fill: { color: C.light }, line: { color: C.teal, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 0.22, y: 3.82, w: 9.55, h: 0.34, fill: { color: C.teal } });
slide.addText("Dietary & Lifestyle Modifications", { x: 0.22, y: 3.82, w: 9.55, h: 0.34, fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const dietItems = [
"Protein: 0.6–0.8 g/kg/day (avoid excess)",
"Salt restriction: < 2 g Na/day (reduces BP & proteinuria)",
"Potassium restriction (if hyperkalemic)",
"Phosphate restriction + binders",
"Smoking cessation",
"Regular exercise",
"Avoid NSAIDs & nephrotoxic agents",
];
const dBullets = dietItems.map((t, j) => ({
text: `• ${t} `,
options: { breakLine: false, fontSize: 11, color: C.textDark, fontFace: "Calibri" }
}));
// Two rows
slide.addText(dBullets.slice(0, 4).map((b, j) => ({...b, options: { ...b.options, breakLine: j < 3 }})),
{ x: 0.35, y: 4.2, w: 4.7, h: 0.88, valign: "top" });
slide.addText(dBullets.slice(4).map((b, j) => ({...b, options: { ...b.options, breakLine: j < 2 }})),
{ x: 5.1, y: 4.2, w: 4.6, h: 0.88, valign: "top" });
});
// =====================================================
// SLIDE 22 — ANEMIA MANAGEMENT
// =====================================================
contentSlide("Management of Anemia in CKD", slide => {
// Cause box
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.9, w: 4.4, h: 2.35, fill: { color: C.light }, line: { color: C.tealLight, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.9, w: 4.4, h: 0.38, fill: { color: C.teal } });
slide.addText("Pathogenesis", { x: 0.25, y: 0.9, w: 4.4, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
bullet("↓ EPO synthesis by peritubular fibroblasts"),
bullet("Functional iron deficiency (↑ hepcidin → ↓ Fe release)"),
bullet("↓ RBC lifespan in uremic environment"),
bullet("Blood loss (dialysis access, GI bleeding)"),
bullet("Inflammation: IL-6 → ↑ hepcidin → ↓ erythropoiesis"),
], { x: 0.35, y: 1.34, w: 4.2, h: 1.85, valign: "top" });
// Treatment box
slide.addShape(pres.ShapeType.rect, { x: 5.0, y: 0.9, w: 4.7, h: 2.35, fill: { color: "FFF8EC" }, line: { color: C.accent, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 5.0, y: 0.9, w: 4.7, h: 0.38, fill: { color: C.accent } });
slide.addText("Treatment Strategy", { x: 5.0, y: 0.9, w: 4.7, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
bullet("Iron supplementation (IV preferred on dialysis)"),
bullet("Target ferritin 100–500 ng/mL, TSAT > 20%"),
bullet("ESAs: Epoetin alfa / Darbepoetin alfa"),
bullet("Target Hb: 10–12 g/dL (KDIGO)"),
subBullet("Avoid Hb > 13 g/dL: ↑ thrombotic risk"),
bullet("HIF-PHI (Roxadustat): new oral EPO stimulator"),
bullet("Red cell transfusion only if symptomatic / urgent"),
], { x: 5.1, y: 1.34, w: 4.5, h: 1.85, valign: "top" });
// Targets table
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.35, w: 9.5, h: 1.85, fill: { color: C.lightGray }, line: { color: C.midGray, width: 0.6 } });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 3.35, w: 9.5, h: 0.36, fill: { color: C.navy } });
slide.addText("Monitoring Targets", { x: 0.25, y: 3.35, w: 9.5, h: 0.36, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const targets = [
{ param: "Hemoglobin", val: "10–12 g/dL (KDIGO)" },
{ param: "Ferritin", val: "100–500 ng/mL" },
{ param: "TSAT", val: "> 20%" },
{ param: "Reticulocyte Hb", val: "> 29 pg" },
];
targets.forEach((t, i) => {
const x = 0.4 + i * 2.35;
slide.addText(t.param, { x, y: 3.76, w: 2.2, h: 0.4, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri" });
slide.addText(t.val, { x, y: 4.16, w: 2.2, h: 0.9, fontSize: 12.5, color: C.textDark, fontFace: "Calibri" });
});
});
// =====================================================
// SLIDE 23 — SECTION: RRT
// =====================================================
{
const slide = pres.addSlide();
sectionDivider(slide, "09 Renal Replacement Therapy (RRT)", "Hemodialysis · Peritoneal Dialysis · Transplantation");
}
// =====================================================
// SLIDE 24 — RRT OPTIONS
// =====================================================
contentSlide("Renal Replacement Therapy – Overview", slide => {
// Indications
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 9.5, h: 1.12, fill: { color: "FFF0F0" }, line: { color: C.red, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 9.5, h: 0.34, fill: { color: C.red } });
slide.addText("Indications for RRT – 'AEIOU'", { x: 0.25, y: 0.88, w: 9.5, h: 0.34, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
const aeiou = [
{ l: "A", t: "Acidosis (refractory)" },
{ l: "E", t: "Electrolytes (hyperkalemia)" },
{ l: "I", t: "Ingestion / Intoxication" },
{ l: "O", t: "Overload (fluid, refractory)" },
{ l: "U", t: "Uremia (symptoms/signs)" },
];
aeiou.forEach((a, i) => {
const x = 0.4 + i * 1.88;
slide.addText(a.l, { x, y: 1.26, w: 0.35, h: 0.62, fontSize: 22, bold: true, color: C.red, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(a.t, { x: x + 0.35, y: 1.26, w: 1.45, h: 0.62, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", valign: "middle" });
});
// Three modalities
const modalities = [
{
name: "Hemodialysis (HD)",
color: C.navy,
access: "AV fistula (preferred), graft, or tunneled catheter",
how: "Diffusion across semi-permeable membrane; 3×/week (4h) or nocturnal daily",
pros: ["Medical supervision", "Efficient solute clearance"],
cons: ["Vascular access complications", "Hemodynamic instability", "Dietary restrictions"]
},
{
name: "Peritoneal Dialysis (PD)",
color: C.teal,
access: "Permanent peritoneal catheter",
how: "Peritoneum as membrane; CAPD (4 exchanges/day) or APD (overnight machine)",
pros: ["Home-based; greater independence", "Better preserved residual renal function", "Gentler hemodynamics"],
cons: ["Risk of peritonitis", "Catheter tunnel infection", "Protein loss"]
},
{
name: "Kidney Transplantation",
color: C.green,
access: "Living or deceased donor",
how: "Gold standard; best quality of life and survival; pre-emptive preferred",
pros: ["Best survival benefit", "Improved quality of life", "Cost-effective long-term"],
cons: ["Surgical risk; life-long immunosuppression", "Rejection (acute / chronic)", "Infection, malignancy risk"]
},
];
const mxs = [0.25, 3.45, 6.65];
const mw = 3.12;
modalities.forEach((m, i) => {
const x = mxs[i];
const y = 2.05;
slide.addShape(pres.ShapeType.rect, { x, y, w: mw, h: 3.1, fill: { color: "FAFAFA" }, line: { color: "D5E0E3", width: 0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y, w: mw, h: 0.4, fill: { color: m.color } });
slide.addText(m.name, { x, y, w: mw, h: 0.4, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
{ text: "Access: ", options: { bold: true, fontSize: 11, color: m.color, fontFace: "Calibri" } },
{ text: m.access + "\n", options: { fontSize: 11, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "Method: ", options: { bold: true, fontSize: 11, color: m.color, fontFace: "Calibri" } },
{ text: m.how + "\n", options: { fontSize: 11, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "\n✓ ", options: { bold: true, fontSize: 11, color: C.green, fontFace: "Calibri" } },
{ text: m.pros.join("\n✓ ") + "\n", options: { fontSize: 11, color: C.textDark, fontFace: "Calibri", breakLine: true } },
{ text: "\n✗ ", options: { bold: true, fontSize: 11, color: C.red, fontFace: "Calibri" } },
{ text: m.cons.join("\n✗ "), options: { fontSize: 11, color: C.textDark, fontFace: "Calibri" } },
], { x: x + 0.1, y: y + 0.45, w: mw - 0.2, h: 2.6, valign: "top" });
});
});
// =====================================================
// SLIDE 25 — DRUG DOSING & NEPHROTOXINS
// =====================================================
contentSlide("Drug Considerations in CKD", slide => {
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 4.6, h: 3.6, fill: { color: C.light }, line: { color: C.teal, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.88, w: 4.6, h: 0.38, fill: { color: C.teal } });
slide.addText("Dose Adjustments Required", { x: 0.25, y: 0.88, w: 4.6, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
bullet("Antibiotics: amoxicillin, gentamicin,\n vancomycin, fluconazole, acyclovir"),
bullet("Anticoagulants: LMWH, DOACs (rivaroxaban,\n apixaban — dose-reduce per eGFR)"),
bullet("Antidiabetics: metformin (avoid eGFR < 30),\n sulfonylureas (glipizide preferred)"),
bullet("Antihypertensives: ACEi/ARB (monitor K⁺)"),
bullet("Opioids: use morphine cautiously\n (active metabolites accumulate)"),
bullet("Colchicine: reduce dose in G3-G4"),
bullet("Bisphosphonates: avoid eGFR < 35"),
], { x: 0.35, y: 1.32, w: 4.42, h: 3.1, valign: "top" });
slide.addShape(pres.ShapeType.rect, { x: 5.15, y: 0.88, w: 4.6, h: 3.6, fill: { color: "FFF0F0" }, line: { color: C.red, width: 0.8 } });
slide.addShape(pres.ShapeType.rect, { x: 5.15, y: 0.88, w: 4.6, h: 0.38, fill: { color: C.red } });
slide.addText("Nephrotoxic Agents to Avoid", { x: 5.15, y: 0.88, w: 4.6, h: 0.38, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText([
bullet("NSAIDs (inhibit prostaglandin-mediated\n afferent dilation → ↓ GFR)"),
bullet("Aminoglycosides (proximal tubule toxicity)"),
bullet("Iodinated contrast media\n (contrast nephropathy — hydrate well)"),
bullet("Calcineurin inhibitors (CsA, tacrolimus)"),
bullet("Cisplatin, methotrexate (chemotherapy)"),
bullet("Herbal remedies containing aristolochic acid"),
subBullet("Always check Summaries of Product\n Characteristics before prescribing"),
], { x: 5.25, y: 1.32, w: 4.42, h: 3.1, valign: "top" });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: 4.6, w: 9.5, h: 0.6, fill: { color: C.navy } });
slide.addText("Kidney Failure Risk Equation available at www.kidneyfailurerisk.com — uses age, sex, region, eGFR, UACR to predict progression risk", {
x: 0.35, y: 4.62, w: 9.3, h: 0.56,
fontSize: 10.5, color: C.white, fontFace: "Calibri", valign: "middle"
});
});
// =====================================================
// SLIDE 26 — WHEN TO REFER
// =====================================================
contentSlide("When to Refer to Nephrology", slide => {
const criteria = [
{ trigger: "eGFR < 30 mL/min/1.73 m²", rationale: "G4/G5 — prepare for RRT, advanced management of complications" },
{ trigger: "Rapidly falling eGFR (> 5 mL/min/yr)", rationale: "Rule out superimposed AKI; urgent investigation needed" },
{ trigger: "Persistent ACR > 300 mg/g", rationale: "Nephrotic range; biopsy, aggressive RAS blockade" },
{ trigger: "Refractory hypertension", rationale: "Evaluate for renovascular disease, secondary causes" },
{ trigger: "Unexplained hematuria + proteinuria", rationale: "Glomerulonephritis suspected; biopsy may be needed" },
{ trigger: "Electrolyte abnormalities (K⁺, phosphate)", rationale: "Complex management; dietary counseling + drug titration" },
{ trigger: "CKD in pregnancy", rationale: "High-risk obstetric situation; preeclampsia risk ↑" },
{ trigger: "Genetic/hereditary kidney disease", rationale: "ADPKD, Alport syndrome — specialist surveillance" },
];
const yStart = 0.96;
const rowH = 0.55;
const headers = ["Referral Trigger", "Clinical Rationale"];
[0.25, 4.2].forEach((x, i) => {
slide.addShape(pres.ShapeType.rect, { x, y: yStart - 0.36, w: i === 0 ? 3.87 : 5.6, h: 0.36, fill: { color: C.navy } });
slide.addText(headers[i], { x, y: yStart - 0.36, w: i === 0 ? 3.87 : 5.6, h: 0.36, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
});
criteria.forEach((c, i) => {
const y = yStart + i * rowH;
const bg = i % 2 === 0 ? "FFFFFF" : C.light;
slide.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 9.5, h: rowH, fill: { color: bg }, line: { color: "D5E0E3", width: 0.4 } });
slide.addShape(pres.ShapeType.rect, { x: 0.25, y: y + 0.1, w: 0.06, h: rowH - 0.2, fill: { color: C.accent } });
slide.addText(c.trigger, { x: 0.4, y, w: 3.72, h: rowH, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle", margin: [0, 0, 0, 2] });
slide.addText(c.rationale, { x: 4.2, y, w: 5.5, h: rowH, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", valign: "middle" });
});
});
// =====================================================
// SLIDE 27 — KEY CLINICAL TRIALS / EVIDENCE
// =====================================================
contentSlide("Key Clinical Trials in CKD", slide => {
const trials = [
{ name: "DCCT / UKPDS", year: "1993/1998", finding: "Tight glycemic control reduces onset and progression of diabetic nephropathy" },
{ name: "REIN / MICRO-HOPE", year: "1997/2000", finding: "ACE inhibitors (ramipril) reduce progression of proteinuric CKD independent of BP lowering" },
{ name: "RENAAL / IDNT", year: "2001", finding: "ARBs (losartan, irbesartan) reduce progression of CKD in T2DM with nephropathy" },
{ name: "CREDENCE", year: "2019", finding: "Canagliflozin reduced ESKD + CV death by 30% in diabetic CKD (ACR ≥ 300)" },
{ name: "DAPA-CKD", year: "2020", finding: "Dapagliflozin reduced worsening of kidney function or death by 39% (CKD with/without DM)" },
{ name: "EMPA-KIDNEY", year: "2023", finding: "Empagliflozin reduced kidney disease progression or CV death by 28% across broad CKD" },
{ name: "FIDELIO-DKD / FIGARO", year: "2020/2021", finding: "Finerenone (non-steroidal MRA) reduced CKD progression and CV events in DKD" },
];
const yStart = 0.98;
const rowH = 0.58;
// Header
const hdrs = ["Trial", "Year", "Key Finding"];
[0.25, 3.0, 4.0].forEach((x, i) => {
const w2 = i === 0 ? 2.7 : (i === 1 ? 0.95 : 5.7);
slide.addShape(pres.ShapeType.rect, { x, y: yStart - 0.34, w: w2, h: 0.34, fill: { color: C.navy } });
slide.addText(hdrs[i], { x, y: yStart - 0.34, w: w2, h: 0.34, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: i === 0 ? "left" : "center", valign: "middle", margin: i === 0 ? [0, 0, 0, 6] : 0 });
});
trials.forEach((t, i) => {
const y = yStart + i * rowH;
const bg = i % 2 === 0 ? "FFFFFF" : C.light;
slide.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 9.5, h: rowH, fill: { color: bg }, line: { color: "D5E0E3", width: 0.4 } });
slide.addText(t.name, { x: 0.32, y, w: 2.65, h: rowH, fontSize: 12.5, bold: true, color: C.teal, fontFace: "Calibri", valign: "middle" });
slide.addText(t.year, { x: 3.0, y, w: 0.95, h: rowH, fontSize: 12, color: C.midGray, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addText(t.finding, { x: 4.0, y, w: 5.65, h: rowH, fontSize: 11.5, color: C.textDark, fontFace: "Calibri", valign: "middle" });
});
});
// =====================================================
// SLIDE 28 — SUMMARY
// =====================================================
contentSlide("Summary – Key Takeaways", slide => {
const points = [
{ n: "1", h: "Definition", t: "CKD = abnormal kidney structure or function for > 3 months; classified by the KDIGO CGA system (Cause, GFR, Albuminuria)" },
{ n: "2", h: "Staging", t: "G1–G5 based on eGFR; A1–A3 based on ACR. The heat map predicts risk of ESKD, CV mortality, and all-cause mortality" },
{ n: "3", h: "Causes", t: "Diabetic nephropathy #1 (US/Europe); hypertension #2; glomerulonephritis #3; ADPKD and others account for rest" },
{ n: "4", h: "Pathophysiology", t: "Hyperfiltration → maladaptive sclerosis via RAS/TGF-β; proteinuria drives tubulointerstitial fibrosis" },
{ n: "5", h: "Complications", t: "CVD (leading killer), anemia (↓ EPO), CKD-MBD (↑ FGF-23 → ↑ PTH), metabolic acidosis, hyperkalemia, uremia" },
{ n: "6", h: "Management", t: "ACEi/ARB + SGLT-2 inhibitor = current cornerstone; target BP < 130/80; correct anemia, bone disease, acidosis" },
{ n: "7", h: "RRT", t: "Hemodialysis, peritoneal dialysis, or transplant (gold standard); indicated by AEIOU criteria or eGFR < 10–15" },
];
points.forEach((p, i) => {
const col = i < 4 ? 0 : 1;
const row = i < 4 ? i : i - 4;
const x = col === 0 ? 0.22 : 5.1;
const y = 0.9 + row * 1.1;
const w2 = 4.7;
slide.addShape(pres.ShapeType.rect, { x, y, w: 0.45, h: 0.9, fill: { color: C.navy } });
slide.addText(p.n, { x, y, w: 0.45, h: 0.9, fontSize: 18, bold: true, color: C.accent, fontFace: "Calibri", align: "center", valign: "middle" });
slide.addShape(pres.ShapeType.rect, { x: x + 0.47, y, w: w2 - 0.47, h: 0.9, fill: { color: C.lightGray }, line: { color: "D5E0E3", width: 0.4 } });
slide.addText(p.h, { x: x + 0.56, y, w: 1.1, h: 0.9, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri", valign: "middle" });
slide.addText(p.t, { x: x + 1.72, y, w: w2 - 1.74, h: 0.9, fontSize: 10.5, color: C.textDark, fontFace: "Calibri", valign: "middle" });
});
});
// =====================================================
// SLIDE 29 — THANK YOU / REFERENCES
// =====================================================
{
const slide = pres.addSlide();
addBgRect(slide, C.navy);
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 5.625, fill: { color: C.accent } });
slide.addShape(pres.ShapeType.rect, { x: 9.85, y: 0, w: 0.15, h: 5.625, fill: { color: C.tealLight } });
slide.addShape(pres.ShapeType.rect, { x: 0.15, y: 3.55, w: 9.7, h: 2.075, fill: { color: C.teal } });
slide.addText("Thank You", {
x: 0.3, y: 0.6, w: 9.4, h: 0.9,
fontSize: 44, bold: true, color: C.white, fontFace: "Calibri", align: "center"
});
slide.addShape(pres.ShapeType.rect, { x: 2.5, y: 1.6, w: 5.0, h: 0.06, fill: { color: C.accent } });
slide.addText("Questions & Discussion", {
x: 0.3, y: 1.75, w: 9.4, h: 0.5,
fontSize: 18, italic: true, color: C.tealLight, fontFace: "Calibri", align: "center"
});
slide.addText([
{ text: "Key References\n", options: { bold: true, fontSize: 13, color: C.accent, fontFace: "Calibri", breakLine: true } },
{ text: "1. Harrison's Principles of Internal Medicine, 22nd Ed (2025). Chapter 322: Chronic Kidney Disease. Bargman JM, Skorecki KL.\n", options: { fontSize: 10.5, color: C.white, fontFace: "Calibri", breakLine: true } },
{ text: "2. Comprehensive Clinical Nephrology, 7th Ed. Chapter 80: Chronic Kidney Disease Staging.\n", options: { fontSize: 10.5, color: C.white, fontFace: "Calibri", breakLine: true } },
{ text: "3. Brenner & Rector's The Kidney. Classification and Mechanisms of CKD.\n", options: { fontSize: 10.5, color: C.white, fontFace: "Calibri", breakLine: true } },
{ text: "4. KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of CKD. Kidney Int Suppl 2013;3:1–150.\n", options: { fontSize: 10.5, color: C.white, fontFace: "Calibri", breakLine: true } },
{ text: "5. DAPA-CKD: Heerspink HJL et al. N Engl J Med 2020;383:1436–46. | 6. CREDENCE: Perkovic V et al. N Engl J Med 2019;380:2295–306.\n", options: { fontSize: 10.5, color: C.white, fontFace: "Calibri", breakLine: true } },
{ text: "7. EMPA-KIDNEY: The EMPA-KIDNEY Collaborative Group. N Engl J Med 2023;388:117–127.", options: { fontSize: 10.5, color: C.white, fontFace: "Calibri" } },
], { x: 0.3, y: 2.35, w: 9.4, h: 1.1, valign: "top" });
slide.addText("Chronic Kidney Disease | Medical Education Presentation | May 2026", {
x: 0.3, y: 3.6, w: 9.4, h: 0.42,
fontSize: 11, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
});
}
// =====================================================
// SAVE
// =====================================================
pres.writeFile({ fileName: "/home/daytona/workspace/ckd-ppt/CKD_Medical_Students.pptx" })
.then(() => console.log("✅ Saved: CKD_Medical_Students.pptx"))
.catch(e => { console.error("Error:", e); process.exit(1); });
cd /home/daytona/workspace/ckd-ppt && node ckd.js 2>&1
ls -lh /home/daytona/workspace/ckd-ppt/CKD_Medical_Students.pptx
CKD Medical Students
Presentation · PPTX
| # | Slide(s) | Content |
|---|---|---|
| 1 | Title | Title slide with source attribution |
| 2 | Learning Objectives | 7 core learning outcomes |
| 3–4 | Definition & Epidemiology | KDIGO definition, 5 epidemiology stats, key criteria |
| 5–7 | Classification | G1–G5 GFR table (color-coded), A1–A3 albuminuria, KDIGO heat map, CGA system explained |
| 8–10 | Etiology & Risk Factors | Top 5 causes with % prevalence, risk factor grid (NCDs, infectious, genetic, lifestyle) |
| 11–12 | Pathophysiology | Step-by-step hyperfiltration→sclerosis flow; RAS, proteinuria, FGF-23/Klotho, uremic toxins |
| 13–14 | Clinical Features | Stage-by-stage table from asymptomatic (G1) to uremic syndrome (G5) |
| 15–16 | Complications | CVD, anemia, CKD-MBD, metabolic - four-column layout |
| 17 | CKD-MBD Detail | FGF-23 → PTH cascade, bone types, treatment (phosphate binders, calcitriol, cinacalcet) |
| 18–19 | Diagnosis | Blood, urine, imaging, biopsy indications |
| 20–22 | Management | ACEi/ARB, SGLT-2i, diet; anemia management with ESA targets; drug dosing/nephrotoxins |
| 23–24 | RRT | AEIOU indications; HD vs PD vs transplant comparison |
| 25 | Drug Considerations | Dose adjustments + nephrotoxins to avoid |
| 26 | Referral Criteria | 8 triggers for nephrology referral with rationale |
| 27 | Key Trials | CREDENCE, DAPA-CKD, EMPA-KIDNEY, FIDELIO, RENAAL, REIN, DCCT/UKPDS |
| 28 | Summary | 7-point key takeaways |
| 29 | References | Harrison's 22E, Comprehensive Clinical Nephrology 7th Ed, Brenner & Rector, KDIGO 2012 |
Detailed chronic liver disease ppt for medical students
~/cld-ppt/cld.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Chronic Liver Disease";
pres.author = "Medical Education";
// === COLOR PALETTE ===
// Deep forest green dominant; warm amber accent; burgundy highlights
const C = {
forest: "0D3B2E", // dominant dark green
green: "1A6B45", // supporting mid green
greenMid: "228B57",
greenLight:"2ECC71",
accent: "D4A017", // warm gold/amber accent
accentSoft:"F0C040",
white: "FFFFFF",
light: "EAF5EE", // very pale green bg
lightGold:"FFF8E1",
lightGray:"F4F4F4",
midGray: "8C9BAD",
darkGray: "3A4A5A",
red: "C0392B",
orange: "D35400",
teal: "1A7B8C",
textDark: "1C2B1A",
burgundy: "7B1D3A",
};
function addBgRect(slide, color) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color } });
}
function sectionDivider(slide, title, subtitle) {
addBgRect(slide, C.forest);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.14, h:5.625, fill:{ color:C.accent } });
slide.addShape(pres.ShapeType.rect, { x:0.3, y:2.85, w:9.4, h:0.04, fill:{ color:C.greenLight } });
slide.addText(title, { x:0.3, y:1.55, w:9.4, h:1.1, fontSize:36, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" });
if (subtitle) {
slide.addText(subtitle, { x:0.3, y:2.95, w:9.4, h:0.75, fontSize:17, color:C.accentSoft, fontFace:"Calibri", align:"left", italic:true });
}
}
function contentSlide(title, contentFn) {
const slide = pres.addSlide();
addBgRect(slide, C.white);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.72, fill:{ color:C.forest } });
slide.addShape(pres.ShapeType.rect, { x:0, y:0.72, w:10, h:0.07, fill:{ color:C.accent } });
slide.addText(title, { x:0.3, y:0, w:9.4, h:0.72, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", valign:"middle" });
contentFn(slide);
slide.addShape(pres.ShapeType.rect, { x:0, y:5.45, w:10, h:0.175, fill:{ color:C.light } });
slide.addText("Chronic Liver Disease | Medical Education", { x:0.3, y:5.45, w:9.4, h:0.175, fontSize:7.5, color:C.midGray, fontFace:"Calibri", valign:"middle" });
return slide;
}
function bullet(text, opts={}) {
return { text, options: { bullet:{ code:"2022" }, breakLine:true, fontSize:opts.fontSize||14, color:opts.color||C.textDark, bold:opts.bold||false, indentLevel:opts.indent||0, fontFace:"Calibri", spaceBefore:opts.sb||2, ...opts.extra } };
}
function subBullet(text, opts={}) {
return bullet(text, { indent:1, fontSize:12.5, color:C.green, ...opts });
}
// =====================================================
// SLIDE 1 — TITLE
// =====================================================
{
const slide = pres.addSlide();
addBgRect(slide, C.forest);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:5.625, fill:{ color:C.accent } });
slide.addShape(pres.ShapeType.rect, { x:9.82, y:0, w:0.18, h:5.625, fill:{ color:C.greenLight } });
slide.addShape(pres.ShapeType.rect, { x:0.18, y:4.6, w:9.64, h:1.025, fill:{ color:C.green } });
slide.addText("CHRONIC LIVER DISEASE", { x:0.4, y:0.8, w:9.2, h:1.2, fontSize:42, bold:true, color:C.white, fontFace:"Calibri", align:"center", charSpacing:2 });
slide.addShape(pres.ShapeType.rect, { x:2.5, y:2.1, w:5.0, h:0.07, fill:{ color:C.accent } });
slide.addText("A Comprehensive Guide for Medical Students", { x:0.4, y:2.25, w:9.2, h:0.65, fontSize:19, color:C.accentSoft, fontFace:"Calibri", align:"center", italic:true });
slide.addText("Based on: Harrison's 22E (2025) · Goldman-Cecil Medicine · Sleisenger & Fordtran's GI & Liver Disease", { x:0.4, y:3.05, w:9.2, h:0.6, fontSize:11, color:C.greenLight, fontFace:"Calibri", align:"center" });
slide.addText("Pathophysiology · Etiology · Complications · Scoring · Management · Transplantation", { x:0.4, y:4.65, w:9.2, h:0.55, fontSize:13, color:C.white, fontFace:"Calibri", align:"center" });
}
// =====================================================
// SLIDE 2 — LEARNING OBJECTIVES
// =====================================================
contentSlide("Learning Objectives", slide => {
const items = [
"Define chronic liver disease (CLD) and cirrhosis; distinguish compensated from decompensated cirrhosis",
"Describe the pathophysiology of hepatic fibrosis, portal hypertension, and the hyperdynamic circulatory state",
"List the major causes of CLD and recognize their distinguishing features",
"Identify the clinical signs and symptoms of CLD and interpret relevant investigations",
"Classify disease severity using Child-Pugh and MELD scoring systems",
"Explain the pathophysiology and management of key complications: ascites, SBP, varices, HE, HRS, HCC",
"Outline the principles of liver transplantation and indications for referral",
];
slide.addShape(pres.ShapeType.rect, { x:0.3, y:0.88, w:0.09, h:4.42, fill:{ color:C.accent } });
const bullArr = items.map((t, i) => ({ text:`${i+1}. ${t}`, options:{ breakLine:true, fontSize:14, color:C.textDark, fontFace:"Calibri", spaceBefore:5 } }));
bullArr[bullArr.length-1].options.breakLine = false;
slide.addText(bullArr, { x:0.52, y:0.95, w:9.15, h:4.35, valign:"top" });
});
// =====================================================
// SLIDE 3 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); sectionDivider(s, "01 Definition & Epidemiology", "What is chronic liver disease and how common is it?"); }
// =====================================================
// SLIDE 4 — DEFINITION
// =====================================================
contentSlide("Definition & Key Concepts", slide => {
// Left
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:5.85, h:3.1, fill:{ color:C.light }, line:{ color:C.greenLight, width:1 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:5.85, h:0.42, fill:{ color:C.green } });
slide.addText("Cirrhosis — Definition", { x:0.25, y:0.9, w:5.85, h:0.42, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"Cirrhosis is a ", options:{ fontSize:13.5, color:C.textDark, fontFace:"Calibri" } },
{ text:"progressive, diffuse, fibrosing, and nodular condition", options:{ fontSize:13.5, bold:true, color:C.forest, fontFace:"Calibri" } },
{ text:" that disrupts the entire normal hepatic architecture.\n\n", options:{ fontSize:13.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• ", options:{ fontSize:13.5, bold:true, color:C.green, fontFace:"Calibri" } },
{ text:"End-stage of many chronic liver diseases\n", options:{ fontSize:13.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• ", options:{ fontSize:13.5, bold:true, color:C.green, fontFace:"Calibri" } },
{ text:"Characterized by replacement of normal parenchyma with fibrous tissue and regenerative nodules\n", options:{ fontSize:13.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• ", options:{ fontSize:13.5, bold:true, color:C.green, fontFace:"Calibri" } },
{ text:"Portal hypertension ensues with multiple long-term complications\n", options:{ fontSize:13.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• ", options:{ fontSize:13.5, bold:true, color:C.green, fontFace:"Calibri" } },
{ text:"~40% of patients are asymptomatic at time of diagnosis", options:{ fontSize:13.5, color:C.textDark, fontFace:"Calibri" } },
], { x:0.4, y:1.38, w:5.6, h:2.55, valign:"top" });
// Right — Compensated vs Decompensated
slide.addShape(pres.ShapeType.rect, { x:6.4, y:0.9, w:3.35, h:3.1, fill:{ color:C.lightGold }, line:{ color:C.accent, width:1 } });
slide.addShape(pres.ShapeType.rect, { x:6.4, y:0.9, w:3.35, h:0.42, fill:{ color:C.accent } });
slide.addText("Compensated vs Decompensated", { x:6.4, y:0.9, w:3.35, h:0.42, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"COMPENSATED\n", options:{ bold:true, fontSize:13, color:C.green, fontFace:"Calibri", breakLine:true } },
{ text:"• Normal synthetic function\n• Portal pressure below threshold\n• Median survival: >12 years\n\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"DECOMPENSATED\n", options:{ bold:true, fontSize:13, color:C.red, fontFace:"Calibri", breakLine:true } },
{ text:"• Ascites, varices, encephalopathy,\n jaundice present\n• Median survival: ~1.6 years\n• Transition rate: 5-7%/year", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:6.55, y:1.38, w:3.1, h:2.55, valign:"top" });
// Bottom stats bar
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.15, w:9.5, h:1.05, fill:{ color:C.forest } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.15, w:9.5, h:0.35, fill:{ color:C.green } });
slide.addText("Global Burden", { x:0.25, y:4.15, w:9.5, h:0.35, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const stats = [
{ v:"#12", l:"Leading cause of\ndeath (US)" },
{ v:"27,555", l:"Annual US deaths\n(CLD & cirrhosis)" },
{ v:"1.5M", l:"Annual deaths\nglobally" },
{ v:"40%", l:"Asymptomatic\nat diagnosis" },
{ v:">80%", l:"Cases preventable\n(alcohol/HBV/HCV/NAFLD)" },
];
stats.forEach((s, i) => {
const x = 0.45 + i*1.88;
slide.addText(s.v, { x, y:4.5, w:1.78, h:0.38, fontSize:20, bold:true, color:C.accentSoft, fontFace:"Calibri", align:"center" });
slide.addText(s.l, { x, y:4.87, w:1.78, h:0.28, fontSize:9, color:C.white, fontFace:"Calibri", align:"center" });
});
});
// =====================================================
// SLIDE 5 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); sectionDivider(s, "02 Etiology & Risk Factors", "Common causes — most are preventable"); }
// =====================================================
// SLIDE 6 — CAUSES
// =====================================================
contentSlide("Major Causes of Chronic Liver Disease", slide => {
const causes = [
{ rank:"1", name:"Alcohol-Related Liver Disease", pct:"~40–50%", color:C.red, desc:"Steatosis → alcoholic hepatitis → cirrhosis. AST:ALT ratio > 2:1 characteristic. Prevalence closely parallels alcohol consumption." },
{ rank:"2", name:"Non-Alcoholic Fatty Liver Disease (NAFLD/MASLD)", pct:"~25–30%", color:C.orange, desc:"Closely linked to metabolic syndrome, T2DM, obesity. NASH (steatohepatitis) subtype progresses to cirrhosis." },
{ rank:"3", name:"Hepatitis C Virus (HCV)", pct:"~15–20%", color:C.teal, desc:"Leading infectious cause in developed countries. DAA therapy (sofosbuvir/ledipasvir) achieves >95% SVR." },
{ rank:"4", name:"Hepatitis B Virus (HBV)", pct:"~10–15%", color:C.green, desc:"Most common worldwide (Asia, Africa). Vaccination preventable. Risk of HCC even without cirrhosis." },
{ rank:"5", name:"Cholestatic / Autoimmune", pct:"~5–10%", color:C.burgundy, desc:"PBC (anti-mitochondrial Ab, AMA), PSC (ERCP beading), AIH (ANA, SMA, elevated IgG)." },
{ rank:"6", name:"Hereditary / Metabolic / Other", pct:"~5%", color:"5A5A5A", desc:"Haemochromatosis (HFE gene), Wilson disease (ATP7B), α1-AT deficiency, Budd-Chiari, drugs (amiodarone, MTX)." },
];
const yStart = 0.95;
const rowH = 0.72;
// Headers
[0.25, 0.82, 3.3, 6.0].forEach((x, i) => {
const w2 = [0.55, 2.45, 2.65, 3.75][i];
const h = ["#", "Cause", "%", "Key Features"][i];
slide.addShape(pres.ShapeType.rect, { x, y:yStart-0.34, w:w2, h:0.34, fill:{ color:C.forest } });
slide.addText(h, { x, y:yStart-0.34, w:w2, h:0.34, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
causes.forEach((c, i) => {
const y = yStart + i * rowH;
const bg = i%2===0 ? "FFFFFF" : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:9.5, h:rowH, fill:{ color:bg }, line:{ color:"D5E5DA", width:0.5 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:0.55, h:rowH, fill:{ color:c.color } });
slide.addText(c.rank, { x:0.25, y, w:0.55, h:rowH, fontSize:15, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(c.name, { x:0.85, y:y+0.04, w:2.4, h:rowH-0.08, fontSize:12, bold:true, color:C.forest, fontFace:"Calibri", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:3.32, y:y+0.18, w:0.7, h:0.28, fill:{ color:c.color } });
slide.addText(c.pct, { x:3.32, y:y+0.18, w:0.7, h:0.28, fontSize:9.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(c.desc, { x:6.1, y:y+0.06, w:3.55, h:rowH-0.12, fontSize:11, color:C.darkGray, fontFace:"Calibri", valign:"middle" });
});
});
// =====================================================
// SLIDE 7 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); sectionDivider(s, "03 Pathophysiology", "Fibrosis · Portal hypertension · Hyperdynamic circulation"); }
// =====================================================
// SLIDE 8 — FIBROSIS PATHWAY
// =====================================================
contentSlide("Hepatic Fibrosis — Pathophysiology", slide => {
// Flow
const steps = [
{ t:"Chronic Injury", sub:"Alcohol, HBV, HCV,\nfat accumulation", c:C.red },
{ t:"Hepatocyte Death\n& Inflammation", sub:"Kupffer cell activation,\ncytokine release", c:C.orange },
{ t:"Stellate Cell\nActivation", sub:"TGF-β1 → HSC\nactivation (key step)", c:C.green },
{ t:"Collagen\nDeposition", sub:"Type I/III collagen\nreplaces parenchyma", c:C.teal },
{ t:"Regenerative\nNodules", sub:"Disorganized\nregeneration", c:C.forest },
{ t:"CIRRHOSIS", sub:"Portal HTN\n+ Liver failure", c:"8B0000" },
];
const xStarts = [0.15, 1.78, 3.41, 5.04, 6.67, 8.3];
const w = 1.5;
steps.forEach((s, i) => {
slide.addShape(pres.ShapeType.rect, { x:xStarts[i], y:0.88, w, h:1.7, fill:{ color:s.c } });
slide.addText(s.t, { x:xStarts[i], y:0.92, w, h:0.62, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:xStarts[i]+0.1, y:1.56, w:w-0.2, h:0.03, fill:{ color:"FFFFFF" } });
slide.addText(s.sub, { x:xStarts[i], y:1.62, w, h:0.94, fontSize:10.5, color:C.white, fontFace:"Calibri", align:"center", valign:"top" });
if (i < steps.length-1) {
slide.addText("▶", { x:xStarts[i]+w, y:1.35, w:0.28, h:0.42, fontSize:14, bold:true, color:C.accent, fontFace:"Calibri", align:"center" });
}
});
// Details
slide.addShape(pres.ShapeType.rect, { x:0.2, y:2.75, w:9.6, h:2.45, fill:{ color:"F4F8F2" }, line:{ color:C.forest, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.2, y:2.75, w:9.6, h:0.38, fill:{ color:C.forest } });
slide.addText("Key Molecular Mechanisms", { x:0.2, y:2.75, w:9.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const mechs = [
{ t:"TGF-β1", d:"Transforming growth factor β1 — most potent pro-fibrotic cytokine; activates hepatic stellate cells (HSC) → myofibroblast phenotype" },
{ t:"HSC Activation", d:"Quiescent lipocytes → activated HSC → produce collagen I/III; upregulate MMP inhibitors (TIMPs) reducing degradation" },
{ t:"NO/Endothelin", d:"↑ Endothelin → intrahepatic vasoconstriction; ↓ intrahepatic NO → further ↑ resistance → portal hypertension" },
{ t:"RAAS/SNS", d:"Vasodilation → ↓ effective arterial volume → RAAS & SNS activation → Na⁺ retention → ascites & hyperdynamic state" },
];
mechs.forEach((m, i) => {
const x = 0.35 + i*2.4;
slide.addText(m.t, { x, y:3.19, w:2.25, h:0.32, fontSize:12, bold:true, color:C.green, fontFace:"Calibri" });
slide.addText(m.d, { x, y:3.5, w:2.25, h:1.6, fontSize:10.5, color:C.textDark, fontFace:"Calibri", valign:"top" });
});
});
// =====================================================
// SLIDE 9 — PORTAL HYPERTENSION
// =====================================================
contentSlide("Portal Hypertension — Pathophysiology", slide => {
// Threshold box
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.88, fill:{ color:C.forest } });
slide.addText([
{ text:"Normal HVPG: ≤ 5 mmHg ", options:{ bold:true, fontSize:14, color:C.greenLight, fontFace:"Calibri" } },
{ text:"Portal HTN: > 5 mmHg ", options:{ bold:true, fontSize:14, color:C.accentSoft, fontFace:"Calibri" } },
{ text:"Varices form: > 10–12 mmHg ", options:{ bold:true, fontSize:14, color:C.orange, fontFace:"Calibri" } },
{ text:"Ascites: > 12 mmHg ", options:{ bold:true, fontSize:14, color:C.red, fontFace:"Calibri" } },
{ text:"Variceal bleed: > 20 mmHg", options:{ bold:true, fontSize:14, color:"FF4444", fontFace:"Calibri" } },
], { x:0.35, y:0.9, w:9.3, h:0.88, valign:"middle" });
// Three mechanism columns
const cols3 = [
{ title:"↑ Intrahepatic Resistance", color:C.red, items:["Structural: fibrosis, regenerative nodules distort sinusoids", "Functional: endothelin, TXA₂ → intrahepatic vasoconstriction", "↓ NO production within liver", "↑ Hepatic venous pressure gradient (HVPG)"] },
{ title:"↑ Portal Blood Flow", color:C.orange, items:["Splanchnic vasodilation (↑ NO, prostacyclin, glucagon)", "Hyperdynamic circulation develops", "Portosystemic collaterals form (coronary v., short gastric v.)", "Gastroesophageal varices develop"] },
{ title:"Systemic Consequences", color:C.teal, items:["↓ Effective arterial blood volume", "RAAS + SNS activation → Na⁺/H₂O retention", "Ascites, peripheral edema, hyponatremia", "Hepatorenal syndrome (end-stage vasoconstriction)"] },
];
cols3.forEach((c, i) => {
const x = 0.25 + i*3.2;
slide.addShape(pres.ShapeType.rect, { x, y:1.9, w:3.1, h:2.9, fill:{ color:C.lightGray }, line:{ color:"D5E5DA", width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y:1.9, w:3.1, h:0.42, fill:{ color:c.color } });
slide.addText(c.title, { x, y:1.9, w:3.1, h:0.42, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = c.items.map((t, j) => ({ text:`• ${t}`, options:{ breakLine:j<c.items.length-1, fontSize:11.5, color:C.textDark, fontFace:"Calibri", spaceBefore:3 } }));
slide.addText(bullArr, { x:x+0.1, y:2.38, w:2.9, h:2.35, valign:"top" });
});
slide.addText("HVPG = hepatic venous pressure gradient (wedged - free hepatic vein pressure) — gold standard for measuring portal pressure", { x:0.25, y:5.25, w:9.5, h:0.18, fontSize:9, color:C.midGray, fontFace:"Calibri", italic:true });
});
// =====================================================
// SLIDE 10 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); sectionDivider(s, "04 Clinical Features", "History · Physical signs · Investigations"); }
// =====================================================
// SLIDE 11 — CLINICAL FEATURES
// =====================================================
contentSlide("Clinical Features of Chronic Liver Disease", slide => {
const groups = [
{ title:"Symptoms", color:C.forest, items:["Fatigue, malaise (early)", "Anorexia, weight loss", "Abdominal distension (ascites)", "Ankle swelling (hypoalbuminaemia)", "Jaundice (decompensation)", "Confusion, personality change (HE)", "GI bleeding (haematemesis, melena)", "Pruritus (cholestatic disease)"] },
{ title:"Signs — Hepatic", color:C.green, items:["Hepatomegaly (early) → small liver (advanced)", "Splenomegaly (portal HTN)", "Ascites (shifting dullness, fluid thrill)", "Caput medusae (portosystemic collaterals)", "Asterixis / flap (hepatic encephalopathy)", "Fetor hepaticus (musty sweet breath)"] },
{ title:"Signs — Peripheral", color:C.orange, items:["Jaundice + scleral icterus", "Spider naevi (> 5 pathological)", "Palmar erythema", "Leuconychia (white nails)", "Dupuytren's contracture (alcohol)", "Gynecomastia, testicular atrophy", "Parotid enlargement (alcohol)", "Clubbing, Terry's nails"] },
{ title:"Late / Decompensated", color:C.red, items:["Muscle wasting, cachexia", "Encephalopathy (grade 0–IV)", "Spontaneous bacterial peritonitis", "Hepatorenal syndrome", "Coagulopathy (prolonged PT/INR)", "Thrombocytopenia (hypersplenism)", "Hepatocellular carcinoma"] },
];
const xs = [0.22, 2.65, 5.1, 7.53];
const w = 2.25;
groups.forEach((g, i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y:0.88, w, h:4.35, fill:{ color:C.lightGray }, line:{ color:"D5E5DA", width:0.6 } });
slide.addShape(pres.ShapeType.rect, { x, y:0.88, w, h:0.42, fill:{ color:g.color } });
slide.addText(g.title, { x, y:0.88, w, h:0.42, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = g.items.map((t, j) => ({ text:`• ${t}`, options:{ breakLine:j<g.items.length-1, fontSize:11, color:C.textDark, fontFace:"Calibri", spaceBefore:2.5 } }));
slide.addText(bullArr, { x:x+0.1, y:1.36, w:w-0.18, h:3.8, valign:"top" });
});
});
// =====================================================
// SLIDE 12 — INVESTIGATIONS
// =====================================================
contentSlide("Investigations in Chronic Liver Disease", slide => {
const invGroups = [
{ title:"Liver Function Tests", color:C.forest, items:["ALT, AST (hepatocellular injury)\n AST:ALT > 2 → alcoholic liver disease", "ALP, GGT (cholestatic disease)", "Bilirubin (conjugated/unconjugated)", "Albumin (synthetic function marker)", "Prothrombin time / INR", "γ-globulins (elevated in AIH)"] },
{ title:"Haematology & Biochem", color:C.green, items:["FBC: anaemia (multifactorial),\n thrombocytopenia (hypersplenism)", "Coagulation: PT, APTT, INR", "U&E, creatinine (hepatorenal risk)", "Glucose (hypoglycaemia in decompensation)", "Serum sodium (marker of severity)", "Plasma ammonia (hepatic encephalopathy)"] },
{ title:"Serology / Specific Tests", color:C.teal, items:["HBsAg, anti-HBs, HBeAg, HBV DNA", "Anti-HCV, HCV RNA (genotype)", "ANA, SMA, LKM-1 (AIH)", "AMA (anti-mitochondrial Ab → PBC)", "Serum ferritin, transferrin sat. (iron overload)", "Serum copper, caeruloplasmin\n (Wilson disease)", "α1-antitrypsin level/phenotype"] },
{ title:"Imaging & Histology", color:C.orange, items:["USS abdomen (1st line):\n liver texture, size, splenomegaly,\n ascites, HCC surveillance", "CT/MRI liver (HCC characterisation)", "MRCP (biliary anatomy — PSC)", "FibroScan (transient elastography):\n liver stiffness → fibrosis staging", "Liver biopsy: gold standard\n for diagnosis & staging"] },
];
const xs = [0.22, 2.65, 5.1, 7.55];
const w = 2.3;
invGroups.forEach((g, i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y:0.88, w, h:4.35, fill:{ color:C.light }, line:{ color:"C5E0CE", width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y:0.88, w, h:0.42, fill:{ color:g.color } });
slide.addText(g.title, { x, y:0.88, w, h:0.42, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = g.items.map((t, j) => ({ text:`• ${t}`, options:{ breakLine:j<g.items.length-1, fontSize:11, color:C.textDark, fontFace:"Calibri", spaceBefore:2.5 } }));
slide.addText(bullArr, { x:x+0.1, y:1.36, w:w-0.18, h:3.8, valign:"top" });
});
});
// =====================================================
// SLIDE 13 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); sectionDivider(s, "05 Disease Severity Scoring", "Child-Pugh · MELD · MELD-Na"); }
// =====================================================
// SLIDE 14 — CHILD-PUGH SCORE
// =====================================================
contentSlide("Child-Pugh Score", slide => {
// Table
const cpRows = [
{ param:"Bilirubin (µmol/L)", p1:"< 34", p2:"34–51", p3:"> 51" },
{ param:"Albumin (g/L)", p1:"> 35", p2:"28–35", p3:"< 28" },
{ param:"PT prolongation (s)\nor INR", p1:"< 4 ( <1.7)", p2:"4–6 (1.7–2.3)", p3:"> 6 (>2.3)" },
{ param:"Ascites", p1:"None", p2:"Mild/Controlled", p3:"Moderate-Severe" },
{ param:"Hepatic Encephalopathy", p1:"None", p2:"Grade I–II", p3:"Grade III–IV" },
];
const yStart = 1.08;
const rowH = 0.56;
const hdrs = ["Parameter", "1 Point", "2 Points", "3 Points"];
const xP = [0.25, 3.55, 5.5, 7.45];
const wP = [3.25, 1.9, 1.9, 2.25];
hdrs.forEach((h, i) => {
slide.addShape(pres.ShapeType.rect, { x:xP[i], y:yStart-0.36, w:wP[i], h:0.36, fill:{ color:C.forest } });
slide.addText(h, { x:xP[i], y:yStart-0.36, w:wP[i], h:0.36, fontSize:12, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
cpRows.forEach((r, i) => {
const y = yStart + i*rowH;
const bg = i%2===0 ? "FFFFFF" : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:9.45, h:rowH, fill:{ color:bg }, line:{ color:"D5E5DA", width:0.4 } });
slide.addText(r.param, { x:0.35, y, w:3.15, h:rowH, fontSize:12.5, bold:true, color:C.forest, fontFace:"Calibri", valign:"middle" });
[r.p1, r.p2, r.p3].forEach((v, j) => {
const pointColor = j===0 ? "2E8B57" : j===1 ? C.orange : C.red;
slide.addText(v, { x:xP[j+1], y, w:wP[j+1], h:rowH, fontSize:12, color:pointColor, fontFace:"Calibri", align:"center", valign:"middle", bold:true });
});
});
// Classes box
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.95, w:9.45, h:1.2, fill:{ color:C.forest } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.95, w:9.45, h:0.35, fill:{ color:C.green } });
slide.addText("Child-Pugh Classification", { x:0.25, y:3.95, w:9.45, h:0.35, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const classes = [
{ cls:"A (5–6)", surv:"1-yr: 100% 2-yr: 85%", state:"Compensated; well-tolerated surgery", color:"2E8B57" },
{ cls:"B (7–9)", surv:"1-yr: 80% 2-yr: 60%", state:"Significant dysfunction; moderate risk surgery", color:C.orange },
{ cls:"C (10–15)", surv:"1-yr: 45% 2-yr: 35%", state:"Decompensated; poor surgical candidate; transplant listing", color:C.red },
];
classes.forEach((c, i) => {
const x = 0.4 + i*3.15;
slide.addShape(pres.ShapeType.rect, { x, y:4.35, w:0.75, h:0.7, fill:{ color:c.color } });
slide.addText(`Class ${c.cls}`, { x, y:4.35, w:0.75, h:0.7, fontSize:10.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(`${c.surv}\n${c.state}`, { x:x+0.78, y:4.35, w:2.2, h:0.7, fontSize:10.5, color:C.white, fontFace:"Calibri", valign:"middle" });
});
});
// =====================================================
// SLIDE 15 — MELD SCORE
// =====================================================
contentSlide("MELD & MELD-Na Scores", slide => {
// MELD box
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:5.8, h:2.5, fill:{ color:C.light }, line:{ color:C.green, width:1 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:5.8, h:0.42, fill:{ color:C.forest } });
slide.addText("MELD Score — Formula & Interpretation", { x:0.25, y:0.9, w:5.8, h:0.42, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"MELD = 3.78×ln[Bili (mg/dL)] + 11.2×ln[INR] + 9.57×ln[Creatinine (mg/dL)] + 6.43\n\n", options:{ fontSize:12.5, bold:true, color:C.forest, fontFace:"Courier New", breakLine:true } },
{ text:"• Predicts 90-day mortality without transplant\n", options:{ fontSize:13, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• Used for liver transplant allocation (UNOS/OPTN) since 2002\n", options:{ fontSize:13, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• Replaces Child-Pugh for transplant listing\n", options:{ fontSize:13, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• Range: 6–40 (max capped at 40)", options:{ fontSize:13, color:C.textDark, fontFace:"Calibri" } },
], { x:0.4, y:1.38, w:5.55, h:1.95, valign:"top" });
// MELD-Na
slide.addShape(pres.ShapeType.rect, { x:6.35, y:0.9, w:3.4, h:2.5, fill:{ color:C.lightGold }, line:{ color:C.accent, width:1 } });
slide.addShape(pres.ShapeType.rect, { x:6.35, y:0.9, w:3.4, h:0.42, fill:{ color:C.accent } });
slide.addText("MELD-Na (Sodium-MELD)", { x:6.35, y:0.9, w:3.4, h:0.42, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"MELD-Na = MELD + 1.32×(137-Na) – [0.24×MELD×(137-Na)]\n\n", options:{ fontSize:11.5, bold:true, color:C.forest, fontFace:"Courier New", breakLine:true } },
{ text:"• Hyponatremia independently predicts mortality\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• Incorporated into US transplant allocation\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"• MELD-Na superior to MELD for predicting waitlist mortality", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:6.5, y:1.38, w:3.15, h:1.95, valign:"top" });
// Mortality table
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.58, w:9.5, h:1.62, fill:{ color:"F4F8F2" }, line:{ color:C.forest, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.58, w:9.5, h:0.36, fill:{ color:C.forest } });
slide.addText("MELD Score — Predicted 3-Month Mortality", { x:0.25, y:3.58, w:9.5, h:0.36, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const meldData = [
{ score:"< 9", mort:"< 2%", color:"2E8B57" },
{ score:"10–19", mort:"6%", color:"6AAB3C" },
{ score:"20–29", mort:"20%", color:C.orange },
{ score:"30–39", mort:"52%", color:C.red },
{ score:"≥ 40", mort:">70%", color:"8B0000" },
];
meldData.forEach((m, i) => {
const x = 0.5 + i*1.85;
slide.addShape(pres.ShapeType.rect, { x, y:4.0, w:1.65, h:0.4, fill:{ color:m.color } });
slide.addText(`MELD ${m.score}`, { x, y:4.0, w:1.65, h:0.4, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(`Mortality: ${m.mort}`, { x, y:4.42, w:1.65, h:0.7, fontSize:12, bold:true, color:m.color, fontFace:"Calibri", align:"center", valign:"middle" });
});
});
// =====================================================
// SLIDE 16 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); sectionDivider(s, "06 Complications of Cirrhosis", "Portal HTN consequences · Liver insufficiency"); }
// =====================================================
// SLIDE 17 — COMPLICATIONS OVERVIEW
// =====================================================
contentSlide("Complications of Cirrhosis — Overview", slide => {
// Two source streams
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:0.42, fill:{ color:C.teal } });
slide.addText("Portal Hypertension", { x:0.25, y:0.9, w:4.55, h:0.42, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:5.2, y:0.9, w:4.55, h:0.42, fill:{ color:C.orange } });
slide.addText("Hepatic Insufficiency", { x:5.2, y:0.9, w:4.55, h:0.42, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const portalComps = [
{ name:"Oesophageal Varices", detail:"HVPG > 10–12 mmHg; 5-yr risk variceal bleed ~25–35%; up to 85% of decompensated patients" },
{ name:"Ascites", detail:"HVPG > 12 mmHg + Na⁺ retention; threshold condition for transplant listing; 5-yr survival 30–40%" },
{ name:"Spontaneous Bacterial Peritonitis", detail:"Ascitic PMN > 250 cells/mm³; E.coli, Klebsiella; treat with cefotaxime + IV albumin" },
{ name:"Hepatorenal Syndrome (HRS)", detail:"Type 1 (acute, < 2 wks) vs Type 2 (chronic); renal vasoconstriction without structural damage" },
{ name:"Splenomegaly + Hypersplenism", detail:"Thrombocytopenia, leukopenia, anaemia due to splenic sequestration" },
];
const insuffComps = [
{ name:"Hepatic Encephalopathy", detail:"↑ Ammonia + portosystemic shunting; West Haven Grade 0–IV; treat with lactulose + rifaximin" },
{ name:"Jaundice / Coagulopathy", detail:"↓ Clotting factor synthesis (I, II, V, VII, IX, X), ↓ albumin → bleeding risk, oedema" },
{ name:"Hepatocellular Carcinoma", detail:"5–7% annual risk in cirrhosis; screen USS + AFP q6 months; BCLC staging guides therapy" },
{ name:"Hepatopulmonary Syndrome", detail:"Intrapulmonary vascular dilatation → shunt → hypoxia; orthodexia, platypnoea" },
{ name:"Portopulmonary Hypertension", detail:"Vasoconstrictive substances bypass liver → pulmonary HTN; mPAP > 25 mmHg" },
];
portalComps.forEach((c, i) => {
const y = 1.44 + i*0.72;
const bg = i%2===0 ? "FFFFFF" : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:4.55, h:0.68, fill:{ color:bg }, line:{ color:"C5E0CE", width:0.5 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:y+0.1, w:0.07, h:0.5, fill:{ color:C.teal } });
slide.addText(c.name, { x:0.4, y:y+0.04, w:1.8, h:0.28, fontSize:11.5, bold:true, color:C.teal, fontFace:"Calibri", valign:"middle" });
slide.addText(c.detail, { x:0.4, y:y+0.32, w:4.2, h:0.34, fontSize:10.5, color:C.darkGray, fontFace:"Calibri", valign:"middle" });
});
insuffComps.forEach((c, i) => {
const y = 1.44 + i*0.72;
const bg = i%2===0 ? "FFFFFF" : C.lightGold;
slide.addShape(pres.ShapeType.rect, { x:5.2, y, w:4.55, h:0.68, fill:{ color:bg }, line:{ color:"E0C88A", width:0.5 } });
slide.addShape(pres.ShapeType.rect, { x:5.2, y:y+0.1, w:0.07, h:0.5, fill:{ color:C.orange } });
slide.addText(c.name, { x:5.35, y:y+0.04, w:2.2, h:0.28, fontSize:11.5, bold:true, color:C.orange, fontFace:"Calibri", valign:"middle" });
slide.addText(c.detail, { x:5.35, y:y+0.32, w:4.2, h:0.34, fontSize:10.5, color:C.darkGray, fontFace:"Calibri", valign:"middle" });
});
});
// =====================================================
// SLIDE 18 — ASCITES
// =====================================================
contentSlide("Ascites — Pathophysiology, Grading & Management", slide => {
// Pathophysiology
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.95, fill:{ color:C.light }, line:{ color:C.green, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.36, fill:{ color:C.forest } });
slide.addText("Pathophysiology", { x:0.25, y:0.9, w:9.5, h:0.36, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText("Sinusoidal HTN (HVPG > 12 mmHg) → splanchnic vasodilation (↑ NO) → ↓ effective arterial volume → RAAS + SNS activation → Na⁺/H₂O retention → ascites formation. SAAG (serum-ascites albumin gradient): ≥ 1.1 g/dL = portal HTN cause (97.5% accuracy)", { x:0.4, y:1.3, w:9.2, h:0.5, fontSize:12.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
// Grading + Treatment
const grades = [
{ g:"Grade 1", t:"Mild — only detectable by USS", tx:"Dietary Na restriction (88 mmol/day = 2 g/day)" },
{ g:"Grade 2", t:"Moderate — moderate symmetrical distension", tx:"Spironolactone 100–400 mg/day ± furosemide 40–160 mg/day" },
{ g:"Grade 3", t:"Large — marked distension (tense)", tx:"Large-volume paracentesis (LVP) + IV albumin 8 g/L drained" },
{ g:"Refractory", t:"No response to diuretics / side-effects prevent use", tx:"TIPS (transjugular intrahepatic portosystemic shunt)\nor repeated LVP + transplant listing" },
];
grades.forEach((g, i) => {
const y = 2.0 + i*0.77;
const colors = ["2E8B57", C.greenMid, C.orange, C.red];
const bg = i%2===0 ? "FFFFFF" : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:9.5, h:0.72, fill:{ color:bg }, line:{ color:"D5E5DA", width:0.5 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:1.1, h:0.72, fill:{ color:colors[i] } });
slide.addText(g.g, { x:0.25, y, w:1.1, h:0.72, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(g.t, { x:1.42, y:y+0.06, w:3.2, h:0.6, fontSize:12, color:C.textDark, fontFace:"Calibri", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:4.65, y:y+0.12, w:0.08, h:0.5, fill:{ color:colors[i] } });
slide.addText(`Treatment: ${g.tx}`, { x:4.82, y:y+0.06, w:4.85, h:0.6, fontSize:11.5, color:C.forest, fontFace:"Calibri", valign:"middle", bold:false });
});
slide.addText("SBP prophylaxis: norfloxacin 400 mg/day (ascitic protein < 15 g/L + MELD ≥ 14). On admission with variceal bleed: ceftriaxone 1g/day for 7 days", { x:0.25, y:5.15, w:9.5, h:0.28, fontSize:9.5, color:C.midGray, fontFace:"Calibri", italic:true });
});
// =====================================================
// SLIDE 19 — VARICEAL HAEMORRHAGE
// =====================================================
contentSlide("Oesophageal Varices & Variceal Haemorrhage", slide => {
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:2.8, fill:{ color:C.light }, line:{ color:C.teal, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:0.38, fill:{ color:C.teal } });
slide.addText("Surveillance & Primary Prophylaxis", { x:0.25, y:0.9, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bullet("All cirrhotic patients → OGD at diagnosis"),
bullet("No varices: repeat OGD in 2–3 years"),
bullet("Small varices: repeat OGD in 1–2 years"),
bullet("Medium/Large varices:"),
subBullet("Non-selective β-blocker (propranolol / nadolol / carvedilol) — 1st line"),
subBullet("OR Endoscopic variceal ligation (EVL)"),
bullet("Target: reduce HVPG < 12 mmHg\nor by > 20% from baseline"),
], { x:0.4, y:1.34, w:4.35, h:2.3, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:2.8, fill:{ color:"FFF0F0" }, line:{ color:C.red, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.38, fill:{ color:C.red } });
slide.addText("Acute Variceal Haemorrhage — Management", { x:5.15, y:0.9, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bullet("ABC: airway protection (consider intubation)"),
bullet("IV access × 2 + resuscitate (target Hb 7–8 g/dL)"),
bullet("Vasoactive drugs: terlipressin (1st line)\n OR somatostatin / octreotide for 2–5 days"),
bullet("Antibiotics: IV ceftriaxone 1 g/day (7 days)"),
bullet("Urgent OGD (< 12h) → EVL (banding)"),
bullet("If refractory: Sengstaken-Blakemore tube\n as bridge to TIPS"),
bullet("Secondary prophylaxis: EVL + β-blocker"),
], { x:5.3, y:1.34, w:4.35, h:2.3, valign:"top" });
// 6-week mortality
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.85, w:9.5, h:1.32, fill:{ color:C.forest } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.85, w:9.5, h:0.35, fill:{ color:C.green } });
slide.addText("Prognosis of Variceal Haemorrhage", { x:0.25, y:3.85, w:9.5, h:0.35, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const stats = [
{ v:"30–40%", l:"5-yr risk of\nfirst bleed" },
{ v:"~20%", l:"6-wk mortality\n(modern care)" },
{ v:"60–70%", l:"Rebleed risk\nwithin 1 yr (untreated)" },
{ v:"MELD ≥20", l:"High mortality risk\nwith acute bleed" },
{ v:"TIPS", l:"< 72h if Child C\nor MELD 19–24" },
];
stats.forEach((s, i) => {
const x = 0.55 + i*1.88;
slide.addText(s.v, { x, y:4.23, w:1.7, h:0.42, fontSize:19, bold:true, color:C.accentSoft, fontFace:"Calibri", align:"center" });
slide.addText(s.l, { x, y:4.65, w:1.7, h:0.48, fontSize:9, color:C.white, fontFace:"Calibri", align:"center" });
});
});
// =====================================================
// SLIDE 20 — HEPATIC ENCEPHALOPATHY
// =====================================================
contentSlide("Hepatic Encephalopathy (HE)", slide => {
// Pathophysiology top
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.82, fill:{ color:C.light }, line:{ color:C.forest, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.36, fill:{ color:C.forest } });
slide.addText("Pathophysiology", { x:0.25, y:0.9, w:9.5, h:0.36, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText("Ammonia (from gut urease, glutaminase) → portosystemic shunting → bypasses liver → astrocyte swelling (Alzheimer type II) → upregulation of peripheral benzodiazepine receptors → ↑ neurosteroid production → ↑ GABA-ergic tone → cortical depression. Manganese → basal ganglia dysfunction.", { x:0.4, y:1.3, w:9.2, h:0.38, fontSize:12.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
// West Haven Grade table
const heGrades = [
{ g:"Grade 0\n(Minimal HE)", features:"No detectable change; subtle psychomotor deficits only on testing (PHES, ICT)", eeg:"Normal" },
{ g:"Grade I", features:"Shortened attention span; sleep disturbance; mild confusion; euphoria or depression; tremor", eeg:"Triphasic waves possible" },
{ g:"Grade II", features:"Lethargy; obvious personality change; asterixis (hepatic flap); disorientation to time", eeg:"Triphasic waves" },
{ g:"Grade III", features:"Somnolent but rousable; gross disorientation; bizarre behaviour; asterixis present", eeg:"Markedly abnormal" },
{ g:"Grade IV", features:"Coma (IV-A: responds to pain; IV-B: no response). No asterixis possible if in coma", eeg:"Delta waves" },
];
const hdrs = ["West Haven Grade", "Clinical Features", "EEG Changes"];
const xP = [0.25, 2.02, 7.08]; const wP = [1.73, 5.02, 2.65];
const yS2 = 2.0;
hdrs.forEach((h, i) => {
slide.addShape(pres.ShapeType.rect, { x:xP[i], y:yS2-0.34, w:wP[i], h:0.34, fill:{ color:C.forest } });
slide.addText(h, { x:xP[i], y:yS2-0.34, w:wP[i], h:0.34, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
const gradeColors = ["2E8B57", "6AAB3C", C.orange, C.red, "8B0000"];
heGrades.forEach((r, i) => {
const y = yS2 + i*0.6;
const bg = i%2===0 ? "FFFFFF" : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:9.48, h:0.56, fill:{ color:bg }, line:{ color:"D5E5DA", width:0.4 } });
slide.addText(r.g, { x:0.25, y, w:1.73, h:0.56, fontSize:11.5, bold:true, color:gradeColors[i], fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(r.features, { x:2.08, y, w:4.9, h:0.56, fontSize:10.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
slide.addText(r.eeg, { x:7.08, y, w:2.65, h:0.56, fontSize:11, color:C.darkGray, fontFace:"Calibri", align:"center", valign:"middle" });
});
// Treatment
slide.addShape(pres.ShapeType.rect, { x:0.25, y:5.1, w:9.5, h:0.32, fill:{ color:"F0F9F4" }, line:{ color:C.green, width:0.6 } });
slide.addText("Treatment: Identify & remove precipitants (infection, GI bleed, constipation, dehydration, sedatives) • Lactulose (1st line) — titrate to 2–3 soft stools/day • Rifaximin 550 mg BD (add-on/prevention) • IV albumin for hyponatraemia • Avoid sedatives (BZDs)", { x:0.35, y:5.1, w:9.3, h:0.32, fontSize:9.5, color:C.forest, fontFace:"Calibri", valign:"middle" });
});
// =====================================================
// SLIDE 21 — SBP & HRS
// =====================================================
contentSlide("Spontaneous Bacterial Peritonitis & Hepatorenal Syndrome", slide => {
// SBP
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:3.65, fill:{ color:C.light }, line:{ color:C.teal, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:0.4, fill:{ color:C.teal } });
slide.addText("Spontaneous Bacterial Peritonitis (SBP)", { x:0.25, y:0.9, w:4.55, h:0.4, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bullet("Definition: ascitic PMN > 250 cells/mm³\n (regardless of culture result)", { fontSize:12 }),
bullet("Mechanism: bacterial translocation → gut → mesenteric LN → ascites", { fontSize:12 }),
bullet("Organisms: E.coli, Klebsiella, Streptococci\n (gram-negative 70%)", { fontSize:12 }),
bullet("Symptoms: fever, abdominal pain/tenderness,\n worsening HE, renal impairment", { fontSize:12 }),
bullet("Diagnosis: diagnostic paracentesis (PMN count,\n culture in blood culture bottles)", { fontSize:12 }),
bullet("Treatment:", { fontSize:12, bold:true }),
subBullet("IV cefotaxime 2g TDS × 5 days (1st line)", { fontSize:11.5 }),
subBullet("IV albumin 1.5 g/kg at diagnosis + 1 g/kg day 3\n (prevents HRS — reduces mortality ~33%)", { fontSize:11.5 }),
bullet("Prophylaxis: norfloxacin 400 mg/day if\n ascitic protein < 15 g/L or previous SBP", { fontSize:12 }),
], { x:0.4, y:1.36, w:4.3, h:3.1, valign:"top" });
// HRS
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.55, h:3.65, fill:{ color:"FFF0F0" }, line:{ color:C.red, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.55, h:0.4, fill:{ color:C.red } });
slide.addText("Hepatorenal Syndrome (HRS)", { x:5.15, y:0.9, w:4.55, h:0.4, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bullet("Mechanism: renal vasoconstriction due to ↑ vasoconstrictor (ADH, RAAS, SNS) relative to vasodilators; no structural renal damage", { fontSize:12 }),
bullet("HRS-AKI (Type 1): Creatinine > 2× baseline\n in < 2 weeks; very poor prognosis (median\n survival days–weeks without treatment)", { fontSize:12, bold:true }),
bullet("HRS-CKD (Type 2): Slower, steady renal\n decline; median survival ~6 months", { fontSize:12 }),
bullet("Diagnosis: exclude pre-renal AKI (no response\n to 2 days albumin 1 g/kg/day max 100 g),\n exclude nephrotoxins, structural disease", { fontSize:12 }),
bullet("Treatment:", { fontSize:12, bold:true }),
subBullet("Terlipressin + albumin (1st line)\n → reversal in 40–50%", { fontSize:11.5 }),
subBullet("Noradrenaline + albumin (ICU alternative)", { fontSize:11.5 }),
subBullet("Liver transplant = definitive cure", { fontSize:11.5 }),
], { x:5.3, y:1.36, w:4.3, h:3.1, valign:"top" });
slide.addText("Both SBP and HRS are indications for urgent transplant evaluation — Goldman-Cecil Medicine, Chapter 139", { x:0.25, y:5.2, w:9.5, h:0.22, fontSize:9, color:C.midGray, fontFace:"Calibri", italic:true });
});
// =====================================================
// SLIDE 22 — HCC
// =====================================================
contentSlide("Hepatocellular Carcinoma (HCC)", slide => {
// Epidemiology
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.72, fill:{ color:C.forest } });
slide.addText([
{ text:"Annual HCC risk in cirrhosis: ~5–7% | ", options:{ bold:true, fontSize:14, color:C.accentSoft, fontFace:"Calibri" } },
{ text:"6th most common cancer worldwide | ", options:{ bold:true, fontSize:14, color:C.greenLight, fontFace:"Calibri" } },
{ text:"HBV risk: HCC can occur WITHOUT cirrhosis", options:{ bold:true, fontSize:14, color:C.orange, fontFace:"Calibri" } },
], { x:0.3, y:0.9, w:9.3, h:0.72, valign:"middle" });
// Risk + Screening + Diagnosis + Treatment
const cols4 = [
{ title:"Risk Factors", color:C.red, items:["Cirrhosis (any aetiology)", "HBV (with or without cirrhosis)", "HCV + cirrhosis", "Alcohol", "NAFLD/NASH cirrhosis", "Haemochromatosis", "Primary biliary cirrhosis", "Male sex, age > 50"] },
{ title:"Surveillance", color:C.orange, items:["USS liver + AFP every 6 months\n(all cirrhotic patients)", "Recall if AFP rising or\nnodule > 1 cm on USS", "CT/MRI for characterisation\n(LI-RADS classification)", "Biopsy if imaging inconclusive"] },
{ title:"Staging — BCLC", color:C.teal, items:["Stage 0 (Very Early):\n ≤2 cm → resection/ablation", "Stage A (Early):\n ≤3 nodules ≤3 cm → curative Rx", "Stage B (Intermediate):\n Multinodular → TACE", "Stage C (Advanced):\n Vascular invasion → Sorafenib/Lenvatinib", "Stage D (Terminal):\n Child C → BSC only"] },
{ title:"Treatment Options", color:C.forest, items:["Curative:", " • Surgical resection\n • Liver transplantation (Milan criteria)", " • Ablation (RFA, microwave)", "Palliative:", " • TACE (transarterial\n chemoembolisation)", " • SIRT / Y-90 radioembolisation", "Systemic:", " • Sorafenib / Lenvatinib\n • Atezolizumab + bevacizumab\n (new 1st line)"] },
];
const xs = [0.22, 2.65, 5.1, 7.55];
const w = 2.3;
cols4.forEach((c, i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y:1.72, w, h:3.48, fill:{ color:C.lightGray }, line:{ color:"D5E5DA", width:0.6 } });
slide.addShape(pres.ShapeType.rect, { x, y:1.72, w, h:0.4, fill:{ color:c.color } });
slide.addText(c.title, { x, y:1.72, w, h:0.4, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = c.items.map((t, j) => ({ text:`• ${t}`, options:{ breakLine:j<c.items.length-1, fontSize:11, color:C.textDark, fontFace:"Calibri", spaceBefore:2.5 } }));
slide.addText(bullArr, { x:x+0.1, y:2.18, w:w-0.18, h:2.95, valign:"top" });
});
});
// =====================================================
// SLIDE 23 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); sectionDivider(s, "07 Management", "General principles · Specific disease therapy · Liver transplantation"); }
// =====================================================
// SLIDE 24 — GENERAL MANAGEMENT
// =====================================================
contentSlide("General Management of Chronic Liver Disease", slide => {
const pillars = [
{ title:"Alcohol Cessation", color:C.red, items:["Complete abstinence in all alcoholic liver disease", "Prednisolone for severe alcoholic hepatitis (Maddrey > 32)", "Pentoxifylline alternative if steroid contraindicated", "Transplant listing (6-month abstinence rule debate)"] },
{ title:"Antiviral Therapy", color:C.teal, items:["HBV: tenofovir / entecavir → suppress viral load", "HCV: DAA regimens (sofosbuvir-based) → > 95% SVR → fibrosis regression possible", "HCV cure can improve Child-Pugh class; may delist for transplant"] },
{ title:"Metabolic / NAFLD", color:C.orange, items:["Weight loss 7–10% → histological improvement", "Mediterranean diet; exercise", "GLP-1 agonists (semaglutide) in trials", "Resmetirom (THRβ agonist) — first FDA-approved for MASH 2024"] },
{ title:"Autoimmune / Cholestatic", color:C.burgundy, items:["AIH: prednisolone + azathioprine (remission in 65–80%)", "PBC: ursodeoxycholic acid (UDCA) 13–15 mg/kg/day; OCA second line", "PSC: no proven medical therapy; endoscopic stricture dilation; transplant"] },
];
const xs = [0.22, 2.65, 5.1, 7.55];
const w = 2.3;
pillars.forEach((p, i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y:0.88, w, h:2.65, fill:{ color:C.lightGray }, line:{ color:"D5E5DA", width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y:0.88, w, h:0.44, fill:{ color:p.color } });
slide.addText(p.title, { x, y:0.88, w, h:0.44, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = p.items.map((t, j) => ({ text:`• ${t}`, options:{ breakLine:j<p.items.length-1, fontSize:11.5, color:C.textDark, fontFace:"Calibri", spaceBefore:2.5 } }));
slide.addText(bullArr, { x:x+0.1, y:1.38, w:w-0.18, h:2.1, valign:"top" });
});
// General measures
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.65, w:9.5, h:1.55, fill:{ color:C.light }, line:{ color:C.green, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.65, w:9.5, h:0.36, fill:{ color:C.green } });
slide.addText("General Measures for All Patients", { x:0.25, y:3.65, w:9.5, h:0.36, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const genMeasures = [
"Vaccinate: HAV, HBV, influenza, pneumococcus, COVID-19",
"Avoid NSAIDs, nephrotoxins, herbal remedies",
"Protein intake: 1.2–1.5 g/kg/day (do NOT restrict protein — old myth)",
"Branched-chain amino acids (BCAA) if encephalopathic",
"Zinc supplementation (common deficiency in cirrhosis)",
"Upper endoscopy for variceal surveillance",
"USS + AFP every 6 months (HCC surveillance)",
"Avoid alcohol & sedatives",
];
const halfn = 4;
const leftArr = genMeasures.slice(0,halfn).map((t,j) => ({ text:`• ${t}`, options:{ breakLine:j<halfn-1, fontSize:11, color:C.textDark, fontFace:"Calibri" } }));
const rightArr = genMeasures.slice(halfn).map((t,j) => ({ text:`• ${t}`, options:{ breakLine:j<halfn-1, fontSize:11, color:C.textDark, fontFace:"Calibri" } }));
slide.addText(leftArr, { x:0.4, y:4.07, w:4.65, h:1.05, valign:"top" });
slide.addText(rightArr, { x:5.15, y:4.07, w:4.5, h:1.05, valign:"top" });
});
// =====================================================
// SLIDE 25 — LIVER TRANSPLANTATION
// =====================================================
contentSlide("Liver Transplantation", slide => {
// Indications
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:3.25, fill:{ color:C.light }, line:{ color:C.forest, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:0.42, fill:{ color:C.forest } });
slide.addText("Indications for Transplant Listing", { x:0.25, y:0.9, w:4.6, h:0.42, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bullet("MELD ≥ 15 (benefits > risks of waiting)"),
bullet("Child-Pugh class B (score 7–9) with prior\n decompensation event"),
bullet("Any decompensation episode:\n ascites (especially refractory), SBP, HRS,\n recurrent HE, variceal haemorrhage"),
bullet("Hepatocellular carcinoma:\n Milan criteria: 1 nodule ≤ 5 cm OR\n ≤ 3 nodules each ≤ 3 cm (no vascular invasion)"),
bullet("Acute liver failure (King's College Criteria)"),
bullet("HCC outside Milan → downstage with TACE,\n then reassess for listing"),
bullet("Pre-emptive transplant: CKD+liver (SLKT)"),
], { x:0.4, y:1.38, w:4.35, h:2.7, valign:"top" });
// Contraindications + Post-tx
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:1.55, fill:{ color:"FFF0F0" }, line:{ color:C.red, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.38, fill:{ color:C.red } });
slide.addText("Absolute Contraindications", { x:5.15, y:0.9, w:4.6, h:0.38, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bullet("Active alcohol/drug use (usually 6-month abstinence)", { fontSize:11.5 }),
bullet("Extrahepatic malignancy (within 2–5 years)", { fontSize:11.5 }),
bullet("Severe cardiopulmonary disease (mPAP > 50 mmHg)", { fontSize:11.5 }),
bullet("Active sepsis, uncontrolled HIV", { fontSize:11.5 }),
], { x:5.3, y:1.34, w:4.35, h:1.05, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:2.57, w:4.6, h:1.6, fill:{ color:C.lightGold }, line:{ color:C.accent, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:2.57, w:4.6, h:0.38, fill:{ color:C.accent } });
slide.addText("Post-Transplant", { x:5.15, y:2.57, w:4.6, h:0.38, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bullet("Life-long immunosuppression:\n tacrolimus ± mycophenolate ± prednisolone", { fontSize:11.5 }),
bullet("1-yr survival: ~85–90% 5-yr: ~70–75%", { fontSize:11.5 }),
bullet("Monitor for rejection, infections,\n malignancy (PTLD, skin cancers)", { fontSize:11.5 }),
bullet("HCV: treat with DAA post-transplant", { fontSize:11.5 }),
], { x:5.3, y:3.01, w:4.35, h:1.1, valign:"top" });
// King's criteria
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.28, w:9.5, h:0.92, fill:{ color:C.forest } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.28, w:9.5, h:0.35, fill:{ color:C.green } });
slide.addText("King's College Criteria — Acute Liver Failure", { x:0.25, y:4.28, w:9.5, h:0.35, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText("Paracetamol: pH < 7.3 after resuscitation OR PT > 100s + Cr > 300 µmol/L + Grade III/IV HE | Non-paracetamol: PT > 100s OR 3 of 5: age < 10 or > 40; aetiology (non-A/B/drug/Wilson); jaundice–encephalopathy interval > 7d; PT > 50s; bilirubin > 300 µmol/L", { x:0.4, y:4.65, w:9.2, h:0.52, fontSize:10.5, color:C.white, fontFace:"Calibri", valign:"middle" });
});
// =====================================================
// SLIDE 26 — SUMMARY
// =====================================================
contentSlide("Summary — Key Takeaways", slide => {
const points = [
{ n:"1", h:"Definition", t:"Cirrhosis = end-stage CLD; nodular regeneration + fibrosis + portal HTN. Compensated vs decompensated (median survival > 12 yr vs ~1.6 yr)" },
{ n:"2", h:"Causes", t:"Alcohol, NAFLD/NASH, HCV, HBV are responsible for > 80% of cases — most are preventable. New term: MASLD/MASH for metabolic-associated" },
{ n:"3", h:"Pathophysiology", t:"TGF-β1 → HSC → collagen deposition. Portal HTN → HVPG thresholds (12 mmHg = varices/ascites). Hyperdynamic circulation drives all complications" },
{ n:"4", h:"Scoring", t:"Child-Pugh (A/B/C): surgical risk. MELD (6–40): transplant allocation, 90-day mortality prediction. MELD-Na adds serum sodium" },
{ n:"5", h:"Complications", t:"Varices (β-blockers/EVL), ascites (diuretics/LVP), SBP (cefotaxime+albumin), HE (lactulose+rifaximin), HRS (terlipressin+albumin), HCC (USS q6m)" },
{ n:"6", h:"Treatment", t:"Treat underlying cause (abstinence, antivirals, immunosuppression, weight loss). General: vaccines, nutrition, avoid NSAIDs, HCC surveillance" },
{ n:"7", h:"Transplantation", t:"Listing when MELD ≥ 15 or any decompensation. Milan criteria for HCC. Life-long immunosuppression. 1-yr survival ~85–90%" },
];
points.forEach((p, i) => {
const col = i<4 ? 0 : 1;
const row = i<4 ? i : i-4;
const x = col===0 ? 0.22 : 5.12;
const y = 0.9 + row*1.1;
slide.addShape(pres.ShapeType.rect, { x, y, w:0.45, h:0.9, fill:{ color:C.forest } });
slide.addText(p.n, { x, y, w:0.45, h:0.9, fontSize:18, bold:true, color:C.accent, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:x+0.47, y, w:4.42, h:0.9, fill:{ color:C.lightGray }, line:{ color:"D5E5DA", width:0.4 } });
slide.addText(p.h, { x:x+0.56, y, w:1.15, h:0.9, fontSize:12, bold:true, color:C.green, fontFace:"Calibri", valign:"middle" });
slide.addText(p.t, { x:x+1.76, y, w:3.14, h:0.9, fontSize:10.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
});
});
// =====================================================
// SLIDE 27 — THANK YOU / REFERENCES
// =====================================================
{
const slide = pres.addSlide();
addBgRect(slide, C.forest);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.15, h:5.625, fill:{ color:C.accent } });
slide.addShape(pres.ShapeType.rect, { x:9.85, y:0, w:0.15, h:5.625, fill:{ color:C.greenLight } });
slide.addShape(pres.ShapeType.rect, { x:0.15, y:3.6, w:9.7, h:2.025, fill:{ color:C.green } });
slide.addText("Thank You", { x:0.3, y:0.55, w:9.4, h:0.9, fontSize:44, bold:true, color:C.white, fontFace:"Calibri", align:"center" });
slide.addShape(pres.ShapeType.rect, { x:2.5, y:1.58, w:5.0, h:0.07, fill:{ color:C.accent } });
slide.addText("Questions & Discussion", { x:0.3, y:1.72, w:9.4, h:0.5, fontSize:18, italic:true, color:C.accentSoft, fontFace:"Calibri", align:"center" });
slide.addText([
{ text:"Key References\n", options:{ bold:true, fontSize:13, color:C.accent, fontFace:"Calibri", breakLine:true } },
{ text:"1. Harrison's Principles of Internal Medicine, 22nd Ed (2025). Chapters 347 & 355: Cirrhosis and its Complications.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"2. Goldman-Cecil Medicine, 2-Volume Set. Chapter 139: Portal Hypertension and the Hyperdynamic Circulatory State.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"3. Sleisenger & Fordtran's Gastrointestinal and Liver Disease, 11th Ed. Section VII: Liver Disease.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"4. European Association for the Study of the Liver (EASL). Clinical Practice Guidelines: Decompensated Cirrhosis. J Hepatol 2018;69:406–460.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"5. BAVENO VII consensus: De Franchis R et al. J Hepatol 2022;76:959–974. | 6. EASL-EORTC HCC Guidelines 2022. J Hepatol 2022;77:1526–1594.", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri" } },
], { x:0.3, y:2.35, w:9.4, h:1.15, valign:"top" });
slide.addText("Chronic Liver Disease | Medical Education Presentation | May 2026", { x:0.3, y:3.65, w:9.4, h:0.42, fontSize:11, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
}
// =====================================================
// SAVE
// =====================================================
pres.writeFile({ fileName:"/home/daytona/workspace/cld-ppt/CLD_Medical_Students.pptx" })
.then(() => console.log("✅ Saved: CLD_Medical_Students.pptx"))
.catch(e => { console.error("Error:", e); process.exit(1); });
mkdir -p /home/daytona/workspace/cld-ppt && cd /home/daytona/workspace/cld-ppt &…
ls -lh /home/daytona/workspace/cld-ppt/CLD_Medical_Students.pptx
CLD Medical Students
Presentation · PPTX
| # | Slide(s) | Content |
|---|---|---|
| 1 | Title | Title slide with textbook sources |
| 2 | Learning Objectives | 7 core outcomes |
| 3–4 | Definition & Epidemiology | KDIGO definition, compensated vs decompensated (median survival data), 5 global burden stats |
| 5–6 | Etiology | Top 6 causes with prevalence percentages and distinguishing features (ALD, NAFLD, HCV, HBV, PBC/PSC/AIH, hereditary) |
| 7–9 | Pathophysiology | Fibrosis cascade (TGF-β → HSC → collagen); portal hypertension HVPG thresholds (5/10/12/20 mmHg); hyperdynamic circulation |
| 10–12 | Clinical Features & Investigations | Symptoms, hepatic signs, peripheral signs, decompensated features; LFTs, haematology, serology, imaging/biopsy |
| 13–15 | Scoring — Child-Pugh & MELD | Full 5-parameter Child-Pugh table (A/B/C with survival data); MELD formula + 3-month mortality table; MELD-Na |
| 16–22 | Complications | Overview diagram (portal HTN vs liver insufficiency); ascites (4 grades + treatment ladder); variceal haemorrhage (prophylaxis + acute management); HE (West Haven Grade 0–IV table + pathophysiology); SBP vs HRS (side-by-side); HCC (risk/surveillance/BCLC staging/treatment) |
| 23–25 | Management | Disease-specific (alcohol/antivirals/NAFLD/AIH/PBC/PSC); general measures; liver transplantation (Milan criteria, King's criteria, contraindications, outcomes) |
| 26 | Summary | 7-point key takeaways |
| 27 | References | Harrison's 22E, Goldman-Cecil, Sleisenger & Fordtran, EASL Guidelines, BAVENO VII |
detailed ppt on CLD for medical students
CLD Medical Students
Presentation · PPTX
| Section | Slides | Topics |
|---|---|---|
| Definition & Epidemiology | 2 | KDIGO definition, compensated vs decompensated, global burden stats |
| Etiology | 1 | Top 6 causes (ALD, NAFLD, HCV, HBV, PBC/AIH, hereditary) with prevalence % |
| Pathophysiology | 3 | Fibrosis cascade (TGF-β → HSC), portal HTN (HVPG thresholds), hyperdynamic circulation |
| Clinical Features & Investigations | 2 | Symptoms, hepatic + peripheral signs, LFTs, serology, imaging |
| Severity Scoring | 2 | Full Child-Pugh table (A/B/C + survival), MELD formula + mortality table, MELD-Na |
| Complications | 6 | Varices, ascites (grading + treatment ladder), SBP, HRS, HE (West Haven 0–IV), HCC (BCLC staging) |
| Management | 2 | Disease-specific therapy + general measures |
| Transplantation | 1 | Milan criteria, King's criteria, contraindications, post-transplant outcomes |
| Summary + References | 2 | 7 key takeaways, Harrison's 22E / Goldman-Cecil / EASL Guidelines |
Detailed ppt on valvular heart disease for medical students
mkdir -p /home/daytona/workspace/vhd-ppt && ls /home/daytona/workspace/vhd-ppt/
~/vhd-ppt/vhd.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Valvular Heart Disease";
pres.author = "Medical Education";
// =====================================================
// COLOR PALETTE — Deep crimson / maroon / gold
// =====================================================
const C = {
maroon: "5C0A2E", // dominant dark
crimson: "8B1A3A", // supporting mid
rose: "B22B52", // accent mid
gold: "C8960C", // warm gold accent
goldLight: "E8B830",
white: "FFFFFF",
light: "FDF2F5", // very pale rose bg
lightGold: "FFF8E8",
lightGray: "F5F5F5",
midGray: "8C9BAD",
darkGray: "3A3A4A",
blue: "1A5C8A",
teal: "1A7B72",
green: "2A7A45",
orange: "CC5500",
textDark: "2A1020",
};
// =====================================================
// HELPERS
// =====================================================
function addBg(slide, color) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color } });
}
function sectionDiv(slide, title, subtitle) {
addBg(slide, C.maroon);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.14, h:5.625, fill:{ color:C.gold } });
slide.addShape(pres.ShapeType.rect, { x:0.3, y:2.88, w:9.4, h:0.05, fill:{ color:C.goldLight } });
slide.addText(title, { x:0.3, y:1.5, w:9.4, h:1.15, fontSize:36, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" });
if (subtitle) slide.addText(subtitle, { x:0.3, y:2.98, w:9.4, h:0.75, fontSize:17, color:C.goldLight, fontFace:"Calibri", align:"left", italic:true });
}
function cSlide(title, fn) {
const slide = pres.addSlide();
addBg(slide, C.white);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.72, fill:{ color:C.maroon } });
slide.addShape(pres.ShapeType.rect, { x:0, y:0.72, w:10, h:0.07, fill:{ color:C.gold } });
slide.addText(title, { x:0.3, y:0, w:9.4, h:0.72, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", valign:"middle" });
fn(slide);
slide.addShape(pres.ShapeType.rect, { x:0, y:5.45, w:10, h:0.175, fill:{ color:C.light } });
slide.addText("Valvular Heart Disease | Medical Education", { x:0.3, y:5.45, w:9.4, h:0.175, fontSize:7.5, color:C.midGray, fontFace:"Calibri", valign:"middle" });
return slide;
}
function bul(text, opts={}) {
return { text, options:{ bullet:{ code:"2022" }, breakLine:true, fontSize:opts.fs||13.5, color:opts.color||C.textDark, bold:opts.bold||false, indentLevel:opts.ind||0, fontFace:"Calibri", spaceBefore:opts.sb||2 } };
}
function sub(text, opts={}) { return bul(text, { ind:1, fs:12, color:C.crimson, ...opts }); }
function colBox(slide, x, y, w, h, hdrText, hdrColor, bodyFn) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill:{ color:C.lightGray }, line:{ color:"E0D0D8", width:0.6 } });
slide.addShape(pres.ShapeType.rect, { x, y, w, h:0.4, fill:{ color:hdrColor||C.crimson } });
slide.addText(hdrText, { x, y, w, h:0.4, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
bodyFn(x, y+0.42, w, h-0.44);
}
// =====================================================
// SLIDE 1 — TITLE
// =====================================================
{
const slide = pres.addSlide();
addBg(slide, C.maroon);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:5.625, fill:{ color:C.gold } });
slide.addShape(pres.ShapeType.rect, { x:9.82, y:0, w:0.18, h:5.625, fill:{ color:C.rose } });
slide.addShape(pres.ShapeType.rect, { x:0.18, y:4.58, w:9.64, h:1.045, fill:{ color:C.crimson } });
slide.addText("VALVULAR HEART DISEASE", { x:0.4, y:0.75, w:9.2, h:1.25, fontSize:40, bold:true, color:C.white, fontFace:"Calibri", align:"center", charSpacing:2 });
slide.addShape(pres.ShapeType.rect, { x:2.2, y:2.1, w:5.6, h:0.07, fill:{ color:C.gold } });
slide.addText("A Comprehensive Guide for Medical Students", { x:0.4, y:2.25, w:9.2, h:0.65, fontSize:19, color:C.goldLight, fontFace:"Calibri", align:"center", italic:true });
slide.addText("Based on: Harrison's Principles of Internal Medicine 22E (2025)\nBraunwald's Heart Disease · Fuster & Hurst's The Heart 15th Ed · Goldman-Cecil Medicine", { x:0.4, y:3.1, w:9.2, h:0.72, fontSize:11, color:"F0D0DA", fontFace:"Calibri", align:"center" });
slide.addText("Aortic Stenosis · Aortic Regurgitation · Mitral Stenosis · Mitral Regurgitation · Tricuspid & Pulmonary · Prosthetic Valves", { x:0.4, y:4.63, w:9.2, h:0.56, fontSize:12.5, color:C.white, fontFace:"Calibri", align:"center" });
}
// =====================================================
// SLIDE 2 — LEARNING OBJECTIVES
// =====================================================
cSlide("Learning Objectives", slide => {
slide.addShape(pres.ShapeType.rect, { x:0.28, y:0.88, w:0.09, h:4.42, fill:{ color:C.gold } });
const items = [
"Review the anatomy of cardiac valves and understand haemodynamic consequences of stenosis vs. regurgitation",
"Describe the etiology, pathophysiology, and natural history of the four major valvular lesions (AS, AR, MS, MR)",
"Recognize characteristic clinical features: symptoms, signs, and auscultatory findings for each valve lesion",
"Interpret relevant investigations: ECG, CXR, echocardiography, and cardiac catheterization findings",
"Apply ACC/AHA valve staging (A–D) and identify indications for intervention in each lesion",
"Discuss surgical and transcatheter options: AVR, SAVR, TAVI/TAVR, mitral repair, PBMV, TEER",
"Recognize tricuspid and pulmonary valve disease, infective endocarditis, and prosthetic valve complications",
];
const arr = items.map((t,i) => ({ text:`${i+1}. ${t}`, options:{ breakLine:true, fontSize:13.8, color:C.textDark, fontFace:"Calibri", spaceBefore:5 } }));
arr[arr.length-1].options.breakLine = false;
slide.addText(arr, { x:0.5, y:0.95, w:9.15, h:4.35, valign:"top" });
});
// =====================================================
// SLIDE 3 — SECTION: OVERVIEW
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "01 Overview & Cardiac Valve Anatomy", "Structure · Function · Haemodynamic principles"); }
// =====================================================
// SLIDE 4 — ANATOMY & OVERVIEW
// =====================================================
cSlide("Cardiac Valve Anatomy & Haemodynamic Principles", slide => {
// Four valves
const valves = [
{ name:"Mitral Valve", loc:"Left AV valve", leaflets:"Anterior + posterior\nleaflets (2)", annulus:"Saddle-shaped fibrous annulus", chords:"Chordae tendineae → papillary muscles", color:C.crimson },
{ name:"Aortic Valve", loc:"LVOT → Aorta", leaflets:"3 semilunar cusps\n(L, R, non-coronary)", annulus:"Fibrous + muscular base", chords:"None (semilunar valve)", color:C.maroon },
{ name:"Tricuspid Valve", loc:"Right AV valve", leaflets:"Anterior, posterior,\nseptal leaflets (3)", annulus:"Largest valve annulus", chords:"3 papillary muscles", color:C.teal },
{ name:"Pulmonary Valve", loc:"RVOT → PA", leaflets:"3 semilunar cusps\n(anterior, L, R)", annulus:"Smallest valve", chords:"None (semilunar valve)", color:C.blue },
];
valves.forEach((v,i) => {
const x = 0.22 + i*2.42;
slide.addShape(pres.ShapeType.rect, { x, y:0.9, w:2.3, h:2.0, fill:{ color:C.lightGray }, line:{ color:"E0D0D8", width:0.6 } });
slide.addShape(pres.ShapeType.rect, { x, y:0.9, w:2.3, h:0.42, fill:{ color:v.color } });
slide.addText(v.name, { x, y:0.9, w:2.3, h:0.42, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"Location: ", options:{ bold:true, fontSize:11.5, color:v.color, fontFace:"Calibri" } },
{ text:v.loc+"\n", options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Leaflets: ", options:{ bold:true, fontSize:11.5, color:v.color, fontFace:"Calibri" } },
{ text:v.leaflets+"\n", options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Annulus: ", options:{ bold:true, fontSize:11.5, color:v.color, fontFace:"Calibri" } },
{ text:v.annulus+"\n", options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Support: ", options:{ bold:true, fontSize:11.5, color:v.color, fontFace:"Calibri" } },
{ text:v.chords, options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri" } },
], { x:x+0.1, y:1.36, w:2.1, h:1.48, valign:"top" });
});
// Haemodynamic principles
slide.addShape(pres.ShapeType.rect, { x:0.22, y:3.05, w:9.56, h:2.18, fill:{ color:C.light }, line:{ color:C.rose, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.22, y:3.05, w:9.56, h:0.38, fill:{ color:C.crimson } });
slide.addText("Haemodynamic Consequences", { x:0.22, y:3.05, w:9.56, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const hdPrinciples = [
{ t:"Stenosis", d:"Obstruction to forward flow → pressure overload proximal to valve → compensatory hypertrophy (concentric LVH in AS)" },
{ t:"Regurgitation", d:"Backflow of blood → volume overload proximal to valve → compensatory dilatation with eccentric hypertrophy (AR/MR → LV dilatation)" },
{ t:"Acute vs Chronic", d:"Acute (e.g., acute MR from papillary rupture): no time for compensation → sudden pulmonary oedema. Chronic: gradual adaptation maintains output for years" },
{ t:"Decompensation", d:"LV remodelling maintains EF initially (compensated). Eventually, ↓ contractility, ↑ LVEDP, pulmonary HTN → symptoms, LV dysfunction" },
];
hdPrinciples.forEach((p,i) => {
const x = 0.35 + i*2.38;
slide.addText(p.t, { x, y:3.48, w:2.25, h:0.28, fontSize:12, bold:true, color:C.gold, fontFace:"Calibri" });
slide.addText(p.d, { x, y:3.76, w:2.2, h:1.38, fontSize:11, color:C.textDark, fontFace:"Calibri", valign:"top" });
});
});
// =====================================================
// SLIDE 5 — ACC/AHA STAGING
// =====================================================
cSlide("ACC/AHA Valve Disease Staging (A–D)", slide => {
const stages = [
{ stage:"A", name:"At Risk", desc:"Risk factors for VHD present; normal valve structure and function (e.g., bicuspid aortic valve, known RHD)", color:"2E8B57", exam:"Normal examination; no symptoms" },
{ stage:"B", name:"Progressive", desc:"Mild–moderate VHD; abnormal valve hemodynamics but no symptoms. Asymptomatic severe disease without LV dysfunction", color:"6AAB3C", exam:"Murmur present; haemodynamic changes on echo" },
{ stage:"C", name:"Asymptomatic Severe", desc:"Severe VHD (by haemodynamic criteria) without symptoms. C1: normal LV function. C2: abnormal LV function (EF < 50% for AS)", color:C.orange, exam:"Severe haemodynamic findings on echo; no symptoms" },
{ stage:"D", name:"Symptomatic Severe", desc:"Severe VHD with symptoms attributable to the valve lesion (exertional dyspnoea, chest pain, syncope). Intervention usually indicated", color:C.crimson, exam:"Classic triad or other symptoms; valve area/gradient severe" },
];
const yStart = 0.96;
const rowH = 1.07;
const hdrs = ["Stage", "Category", "Definition", "Key Feature"];
const xP = [0.25, 0.95, 2.45, 6.55]; const wP = [0.68, 1.48, 4.07, 3.0];
hdrs.forEach((h,i) => {
slide.addShape(pres.ShapeType.rect, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fill:{ color:C.maroon } });
slide.addText(h, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
stages.forEach((s,i) => {
const y = yStart + i*rowH;
const bg = i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:9.5, h:rowH, fill:{ color:bg }, line:{ color:"E0D0D8", width:0.5 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y, w:0.68, h:rowH, fill:{ color:s.color } });
slide.addText(s.stage, { x:0.25, y, w:0.68, h:rowH, fontSize:26, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(s.name, { x:0.95, y, w:1.48, h:rowH, fontSize:12, bold:true, color:s.color, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(s.desc, { x:2.5, y:y+0.08, w:3.97, h:rowH-0.16, fontSize:11.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
slide.addText(s.exam, { x:6.6, y:y+0.08, w:2.9, h:rowH-0.16, fontSize:11.5, color:C.darkGray, fontFace:"Calibri", valign:"middle" });
});
slide.addText("Source: 2021 ACC/AHA Guideline for the Management of Patients with Valvular Heart Disease", { x:0.25, y:5.25, w:9.5, h:0.2, fontSize:9, color:C.midGray, fontFace:"Calibri", italic:true });
});
// =====================================================
// SLIDE 6 — SECTION: AORTIC STENOSIS
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "02 Aortic Stenosis (AS)", "Most common valve lesion requiring intervention in the developed world"); }
// =====================================================
// SLIDE 7 — AS: ETIOLOGY & PATHOPHYSIOLOGY
// =====================================================
cSlide("Aortic Stenosis — Etiology & Pathophysiology", slide => {
// Etiology boxes
const etio = [
{ t:"Degenerative\nCalcific AS", pct:"~75%", age:"> 65 years", detail:"Progressive fibro-calcific remodelling of leaflets. Risk factors: age, male sex, hyperlipidaemia, HTN, diabetes, smoking — same as atherosclerosis", color:C.crimson },
{ t:"Bicuspid Aortic\nValve (BAV)", pct:"~20%", age:"Presents 40–60 yrs", detail:"Most common congenital cardiac anomaly (1–2% population). Raphe formation → bicuspid morphology; accelerated calcification. Associated with aortic root dilatation, coarctation", color:C.maroon },
{ t:"Rheumatic\nFever AS", pct:"~5%", age:"Any age", detail:"Commissural fusion + cusp thickening/retraction. Almost always combined with MV disease. Declining incidence in developed countries", color:C.blue },
];
etio.forEach((e,i) => {
const x = 0.25 + i*3.2;
slide.addShape(pres.ShapeType.rect, { x, y:0.9, w:3.05, h:1.85, fill:{ color:C.light }, line:{ color:"E0D0D8", width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y:0.9, w:3.05, h:0.42, fill:{ color:e.color } });
slide.addText(`${e.t} (${e.pct})`, { x, y:0.9, w:3.05, h:0.42, fontSize:12, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:`Age: ${e.age}\n`, options:{ bold:true, fontSize:12, color:e.color, fontFace:"Calibri", breakLine:true } },
{ text:e.detail, options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri" } },
], { x:x+0.1, y:1.37, w:2.85, h:1.32, valign:"top" });
});
// Pathophysiology
slide.addShape(pres.ShapeType.rect, { x:0.25, y:2.9, w:9.5, h:2.28, fill:{ color:C.lightGray }, line:{ color:C.maroon, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:2.9, w:9.5, h:0.38, fill:{ color:C.maroon } });
slide.addText("Pathophysiology", { x:0.25, y:2.9, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const pathSteps = [
{ t:"LV Pressure\nOverload", d:"Valve area < 1 cm²\n→ ↑ transvalvular\ngradient" },
{ t:"Concentric\nLVH", d:"Compensatory ↑ LV\nwall thickness;\nnormal EF maintained" },
{ t:"Diastolic\nDysfunction", d:"Stiff hypertrophied\nLV → ↑ LVEDP →\npulm. congestion" },
{ t:"↓ Coronary\nReserve", d:"↑ O₂ demand +\ncompressed subendo\nvessels → angina" },
{ t:"Decompensation\n→ Symptoms", d:"AS triad: Angina,\nSyncope, Dyspnoea\n→ 2–5 yr survival" },
];
pathSteps.forEach((p,i) => {
const x = 0.4 + i*1.88;
slide.addShape(pres.ShapeType.rect, { x, y:3.34, w:1.72, h:0.5, fill:{ color:C.crimson } });
slide.addText(p.t, { x, y:3.34, w:1.72, h:0.5, fontSize:10.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(p.d, { x, y:3.88, w:1.72, h:1.22, fontSize:10.5, color:C.textDark, fontFace:"Calibri", align:"center", valign:"top" });
if(i<4) slide.addText("→", { x:x+1.72, y:3.5, w:0.16, h:0.3, fontSize:14, bold:true, color:C.gold, fontFace:"Calibri", align:"center" });
});
});
// =====================================================
// SLIDE 8 — AS: CLINICAL FEATURES & ECHO CRITERIA
// =====================================================
cSlide("Aortic Stenosis — Clinical Features & Echo Criteria", slide => {
// Clinical features - 2 cols
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:3.05, fill:{ color:C.light }, line:{ color:C.crimson, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:0.4, fill:{ color:C.crimson } });
slide.addText("Clinical Features", { x:0.25, y:0.9, w:4.55, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Classic Triad:", { bold:true, fs:13 }),
sub("Angina — first symptom; survival ~5 years if untreated", { fs:12.5 }),
sub("Syncope (on exertion) — survival ~3 years", { fs:12.5 }),
sub("Dyspnoea (HF/exertional) — survival ~1–2 years", { fs:12.5 }),
bul("Pulse: slow-rising, plateau pulse (pulsus parvus et tardus)"),
bul("Pulse pressure: narrow"),
bul("Apex beat: sustained, heaving, non-displaced"),
bul("Murmur: ejection systolic, harsh, crescendo-decrescendo"),
sub("Best heard: 2nd RICS → radiates to carotids"),
sub("Peaks late in severe AS; soft A2 or absent A2"),
bul("4th heart sound (S4) — LV hypertrophy"),
bul("Paradoxically split S2 (severe AS)"),
], { x:0.38, y:1.36, w:4.3, h:2.55, valign:"top" });
// Echo criteria
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:3.05, fill:{ color:C.lightGold }, line:{ color:C.gold, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.4, fill:{ color:C.gold } });
slide.addText("Echocardiographic Severity Criteria", { x:5.15, y:0.9, w:4.6, h:0.4, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const echoData = [
{ param:"Parameter", mild:"Mild", mod:"Moderate", severe:"Severe", hdr:true },
{ param:"Valve Area (cm²)", mild:"> 1.5", mod:"1.0–1.5", severe:"< 1.0" },
{ param:"Mean Gradient (mmHg)", mild:"< 20", mod:"20–40", severe:"≥ 40" },
{ param:"Peak Velocity (m/s)", mild:"< 3.0", mod:"3.0–4.0", severe:"≥ 4.0" },
{ param:"Indexed AVA (cm²/m²)", mild:"—", mod:"—", severe:"< 0.6" },
];
const exP = [5.2, 7.3, 8.1, 8.9]; const ewP = [2.05, 0.77, 0.77, 0.8];
echoData.forEach((r,i) => {
const y = 1.36 + i*0.48;
const bg = i===0 ? C.maroon : i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:5.2, y, w:4.48, h:0.44, fill:{ color:bg }, line:{ color:"E0D0D8", width:0.4 } });
[r.param, r.mild, r.mod, r.severe].forEach((val,j) => {
const clr = i===0 ? C.white : j===3 ? C.crimson : C.textDark;
const bold2 = i===0 || j===3;
slide.addText(val, { x:exP[j], y, w:ewP[j], h:0.44, fontSize:11, bold:bold2, color:clr, fontFace:"Calibri", align:"center", valign:"middle" });
});
});
slide.addText([
bul("Low-flow, low-gradient AS: AVA < 1 cm² + mean gradient < 40 mmHg", { fs:11.5 }),
sub("Low EF type: dobutamine stress echo to confirm severity", { fs:11 }),
sub("Normal EF type: commonly hypertensive patients; CT calcium scoring helpful", { fs:11 }),
], { x:5.25, y:3.74, w:4.4, h:1.1, valign:"top" });
// ECG & CXR
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.08, w:4.55, h:1.1, fill:{ color:C.lightGray }, line:{ color:"E0D0D8", width:0.6 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.08, w:4.55, h:0.34, fill:{ color:C.maroon } });
slide.addText("ECG / CXR Findings", { x:0.25, y:4.08, w:4.55, h:0.34, fontSize:12, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"ECG: ", options:{ bold:true, fontSize:12, color:C.crimson, fontFace:"Calibri" } },
{ text:"LVH + strain pattern (inferolateral ST depression, T wave inversion); LAE; AF (late). ", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
{ text:"CXR: ", options:{ bold:true, fontSize:12, color:C.crimson, fontFace:"Calibri" } },
{ text:"Calcified aortic valve; normal heart size early; post-stenotic aortic dilatation; pulmonary oedema (late).", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:0.38, y:4.46, w:4.3, h:0.7, valign:"top" });
});
// =====================================================
// SLIDE 9 — AS: MANAGEMENT
// =====================================================
cSlide("Aortic Stenosis — Management", slide => {
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.62, fill:{ color:C.maroon } });
slide.addText([
{ text:"Intervention Triggers (Stage D OR Stage C2): ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"Symptoms + Severe AS | EF < 50% (asymptomatic) | Mean gradient ≥ 40 mmHg + valve area < 1 cm² | Undergoing cardiac surgery", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
], { x:0.4, y:0.9, w:9.2, h:0.62, valign:"middle" });
const mgmt = [
{
title:"Medical Management",
color:C.blue,
items:[
"No medical therapy delays progression of calcific AS",
"Manage risk factors (statins — trials negative for AS progression)",
"Treat comorbidities: BP control, lipids, diabetes",
"Treat heart failure: diuretics, cautious vasodilators",
"Avoid vasodilators in severe AS (reduce preload dangerously)",
"AF management: rate control + anticoagulation",
"Endocarditis prophylaxis (high-risk procedures only)",
]
},
{
title:"Surgical Aortic Valve Replacement (SAVR)",
color:C.crimson,
items:[
"Gold standard for low-to-medium surgical risk patients",
"Mechanical valve: lifelong warfarin (INR 2.5–3.5); durable",
"Bioprosthetic valve: no anticoagulation (unless AF); limited durability (~15–20 yr)",
"Ross procedure: pulmonary autograft to aortic position (mainly young patients)",
"30-day mortality: ~1–3% in low-risk patients",
"Concomitant CABG if coronary disease present",
]
},
{
title:"TAVI / TAVR (Transcatheter Aortic Valve Implantation)",
color:C.maroon,
items:[
"Expanding to intermediate and low-risk patients",
"Preferred route: transfemoral (TF) — least invasive",
"Alternative routes: transapical, trans-aortic, subclavian",
"Paravalvular leak, pacemaker requirement (~10–20%) key concerns",
"PARTNER 3 (low risk) and Evolut Low Risk trials showed non-inferiority to SAVR",
"Heart team decision: weighs anatomy, STS score, frailty, patient preference",
"DAPT (aspirin + clopidogrel) post-TAVI for 3–6 months; single antiplatelet long-term",
]
},
];
const xs = [0.25, 3.45, 6.65]; const w = 3.12;
mgmt.forEach((m,i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y:1.65, w, h:3.5, fill:{ color:C.lightGray }, line:{ color:"E0D0D8", width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y:1.65, w, h:0.42, fill:{ color:m.color } });
slide.addText(m.title, { x, y:1.65, w, h:0.42, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = m.items.map((t,j) => ({ text:`• ${t}`, options:{ breakLine:j<m.items.length-1, fontSize:11.5, color:C.textDark, fontFace:"Calibri", spaceBefore:2.5 } }));
slide.addText(bullArr, { x:x+0.1, y:2.12, w:w-0.2, h:2.97, valign:"top" });
});
slide.addText("TAVI outcomes at 5 years now equivalent to SAVR in low-risk patients (PARTNER 3, Evolut). Heart team approach is mandatory. — Harrison's 22E, 2025", { x:0.25, y:5.22, w:9.5, h:0.2, fontSize:9, color:C.midGray, fontFace:"Calibri", italic:true });
});
// =====================================================
// SLIDE 10 — SECTION: AORTIC REGURGITATION
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "03 Aortic Regurgitation (AR)", "Volume overload of the left ventricle — chronic adaptation then decompensation"); }
// =====================================================
// SLIDE 11 — AR: FEATURES & MANAGEMENT
// =====================================================
cSlide("Aortic Regurgitation — Clinical Features & Management", slide => {
// Etiology + Pathophys
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:2.05, fill:{ color:C.light }, line:{ color:C.rose, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:0.4, fill:{ color:C.crimson } });
slide.addText("Etiology & Pathophysiology", { x:0.25, y:0.9, w:4.6, h:0.4, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"Valve disease: ", options:{ bold:true, fontSize:12, color:C.crimson, fontFace:"Calibri" } },
{ text:"Rheumatic, BAV, endocarditis, myxomatous degeneration\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Aortic root disease: ", options:{ bold:true, fontSize:12, color:C.crimson, fontFace:"Calibri" } },
{ text:"Annuloaortic ectasia, Marfan, HTN, aortitis, aortic dissection\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Pathophysiology: ", options:{ bold:true, fontSize:12, color:C.crimson, fontFace:"Calibri" } },
{ text:"Regurgitant volume → ↑ LVEDV → eccentric LVH → ↑ stroke volume (hyperdynamic). Chronic: wide pulse pressure; eventual ↓ EF. Acute: LV unprepared → acute pulmonary oedema", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:0.38, y:1.36, w:4.38, h:1.56, valign:"top" });
// Signs
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:2.05, fill:{ color:C.lightGold }, line:{ color:C.gold, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.4, fill:{ color:C.maroon } });
slide.addText("Eponymous Signs (Chronic AR)", { x:5.15, y:0.9, w:4.6, h:0.4, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const arSigns = [
{ n:"Corrigan's pulse", d:"Water-hammer (collapsing) pulse" },
{ n:"de Musset's sign", d:"Head nodding with heartbeat" },
{ n:"Quincke's sign", d:"Nail bed pulsation (capillary) " },
{ n:"Traube's sign", d:"Pistol-shot sound over femoral artery" },
{ n:"Duroziez's sign", d:"Double murmur over femoral artery" },
{ n:"Müller's sign", d:"Uvular pulsation" },
];
arSigns.forEach((s,i) => {
const y = 1.36 + i*0.27;
slide.addText([
{ text:`${s.n}: `, options:{ bold:true, fontSize:11.5, color:C.maroon, fontFace:"Calibri" } },
{ text:s.d, options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri" } },
], { x:5.28, y, w:4.38, h:0.27, valign:"middle" });
});
// Murmur + Echo + Management
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.08, w:9.5, h:2.1, fill:{ color:C.lightGray }, line:{ color:C.maroon, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.08, w:9.5, h:0.38, fill:{ color:C.maroon } });
slide.addText("Murmur · Echo Criteria · Management", { x:0.25, y:3.08, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"Murmur: ", options:{ bold:true, fontSize:12, color:C.gold, fontFace:"Calibri" } },
{ text:"Early diastolic, decrescendo, high-pitched, blowing; best heard at left sternal edge (3rd ICS) with patient sitting forward, held expiration. Austin Flint murmur = apical mid-diastolic rumble (severe AR — functional MS due to AR jet impinging on anterior mitral leaflet).\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Echo — Severe AR: ", options:{ bold:true, fontSize:12, color:C.gold, fontFace:"Calibri" } },
{ text:"Regurgitant fraction ≥ 50%, vena contracta ≥ 6 mm, EROA ≥ 0.30 cm², LV dilatation (LVESD > 50 mm). PHT < 200 ms (acute).\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Medical: ", options:{ bold:true, fontSize:12, color:C.gold, fontFace:"Calibri" } },
{ text:"Vasodilators (nifedipine, ACEi) — delay surgery in chronic AR with LV dilatation. No proven role in asymptomatic patients with normal LV function. ", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
{ text:"Surgery: ", options:{ bold:true, fontSize:12, color:C.gold, fontFace:"Calibri" } },
{ text:"AVR when symptomatic (Stage D) OR EF < 55% OR LVESD > 50 mm OR aortic root > 5.5 cm (Marfan > 5.0 cm). Valve-sparing root replacement (David/Yacoub) where possible.", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:0.38, y:3.5, w:9.25, h:1.6, valign:"top" });
});
// =====================================================
// SLIDE 12 — SECTION: MITRAL STENOSIS
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "04 Mitral Stenosis (MS)", "Obstruction to left atrial emptying — predominantly rheumatic in origin"); }
// =====================================================
// SLIDE 13 — MS: FEATURES & MANAGEMENT
// =====================================================
cSlide("Mitral Stenosis — Clinical Features & Management", slide => {
// Pathophysiology flow
const chain = [
{ t:"LAP rises", d:"LA → LV inflow\nobstructed" },
{ t:"Pulm. congestion", d:"Passive: ↑ pulm.\nvenous pressure" },
{ t:"Pulm. HTN", d:"Reactive ↑ PVR,\nRV pressure ↑" },
{ t:"RV Failure", d:"TR, ↑ JVP,\nedema, hepatomegaly" },
{ t:"AF", d:"LA dilatation →\n↑ thrombus risk" },
];
chain.forEach((c,i) => {
const x = 0.22 + i*1.92;
slide.addShape(pres.ShapeType.rect, { x, y:0.9, w:1.78, h:0.88, fill:{ color:C.crimson } });
slide.addText(c.t, { x, y:0.9, w:1.78, h:0.42, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:x+0.1, y:1.32, w:1.58, h:0.04, fill:{ color:C.goldLight } });
slide.addText(c.d, { x, y:1.36, w:1.78, h:0.42, fontSize:10.5, color:C.white, fontFace:"Calibri", align:"center", valign:"top" });
if(i<4) slide.addText("→", { x:x+1.78, y:1.18, w:0.14, h:0.32, fontSize:13, bold:true, color:C.gold, fontFace:"Calibri", align:"center" });
});
// Clinical features
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.92, w:4.55, h:2.22, fill:{ color:C.light }, line:{ color:C.crimson, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.92, w:4.55, h:0.38, fill:{ color:C.crimson } });
slide.addText("Clinical Features", { x:0.25, y:1.92, w:4.55, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Dyspnoea (on exertion → rest), orthopnoea, PND"),
bul("Haemoptysis (rupture of pulmonary veins)"),
bul("Palpitations (AF in 40–50% of patients)"),
bul("Malar flush (mitral facies) — peripheral vasodilation"),
bul("Pulse: irregularly irregular (AF); low volume"),
bul("Murmur: RUMBLING mid-diastolic at apex"),
sub("Low-pitched, best with bell, left lateral decubitus"),
sub("Loudened by exercise; preceded by opening snap"),
bul("Opening snap: shorter A2–OS interval → more severe"),
bul("Loud S1 (if valve mobile); absent if calcified"),
bul("RV heave if pulmonary HTN develops"),
], { x:0.38, y:2.36, w:4.3, h:1.72, valign:"top" });
// Echo criteria + Management
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.92, w:4.6, h:2.22, fill:{ color:C.lightGold }, line:{ color:C.gold, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.92, w:4.6, h:0.38, fill:{ color:C.maroon } });
slide.addText("Echo & Management", { x:5.15, y:1.92, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"MVA severity: ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"Mild > 1.5 cm² | Moderate 1.0–1.5 cm² | Severe < 1.0 cm²\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Wilkins score: ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"Mobility, thickening, calcification, subvalvular apparatus (0–16); ≤ 8 → favourable for PBMV\n\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Medical: ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"Rate control (β-blocker/CCB in AF); anticoagulation (AF or prior embolism); diuretics for congestion; penicillin prophylaxis (RHD)\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Intervention: ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"PBMV (percutaneous balloon mitral valvuloplasty) — 1st line if Wilkins ≤ 8, no LA thrombus, no severe MR. MVR (surgical replacement) if anatomy unfavourable.", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:5.28, y:2.36, w:4.38, h:1.72, valign:"top" });
// Trigger summary
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.28, w:9.5, h:0.9, fill:{ color:C.maroon } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.28, w:9.5, h:0.35, fill:{ color:C.crimson } });
slide.addText("Triggers of Acute Decompensation in MS", { x:0.25, y:4.28, w:9.5, h:0.35, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText("Rapid AF (↑ HR → less diastolic filling time → ↑ LAP) | Pregnancy (↑ cardiac output) | Fever / Anaemia (↑ HR, ↑ CO demand) | Exercise | Pneumonia", { x:0.4, y:4.65, w:9.2, h:0.5, fontSize:12, color:C.white, fontFace:"Calibri", valign:"middle" });
});
// =====================================================
// SLIDE 14 — SECTION: MITRAL REGURGITATION
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "05 Mitral Regurgitation (MR)", "Most common valvular lesion — primary (organic) vs secondary (functional)"); }
// =====================================================
// SLIDE 15 — MR: FEATURES & MANAGEMENT
// =====================================================
cSlide("Mitral Regurgitation — Clinical Features & Management", slide => {
// Primary vs Secondary
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:1.62, fill:{ color:C.light }, line:{ color:C.crimson, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:0.38, fill:{ color:C.crimson } });
slide.addText("Primary (Organic) MR — Causes", { x:0.25, y:0.9, w:4.55, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Mitral valve prolapse (MVP) — most common in developed world (2–3% of population)", { fs:12 }),
bul("Rheumatic heart disease — most common worldwide", { fs:12 }),
bul("Infective endocarditis (leaflet perforation)", { fs:12 }),
bul("Chordal rupture (spontaneous, acute MI, trauma)", { fs:12 }),
bul("Papillary muscle rupture (acute MI — lateral or inferior)", { fs:12 }),
bul("Congenital: cleft mitral leaflet, AV canal defect", { fs:12 }),
], { x:0.38, y:1.34, w:4.3, h:1.12, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:1.62, fill:{ color:C.lightGold }, line:{ color:C.gold, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.38, fill:{ color:C.maroon } });
slide.addText("Secondary (Functional) MR — Causes", { x:5.15, y:0.9, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Ischaemic MR (LV remodelling, papillary displacement)", { fs:12 }),
bul("Dilated cardiomyopathy (annular dilatation)", { fs:12 }),
bul("Hypertrophic cardiomyopathy (LVOTO + SAM)", { fs:12 }),
bul("Pathophysiology: LV/annular disease → leaflet tethering → coaptation failure → regurgitation. LV remodelling is primary abnormality.", { fs:11.5 }),
], { x:5.28, y:1.34, w:4.38, h:1.12, valign:"top" });
// Clinical features + murmur
slide.addShape(pres.ShapeType.rect, { x:0.25, y:2.65, w:4.55, h:2.52, fill:{ color:C.lightGray }, line:{ color:"E0D0D8", width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:2.65, w:4.55, h:0.38, fill:{ color:C.crimson } });
slide.addText("Clinical Features & Murmur", { x:0.25, y:2.65, w:4.55, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Fatigue, exertional dyspnoea (chronic)"),
bul("Acute MR: sudden pulmonary oedema, cardiogenic shock"),
bul("AF common (LA dilatation); LV displaced, hyperdynamic apex"),
bul("Murmur: PANSYSTOLIC (holosystolic), high-pitched, blowing"),
sub("Best heard at apex, radiates to axilla"),
sub("Grade I–VI; associated with widely split S2 (early A2)"),
sub("Soft S1; S3 gallop (severe MR — volume overload)"),
bul("Acute MR: decrescendo murmur (equalization of pressures)"),
bul("Echo — Severe MR: vena contracta ≥ 7 mm, EROA ≥ 0.40 cm², RF ≥ 50%; LVESD > 40 mm"),
], { x:0.38, y:3.08, w:4.3, h:2.0, valign:"top" });
// Management
slide.addShape(pres.ShapeType.rect, { x:5.15, y:2.65, w:4.6, h:2.52, fill:{ color:C.lightGold }, line:{ color:C.gold, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:2.65, w:4.6, h:0.38, fill:{ color:C.maroon } });
slide.addText("Management", { x:5.15, y:2.65, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"Medical (Primary MR): ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"No proven therapy to delay progression. Vasodilators (ACEi) if HF/HTN. Diuretics for pulmonary congestion.\n\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Medical (Secondary MR): ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"Treat underlying HF (ACEi, β-blocker, MRA, SGLT-2i). CRT if LBBB + EF < 35%.\n\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Surgery (Primary MR): ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"Mitral valve repair preferred over replacement (lower mortality, better LV function preservation). Intervention when EF < 60% or LVESD > 40 mm or new AF or pulm. HTN.\n\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Transcatheter (TEER): ", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri" } },
{ text:"MitraClip / PASCAL edge-to-edge repair. Secondary MR in HF patients (COAPT trial: ↓ hospitalisations 47%, ↓ mortality). Expanding to primary MR (MATTERHORN trial).", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:5.28, y:3.08, w:4.38, h:2.0, valign:"top" });
});
// =====================================================
// SLIDE 16 — SECTION: RIGHT-SIDED VALVE DISEASE
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "06 Right-Sided Valve Disease", "Tricuspid · Pulmonary · Often secondary to left heart or pulmonary HTN"); }
// =====================================================
// SLIDE 17 — TRICUSPID & PULMONARY VALVE DISEASE
// =====================================================
cSlide("Tricuspid & Pulmonary Valve Disease", slide => {
// Tricuspid Stenosis
colBox(slide, 0.25, 0.9, 3.0, 2.1, "Tricuspid Stenosis (TS)", C.teal, (x,y,w,h) => {
slide.addText([
bul("Almost always rheumatic; often with MS", { fs:11.5 }),
bul("Symptoms: oedema, fatigue, ascites; RHF signs (no pulm. congestion)", { fs:11.5 }),
bul("Murmur: rumbling mid-diastolic at LLSB; ↑ with inspiration (Carvallo's sign)", { fs:11.5 }),
bul("Severe: MVA < 1 cm²; mean gradient > 5 mmHg", { fs:11.5 }),
bul("Treatment: diuretics; TV repair/replacement at time of mitral surgery", { fs:11.5 }),
], { x, y, w, h, valign:"top" });
});
// Tricuspid Regurgitation
colBox(slide, 3.5, 0.9, 3.1, 2.1, "Tricuspid Regurgitation (TR)", C.teal, (x,y,w,h) => {
slide.addText([
bul("Functional (most common): RV dilatation from pulm. HTN, left heart disease", { fs:11.5 }),
bul("Organic: RHD, endocarditis (IV drug users), carcinoid, Ebstein anomaly", { fs:11.5 }),
bul("Signs: ↑ JVP (v-waves, cv fusion), pulsatile hepatomegaly, ascites, pitting oedema", { fs:11.5 }),
bul("Murmur: pansystolic at LLSB; ↑ inspiration (Carvallo's)", { fs:11.5 }),
bul("Treatment: treat cause; diuretics; TV repair if severe at time of left heart surgery", { fs:11.5 }),
], { x, y, w, h, valign:"top" });
});
// Pulmonary valve
colBox(slide, 6.9, 0.9, 2.85, 2.1, "Pulmonary Valve Disease", C.blue, (x,y,w,h) => {
slide.addText([
bul("Pulmonary Stenosis (PS):", { fs:11.5, bold:true }),
sub("Usually congenital; tetralogy of Fallot", { fs:11 }),
sub("Ejection click + harsh systolic murmur at LUSB; ↑ with expiration (semilunar)", { fs:11 }),
sub("Balloon valvuloplasty if gradient > 40 mmHg", { fs:11 }),
bul("Pulmonary Regurgitation (PR):", { fs:11.5, bold:true }),
sub("Usually secondary to pulm. HTN; post-ToF repair", { fs:11 }),
sub("Graham-Steell murmur: early diastolic LUSB", { fs:11 }),
sub("Pulmonary valve replacement if severe", { fs:11 }),
], { x, y, w, h, valign:"top" });
});
// Carcinoid + Ebstein
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.15, w:9.5, h:2.03, fill:{ color:C.lightGray }, line:{ color:C.maroon, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.15, w:9.5, h:0.38, fill:{ color:C.maroon } });
slide.addText("Special Conditions — Carcinoid Heart Disease & Ebstein Anomaly", { x:0.25, y:3.15, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"Carcinoid Heart Disease: ", options:{ bold:true, fontSize:12.5, color:C.gold, fontFace:"Calibri" } },
{ text:"Serotonin, bradykinin → fibrous plaques on tricuspid (TS/TR) and pulmonary valves (PS/PR). Left-sided lesions uncommon unless PFO. Associated 5-HIAA in urine. Treatment: somatostatin analogues; valve replacement.\n\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Ebstein Anomaly: ", options:{ bold:true, fontSize:12.5, color:C.gold, fontFace:"Calibri" } },
{ text:"Apical displacement of tricuspid leaflets → 'atrialisation' of RV. Variable severity. TR + WPW syndrome (accessory pathway). Atrial septal defects common. Surgical repair or replacement if severe. Associated with lithium exposure in utero.", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:0.4, y:3.58, w:9.2, h:1.55, valign:"top" });
});
// =====================================================
// SLIDE 18 — SECTION: INFECTIVE ENDOCARDITIS
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "07 Infective Endocarditis (IE)", "Microbial infection of cardiac endothelium / valve leaflets"); }
// =====================================================
// SLIDE 19 — IE
// =====================================================
cSlide("Infective Endocarditis", slide => {
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:3.05, h:3.45, fill:{ color:C.light }, line:{ color:C.crimson, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:3.05, h:0.4, fill:{ color:C.crimson } });
slide.addText("Organisms & Risk Factors", { x:0.25, y:0.9, w:3.05, h:0.4, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Streptococcus viridans — dental procedures, native valves (most common overall)", { fs:11.5 }),
bul("Staphylococcus aureus — IV drug use, prosthetic valves, healthcare-associated; most virulent", { fs:11.5 }),
bul("Enterococcus — GI/GU procedures, elderly", { fs:11.5 }),
bul("HACEK organisms — culture-negative IE (slow-growing gram-negative rods)", { fs:11.5 }),
bul("Risk factors: prosthetic valve, prior IE, structural heart disease, IV drug use, intravascular lines, poor dentition", { fs:11.5 }),
], { x:0.38, y:1.36, w:2.85, h:2.92, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:3.55, y:0.9, w:3.05, h:3.45, fill:{ color:C.lightGold }, line:{ color:C.gold, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:3.55, y:0.9, w:3.05, h:0.4, fill:{ color:C.gold } });
slide.addText("Modified Duke Criteria", { x:3.55, y:0.9, w:3.05, h:0.4, fontSize:12.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"MAJOR CRITERIA:\n", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri", breakLine:true } },
{ text:"• Positive blood cultures (≥ 2 separate sets of typical organisms)\n• Positive echocardiogram (vegetation, abscess, new prosthetic valve dehiscence)\n• New valvular regurgitation\n\n", options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"MINOR CRITERIA:\n", options:{ bold:true, fontSize:12, color:C.maroon, fontFace:"Calibri", breakLine:true } },
{ text:"• Predisposing condition\n• Fever > 38°C\n• Vascular phenomena (emboli, Janeway lesions)\n• Immunological phenomena (Osler nodes, Roth spots, RF+)\n• Atypical cultures\n\n", options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Definite: 2 major / 1 major + 3 minor / 5 minor\n", options:{ bold:true, fontSize:11.5, color:C.maroon, fontFace:"Calibri", breakLine:true } },
{ text:"Possible: 1 major + 1 minor / 3 minor", options:{ bold:true, fontSize:11.5, color:C.maroon, fontFace:"Calibri" } },
], { x:3.68, y:1.36, w:2.85, h:2.92, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:6.85, y:0.9, w:2.9, h:3.45, fill:{ color:C.lightGray }, line:{ color:C.maroon, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:6.85, y:0.9, w:2.9, h:0.4, fill:{ color:C.maroon } });
slide.addText("Clinical Features & Management", { x:6.85, y:0.9, w:2.9, h:0.4, fontSize:12, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"Clinical Signs:\n", options:{ bold:true, fontSize:12, color:C.crimson, fontFace:"Calibri", breakLine:true } },
{ text:"Fever, malaise, night sweats\nNew/changing murmur\nSplenomegaly\nSplinter haemorrhages (nails)\nJaneway lesions (palms — septic emboli)\nOsler's nodes (fingers — immune)\nRoth spots (retinal haemorrhages)\nClubbing (chronic)\n\n", options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Treatment:\n", options:{ bold:true, fontSize:12, color:C.crimson, fontFace:"Calibri", breakLine:true } },
{ text:"• 4–6 weeks IV antibiotics (benzylpenicillin + gentamicin for strep; flucloxacillin ± gentamicin for staph)\n• Surgery: uncontrolled infection, HF from valve destruction, large vegetation > 10 mm, abscess", options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri" } },
], { x:6.98, y:1.36, w:2.68, h:2.92, valign:"top" });
slide.addText("Prophylaxis: Chlorhexidine mouth rinse ± amoxicillin 2 g PO before dental procedures in HIGH-RISK patients ONLY (prosthetic valve, prior IE, congenital cyanotic HD)", { x:0.25, y:4.48, w:9.5, h:0.7, fontSize:11.5, color:C.textDark, fontFace:"Calibri", fill:{ color:C.light } });
});
// =====================================================
// SLIDE 20 — SECTION: PROSTHETIC VALVES
// =====================================================
{ const s = pres.addSlide(); sectionDiv(s, "08 Prosthetic Heart Valves", "Mechanical vs Bioprosthetic · Anticoagulation · Complications"); }
// =====================================================
// SLIDE 21 — PROSTHETIC VALVES
// =====================================================
cSlide("Prosthetic Heart Valves — Types & Management", slide => {
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:2.85, fill:{ color:C.light }, line:{ color:C.crimson, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.6, h:0.4, fill:{ color:C.crimson } });
slide.addText("Mechanical Valves", { x:0.25, y:0.9, w:4.6, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Types: bileaflet (St. Jude Medical — most common), tilting disc (Björk-Shiley), caged-ball (Starr-Edwards — historical)"),
bul("Durability: > 25 years — preferred in patients < 60 years"),
bul("Anticoagulation: lifelong warfarin MANDATORY"),
sub("Mitral position: INR 2.5–3.5"),
sub("Aortic position: INR 2.0–3.0"),
sub("+ Aspirin 75–100 mg/day (high-risk patients)"),
bul("Risk of valve thrombosis if INR subtherapeutic"),
bul("Major hazard: thromboembolic events (~1–2%/yr) and bleeding (~1–3%/yr)"),
bul("Mechanical clicks audible on auscultation"),
], { x:0.38, y:1.36, w:4.3, h:2.32, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:2.85, fill:{ color:C.lightGold }, line:{ color:C.gold, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.4, fill:{ color:C.maroon } });
slide.addText("Bioprosthetic (Tissue) Valves", { x:5.15, y:0.9, w:4.6, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Types: porcine (Hancock, Carpentier-Edwards), bovine pericardial, cryopreserved allograft"),
bul("Durability: 15–20 years; structural valve deterioration (SVD) — especially < 65 yrs"),
bul("Anticoagulation: warfarin 3 months post-op (aortic) or 3–6 months (mitral) → DAPT or aspirin alone"),
bul("No anticoagulation needed long-term (unless AF)"),
bul("Preferred in: age > 65–70, women of childbearing age, patients unable to anticoagulate, and TAVI candidates"),
bul("Valve-in-valve TAVI: feasible for degenerated bioprostheses"),
], { x:5.28, y:1.36, w:4.3, h:2.32, valign:"top" });
// Complications
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.9, w:9.5, h:1.28, fill:{ color:C.lightGray }, line:{ color:C.maroon, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.9, w:9.5, h:0.38, fill:{ color:C.maroon } });
slide.addText("Complications of Prosthetic Valves", { x:0.25, y:3.9, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const comps = [
{ t:"Valve Thrombosis", d:"Emergency anticoagulation or fibrinolysis/surgery; fever, HF, new murmur" },
{ t:"Prosthetic IE", d:"Most dangerous; S. aureus (early), S. epidermidis (late); 6 weeks IV Abx ± surgery" },
{ t:"Haemolysis", d:"LDH ↑, fragmented RBCs; paravalvular leak; may need re-operation" },
{ t:"Paravalvular Leak", d:"Perivalvular regurgitation; haemolysis + HF; transcatheter or surgical closure" },
];
comps.forEach((c,i) => {
const x = 0.38 + i*2.38;
slide.addText([
{ text:`${c.t}: `, options:{ bold:true, fontSize:11.5, color:C.crimson, fontFace:"Calibri" } },
{ text:c.d, options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri" } },
], { x, y:4.32, w:2.25, h:0.8, valign:"top" });
});
});
// =====================================================
// SLIDE 22 — MURMUR SUMMARY
// =====================================================
cSlide("Cardiac Murmur Summary — Auscultation Guide", slide => {
const murmurs = [
{ valve:"Aortic Stenosis", timing:"Ejection systolic", quality:"Harsh, crescendo-decrescendo", location:"2nd RICS", radiation:"Carotids; apex (Gallavardin)", intensity:"Peaks late in systole if severe; soft A2", extra:"Slow-rising pulse; S4" },
{ valve:"Aortic Regurgitation", timing:"Early diastolic", quality:"Decrescendo, high-pitched, blowing", location:"LLSB (3rd ICS)", radiation:"Apex", intensity:"Loudest: leaning forward, held expiration", extra:"Collapsing pulse; Austin Flint murmur" },
{ valve:"Mitral Stenosis", timing:"Mid-diastolic", quality:"Low-pitched rumble", location:"Apex", radiation:"Little radiation", intensity:"Opening snap precedes; loud S1 (if pliable)", extra:"Left lateral decubitus; exercise increases" },
{ valve:"Mitral Regurgitation", timing:"Pansystolic", quality:"High-pitched, blowing", location:"Apex", radiation:"Left axilla/back", intensity:"Grade I–VI; constant throughout systole", extra:"Soft S1; S3 if severe" },
{ valve:"Tricuspid Regurgitation", timing:"Pansystolic", quality:"High-pitched, blowing", location:"LLSB", radiation:"Minimal", intensity:"Carvallo's sign: ↑ with inspiration", extra:"Pulsatile liver; giant v-waves in JVP" },
{ valve:"Pulmonary Stenosis", timing:"Ejection systolic", quality:"Harsh, diamond-shaped", location:"LUSB (2nd LICS)", radiation:"Left shoulder", intensity:"Preceded by ejection click (↑ expiration)", extra:"RV heave; widely split S2" },
];
const yStart = 0.96;
const rowH = 0.69;
const hdrs = ["Lesion", "Timing", "Quality", "Location", "Radiation/Extra"];
const xP = [0.22, 2.1, 3.6, 5.7, 7.0]; const wP = [1.85, 1.48, 2.07, 1.27, 2.68];
hdrs.forEach((h,i) => {
slide.addShape(pres.ShapeType.rect, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fill:{ color:C.maroon } });
slide.addText(h, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
murmurs.forEach((m,i) => {
const y = yStart + i*rowH;
const bg = i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.22, y, w:9.53, h:rowH, fill:{ color:bg }, line:{ color:"E0D0D8", width:0.4 } });
slide.addText(m.valve, { x:0.22, y, w:1.85, h:rowH, fontSize:12, bold:true, color:C.maroon, fontFace:"Calibri", valign:"middle", margin:[0,0,0,4] });
slide.addText(m.timing, { x:2.1, y, w:1.48, h:rowH, fontSize:11, color:C.crimson, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(m.quality, { x:3.6, y, w:2.07, h:rowH, fontSize:11, color:C.textDark, fontFace:"Calibri", valign:"middle", margin:[0,0,0,3] });
slide.addText(m.location, { x:5.7, y, w:1.27, h:rowH, fontSize:11, color:C.blue, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(`${m.radiation}\n${m.extra}`, { x:7.0, y, w:2.68, h:rowH, fontSize:10.5, color:C.darkGray, fontFace:"Calibri", valign:"middle", margin:[0,0,0,3] });
});
});
// =====================================================
// SLIDE 23 — DYNAMIC AUSCULTATION
// =====================================================
cSlide("Dynamic Auscultation — Manoeuvres & Effects on Murmurs", slide => {
const data = [
{ manoeuvre:"Valsalva (strain phase)\n↓ preload", as:"↓", ar:"↓", ms:"↓", mr:"↓", hocm:"↑ (louder)", note:"HOCM uniquely louder with Valsalva (↓ LV volume → ↑ LVOTO)" },
{ manoeuvre:"Valsalva (release)\n↑ preload", as:"↑", ar:"↑", ms:"↑", mr:"↑", hocm:"↓", note:"Most murmurs louder; HOCM softer" },
{ manoeuvre:"Standing\n↓ preload", as:"↓", ar:"↓", ms:"↓", mr:"↓", hocm:"↑", note:"MVP click moves EARLIER (closer to S1) — shorter pre-click interval" },
{ manoeuvre:"Squatting\n↑ preload + afterload", as:"↑", ar:"↑", ms:"↑", mr:"↑", hocm:"↓", note:"MVP click moves LATER (further from S1) — longer pre-click interval" },
{ manoeuvre:"Inspiration\n↑ right heart filling", as:"±", ar:"±", ms:"±", mr:"±", hocm:"±", note:"RIGHT-sided murmurs ↑ (TR, PR, TS, PS) — Carvallo's / Rivero-Carvallo sign" },
{ manoeuvre:"Hand grip\n↑ afterload", as:"↓", ar:"↑", ms:"↑", mr:"↑", hocm:"↓", note:"Increases left-sided regurgitant murmurs; decreases AS and HOCM" },
];
const hdrs = ["Manoeuvre", "AS", "AR", "MS", "MR", "HOCM", "Clinical Pearl"];
const xP = [0.22, 2.62, 3.38, 4.14, 4.9, 5.66, 6.42]; const wP = [2.37, 0.73, 0.73, 0.73, 0.73, 0.73, 3.22];
const yStart = 0.9;
const rH = 0.69;
hdrs.forEach((h,i) => {
slide.addShape(pres.ShapeType.rect, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fill:{ color:C.maroon } });
slide.addText(h, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
data.forEach((r,i) => {
const y = yStart + i*rH;
const bg = i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.22, y, w:9.52, h:rH, fill:{ color:bg }, line:{ color:"E0D0D8", width:0.4 } });
slide.addText(r.manoeuvre, { x:0.22, y, w:2.37, h:rH, fontSize:11.5, bold:true, color:C.maroon, fontFace:"Calibri", valign:"middle", margin:[0,0,0,4] });
[r.as, r.ar, r.ms, r.mr, r.hocm].forEach((val,j) => {
const clr = val==="↑" ? C.green : val==="↓" ? C.crimson : C.midGray;
slide.addText(val, { x:xP[j+1], y, w:wP[j+1], h:rH, fontSize:16, bold:true, color:clr, fontFace:"Calibri", align:"center", valign:"middle" });
});
slide.addText(r.note, { x:6.42, y, w:3.22, h:rH, fontSize:10.5, color:C.darkGray, fontFace:"Calibri", valign:"middle", margin:[0,0,0,4] });
});
slide.addText("↑ = louder/increased ↓ = softer/decreased ± = variable HOCM = hypertrophic obstructive cardiomyopathy MVP = mitral valve prolapse", { x:0.22, y:5.22, w:9.52, h:0.2, fontSize:9, color:C.midGray, fontFace:"Calibri", italic:true });
});
// =====================================================
// SLIDE 24 — SUMMARY TABLE
// =====================================================
cSlide("Summary — Four Major Valve Lesions at a Glance", slide => {
const rows = [
{ hdr:true, col1:"Feature", col2:"Aortic Stenosis", col3:"Aortic Regurgitation", col4:"Mitral Stenosis", col5:"Mitral Regurgitation" },
{ col1:"Mechanism", col2:"LV pressure overload → concentric LVH", col3:"LV volume overload → eccentric LVH + dilatation", col4:"LA pressure ↑ → pulm. HTN + RVF", col5:"LA + LV volume overload → LV dilatation" },
{ col1:"Classic Murmur", col2:"Ejection systolic\n2nd RICS → carotids", col3:"Early diastolic\nLLSB (3rd ICS)", col4:"Mid-diastolic rumble\nApex (LLDP)", col5:"Pansystolic blowing\nApex → axilla" },
{ col1:"Pulse Character", col2:"Pulsus parvus et tardus\n(slow-rising)", col3:"Collapsing (water-hammer)\nWide pulse pressure", col4:"Low volume\nIrregular (AF)", col5:"Hyperdynamic\nIrregular (AF)" },
{ col1:"Echo — Severe", col2:"AVA < 1 cm²\nMean gradient ≥ 40 mmHg", col3:"RF ≥ 50%; EROA ≥ 0.30 cm²\nLVESD > 50 mm", col4:"MVA < 1 cm²\nMean gradient > 10 mmHg", col5:"RF ≥ 50%; EROA ≥ 0.40 cm²\nLVESD > 40 mm" },
{ col1:"Definitive Treatment", col2:"SAVR or TAVI\n(symptomatic Stage D)", col3:"AVR when EF < 55%\nLVESD > 50 mm", col4:"PBMV (Wilkins ≤ 8)\nMVR if unfavourable", col5:"MV repair preferred\nMitraClip (TEER) secondary" },
];
const xP = [0.22, 1.95, 3.8, 5.65, 7.5]; const wP = [1.7, 1.82, 1.82, 1.82, 2.25];
const rowH = 0.73;
const yStart = 0.92;
rows.forEach((r,i) => {
const y = yStart + i*(i===0 ? 0 : 0)*rowH;
const y2 = yStart + i*rowH;
const bg = i===0 ? C.maroon : i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.22, y:y2, w:9.53, h:rowH, fill:{ color:bg }, line:{ color:"E0D0D8", width:0.4 } });
const vals = [r.col1, r.col2, r.col3, r.col4, r.col5];
vals.forEach((val,j) => {
const clr2 = i===0 ? C.white : j===0 ? C.maroon : C.textDark;
const bold2 = i===0 || j===0;
slide.addText(val, { x:xP[j], y:y2, w:wP[j], h:rowH, fontSize:10.5, bold:bold2, color:clr2, fontFace:"Calibri", align:j===0 ? "left" : "center", valign:"middle", margin:j===0 ? [0,0,0,4] : 0 });
});
});
slide.addText("Source: Harrison's Principles of Internal Medicine 22E (2025) · 2021 ACC/AHA Valvular Heart Disease Guideline", { x:0.22, y:5.25, w:9.52, h:0.2, fontSize:9, color:C.midGray, fontFace:"Calibri", italic:true });
});
// =====================================================
// SLIDE 25 — THANK YOU / REFERENCES
// =====================================================
{
const slide = pres.addSlide();
addBg(slide, C.maroon);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.15, h:5.625, fill:{ color:C.gold } });
slide.addShape(pres.ShapeType.rect, { x:9.85, y:0, w:0.15, h:5.625, fill:{ color:C.rose } });
slide.addShape(pres.ShapeType.rect, { x:0.15, y:3.6, w:9.7, h:2.025, fill:{ color:C.crimson } });
slide.addText("Thank You", { x:0.3, y:0.5, w:9.4, h:0.9, fontSize:44, bold:true, color:C.white, fontFace:"Calibri", align:"center" });
slide.addShape(pres.ShapeType.rect, { x:2.5, y:1.55, w:5.0, h:0.07, fill:{ color:C.gold } });
slide.addText("Questions & Discussion", { x:0.3, y:1.7, w:9.4, h:0.5, fontSize:18, italic:true, color:C.goldLight, fontFace:"Calibri", align:"center" });
slide.addText([
{ text:"Key References\n", options:{ bold:true, fontSize:13, color:C.gold, fontFace:"Calibri", breakLine:true } },
{ text:"1. Harrison's Principles of Internal Medicine, 22nd Ed (2025). Chapters 272–274: Aortic Stenosis/Regurgitation, Mitral Stenosis/Regurgitation.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"2. Braunwald's Heart Disease, 10th Ed. Chapter 71: Valvular Heart Disease.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"3. Fuster & Hurst's The Heart, 15th Ed. Chapters on Valvular Heart Disease.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"4. 2021 ACC/AHA Guideline for the Management of Patients with Valvular Heart Disease. J Am Coll Cardiol 2021;77:e25–e197.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"5. PARTNER 3 trial: Mack MJ et al. N Engl J Med 2019;380:1695–1705. | 6. COAPT trial: Stone GW et al. N Engl J Med 2018;379:2307–2318.", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri" } },
], { x:0.3, y:2.3, w:9.4, h:1.2, valign:"top" });
slide.addText("Valvular Heart Disease | Medical Education Presentation | May 2026", { x:0.3, y:3.65, w:9.4, h:0.42, fontSize:11, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
}
// =====================================================
// SAVE
// =====================================================
pres.writeFile({ fileName:"/home/daytona/workspace/vhd-ppt/VHD_Medical_Students.pptx" })
.then(() => console.log("✅ Saved: VHD_Medical_Students.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/vhd-ppt && node vhd.js 2>&1
ls -lh /home/daytona/workspace/vhd-ppt/VHD_Medical_Students.pptx
VHD Medical Students
Presentation · PPTX
| # | Slide(s) | Content |
|---|---|---|
| 1 | Title | Sources: Harrison's 22E, Braunwald's, Fuster & Hurst 15th Ed |
| 2 | Learning Objectives | 7 outcomes covering anatomy to intervention |
| 3–5 | Overview | Cardiac valve anatomy (all 4 valves); haemodynamic principles (stenosis vs regurgitation, acute vs chronic); ACC/AHA Staging A–D explained with clinical criteria |
| 6–9 | Aortic Stenosis | Etiology (calcific/BAV/rheumatic with % prevalence); pathophysiology cascade (LV pressure overload → concentric LVH → decompensation); clinical features + classic triad (SAD); echo severity table (AVA/gradient/velocity); SAVR vs TAVI comparison with PARTNER 3 / Evolut trial data |
| 10–11 | Aortic Regurgitation | Etiology (valve vs root); pathophysiology; 6 eponymous signs (Corrigan, de Musset, Quincke, etc.); Austin Flint murmur; echo criteria; valve-sparing surgery indications |
| 12–13 | Mitral Stenosis | Pathophysiology cascade (LAP → pulm. HTN → RVF → AF); Wilkins score; MVA severity; PBMV indications; acute decompensation triggers |
| 14–15 | Mitral Regurgitation | Primary vs secondary causes; papillary rupture; TEER/MitraClip (COAPT trial data); MV repair vs replacement; indications (EF/LVESD thresholds) |
| 16–17 | Right-sided Valve Disease | Tricuspid stenosis/regurgitation, pulmonary stenosis/regurgitation, carcinoid heart disease, Ebstein anomaly |
| 18–19 | Infective Endocarditis | Organisms; Modified Duke Criteria (major + minor); classic peripheral signs (Janeway, Osler's, Roth spots, splinters); management; prophylaxis |
| 20–21 | Prosthetic Valves | Mechanical vs bioprosthetic (types, durability, anticoagulation targets); INR targets by position; complications (thrombosis, IE, haemolysis, paravalvular leak) |
| 22 | Murmur Summary | Full 6-lesion auscultation table (timing/quality/location/radiation/extra features) |
| 23 | Dynamic Auscultation | Manoeuvre effects table (Valsalva, standing, squatting, inspiration, hand grip) — ↑/↓ for AS/AR/MS/MR/HOCM |
| 24 | Summary Table | All 4 major lesions side-by-side (mechanism/murmur/pulse/echo/treatment) |
| 25 | References | Harrison's 22E, 2021 ACC/AHA guideline, PARTNER 3, COAPT |
Detailed ppt on valvular heart disease for medical students
VHD Medical Students
Presentation · PPTX
| Section | Slides | Topics Covered |
|---|---|---|
| Overview & Anatomy | 3 | All 4 valve structures; haemodynamic principles (stenosis vs regurgitation, acute vs chronic); ACC/AHA Staging A–D |
| Aortic Stenosis | 4 | Etiology (calcific/BAV/rheumatic + prevalence); LV pressure overload cascade; classic triad (SAD — Angina/Syncope/Dyspnoea); echo severity table; SAVR vs TAVI (PARTNER 3, Evolut) |
| Aortic Regurgitation | 2 | Valve vs root causes; eccentric LVH; 6 eponymous signs (Corrigan, de Musset, Quincke, etc.); Austin Flint murmur; valve-sparing surgery |
| Mitral Stenosis | 2 | LAP → pulm. HTN → RVF cascade; Wilkins score; PBMV criteria; decompensation triggers |
| Mitral Regurgitation | 2 | Primary vs secondary (organic vs functional); TEER/MitraClip (COAPT trial); MV repair thresholds |
| Right-sided Valves | 2 | Tricuspid stenosis/regurgitation; PS/PR; carcinoid heart disease; Ebstein anomaly |
| Infective Endocarditis | 2 | Organisms; Modified Duke Criteria; peripheral signs (Janeway/Osler/Roth); prophylaxis |
| Prosthetic Valves | 2 | Mechanical vs bioprosthetic; INR targets; complications (thrombosis, IE, haemolysis) |
| Auscultation Guides | 2 | Full 6-lesion murmur table + dynamic auscultation (Valsalva/squatting/inspiration/hand grip) |
| Summary + References | 2 | All 4 lesions side-by-side; 2021 ACC/AHA guideline + key trials |
Detailed ppt on hepatitis for medical students
mkdir -p /home/daytona/workspace/hepatitis-ppt && echo "ready"
~/hepatitis-ppt/hepatitis.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Hepatitis";
pres.author = "Medical Education";
// =====================================================
// COLOR PALETTE — Deep amber/saffron/brown (liver theme)
// =====================================================
const C = {
brown: "4A2000", // dominant dark
amber: "8B4513", // supporting mid
saffron: "C47A1E", // accent warm
gold: "D4A017",
goldLight: "F0C040",
white: "FFFFFF",
light: "FDF6EE", // very pale amber
lightBlue: "EEF4FB",
lightGray: "F5F5F5",
midGray: "8C9BAD",
darkGray: "3A3A3A",
red: "C0392B",
orange: "D35400",
blue: "1A5C8A",
teal: "1A7B72",
green: "2A7A45",
purple: "6B3A8C",
textDark: "2A1505",
};
// =====================================================
// HELPERS
// =====================================================
function addBg(slide, color) {
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color } });
}
function secDiv(slide, title, subtitle) {
addBg(slide, C.brown);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.14, h:5.625, fill:{ color:C.gold } });
slide.addShape(pres.ShapeType.rect, { x:0.3, y:2.88, w:9.4, h:0.05, fill:{ color:C.goldLight } });
slide.addText(title, { x:0.3, y:1.5, w:9.4, h:1.15, fontSize:36, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" });
if (subtitle) slide.addText(subtitle, { x:0.3, y:2.98, w:9.4, h:0.75, fontSize:17, color:C.goldLight, fontFace:"Calibri", align:"left", italic:true });
}
function cSlide(title, fn) {
const slide = pres.addSlide();
addBg(slide, C.white);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.72, fill:{ color:C.brown } });
slide.addShape(pres.ShapeType.rect, { x:0, y:0.72, w:10, h:0.07, fill:{ color:C.gold } });
slide.addText(title, { x:0.3, y:0, w:9.4, h:0.72, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", valign:"middle" });
fn(slide);
slide.addShape(pres.ShapeType.rect, { x:0, y:5.45, w:10, h:0.175, fill:{ color:C.light } });
slide.addText("Hepatitis | Medical Education", { x:0.3, y:5.45, w:9.4, h:0.175, fontSize:7.5, color:C.midGray, fontFace:"Calibri", valign:"middle" });
return slide;
}
function bul(text, opts={}) {
return { text, options:{ bullet:{ code:"2022" }, breakLine:true, fontSize:opts.fs||13.5, color:opts.color||C.textDark, bold:opts.bold||false, indentLevel:opts.ind||0, fontFace:"Calibri", spaceBefore:opts.sb||2 } };
}
function sub(text, opts={}) { return bul(text, { ind:1, fs:12, color:C.amber, ...opts }); }
// =====================================================
// SLIDE 1 — TITLE
// =====================================================
{
const slide = pres.addSlide();
addBg(slide, C.brown);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:5.625, fill:{ color:C.gold } });
slide.addShape(pres.ShapeType.rect, { x:9.82, y:0, w:0.18, h:5.625, fill:{ color:C.saffron } });
slide.addShape(pres.ShapeType.rect, { x:0.18, y:4.58, w:9.64, h:1.045, fill:{ color:C.amber } });
slide.addText("HEPATITIS", { x:0.4, y:0.7, w:9.2, h:1.3, fontSize:52, bold:true, color:C.white, fontFace:"Calibri", align:"center", charSpacing:4 });
slide.addShape(pres.ShapeType.rect, { x:2.0, y:2.1, w:6.0, h:0.07, fill:{ color:C.gold } });
slide.addText("A Comprehensive Guide for Medical Students", { x:0.4, y:2.25, w:9.2, h:0.65, fontSize:19, color:C.goldLight, fontFace:"Calibri", align:"center", italic:true });
slide.addText("Based on: Harrison's Principles of Internal Medicine 22E (2025)\nGoldman-Cecil Medicine · Sleisenger & Fordtran's GI & Liver Disease", { x:0.4, y:3.05, w:9.2, h:0.65, fontSize:11, color:"F0D8A0", fontFace:"Calibri", align:"center" });
slide.addText("HAV · HBV · HCV · HDV · HEV · Alcoholic · Autoimmune · Drug-Induced", { x:0.4, y:4.63, w:9.2, h:0.55, fontSize:13, color:C.white, fontFace:"Calibri", align:"center" });
}
// =====================================================
// SLIDE 2 — LEARNING OBJECTIVES
// =====================================================
cSlide("Learning Objectives", slide => {
slide.addShape(pres.ShapeType.rect, { x:0.28, y:0.88, w:0.09, h:4.42, fill:{ color:C.gold } });
const items = [
"Classify hepatitis by aetiology: viral (A–E), alcoholic, autoimmune, and drug-induced",
"Compare and contrast the five hepatitis viruses: transmission, serology, chronicity, and prevention",
"Interpret hepatitis B serological markers (HBsAg, HBeAg, anti-HBc, anti-HBs) in various disease phases",
"Describe the clinical presentation, acute complications, and progression to chronic disease for each type",
"Outline treatment options: antiviral agents for HBV (tenofovir/entecavir) and HCV (DAA regimens)",
"Identify risk factors, screening indications, and vaccination recommendations (HAV, HBV)",
"Recognise and manage acute liver failure, alcoholic hepatitis (Maddrey score), and autoimmune hepatitis",
];
const arr = items.map((t,i) => ({ text:`${i+1}. ${t}`, options:{ breakLine:true, fontSize:13.8, color:C.textDark, fontFace:"Calibri", spaceBefore:5 } }));
arr[arr.length-1].options.breakLine = false;
slide.addText(arr, { x:0.5, y:0.95, w:9.15, h:4.35, valign:"top" });
});
// =====================================================
// SLIDE 3 — SECTION DIVIDER
// =====================================================
{ const s = pres.addSlide(); secDiv(s, "01 Overview & Classification", "Aetiology · Pathophysiology · Patterns of injury"); }
// =====================================================
// SLIDE 4 — OVERVIEW
// =====================================================
cSlide("What is Hepatitis? — Overview & Classification", slide => {
// Definition
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.7, fill:{ color:C.brown } });
slide.addText([
{ text:"Definition: ", options:{ bold:true, fontSize:14, color:C.goldLight, fontFace:"Calibri" } },
{ text:"Hepatitis = inflammation of the liver parenchyma, characterised by hepatocyte necrosis and elevated serum transaminases (ALT/AST). Can be acute (< 6 months) or chronic (> 6 months).", options:{ fontSize:13.5, color:C.white, fontFace:"Calibri" } },
], { x:0.4, y:0.9, w:9.2, h:0.7, valign:"middle" });
// Classification grid
const types = [
{ cat:"Viral", color:C.blue, items:["Hepatitis A (HAV)", "Hepatitis B (HBV)", "Hepatitis C (HCV)", "Hepatitis D (HDV)", "Hepatitis E (HEV)", "Other: EBV, CMV, HSV"] },
{ cat:"Alcoholic", color:C.amber, items:["Steatosis (fatty liver)", "Alcoholic hepatitis", "Alcoholic cirrhosis", "HCC complication", "AST:ALT ratio > 2:1", "Maddrey score guides Rx"] },
{ cat:"Autoimmune", color:C.purple, items:["Type 1 AIH (ANA + SMA)", "Type 2 AIH (anti-LKM-1)", "Type 3 AIH (anti-SLA)", "↑ IgG level", "Female predominance", "Steroid + azathioprine"] },
{ cat:"Drug-Induced (DILI)", color:C.red, items:["Paracetamol (Zone 3 necrosis)", "Isoniazid, rifampicin", "Statins, methotrexate", "RUCAM causality score", "Idiosyncratic vs dose-dependent", "Herbal/supplement toxicity"] },
];
const xs = [0.22, 2.65, 5.1, 7.55]; const w = 2.3;
types.forEach((t,i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y:1.73, w, h:3.5, fill:{ color:C.lightGray }, line:{ color:"E8E0D0", width:0.6 } });
slide.addShape(pres.ShapeType.rect, { x, y:1.73, w, h:0.42, fill:{ color:t.color } });
slide.addText(t.cat, { x, y:1.73, w, h:0.42, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = t.items.map((v,j) => ({ text:`• ${v}`, options:{ breakLine:j<t.items.length-1, fontSize:11.5, color:C.textDark, fontFace:"Calibri", spaceBefore:3 } }));
slide.addText(bullArr, { x:x+0.1, y:2.2, w:w-0.18, h:2.95, valign:"top" });
});
});
// =====================================================
// SLIDE 5 — PATHOPHYSIOLOGY
// =====================================================
cSlide("Pathophysiology of Hepatic Inflammation", slide => {
// Injury pathway
const chain = [
{ t:"Injurious Agent", sub:"Virus / Alcohol\n/ Drugs / Immune", c:C.red },
{ t:"Hepatocyte\nDamage", sub:"Ballooning\ndegeneration, necrosis", c:C.orange },
{ t:"Inflammatory\nInfiltrate", sub:"CD8+ T cells,\nKupffer cells, NK cells", c:C.amber },
{ t:"Cytokine\nRelease", sub:"TNF-α, IFN-γ,\nIL-1, IL-6", c:C.saffron },
{ t:"Hepatic\nFibrosis", sub:"TGF-β → stellate\ncell activation", c:C.brown },
];
chain.forEach((c,i) => {
const x = 0.2 + i*1.94;
slide.addShape(pres.ShapeType.rect, { x, y:0.9, w:1.8, h:1.65, fill:{ color:c.c } });
slide.addText(c.t, { x, y:0.94, w:1.8, h:0.55, fontSize:12, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:x+0.1, y:1.52, w:1.6, h:0.04, fill:{ color:"FFFFFF" } });
slide.addText(c.sub, { x, y:1.58, w:1.8, h:0.95, fontSize:10.5, color:C.white, fontFace:"Calibri", align:"center", valign:"top" });
if(i<4) slide.addText("→", { x:x+1.8, y:1.4, w:0.14, h:0.35, fontSize:13, bold:true, color:C.gold, fontFace:"Calibri", align:"center" });
});
// Three patterns
const patterns = [
{ t:"Acute Hepatitis", c:C.orange, items:["Prodrome: fatigue, anorexia, nausea, RUQ pain", "Icteric phase: jaundice, dark urine, pale stools", "↑↑ ALT/AST (may be > 1000 IU/L)", "Convalescence: complete recovery in most", "Rare: fulminant hepatic failure (< 1%)"] },
{ t:"Chronic Hepatitis", c:C.amber, items:["Persistent inflammation > 6 months", "Often asymptomatic until advanced disease", "Graded by necro-inflammatory activity (0–18, Ishak)", "Staged by fibrosis (F0–F4; F4 = cirrhosis)", "Risks: cirrhosis, hepatocellular carcinoma"] },
{ t:"Cholestatic Pattern", c:C.blue, items:["Disproportionate ↑ ALP, GGT, bilirubin", "Pruritus, pale stools, dark urine prominent", "Drug-induced (amoxicillin-clavulanate)", "Viral: EBV, CMV hepatitis", "PBC, PSC also present this way"] },
];
const xs = [0.22, 3.45, 6.68]; const w = 3.1;
patterns.forEach((p,i) => {
const x = xs[i];
slide.addShape(pres.ShapeType.rect, { x, y:2.7, w, h:2.53, fill:{ color:C.light }, line:{ color:"E8E0D0", width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x, y:2.7, w, h:0.4, fill:{ color:p.c } });
slide.addText(p.t, { x, y:2.7, w, h:0.4, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const bullArr = p.items.map((v,j) => ({ text:`• ${v}`, options:{ breakLine:j<p.items.length-1, fontSize:11.5, color:C.textDark, fontFace:"Calibri", spaceBefore:2.5 } }));
slide.addText(bullArr, { x:x+0.1, y:3.16, w:w-0.2, h:2.0, valign:"top" });
});
});
// =====================================================
// SLIDE 6 — SECTION: HEPATITIS A
// =====================================================
{ const s = pres.addSlide(); secDiv(s, "02 Hepatitis A Virus (HAV)", "Faecal-oral · Self-limiting · Highly preventable"); }
// =====================================================
// SLIDE 7 — HAV
// =====================================================
cSlide("Hepatitis A — Virology, Serology & Management", slide => {
// Virology strip
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.55, fill:{ color:C.blue } });
slide.addText([
{ text:"Virus: ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"Picornavirus (ssRNA, non-enveloped) | ", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
{ text:"Transmission: ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"Faecal-oral (contaminated food/water) | ", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
{ text:"Incubation: ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"2–6 weeks | ", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
{ text:"Chronicity: ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"NEVER (complete recovery)", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
], { x:0.4, y:0.9, w:9.2, h:0.55, valign:"middle" });
// Serology
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.56, w:4.55, h:2.28, fill:{ color:C.lightBlue }, line:{ color:C.blue, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.56, w:4.55, h:0.38, fill:{ color:C.blue } });
slide.addText("Serological Markers", { x:0.25, y:1.56, w:4.55, h:0.38, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const havSerology = [
{ marker:"Anti-HAV IgM", meaning:"Acute infection (current or recent)", timing:"Appears at symptom onset; lasts < 6 months", color:C.red },
{ marker:"Anti-HAV IgG", meaning:"Past infection OR vaccination", timing:"Appears 1–2 wk after IgM; lifelong immunity", color:C.green },
{ marker:"HAV RNA (PCR)", meaning:"Active viral replication", timing:"Detectable in stool 2 wk before symptoms", color:C.amber },
];
havSerology.forEach((s,i) => {
const y = 2.0 + i*0.62;
slide.addShape(pres.ShapeType.rect, { x:0.3, y:y+0.04, w:0.07, h:0.52, fill:{ color:s.color } });
slide.addText([
{ text:`${s.marker}\n`, options:{ bold:true, fontSize:12, color:s.color, fontFace:"Calibri", breakLine:true } },
{ text:`${s.meaning} — ${s.timing}`, options:{ fontSize:11.5, color:C.textDark, fontFace:"Calibri" } },
], { x:0.45, y, w:4.25, h:0.58, valign:"middle" });
});
// Clinical + Management
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.56, w:4.6, h:2.28, fill:{ color:C.light }, line:{ color:C.amber, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.56, w:4.6, h:0.38, fill:{ color:C.amber } });
slide.addText("Clinical Features & Management", { x:5.15, y:1.56, w:4.6, h:0.38, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Prodrome: malaise, fever, anorexia, nausea, RUQ pain (1–2 wks)", { fs:12 }),
bul("Icteric phase: jaundice, dark urine, pale stools", { fs:12 }),
bul("Cholestatic form: prolonged jaundice (6–12 wks)", { fs:12 }),
bul("Relapsing: biphasic course in ~10% of patients", { fs:12 }),
bul("Fulminant hepatic failure: rare (< 0.5%), ↑ risk if age > 50 or chronic liver disease", { fs:12 }),
bul("Treatment: supportive (no antivirals); rest, fluids", { fs:12 }),
bul("Mortality: < 0.1% overall; 1–3% in elderly", { fs:12 }),
], { x:5.28, y:2.0, w:4.38, h:1.78, valign:"top" });
// Vaccination + Prevention
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.98, w:9.5, h:1.2, fill:{ color:C.brown } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.98, w:9.5, h:0.38, fill:{ color:C.amber } });
slide.addText("Prevention & Vaccination", { x:0.25, y:3.98, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const prev = [
{ t:"Active Vaccine", d:"Inactivated HAV vaccine; 2 doses (0, 6–12 months); > 95% seroprotection; recommended for travellers, men who have sex with men, chronic liver disease, IV drug users" },
{ t:"Post-exposure Prophylaxis", d:"Vaccine (preferred) OR immunoglobulin (Ig) 0.1 mL/kg IM within 2 weeks of exposure; Ig preferred if age < 1 yr, immunocompromised, chronic liver disease" },
{ t:"Infection Control", d:"Handwashing; safe water/food; faecal-oral precautions; exclude food handlers until non-infectious (1 wk after jaundice onset)" },
];
prev.forEach((p,i) => {
const x = 0.38 + i*3.15;
slide.addText([
{ text:`${p.t}: `, options:{ bold:true, fontSize:12, color:C.goldLight, fontFace:"Calibri" } },
{ text:p.d, options:{ fontSize:11.5, color:C.white, fontFace:"Calibri" } },
], { x, y:4.4, w:2.95, h:0.72, valign:"top" });
});
});
// =====================================================
// SLIDE 8 — SECTION: HEPATITIS B
// =====================================================
{ const s = pres.addSlide(); secDiv(s, "03 Hepatitis B Virus (HBV)", "2 billion infected worldwide · Preventable · Treatable"); }
// =====================================================
// SLIDE 9 — HBV VIROLOGY & NATURAL HISTORY
// =====================================================
cSlide("Hepatitis B — Virology, Transmission & Natural History", slide => {
// Virology + risk
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:2.32, fill:{ color:C.lightBlue }, line:{ color:C.blue, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:0.4, fill:{ color:C.blue } });
slide.addText("Virology & Transmission", { x:0.25, y:0.9, w:4.55, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Hepadnavirus — partially double-stranded circular DNA virus", { fs:12 }),
bul("Enveloped: surface antigen (HBsAg) is key marker"),
bul("Transmission routes:", { fs:12, bold:true }),
sub("Perinatal (vertical): most common worldwide (Asia/Africa)", { fs:11.5 }),
sub("Sexual contact (horizontal): most common in developed world", { fs:11.5 }),
sub("Parenteral: IV drug use, needlestick, blood transfusion", { fs:11.5 }),
bul("~2 billion infected globally; 350 million chronic carriers", { fs:12 }),
bul("Incubation: 1–6 months", { fs:12 }),
bul("100× more infectious than HIV", { fs:12 }),
], { x:0.38, y:1.36, w:4.3, h:1.82, valign:"top" });
// Natural history
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:2.32, fill:{ color:C.light }, line:{ color:C.amber, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.4, fill:{ color:C.amber } });
slide.addText("Risk of Chronicity by Age at Infection", { x:5.15, y:0.9, w:4.6, h:0.4, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const chronRisk = [
{ age:"Perinatal", risk:"90%", color:C.red },
{ age:"1–5 years", risk:"25–50%", color:C.orange },
{ age:"Older child", risk:"6–10%", color:C.saffron },
{ age:"Adult (immunocompetent)", risk:"< 5%", color:C.green },
{ age:"Immunocompromised adult", risk:"Up to 40%", color:C.amber },
];
chronRisk.forEach((r,i) => {
const y = 1.38 + i*0.38;
const bg = i%2===0 ? C.white : C.lightGray;
slide.addShape(pres.ShapeType.rect, { x:5.2, y, w:4.48, h:0.35, fill:{ color:bg } });
slide.addText(r.age, { x:5.25, y, w:2.7, h:0.35, fontSize:12, color:C.textDark, fontFace:"Calibri", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:7.98, y:y+0.04, w:1.0, h:0.27, fill:{ color:r.color } });
slide.addText(r.risk, { x:7.98, y:y+0.04, w:1.0, h:0.27, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
// Phases of chronic HBV
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.35, w:9.5, h:1.88, fill:{ color:C.lightGray }, line:{ color:C.brown, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.35, w:9.5, h:0.38, fill:{ color:C.brown } });
slide.addText("Phases of Chronic HBV Infection", { x:0.25, y:3.35, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const phases = [
{ p:"Phase 1\nImmune Tolerant", hbsag:"✓", hbeag:"✓", dna:"Very High\n(>10⁶ IU/mL)", alt:"Normal", activity:"Low inflammation", color:C.green },
{ p:"Phase 2\nImmune Active\n(HBeAg+)", hbsag:"✓", hbeag:"✓", dna:"High", alt:"↑↑", activity:"Active; risk of fibrosis", color:C.orange },
{ p:"Phase 3\nInactive Carrier", hbsag:"✓", hbeag:"✗", dna:"Low (<2000)", alt:"Normal", activity:"Minimal; good prognosis", color:C.blue },
{ p:"Phase 4\nHBeAg-negative\nChronic Hepatitis", hbsag:"✓", hbeag:"✗", dna:"Moderate-High", alt:"↑ (fluctuating)", activity:"Progressive fibrosis risk", color:C.red },
{ p:"Phase 5\nHBsAg clearance\n(OBI)", hbsag:"✗", hbeag:"✗", dna:"Undetectable", alt:"Normal", activity:"Functional cure; best outcome", color:"2E8B57" },
];
const phHdrs = ["Phase", "HBsAg", "HBeAg", "HBV DNA", "ALT", "Activity"];
const phX = [0.28, 2.2, 3.1, 4.0, 5.6, 6.55]; const phW = [1.9, 0.87, 0.87, 1.57, 0.92, 3.15];
phHdrs.forEach((h,i) => {
slide.addText(h, { x:phX[i], y:3.78, w:phW[i], h:0.3, fontSize:11, bold:true, color:C.amber, fontFace:"Calibri", align:"center", valign:"middle" });
});
phases.forEach((ph,i) => {
const y = 4.08 + i*0.22;
const bg = i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.28, y, w:9.42, h:0.2, fill:{ color:bg } });
slide.addShape(pres.ShapeType.rect, { x:0.28, y:y+0.02, w:0.06, h:0.16, fill:{ color:ph.color } });
slide.addText(ph.p.replace(/\n/g," "), { x:0.36, y, w:1.82, h:0.2, fontSize:9.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
[ph.hbsag, ph.hbeag, ph.dna, ph.alt, ph.activity].forEach((v,j) => {
const clr2 = v==="✓" ? C.green : v==="✗" ? C.red : C.textDark;
slide.addText(v, { x:phX[j+1], y, w:phW[j+1], h:0.2, fontSize:9.5, color:clr2, fontFace:"Calibri", align:"center", valign:"middle" });
});
});
});
// =====================================================
// SLIDE 10 — HBV SEROLOGY
// =====================================================
cSlide("Hepatitis B — Serological Markers Explained", slide => {
const markers = [
{ marker:"HBsAg", meaning:"Hepatitis B Surface Antigen", interpretation:"Earliest marker of acute infection. Present from weeks 1–6; persists > 6 months → chronic carrier. Basis of diagnosis", clinical:"Positive in acute AND chronic HBV; used for diagnosis and screening", color:C.red },
{ marker:"Anti-HBs", meaning:"Antibody to HBsAg", interpretation:"Marker of RECOVERY (from infection) or IMMUNITY (from vaccination). Appears after HBsAg disappears (window period); lifelong protective antibody", clinical:"Positive after vaccination (anti-HBs only) or recovery (anti-HBc + anti-HBs). Titre > 10 mIU/mL = protective", color:C.green },
{ marker:"Anti-HBc IgM", meaning:"IgM to Hepatitis B Core Antigen", interpretation:"Early marker of ACUTE infection. Short-lived (3–6 months). Important in 'window period' when HBsAg has cleared but anti-HBs not yet positive", clinical:"Positive = acute/recent HBV. Only anti-HBc positive = past infection / window period", color:C.orange },
{ marker:"Anti-HBc IgG", meaning:"IgG to Hepatitis B Core Antigen", interpretation:"Lifelong marker of past OR current HBV exposure. Does NOT confer immunity. Present in chronic carriers and resolved infection", clinical:"Never present after vaccination (distinguishes vaccine from natural infection)", color:C.amber },
{ marker:"HBeAg", meaning:"Hepatitis B e-Antigen", interpretation:"Marker of HIGH viral replication and INFECTIVITY. Correlates with HBV DNA level. Pre-core mutants may be HBeAg-negative yet highly viraemic", clinical:"HBeAg+ = highly infectious. Seroconversion to anti-HBe = decreased infectivity, better prognosis", color:C.red },
{ marker:"Anti-HBe", meaning:"Antibody to HBeAg", interpretation:"Seroconversion from HBeAg → anti-HBe indicates decreased viral replication and reduced infectivity. Can persist for years after resolution", clinical:"Positive = lower infectivity in most patients (pre-core mutants excepted)", color:C.green },
{ marker:"HBV DNA (PCR)", meaning:"HBV Viral Load", interpretation:"Gold standard for assessing viral replication. Guides treatment decisions. Level correlates with liver disease activity and HCC risk", clinical:"Quantitative PCR (IU/mL); treatment thresholds: > 2000 (HBeAg-neg) or > 20,000 (HBeAg+)", color:C.blue },
];
const yStart = 0.92;
const rH = 0.64;
const hdrs = ["Marker", "Definition", "Interpretation", "Clinical Use"];
const xP = [0.22, 1.28, 3.58, 6.58]; const wP = [1.03, 2.27, 2.97, 3.17];
hdrs.forEach((h,i) => {
slide.addShape(pres.ShapeType.rect, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fill:{ color:C.brown } });
slide.addText(h, { x:xP[i], y:yStart-0.34, w:wP[i], h:0.34, fontSize:11.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
});
markers.forEach((m,i) => {
const y = yStart + i*rH;
const bg = i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.22, y, w:9.53, h:rH, fill:{ color:bg }, line:{ color:"E8E0D0", width:0.4 } });
slide.addShape(pres.ShapeType.rect, { x:0.22, y, w:1.03, h:rH, fill:{ color:m.color } });
slide.addText(m.marker, { x:0.22, y, w:1.03, h:rH, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(m.meaning, { x:1.3, y:y+0.06, w:2.23, h:rH-0.12, fontSize:11, bold:true, color:m.color, fontFace:"Calibri", valign:"middle" });
slide.addText(m.interpretation, { x:3.6, y:y+0.04, w:2.93, h:rH-0.08, fontSize:10.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
slide.addText(m.clinical, { x:6.6, y:y+0.04, w:3.1, h:rH-0.08, fontSize:10.5, color:C.darkGray, fontFace:"Calibri", valign:"middle" });
});
});
// =====================================================
// SLIDE 11 — HBV TREATMENT
// =====================================================
cSlide("Hepatitis B — Treatment", slide => {
// Treatment goals
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.58, fill:{ color:C.brown } });
slide.addText([
{ text:"Treatment Goals: ", options:{ bold:true, fontSize:13.5, color:C.goldLight, fontFace:"Calibri" } },
{ text:"Suppress HBV replication → reduce liver inflammation → prevent cirrhosis/HCC → achieve HBsAg clearance ('functional cure') where possible", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
], { x:0.4, y:0.9, w:9.2, h:0.58, valign:"middle" });
// Indications
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.58, w:4.55, h:1.78, fill:{ color:C.light }, line:{ color:C.amber, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.58, w:4.55, h:0.38, fill:{ color:C.amber } });
slide.addText("Indications for Treatment", { x:0.25, y:1.58, w:4.55, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("HBeAg+ chronic HBV: ALT > 2×ULN + HBV DNA > 20,000 IU/mL", { fs:12 }),
bul("HBeAg− chronic HBV: ALT > 2×ULN + HBV DNA > 2,000 IU/mL", { fs:12 }),
bul("Compensated cirrhosis: HBV DNA detectable (any level)", { fs:12 }),
bul("Decompensated cirrhosis: treat regardless of DNA/ALT", { fs:12 }),
bul("HBV DNA > 200,000 IU/mL in pregnant women ≥ 28 weeks", { fs:12 }),
bul("Immunosuppression planned: prophylactic antiviral therapy", { fs:12 }),
], { x:0.38, y:2.02, w:4.3, h:1.28, valign:"top" });
// Drug table
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.58, w:4.6, h:1.78, fill:{ color:C.lightBlue }, line:{ color:C.blue, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.58, w:4.6, h:0.38, fill:{ color:C.blue } });
slide.addText("Antiviral Agents (Goldman-Cecil 2025)", { x:5.15, y:1.58, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const drugs = [
{ drug:"Tenofovir disoproxil (TDF)", dose:"300 mg/day PO", note:"Preferred; high barrier to resistance" },
{ drug:"Tenofovir alafenamide (TAF)", dose:"25 mg/day PO", note:"Less renal/bone toxicity; preferred if CKD" },
{ drug:"Entecavir", dose:"0.5 mg/day PO", note:"High barrier; preferred if no prior lamivudine" },
{ drug:"PEG-Interferon-α-2a", dose:"180 µg SC/week × 48 wk", note:"Finite duration; aim for seroconversion" },
];
drugs.forEach((d,i) => {
const y = 2.02 + i*0.34;
const bg = i%2===0 ? C.white : C.lightGray;
slide.addShape(pres.ShapeType.rect, { x:5.2, y, w:4.48, h:0.3, fill:{ color:bg } });
slide.addText(d.drug, { x:5.25, y:y+0.03, w:2.0, h:0.25, fontSize:11, bold:true, color:C.blue, fontFace:"Calibri", valign:"middle" });
slide.addText(`${d.dose}`, { x:7.28, y:y+0.03, w:1.1, h:0.25, fontSize:10.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
slide.addText(d.note, { x:5.25, y:y+0.16, w:4.35, h:0.18, fontSize:9.5, color:C.amber, fontFace:"Calibri", italic:true, valign:"middle" });
});
// Vaccination
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.48, w:9.5, h:1.72, fill:{ color:C.lightGray }, line:{ color:C.brown, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.48, w:9.5, h:0.38, fill:{ color:C.brown } });
slide.addText("HBV Vaccination & Prevention", { x:0.25, y:3.48, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const vaxInfo = [
{ t:"Vaccine Schedule", d:"Recombinant HBsAg; 3 doses at 0, 1, 6 months (OR 0, 1, 2 + 12 months accelerated). 2-dose Heplisav-B (adults). > 90% seroconversion." },
{ t:"HBIG (Immunoglobulin)", d:"Post-exposure prophylaxis: needlestick (give within 24h); neonate born to HBsAg+ mother (within 12h + vaccine). Passive immunity only." },
{ t:"Perinatal Prevention", d:"All neonates of HBsAg+ mothers: HBIG + HBV vaccine within 12h of birth. Mothers with HBV DNA > 200,000 IU/mL: tenofovir from 28 weeks." },
{ t:"Universal Vaccination", d:"WHO recommends universal childhood vaccination + birth dose within 24h. Also: healthcare workers, travellers, sexual contacts of HBsAg+ persons." },
];
vaxInfo.forEach((v,i) => {
const x = 0.38 + i*2.38;
slide.addText([
{ text:`${v.t}\n`, options:{ bold:true, fontSize:11.5, color:C.amber, fontFace:"Calibri", breakLine:true } },
{ text:v.d, options:{ fontSize:11, color:C.textDark, fontFace:"Calibri" } },
], { x, y:3.9, w:2.25, h:1.18, valign:"top" });
});
});
// =====================================================
// SLIDE 12 — SECTION: HEPATITIS C
// =====================================================
{ const s = pres.addSlide(); secDiv(s, "04 Hepatitis C Virus (HCV)", "> 300 million infected · DAA revolution · Cure rate > 95%"); }
// =====================================================
// SLIDE 13 — HCV
// =====================================================
cSlide("Hepatitis C — Virology, Genotypes, Clinical Course & Treatment", slide => {
// Virology strip
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:9.5, h:0.52, fill:{ color:C.teal } });
slide.addText([
{ text:"Virus: ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"Hepacivirus (ssRNA+, enveloped, Flaviviridae) | ", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
{ text:"Genotypes: ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"6 major genotypes (1 most common; 1a/1b in US) | ", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
{ text:"Incubation: ", options:{ bold:true, fontSize:13, color:C.goldLight, fontFace:"Calibri" } },
{ text:"2 weeks – 6 months | No vaccine available", options:{ fontSize:13, color:C.white, fontFace:"Calibri" } },
], { x:0.4, y:0.9, w:9.2, h:0.52, valign:"middle" });
// Transmission + Clinical
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.52, w:4.55, h:2.05, fill:{ color:C.lightBlue }, line:{ color:C.teal, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:1.52, w:4.55, h:0.38, fill:{ color:C.teal } });
slide.addText("Transmission & Clinical Course", { x:0.25, y:1.52, w:4.55, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Parenteral: IV/intranasal drug use (#1 route in developed world), needlestick, blood products (pre-1992 screening)", { fs:12 }),
bul("Sexual transmission: uncommon (HIV co-infection ↑ risk)", { fs:12 }),
bul("Vertical (mother to child): 5%; risk ↑ with HIV co-infection", { fs:12 }),
bul("Acute HCV: usually ASYMPTOMATIC (75–80%); icteric in 20–25%", { fs:12 }),
bul("Chronicity: 75–85% of acutely infected patients develop chronic HCV", { fs:12 }),
bul("Anti-HCV antibody: appears 8–12 wks after exposure; not protective", { fs:12 }),
bul("Diagnosis: anti-HCV ELISA → confirm with HCV RNA (PCR)", { fs:12 }),
], { x:0.38, y:1.96, w:4.3, h:1.55, valign:"top" });
// DAA treatments
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.52, w:4.6, h:2.05, fill:{ color:C.light }, line:{ color:C.amber, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:1.52, w:4.6, h:0.38, fill:{ color:C.amber } });
slide.addText("Direct-Acting Antiviral (DAA) Therapy", { x:5.15, y:1.52, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
const daas = [
{ class:"NS5B Pol Inhibitor", drugs:"Sofosbuvir (SOF)", note:"Backbone of all pangenotypic regimens" },
{ class:"NS5A Inhibitor", drugs:"Velpatasvir, Ledipasvir,\nDaclatasvir", note:"Blocks replication complex assembly" },
{ class:"NS3/4A Protease\nInhibitor", drugs:"Glecaprevir, Grazoprevir", note:"Not recommended in decompensated cirrhosis" },
{ class:"Pangenotypic Regimens", drugs:"SOF/VEL (Epclusa) G1-6\nGLE/PIB (Mavyret) G1-6", note:"8–12 weeks; SVR > 95% ALL genotypes" },
];
daas.forEach((d,i) => {
const y = 1.96 + i*0.38;
const bg = i%2===0 ? C.white : C.lightGray;
slide.addShape(pres.ShapeType.rect, { x:5.2, y, w:4.48, h:0.36, fill:{ color:bg } });
slide.addText([
{ text:d.class, options:{ bold:true, fontSize:10.5, color:C.teal, fontFace:"Calibri" } },
{ text:` ${d.drugs}`, options:{ fontSize:10.5, color:C.textDark, fontFace:"Calibri" } },
], { x:5.25, y:y+0.02, w:4.38, h:0.2, valign:"middle" });
slide.addText(d.note, { x:5.25, y:y+0.2, w:4.38, h:0.16, fontSize:9.5, color:C.amber, fontFace:"Calibri", italic:true, valign:"middle" });
});
// SVR + Complications
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.68, w:9.5, h:1.5, fill:{ color:C.lightGray }, line:{ color:C.brown, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:3.68, w:9.5, h:0.38, fill:{ color:C.brown } });
slide.addText("SVR & Extrahepatic Manifestations", { x:0.25, y:3.68, w:9.5, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"SVR (Sustained Virologic Response) = undetectable HCV RNA 12 weeks after treatment completion = cure (99% durable). After SVR: ↓ HCC risk, regression of fibrosis, improved survival.\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Extrahepatic manifestations: ", options:{ bold:true, fontSize:12, color:C.brown, fontFace:"Calibri" } },
{ text:"Mixed cryoglobulinaemia (palpable purpura, arthritis, glomerulonephritis), membranoproliferative GN, B-cell lymphoma, lichen planus, porphyria cutanea tarda, type 2 diabetes", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:0.38, y:4.1, w:9.2, h:0.98, valign:"top" });
});
// =====================================================
// SLIDE 14 — SECTION: HDV & HEV
// =====================================================
{ const s = pres.addSlide(); secDiv(s, "05 Hepatitis D & E Viruses", "HDV requires HBV · HEV faecal-oral · Unique features"); }
// =====================================================
// SLIDE 15 — HDV & HEV
// =====================================================
cSlide("Hepatitis D (HDV) & Hepatitis E (HEV)", slide => {
// HDV
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:4.28, fill:{ color:C.light }, line:{ color:C.purple, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:0.42, fill:{ color:C.purple } });
slide.addText("Hepatitis D Virus (HDV) — Delta Virus", { x:0.25, y:0.9, w:4.55, h:0.42, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Satellite virus — defective RNA virus; REQUIRES HBsAg envelope to replicate; can only infect those with HBV"),
bul("Virology: ssRNA virus (negative sense); smallest human pathogenic RNA virus"),
bul("Transmission: same as HBV — parenteral (IV drug use most common), sexual, perinatal"),
bul("Two patterns:", { bold:true }),
sub("Co-infection: Simultaneous HBV + HDV; usually self-limiting; < 5% chronic; ↑ risk of fulminant hepatitis"),
sub("Superinfection: HDV in chronic HBV carrier; 80% chronic; rapid progression to cirrhosis in 70–80% within 5–10 years"),
bul("Serology:"),
sub("IgM anti-HDV: acute infection; HDV RNA (PCR) confirms"),
sub("Total anti-HDV: past or chronic exposure; HDV Ag positive early"),
bul("Clinical: accelerated liver disease; highest risk of fulminant hepatitis among all viral hepatitides"),
bul("Treatment: PEG-interferon-α (48–72 weeks; 25–30% SVR); Bulevirtide (new entry inhibitor — approved EMA 2020)"),
bul("Prevention: HBV vaccination prevents HDV! HBIG post-exposure. No HDV-specific vaccine"),
], { x:0.38, y:1.38, w:4.3, h:3.74, valign:"top" });
// HEV
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:4.28, fill:{ color:C.lightBlue }, line:{ color:C.teal, width:0.8 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.42, fill:{ color:C.teal } });
slide.addText("Hepatitis E Virus (HEV)", { x:5.15, y:0.9, w:4.6, h:0.42, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Hepevirus — non-enveloped, ssRNA+; 4 main genotypes"),
bul("Transmission: faecal-oral (like HAV); waterborne outbreaks in Asia, Africa, Middle East, Mexico"),
bul("Genotype 1, 2: epidemic in developing countries (waterborne)"),
bul("Genotype 3, 4: zoonotic (pork, deer, shellfish); sporadic in developed countries; chronic in immunocompromised"),
bul("Incubation: 2–10 weeks"),
bul("Usually self-limiting (no chronic carrier state in GT 1/2)"),
bul("Mortality:", { bold:true }),
sub("General population: 0.5–3%"),
sub("Pregnant women (3rd trimester): up to 25–30% — very high fulminant risk"),
sub("Chronic HEV (GT3): in solid organ transplant recipients, HIV+ patients — can progress to cirrhosis"),
bul("Diagnosis: anti-HEV IgM/IgG; HEV RNA in stool/serum"),
bul("Treatment: supportive; no proven antivirals for acute. Ribavirin effective for chronic HEV GT3 (immunocompromised). Reduce immunosuppression first"),
bul("Prevention: safe water supply; cook pork/game fully; HEV 239 vaccine (Hecolin®) approved in China"),
], { x:5.28, y:1.38, w:4.38, h:3.74, valign:"top" });
});
// =====================================================
// SLIDE 16 — SECTION: NON-VIRAL HEPATITIS
// =====================================================
{ const s = pres.addSlide(); secDiv(s, "06 Non-Viral Hepatitis", "Alcoholic · Autoimmune · Drug-Induced (DILI)"); }
// =====================================================
// SLIDE 17 — ALCOHOLIC HEPATITIS
// =====================================================
cSlide("Alcoholic Liver Disease & Alcoholic Hepatitis", slide => {
// Spectrum
const spectrum = [
{ s:"Hepatic\nSteatosis", d:"Reversible within 2–4\nwks of abstinence;\n↑ echogenicity on USS", c:C.green },
{ s:"Alcoholic\nHepatitis", d:"Fever, jaundice, AST:\nALT > 2:1; WBC ↑;\nbilirubin ↑↑", c:C.orange },
{ s:"Alcoholic\nFibrosis", d:"Perivenular + peri-\nsinusoidal fibrosis;\n↑ AST:ALT", c:C.amber },
{ s:"Alcoholic\nCirrhosis", d:"Irreversible; HCC\nrisk; decompensation\nevents", c:C.red },
{ s:"HCC", d:"1%/yr in decompensated\nalcoholic cirrhosis;\nUSS + AFP q6 months", c:"8B0000" },
];
spectrum.forEach((s,i) => {
const x = 0.2 + i*1.94;
slide.addShape(pres.ShapeType.rect, { x, y:0.9, w:1.8, h:1.38, fill:{ color:s.c } });
slide.addText(s.s, { x, y:0.9, w:1.8, h:0.5, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText(s.d, { x, y:1.42, w:1.8, h:0.84, fontSize:10, color:C.white, fontFace:"Calibri", align:"center", valign:"top" });
if(i<4) slide.addText("→", { x:x+1.8, y:1.34, w:0.14, h:0.3, fontSize:13, bold:true, color:C.gold, fontFace:"Calibri", align:"center" });
});
// Maddrey + Treatment
slide.addShape(pres.ShapeType.rect, { x:0.25, y:2.42, w:4.55, h:2.78, fill:{ color:C.light }, line:{ color:C.amber, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:2.42, w:4.55, h:0.38, fill:{ color:C.amber } });
slide.addText("Maddrey Discriminant Function (MDF)", { x:0.25, y:2.42, w:4.55, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
{ text:"MDF = 4.6 × (PT − control PT) + Serum bilirubin (mg/dL)\n\n", options:{ bold:true, fontSize:13.5, color:C.brown, fontFace:"Courier New", breakLine:true } },
{ text:"MDF ≥ 32: ", options:{ bold:true, fontSize:13, color:C.red, fontFace:"Calibri" } },
{ text:"Severe alcoholic hepatitis → 30-day mortality ~ 35%\n", options:{ fontSize:13, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"MDF < 32: ", options:{ bold:true, fontSize:13, color:C.green, fontFace:"Calibri" } },
{ text:"Mild–moderate; supportive management\n\n", options:{ fontSize:13, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Other scores: ", options:{ bold:true, fontSize:12, color:C.amber, fontFace:"Calibri" } },
{ text:"MELD score, Glasgow Alcoholic Hepatitis Score (GAHS), ABIC score\n\n", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri", breakLine:true } },
{ text:"Lille score (after 7 days of steroids): ≥ 0.45 → non-responder → stop steroids, consider transplant evaluation", options:{ fontSize:12, color:C.textDark, fontFace:"Calibri" } },
], { x:0.38, y:2.86, w:4.3, h:2.28, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:2.42, w:4.6, h:2.78, fill:{ color:C.lightBlue }, line:{ color:C.blue, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:2.42, w:4.6, h:0.38, fill:{ color:C.blue } });
slide.addText("Treatment of Alcoholic Hepatitis", { x:5.15, y:2.42, w:4.6, h:0.38, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Abstinence: cornerstone; steatosis reversible in 2 weeks"),
bul("Nutritional support: 1.2–1.5 g protein/kg/day; thiamine, folate, zinc"),
bul("Prednisolone 40 mg/day × 28 days (if MDF ≥ 32, no contraindications)"),
sub("Exclusions: active sepsis, GI bleeding, hepatorenal syndrome, HBV"),
sub("Reassess with Lille score at day 7 (≥ 0.45 = non-responder)"),
bul("Pentoxifylline 400 mg TDS × 28 days: alternative (↓ TNF-α) if steroids contraindicated — benefit questioned"),
bul("N-acetylcysteine: adjunct to steroids (↓ infection risk)"),
bul("Early liver transplantation: select centres; 6-month rule controversial"),
bul("Baclofen: reduce alcohol craving/prevent relapse post-recovery"),
], { x:5.28, y:2.86, w:4.38, h:2.28, valign:"top" });
});
// =====================================================
// SLIDE 18 — AUTOIMMUNE & DRUG-INDUCED HEPATITIS
// =====================================================
cSlide("Autoimmune Hepatitis (AIH) & Drug-Induced Liver Injury (DILI)", slide => {
// AIH
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:4.28, fill:{ color:C.light }, line:{ color:C.purple, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:4.55, h:0.4, fill:{ color:C.purple } });
slide.addText("Autoimmune Hepatitis (AIH)", { x:0.25, y:0.9, w:4.55, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Immune-mediated destruction of hepatocytes; F:M = 4:1"),
bul("Types:", { bold:true }),
sub("Type 1: ANA + / SMA +; most common; any age; pANCA+ in some"),
sub("Type 2: anti-LKM-1 + ; children/young women; HCV overlap"),
sub("Type 3: anti-SLA/LP + ; severe, often relapsing"),
bul("Clinical: wide spectrum — asymptomatic to acute liver failure. Fatigue, jaundice, amenorrhoea, acne in young women"),
bul("Associations: other autoimmune disease (thyroiditis, UC, T1DM, RA)"),
bul("Labs: ↑↑ ALT/AST; ↑ IgG (hallmark); ↑ ALP (if overlap PBC/PSC); autoantibody titres ≥ 1:80"),
bul("Liver biopsy: interface hepatitis (piecemeal necrosis); plasma cell infiltrate"),
bul("Simplified IAIHG Score: ANA/SMA + biopsy + IgG + absence viral markers"),
bul("Treatment:", { bold:true }),
sub("Prednisolone 40–60 mg/day → taper over weeks"),
sub("Add azathioprine 1–2 mg/kg/day as steroid-sparer"),
sub("Remission in 65–80% (normalise ALT + histology)"),
sub("Lifelong maintenance for most; relapse on withdrawal common"),
bul("Liver transplant: acute liver failure or end-stage disease; 5-yr survival 80–90%"),
], { x:0.38, y:1.36, w:4.3, h:3.76, valign:"top" });
// DILI
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:4.28, fill:{ color:"FFF5F5" }, line:{ color:C.red, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:5.15, y:0.9, w:4.6, h:0.4, fill:{ color:C.red } });
slide.addText("Drug-Induced Liver Injury (DILI)", { x:5.15, y:0.9, w:4.6, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Leading cause of acute liver failure in Western countries"),
bul("Types:", { bold:true }),
sub("Intrinsic (predictable/dose-dependent): paracetamol, carbon tetrachloride, aflatoxin"),
sub("Idiosyncratic: most drugs; unpredictable; immune or metabolic mechanism"),
bul("Pattern:", { bold:true }),
sub("Hepatocellular: ALT > 3×ULN (R ratio ≥ 5)"),
sub("Cholestatic: ALP > 2×ULN (R ratio ≤ 2)"),
sub("Mixed: both elevated (R ratio 2–5)"),
bul("R ratio = (ALT/ULN) ÷ (ALP/ULN)"),
bul("Common culprits:", { bold:true }),
sub("Paracetamol: centrilobular necrosis; Zone 3; NAC antidote"),
sub("Isoniazid: 1–2% hepatitis; can be fatal"),
sub("Amoxicillin-clavulanate: cholestatic; most common drug-induced"),
sub("Statins: usually mild ↑ ALT; rarely clinically significant"),
sub("Halothane, diclofenac, nitrofurantoin: immune-mediated"),
bul("Causality: RUCAM (Roussel Uclaf Causality Assessment Method) — score 1–10"),
bul("Management:", { bold:true }),
sub("STOP the offending drug (most important step)"),
sub("NAC for paracetamol within 8–10h; liver transplant if ALF"),
sub("Monitor for resolution; most recover in weeks–months"),
], { x:5.28, y:1.36, w:4.38, h:3.76, valign:"top" });
});
// =====================================================
// SLIDE 19 — CLINICAL APPROACH
// =====================================================
cSlide("Clinical Approach to the Jaundiced/Hepatitic Patient", slide => {
// History
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:3.0, h:3.7, fill:{ color:C.light }, line:{ color:C.amber, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:0.9, w:3.0, h:0.4, fill:{ color:C.amber } });
slide.addText("History", { x:0.25, y:0.9, w:3.0, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("Onset & duration of symptoms", { fs:12 }),
bul("Travel history (HAV, HEV endemic areas)", { fs:12 }),
bul("Sexual history (HBV, HCV risk)", { fs:12 }),
bul("IV drug use / needlestick (HBV, HCV)", { fs:12 }),
bul("Blood transfusion history (pre-1992 HCV)", { fs:12 }),
bul("Alcohol consumption (quantity, duration)", { fs:12 }),
bul("Medication & herbal supplement use (DILI)", { fs:12 }),
bul("Family history (Wilson, haemochromatosis)", { fs:12 }),
bul("Vaccination history (HAV, HBV)", { fs:12 }),
bul("HIV status (co-infection modifies HBV/HCV course)", { fs:12 }),
bul("Pregnancy status (HEV risk, perinatal HBV)", { fs:12 }),
], { x:0.38, y:1.36, w:2.78, h:3.18, valign:"top" });
// Investigations
slide.addShape(pres.ShapeType.rect, { x:3.5, y:0.9, w:3.2, h:3.7, fill:{ color:C.lightBlue }, line:{ color:C.blue, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:3.5, y:0.9, w:3.2, h:0.4, fill:{ color:C.blue } });
slide.addText("Key Investigations", { x:3.5, y:0.9, w:3.2, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("LFTs: ALT, AST, ALP, GGT, bilirubin (conj/unconj)", { fs:12 }),
bul("PT/INR (synthetic function)", { fs:12 }),
bul("Albumin, glucose (decompensation)", { fs:12 }),
bul("FBC: WCC, platelets (hypersplenism)", { fs:12 }),
bul("Hepatitis serology panel:", { fs:12, bold:true }),
sub("Anti-HAV IgM, IgG", { fs:11.5 }),
sub("HBsAg, anti-HBs, anti-HBc IgM/IgG, HBeAg, HBV DNA", { fs:11.5 }),
sub("Anti-HCV + HCV RNA if anti-HCV positive", { fs:11.5 }),
sub("Anti-HDV (if HBV+)", { fs:11.5 }),
sub("Anti-HEV IgM (if relevant exposure)", { fs:11.5 }),
bul("Autoimmune: ANA, SMA, anti-LKM-1, IgG", { fs:12 }),
bul("Metabolic: ferritin, TIBC, caeruloplasmin, α1-AT", { fs:12 }),
bul("USS abdomen (liver size, echogenicity, portal flow, biliary tract)", { fs:12 }),
bul("FibroScan / Liver biopsy (staging/grading if needed)", { fs:12 }),
], { x:3.63, y:1.36, w:2.98, h:3.18, valign:"top" });
// Interpretation box
slide.addShape(pres.ShapeType.rect, { x:6.95, y:0.9, w:2.8, h:3.7, fill:{ color:C.lightGray }, line:{ color:C.brown, width:0.7 } });
slide.addShape(pres.ShapeType.rect, { x:6.95, y:0.9, w:2.8, h:0.4, fill:{ color:C.brown } });
slide.addText("Interpreting LFTs", { x:6.95, y:0.9, w:2.8, h:0.4, fontSize:13.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addText([
bul("ALT > AST:", { bold:true, fs:12 }),
sub("Viral hepatitis (typical)", { fs:11.5 }),
bul("AST:ALT > 2:1:", { bold:true, fs:12 }),
sub("Alcoholic hepatitis (classic)", { fs:11.5 }),
bul("AST:ALT > 3:1:", { bold:true, fs:12 }),
sub("Suggests alcohol strongly", { fs:11.5 }),
bul("ALP + GGT ↑↑:", { bold:true, fs:12 }),
sub("Cholestatic pattern: PBC, PSC, DILI, bile duct obstruction", { fs:11.5 }),
bul("ALT/AST > 1000:", { bold:true, fs:12 }),
sub("Viral hepatitis, ischaemic, paracetamol, acute Budd-Chiari", { fs:11.5 }),
bul("Falling ALT + rising bilirubin:", { bold:true, fs:12 }),
sub("Poor prognostic sign in acute liver failure", { fs:11.5 }),
bul("Conjugated bilirubin ↑:", { bold:true, fs:12 }),
sub("Hepatocellular or cholestatic disease", { fs:11.5 }),
bul("Unconjugated bilirubin ↑:", { bold:true, fs:12 }),
sub("Haemolysis or Gilbert's syndrome", { fs:11.5 }),
], { x:7.08, y:1.36, w:2.58, h:3.18, valign:"top" });
slide.addShape(pres.ShapeType.rect, { x:0.25, y:4.73, w:9.5, h:0.52, fill:{ color:C.brown } });
slide.addText("Acute Liver Failure (ALF) criteria: Coagulopathy (PT > 15s / INR > 1.5) + Hepatic encephalopathy WITHOUT prior liver disease. King's College Criteria guides transplant listing.", { x:0.4, y:4.73, w:9.2, h:0.52, fontSize:11.5, bold:false, color:C.white, fontFace:"Calibri", valign:"middle" });
});
// =====================================================
// SLIDE 20 — COMPARISON TABLE
// =====================================================
cSlide("Viral Hepatitis — Comparison Summary", slide => {
const rows = [
{ hdr:true, a:"Feature", b:"HAV", c:"HBV", d:"HCV", e:"HDV", f:"HEV" },
{ a:"Genome", b:"ssRNA+", c:"dsDNA (partial)", d:"ssRNA+", e:"ssRNA−\n(satellite)", f:"ssRNA+" },
{ a:"Family", b:"Picornaviridae", c:"Hepadnaviridae", d:"Flaviviridae", e:"Deltaviridae", f:"Hepeviridae" },
{ a:"Transmission", b:"Faecal-oral", c:"Blood/sexual/\nperinatal", d:"Blood/IV\ndrug use", e:"Blood/sexual\n(needs HBV)", f:"Faecal-oral\n(+ zoonotic GT3)" },
{ a:"Incubation", b:"2–6 weeks", c:"1–6 months", d:"2 wks–6 mths", e:"3–7 weeks", f:"2–10 weeks" },
{ a:"Chronic?", b:"Never", c:"5–10% adults\n(90% neonates)", d:"75–85%", e:"Superinfection\n→ 80% chronic", f:"Rare (GT3 in\nimmunocomp.)" },
{ a:"Diagnosis", b:"Anti-HAV IgM", c:"HBsAg + IgM\nanti-HBc", d:"Anti-HCV +\nHCV RNA", e:"Anti-HDV +\nHDV RNA", f:"Anti-HEV IgM\nHEV RNA" },
{ a:"Treatment", b:"Supportive", c:"TDF/TAF/ETV\nPEG-IFN", d:"SOF/VEL\n(pangenotypic)", e:"PEG-IFN\nBulevirtide", f:"Supportive\n(Ribavirin GT3)" },
{ a:"Vaccine", b:"Yes\n(inactivated)", c:"Yes\n(recombinant)", d:"No", e:"HBV vaccine\nprevents HDV", f:"Yes (China only)\nHecolin" },
{ a:"Special Feature", b:"No chronicity;\nanti-HAV IgG\n= immunity", c:"Window period;\nHCC w/o\ncirrhosis", d:"No Abdy\nprotective;\nSVR = cure", e:"Requires HBV;\nworst hepatitis\noutcome", f:"Highest mortality\nin pregnancy\n(25–30%, GT1)" },
];
const hdrsB = ["Feature","HAV","HBV","HCV","HDV","HEV"];
const xP = [0.22, 1.88, 3.42, 5.0, 6.58, 8.14]; const wP = [1.63, 1.51, 1.55, 1.55, 1.53, 1.6];
const yStart = 0.92; const rH = 0.48;
rows.forEach((r,i) => {
const y = yStart + i*rH;
const bg = i===0 ? C.brown : i%2===0 ? C.white : C.light;
slide.addShape(pres.ShapeType.rect, { x:0.22, y, w:9.53, h:rH, fill:{ color:bg }, line:{ color:"E8E0D0", width:0.3 } });
const vals = [r.a, r.b, r.c, r.d, r.e, r.f];
vals.forEach((val,j) => {
const clr = i===0 ? C.white : j===0 ? C.brown : C.textDark;
const bold2 = i===0 || j===0;
slide.addText(val, { x:xP[j], y, w:wP[j], h:rH, fontSize:10, bold:bold2, color:clr, fontFace:"Calibri", align:"center", valign:"middle" });
});
});
});
// =====================================================
// SLIDE 21 — SUMMARY
// =====================================================
cSlide("Summary — Key Takeaways", slide => {
const points = [
{ n:"1", h:"HAV", t:"Faecal-oral, self-limiting, no chronicity. Anti-HAV IgM = acute. Excellent vaccine. Fulminant hepatitis rare but risk ↑ in elderly and chronic liver disease." },
{ n:"2", h:"HBV", t:"2 billion infected; 5 phases of chronic HBV. Serology interpretation critical. Treat with TDF/TAF/ETV. Vaccine + HBIG prevent neonatal transmission (key public health priority)." },
{ n:"3", h:"HCV", t:"75–85% chronic after acute infection; anti-HCV not protective. DAA regimens (SOF/VEL) achieve > 95% SVR (cure) for all genotypes in 8–12 weeks. No vaccine." },
{ n:"4", h:"HDV & HEV", t:"HDV = satellite virus; needs HBV. Superinfection → 80% chronic, rapid cirrhosis. HEV = faecal-oral; mortality 25–30% in pregnancy (GT1). GT3 chronic in immunocompromised." },
{ n:"5", h:"Alcoholic", t:"Spectrum: steatosis → hepatitis → cirrhosis. MDF ≥ 32 = severe; treat with prednisolone 40 mg/day. Lille score at day 7. Abstinence is the single most important intervention." },
{ n:"6", h:"Autoimmune", t:"ANA/SMA + ↑ IgG + interface hepatitis on biopsy. Prednisolone + azathioprine; remission in 65–80%. Lifelong maintenance needed for most patients." },
{ n:"7", h:"DILI", t:"Leading cause of ALF in the West. Paracetamol #1 (NAC antidote within 8–10h). Stop offending drug. R ratio classifies pattern. RUCAM tool for causality assessment." },
];
points.forEach((p,i) => {
const col = i<4 ? 0 : 1;
const row = i<4 ? i : i-4;
const x = col===0 ? 0.22 : 5.12;
const y = 0.9 + row*1.1;
slide.addShape(pres.ShapeType.rect, { x, y, w:0.45, h:0.9, fill:{ color:C.brown } });
slide.addText(p.n, { x, y, w:0.45, h:0.9, fontSize:18, bold:true, color:C.gold, fontFace:"Calibri", align:"center", valign:"middle" });
slide.addShape(pres.ShapeType.rect, { x:x+0.47, y, w:4.42, h:0.9, fill:{ color:C.lightGray }, line:{ color:"E8E0D0", width:0.4 } });
slide.addText(p.h, { x:x+0.56, y, w:0.85, h:0.9, fontSize:12, bold:true, color:C.amber, fontFace:"Calibri", valign:"middle" });
slide.addText(p.t, { x:x+1.45, y, w:3.45, h:0.9, fontSize:10.5, color:C.textDark, fontFace:"Calibri", valign:"middle" });
});
});
// =====================================================
// SLIDE 22 — THANK YOU
// =====================================================
{
const slide = pres.addSlide();
addBg(slide, C.brown);
slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.15, h:5.625, fill:{ color:C.gold } });
slide.addShape(pres.ShapeType.rect, { x:9.85, y:0, w:0.15, h:5.625, fill:{ color:C.saffron } });
slide.addShape(pres.ShapeType.rect, { x:0.15, y:3.6, w:9.7, h:2.025, fill:{ color:C.amber } });
slide.addText("Thank You", { x:0.3, y:0.5, w:9.4, h:0.9, fontSize:44, bold:true, color:C.white, fontFace:"Calibri", align:"center" });
slide.addShape(pres.ShapeType.rect, { x:2.5, y:1.55, w:5.0, h:0.07, fill:{ color:C.gold } });
slide.addText("Questions & Discussion", { x:0.3, y:1.7, w:9.4, h:0.5, fontSize:18, italic:true, color:C.goldLight, fontFace:"Calibri", align:"center" });
slide.addText([
{ text:"Key References\n", options:{ bold:true, fontSize:13, color:C.gold, fontFace:"Calibri", breakLine:true } },
{ text:"1. Harrison's Principles of Internal Medicine, 22nd Ed (2025). Chapters 328, 334, 335: Hepatitis Viruses & Management.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"2. Goldman-Cecil Medicine (2025). Chapters 134–135: Acute & Chronic Viral Hepatitis. Chapter 328: Antivirals for Hepatitis.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"3. Sleisenger & Fordtran's Gastrointestinal and Liver Disease, 11th Ed. Sections on Viral & Non-Viral Hepatitis.\n", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri", breakLine:true } },
{ text:"4. EASL CPG: Management of Hepatitis B, C, D, E. J Hepatol 2017–2023. | 5. AASLD-IDSA HCV Guidance 2024 (HCVguidelines.org).", options:{ fontSize:10.5, color:C.white, fontFace:"Calibri" } },
], { x:0.3, y:2.3, w:9.4, h:1.22, valign:"top" });
slide.addText("Hepatitis | Medical Education Presentation | May 2026", { x:0.3, y:3.65, w:9.4, h:0.42, fontSize:11, color:C.white, fontFace:"Calibri", align:"center", valign:"middle" });
}
// =====================================================
// SAVE
// =====================================================
pres.writeFile({ fileName:"/home/daytona/workspace/hepatitis-ppt/Hepatitis_Medical_Students.pptx" })
.then(() => console.log("✅ Saved: Hepatitis_Medical_Students.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/hepatitis-ppt && node hepatitis.js 2>&1
ls -lh /home/daytona/workspace/hepatitis-ppt/Hepatitis_Medical_Students.pptx
Hepatitis Medical Students
Presentation · PPTX
| # | Slide(s) | Content |
|---|---|---|
| 1 | Title | Sources: Harrison's 22E, Goldman-Cecil, Sleisenger & Fordtran |
| 2 | Learning Objectives | 7 clinical outcomes |
| 3–5 | Overview & Pathophysiology | Classification grid (viral/alcoholic/AIH/DILI); inflammatory cascade → fibrosis; 3 patterns (hepatocellular, chronic, cholestatic) |
| 6–7 | Hepatitis A | Serology (IgM vs IgG vs PCR); self-limiting course; fulminant risk groups; vaccine schedule; post-exposure prophylaxis |
| 8–9 | Hepatitis B | Virology; transmission routes; risk of chronicity by age at infection (90% neonates → < 5% adults); 5 phases of chronic HBV table (HBsAg/HBeAg/DNA/ALT/activity) |
| 10 | HBV Serology | Full 7-marker table (HBsAg, anti-HBs, anti-HBc IgM/IgG, HBeAg, anti-HBe, HBV DNA) with interpretation + clinical use |
| 11 | HBV Treatment | Treatment indications (HBeAg+/−, cirrhosis, pregnancy); drug table (TDF/TAF/ETV/PEG-IFN with doses); vaccination schedule + HBIG protocol |
| 12–13 | Hepatitis C | Virology; 75–85% chronicity; anti-HCV not protective; DAA regimen table (SOF/VEL, GLE/PIB); SVR = cure; extrahepatic manifestations (cryoglobulinaemia, GN, lymphoma) |
| 14–15 | Hepatitis D & E | HDV satellite virus; co-infection vs superinfection; bulevirtide (EMA-approved); HEV faecal-oral; GT1 maternal mortality 25–30%; ribavirin for chronic GT3 |
| 16–17 | Alcoholic Hepatitis | Disease spectrum (steatosis → HCC); Maddrey formula; Lille score at day 7; prednisolone criteria; pentoxifylline; early transplant |
| 18 | AIH & DILI | AIH types 1/2/3 with antibody profiles; prednisolone + azathioprine; DILI R-ratio classification; paracetamol NAC antidote; RUCAM score |
| 19 | Clinical Approach | History checklist; investigation panel; LFT interpretation guide (AST:ALT ratios, patterns); ALF criteria |
| 20 | Comparison Table | All 5 viruses side-by-side (genome, family, transmission, incubation, chronicity, diagnosis, treatment, vaccine, special feature) |
| 21 | Summary | 7-point key takeaways (one per hepatitis type) |
| 22 | References | Harrison's 22E, Goldman-Cecil, EASL guidelines, AASLD-IDSA HCV guidance 2024 |