Topic : treatment plan for heart failure.make presentation for mbbs final year student
"heart failure" AND treatment guidelines
mkdir -p /home/daytona/workspace/heart-failure-pptx && ls /home/daytona/workspace/heart-failure-pptx/
~/heart-failure-pptx/hf_presentation.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Heart Failure - Treatment Plan";
pres.author = "MBBS Final Year";
// ─── COLOR PALETTE ─────────────────────────────────────────────
// Deep navy dominant, crimson accent, light gray body, white text
const C = {
navy: "0D1B3E", // dominant bg
navyMid: "162447", // section bg
crimson: "C0392B", // accent / headings
crimsonSoft:"E74C3C",
teal: "1A5276",
gold: "F39C12",
green: "1E8449",
greenSoft: "27AE60",
white: "FFFFFF",
offWhite: "F0F3F4",
grayLight: "BDC3C7",
grayMid: "7F8C8D",
darkText: "1C2833",
boxBlue: "1F618D",
boxGreen: "1E8449",
boxOrange: "D35400",
boxRed: "C0392B",
boxPurple: "6C3483",
};
// ─── HELPERS ────────────────────────────────────────────────────
function addTitle(slide, text) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.crimson } });
slide.addText(text, {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true,
color: C.white, valign: "middle", fontFace: "Calibri"
});
}
function addSectionBadge(slide, label, x, y, w, color) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h: 0.35, fill: { color }, line: { color, width: 0 } });
slide.addText(label, { x, y, w, h: 0.35, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
}
function addBox(slide, title, bullets, x, y, w, h, titleColor) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: "EAF2FF" }, line: { color: titleColor || C.boxBlue, width: 1.5 } });
slide.addShape(pres.ShapeType.rect, { x, y, w, h: 0.38, fill: { color: titleColor || C.boxBlue }, line: { color: titleColor || C.boxBlue, width: 0 } });
slide.addText(title, { x: x + 0.08, y, w: w - 0.16, h: 0.38, fontSize: 12, bold: true, color: C.white, valign: "middle", fontFace: "Calibri" });
const items = bullets.map((b, i) => ({
text: b,
options: { bullet: true, breakLine: i < bullets.length - 1, fontSize: 10.5, color: C.darkText, fontFace: "Calibri" }
}));
slide.addText(items, { x: x + 0.1, y: y + 0.42, w: w - 0.2, h: h - 0.5, valign: "top" });
}
// ══════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// Full dark bg
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
// Red accent strip top
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.12, fill: { color: C.crimson } });
// Red accent strip bottom
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.5, w: "100%", h: 0.12, fill: { color: C.crimson } });
// Heart icon decoration (large circle)
s.addShape(pres.ShapeType.ellipse, { x: 7.5, y: 0.5, w: 2.2, h: 2.2, fill: { color: C.crimson }, line: { color: C.crimson } });
s.addText("♥", { x: 7.5, y: 0.6, w: 2.2, h: 2.0, fontSize: 60, color: C.white, align: "center", valign: "middle" });
// Title
s.addText("HEART FAILURE", {
x: 0.5, y: 0.9, w: 6.8, h: 1.1, fontSize: 46, bold: true, color: C.white,
charSpacing: 4, fontFace: "Calibri"
});
s.addText("TREATMENT PLAN", {
x: 0.5, y: 1.95, w: 6.8, h: 0.7, fontSize: 28, bold: false, color: C.gold,
charSpacing: 2, fontFace: "Calibri"
});
s.addShape(pres.ShapeType.line, { x: 0.5, y: 2.7, w: 6.5, h: 0, line: { color: C.crimson, width: 2 } });
s.addText("A Comprehensive Clinical Overview for MBBS Final Year Students", {
x: 0.5, y: 2.85, w: 9, h: 0.5, fontSize: 14, italic: true, color: C.grayLight, fontFace: "Calibri"
});
s.addText([
{ text: "Topics Covered: ", options: { bold: true, color: C.gold } },
{ text: "Definition | Classification | Pathophysiology | Pharmacotherapy | Non-pharmacological | Devices | Special Cases", options: { color: C.grayLight } }
], { x: 0.5, y: 3.5, w: 9.2, h: 0.5, fontSize: 11, fontFace: "Calibri" });
s.addText("Based on ACC/AHA 2022 HF Guidelines & ESC 2021 Guidelines", {
x: 0.5, y: 4.9, w: 9, h: 0.4, fontSize: 11, color: C.grayMid, fontFace: "Calibri", italic: true
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 2 — DEFINITION & EPIDEMIOLOGY
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Definition & Epidemiology");
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.9, w: 9.4, h: 1.0, fill: { color: C.navyMid }, line: { color: C.navy } });
s.addText([
{ text: "Heart failure (HF) ", options: { bold: true, color: C.gold } },
{ text: "is a complex clinical syndrome in which structural or functional cardiac impairment reduces the heart's ability to fill or eject blood, causing symptoms of dyspnea, fatigue, and fluid retention.", options: { color: C.white } }
], { x: 0.5, y: 0.92, w: 9.0, h: 0.95, fontSize: 13, fontFace: "Calibri", valign: "middle" });
// Epidemiology boxes
const epiBullets = [
["~64 million people globally affected", "Leading cause of hospitalization in >65 yrs", "~50% die within 5 years of diagnosis"],
["Prevalence: 1-2% in developed countries", "Annual incidence increasing with aging population", "Direct cost: USD 30 billion annually (USA)"],
["Most common causes: CAD (ischaemic), Hypertension, Cardiomyopathy, Valvular disease, Myocarditis", "Precipitants: Infection, Non-compliance, AF, Anaemia"]
];
const boxColors = [C.boxBlue, C.boxOrange, C.boxGreen];
const boxTitles = ["Global Burden", "Prevalence & Cost", "Aetiology"];
for (let i = 0; i < 3; i++) {
addBox(s, boxTitles[i], epiBullets[i], 0.25 + i * 3.2, 2.05, 3.0, 2.85, boxColors[i]);
}
s.addText("Mnemonic: FAILURE — Fatigue, Activity limitation, Irregular heartbeat, Leg swelling, Unusual breathlessness, Reduced EF, Extra sounds (S3)", {
x: 0.3, y: 5.1, w: 9.4, h: 0.4, fontSize: 10.5, color: C.crimson, italic: true, fontFace: "Calibri"
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 3 — CLASSIFICATION: ACC/AHA STAGES & NYHA
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Classification: ACC/AHA Stages & NYHA Functional Classes");
// ACC/AHA stages table
const stages = [
{ stage: "A", nyha: "Pre-HF", desc: "At-risk: HTN, DM, CAD\n(No structural disease)", mgmt: "Treat risk factors", color: C.greenSoft },
{ stage: "B", nyha: "I", desc: "Structural disease\n(No symptoms)", mgmt: "ACEI/ARB + β-blocker", color: C.gold },
{ stage: "C", nyha: "II / III", desc: "Structural disease\n+ Symptoms", mgmt: "Diuretic + ACEI/ARB/ARNI\n+ β-blocker + MRA + SGLT2i", color: C.crimsonSoft },
{ stage: "D", nyha: "IV", desc: "Refractory HF\nSymptoms at rest", mgmt: "LVAD, Transplant\nPalliative care", color: C.boxRed },
];
const stageX = [0.2, 2.6, 5.0, 7.4];
stages.forEach((st, i) => {
const x = stageX[i];
s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 2.3, h: 4.55, fill: { color: "FDFEFE" }, line: { color: st.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 2.3, h: 0.6, fill: { color: st.color } });
s.addText(`Stage ${st.stage}`, { x, y: 0.85, w: 2.3, h: 0.6, fontSize: 18, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(`NYHA Class: ${st.nyha}`, { x: x + 0.1, y: 1.5, w: 2.1, h: 0.35, fontSize: 11, bold: true, color: st.color, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 1.87, w: 2.1, h: 0, line: { color: C.grayLight, width: 1 } });
s.addText(st.desc, { x: x + 0.1, y: 1.95, w: 2.1, h: 1.0, fontSize: 10.5, color: C.darkText, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 3.0, w: 2.1, h: 0, line: { color: C.grayLight, width: 1 } });
s.addText("Management:", { x: x + 0.1, y: 3.08, w: 2.1, h: 0.3, fontSize: 10, bold: true, color: C.grayMid, fontFace: "Calibri" });
s.addText(st.mgmt, { x: x + 0.1, y: 3.4, w: 2.1, h: 1.9, fontSize: 10, color: C.darkText, fontFace: "Calibri" });
});
// Arrow between stages
for (let i = 0; i < 3; i++) {
s.addText("→", { x: stageX[i] + 2.32, y: 2.8, w: 0.3, h: 0.4, fontSize: 18, color: C.grayMid, align: "center" });
}
}
// ══════════════════════════════════════════════════════════════
// SLIDE 4 — EF-BASED CLASSIFICATION
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "EF-Based Classification: HFrEF, HFmrEF, HFpEF");
const efTypes = [
{
label: "HFrEF", efRange: "EF < 40%", subtitle: "Reduced EF (Systolic HF)", color: C.boxRed,
patho: "Impaired systolic contractility\nDilated LV cavity\nReduced stroke volume",
treatment: "Full GDMT: ARNI/ACEI + β-blocker\n+ MRA + SGLT2i + Diuretics",
drugs: "Sacubitril/Valsartan, Carvedilol, Spironolactone, Dapagliflozin"
},
{
label: "HFmrEF", efRange: "EF 40–49%", subtitle: "Mildly Reduced EF", color: C.gold,
patho: "Mixed systolic/diastolic dysfunction\nIntermediate phenotype\nOften ischaemic aetiology",
treatment: "Consider GDMT agents\nDiuretics for congestion\nTreat underlying cause",
drugs: "ACEI/ARB, β-blockers, SGLT2i (emerging evidence)"
},
{
label: "HFpEF", efRange: "EF ≥ 50%", subtitle: "Preserved EF (Diastolic HF)", color: C.boxGreen,
patho: "Impaired ventricular relaxation\nStiff LV\nHigher filling pressures",
treatment: "Treat comorbidities (HTN, AF, obesity)\nSGLT2i reduce hospitalizations",
drugs: "SGLT2i (Empagliflozin, Dapagliflozin)\nDiuretics for symptoms"
}
];
efTypes.forEach((ef, i) => {
const x = 0.2 + i * 3.25;
s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 3.05, h: 4.55, fill: { color: "FDFEFE" }, line: { color: ef.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 3.05, h: 0.75, fill: { color: ef.color } });
s.addText(ef.label, { x, y: 0.87, w: 3.05, h: 0.38, fontSize: 20, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(ef.efRange, { x, y: 1.22, w: 3.05, h: 0.35, fontSize: 12, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(ef.subtitle, { x: x + 0.1, y: 1.65, w: 2.85, h: 0.35, fontSize: 10.5, bold: true, color: ef.color, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 2.05, w: 2.85, h: 0, line: { color: C.grayLight, width: 1 } });
s.addText("Pathophysiology:", { x: x + 0.1, y: 2.1, w: 2.85, h: 0.3, fontSize: 9.5, bold: true, color: C.grayMid, fontFace: "Calibri" });
s.addText(ef.patho, { x: x + 0.1, y: 2.42, w: 2.85, h: 0.85, fontSize: 10, color: C.darkText, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 3.32, w: 2.85, h: 0, line: { color: C.grayLight, width: 1 } });
s.addText("Treatment Strategy:", { x: x + 0.1, y: 3.37, w: 2.85, h: 0.3, fontSize: 9.5, bold: true, color: C.grayMid, fontFace: "Calibri" });
s.addText(ef.treatment, { x: x + 0.1, y: 3.7, w: 2.85, h: 0.75, fontSize: 10, color: C.darkText, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 4.5, w: 2.85, h: 0, line: { color: C.grayLight, width: 1 } });
s.addText(ef.drugs, { x: x + 0.1, y: 4.55, w: 2.85, h: 0.75, fontSize: 9.5, italic: true, color: ef.color, fontFace: "Calibri" });
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 5 — PATHOPHYSIOLOGY
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.crimson } });
s.addText("Pathophysiology of Heart Failure", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true,
color: C.white, valign: "middle", fontFace: "Calibri"
});
// Central cascade
const steps = [
{ label: "Cardiac Injury / Stress", detail: "(MI, HTN, Cardiomyopathy)", color: C.crimson, x: 3.8, y: 0.85 },
{ label: "Reduced CO / Stretch", detail: "Decreased cardiac output", color: C.boxOrange, x: 3.8, y: 1.65 },
{ label: "Neurohormonal Activation", detail: "RAAS + SNS + ADH + BNP", color: C.gold, x: 3.8, y: 2.45 },
{ label: "Maladaptive Remodeling", detail: "Ventricular dilation, hypertrophy, fibrosis", color: C.boxBlue, x: 3.8, y: 3.25 },
{ label: "Progressive HF & Death", detail: "SCD, pump failure", color: C.boxRed, x: 3.8, y: 4.05 },
];
steps.forEach((st, i) => {
s.addShape(pres.ShapeType.roundRect, { x: st.x, y: st.y, w: 4.2, h: 0.65, fill: { color: st.color }, rectRadius: 0.12, line: { color: st.color } });
s.addText(st.label, { x: st.x + 0.1, y: st.y + 0.02, w: 4.0, h: 0.35, fontSize: 12.5, bold: true, color: C.white, valign: "middle", fontFace: "Calibri" });
s.addText(st.detail, { x: st.x + 0.1, y: st.y + 0.35, w: 4.0, h: 0.28, fontSize: 10, color: C.white, fontFace: "Calibri" });
if (i < steps.length - 1) {
s.addText("▼", { x: st.x + 1.8, y: st.y + 0.65, w: 0.6, h: 0.35, fontSize: 16, color: C.grayLight, align: "center" });
}
});
// Side panels
addBox(s, "RAAS Activation", ["↑ Renin → AngII → Aldosterone", "Na+/H2O retention", "Vasoconstriction", "Myocardial fibrosis", "Hypertension ↑"], 0.15, 0.85, 3.45, 2.4, C.boxBlue);
addBox(s, "SNS Activation", ["↑ NE → tachycardia", "↑ contractility (short-term)", "↑ afterload (long-term)", "β-receptor downregulation", "Arrhythmia risk ↑"], 0.15, 3.35, 3.45, 2.05, C.boxPurple);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 6 — DIAGNOSIS
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Diagnosis of Heart Failure");
addBox(s, "Clinical Features", [
"SYMPTOMS: Dyspnea (exertional → rest), Orthopnea, PND, Fatigue, Leg swelling",
"SIGNS: Raised JVP, S3 gallop, Pulmonary crepitations, Peripheral oedema, Displaced apex",
"Reduced exercise tolerance, Cachexia in severe HF"
], 0.2, 0.9, 4.6, 2.1, C.boxBlue);
addBox(s, "Investigations", [
"BNP >100 pg/mL or NT-proBNP >300 pg/mL (diagnosis)",
"ECG: LVH, Q waves, LBBB, AF",
"CXR: Cardiomegaly (CTR >0.5), Kerley B lines, Bat-wing opacity, Pleural effusion",
"Echo: EF, wall motion, valves (KEY investigation)",
"Bloods: FBC, U&E, LFT, TFT, Lipids, HbA1c"
], 5.0, 0.9, 4.7, 2.1, C.boxRed);
addBox(s, "Framingham Criteria (2 Major OR 1 Major + 2 Minor)", [
"MAJOR: PND, Orthopnea, Raised JVP, S3 gallop, Cardiomegaly, Pulmonary oedema, Weight loss >4.5 kg in 5 days on Rx",
"MINOR: Bilateral ankle oedema, Nocturnal cough, Dyspnoea on exertion, Hepatomegaly, Pleural effusion, Tachycardia (HR >120)"
], 0.2, 3.1, 4.6, 2.3, C.boxOrange);
addBox(s, "Echocardiographic Assessment", [
"EF measurement (Biplane Simpson's method)",
"Assess diastolic function: E/e' ratio, E/A ratio",
"Wall motion abnormality → ischaemic HF",
"Valvular pathology identification",
"Estimated RVSP for pulmonary HTN",
"Pericardial effusion"
], 5.0, 3.1, 4.7, 2.3, C.boxGreen);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 7 — TREATMENT OVERVIEW (THE PILLARS)
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.crimson } });
s.addText("Treatment Pillars of Heart Failure", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: C.white, valign: "middle", fontFace: "Calibri"
});
const pillars = [
{ icon: "💊", title: "Pharmacotherapy", items: ["ACEi / ARB / ARNI", "Beta-Blockers", "MRA (Spironolactone)", "SGLT2 inhibitors", "Diuretics", "Digoxin (selected)"], color: C.crimsonSoft },
{ icon: "🥗", title: "Non-Pharmacological", items: ["Salt restriction (<2g/day)", "Fluid restriction", "Weight monitoring", "Smoking cessation", "Exercise rehab (HF-ACTION)", "Cardiac rehab programme"], color: C.boxBlue },
{ icon: "⚙️", title: "Device Therapy", items: ["ICD (SCD prevention)", "CRT (biventricular pacing)", "LVAD (bridge to Tx)", "Heart transplantation", "TAVI/surgical valve"], color: C.boxOrange },
{ icon: "🏥", title: "Acute HF Management", items: ["Oxygen / NIV (CPAP)", "IV Furosemide", "IV Nitrates (vasodilators)", "Inotropes (dopamine, dobutamine)", "Morphine (cautious use)", "Treat precipitants"], color: C.boxGreen },
];
pillars.forEach((p, i) => {
const x = 0.2 + i * 2.42;
s.addShape(pres.ShapeType.rect, { x, y: 0.88, w: 2.3, h: 4.5, fill: { color: C.navyMid }, line: { color: p.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 0.88, w: 2.3, h: 0.65, fill: { color: p.color } });
s.addText(p.icon + " " + p.title, { x: x + 0.06, y: 0.88, w: 2.18, h: 0.65, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
const bullets = p.items.map((it, j) => ({ text: it, options: { bullet: true, breakLine: j < p.items.length - 1, fontSize: 10.5, color: C.offWhite, fontFace: "Calibri" } }));
s.addText(bullets, { x: x + 0.1, y: 1.6, w: 2.1, h: 3.65, valign: "top" });
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 8 — PHARMACOTHERAPY: GDMT OVERVIEW
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Guideline-Directed Medical Therapy (GDMT) for HFrEF");
// "Fantastic Four" label
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.85, w: 9.2, h: 0.4, fill: { color: C.navyMid } });
s.addText('The "Fantastic Four" — Cornerstone of HFrEF Treatment (Mortality Benefit)', {
x: 0.3, y: 0.85, w: 9.2, h: 0.4, fontSize: 12, bold: true, color: C.gold, align: "center", valign: "middle", fontFace: "Calibri"
});
const gdmt = [
{ class: "ARNI / ACEi / ARB", example: "Sacubitril/Valsartan\n(Entresto)", mechanism: "Blocks RAAS; ARNI also inhibits neprilysin → ↑ natriuretic peptides → vasodilation + natriuresis", mortality: "↓ Mortality by 20% (PARADIGM-HF)", dose: "Sacubitril/Val: 49/51mg BD\nEnalaprll: 2.5–20mg BD", cautions: "Avoid in pregnancy, bilateral RAS, hyperkalemia; 36h washout from ACEi before ARNI", color: C.boxBlue },
{ class: "Beta-Blockers", example: "Carvedilol\nBisoprolol\nMetoprolol succinate", mechanism: "Blocks SNS; ↓ HR, ↓ remodeling, antiarrhythmic, ↑ EF", mortality: "↓ Mortality by ~34% (COPERNICUS, MERIT-HF)", dose: "Carvedilol: 3.125–25mg BD\nBisoprolol: 1.25–10mg OD", cautions: "Start low dose; avoid in acute decompensation, severe bradycardia, severe bronchospasm", color: C.boxRed },
{ class: "MRA (Aldosterone Antagonist)", example: "Spironolactone\nEplerenone", mechanism: "Blocks aldosterone → ↓ Na/H2O retention, ↓ fibrosis, ↓ myocardial remodeling", mortality: "↓ Mortality 30% (RALES), ↓ SCD", dose: "Spironolactone: 25–50mg OD\nEplerenone: 25–50mg OD", cautions: "Monitor K+ (hyperkalemia risk); avoid if K+>5 or eGFR<30. Gynaecomastia with spironolactone", color: C.boxOrange },
{ class: "SGLT2 Inhibitors", example: "Dapagliflozin\nEmpagliflozin", mechanism: "Osmotic diuresis; metabolic/cardiac protective effects independent of glucose lowering", mortality: "↓ CV death/HHF by 25% (DAPA-HF, EMPEROR-Reduced)", dose: "Dapagliflozin: 10mg OD\nEmpagliflozin: 10mg OD", cautions: "DKA risk (rare); genital mycotic infections; UTI; hold peri-operatively; volume depletion", color: C.boxGreen },
];
gdmt.forEach((d, i) => {
const x = 0.2 + i * 2.42;
const y = 1.35;
s.addShape(pres.ShapeType.rect, { x, y, w: 2.3, h: 4.05, fill: { color: "FDFEFE" }, line: { color: d.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 2.3, h: 0.55, fill: { color: d.color } });
s.addText(d.class, { x: x + 0.05, y: y, w: 2.2, h: 0.55, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(d.example, { x: x + 0.08, y: y + 0.58, w: 2.14, h: 0.45, fontSize: 10, bold: true, color: d.color, fontFace: "Calibri" });
s.addText("Mechanism: " + d.mechanism, { x: x + 0.08, y: y + 1.05, w: 2.14, h: 0.85, fontSize: 9, color: C.darkText, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: x + 0.08, y: y + 1.92, w: 2.1, h: 0, line: { color: C.grayLight, width: 0.8 } });
s.addText(d.mortality, { x: x + 0.08, y: y + 1.97, w: 2.14, h: 0.35, fontSize: 9.5, bold: true, color: C.greenSoft, fontFace: "Calibri" });
s.addText("Dose: " + d.dose, { x: x + 0.08, y: y + 2.34, w: 2.14, h: 0.65, fontSize: 9, color: C.darkText, fontFace: "Calibri" });
s.addText("Cautions: " + d.cautions, { x: x + 0.08, y: y + 3.0, w: 2.14, h: 0.95, fontSize: 8.5, italic: true, color: C.boxRed, fontFace: "Calibri" });
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 9 — DIURETICS & DIGOXIN
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Diuretics, Digoxin & Vasodilators in HF");
addBox(s, "Loop Diuretics (Symptom Relief - Decongestion)", [
"Furosemide: 20–80 mg OD/BD (oral or IV in acute HF)",
"Bumetanide: 0.5–2 mg OD (more bioavailable in oedema)",
"Torasemide: 5–20 mg OD (better oral bioavailability)",
"Mechanism: Inhibit Na+/K+/2Cl- cotransporter in thick ascending LOH",
"Monitor: K+, Na+, Creatinine, Urine output, Daily weight",
"Caution: Hypokalemia, hyponatraemia, volume depletion, ototoxicity (high IV doses)"
], 0.2, 0.9, 4.6, 2.5, C.boxBlue);
addBox(s, "Thiazides & Combination Diuresis", [
"Metolazone or Bendroflumethiazide - add-on for diuretic resistance",
"Combination: Loop + Thiazide = 'Sequential nephron blockade'",
"Only under close electrolyte monitoring (aggressive)",
"Spironolactone (MRA): also acts as diuretic + neurohormonal blocker",
"Tolvaptan (V2-receptor antagonist): for hyponatraemia in HF"
], 5.0, 0.9, 4.7, 2.5, C.boxPurple);
addBox(s, "Digoxin", [
"Mechanism: Inhibits Na+/K+-ATPase → ↑ intracellular Ca++ → +ve inotropy",
"Slows ventricular rate in AF via vagotonic effect on AV node",
"Indication: Symptomatic HFrEF with persistent AF or sinus rhythm (symptom control only)",
"Dose: 62.5–250 mcg/day (renally adjusted); Target level 0.5–0.9 ng/mL",
"Toxicity: N/V, visual (yellow/green halos), bradycardia, AV block, arrhythmias",
"Toxicity precipitated by: Hypokalemia, Hypomagnesemia, Hypercalcemia, Renal impairment"
], 0.2, 3.5, 4.6, 2.0, C.boxOrange);
addBox(s, "Vasodilators (Selected Populations)", [
"Hydralazine + Isosorbide Dinitrate: For Black African patients (A-HeFT trial)",
"Used when ACEI/ARB/ARNI not tolerated (e.g. angioedema, severe CKD)",
"IV Nitrates: GTN infusion in acute HF with hypertension",
"Nesiritide (BNP analogue): IV vasodilator; does not improve mortality",
"Ivabradine: For HFrEF, sinus rhythm, HR ≥70 bpm on max BB (SHIFT trial)"
], 5.0, 3.5, 4.7, 2.0, C.boxGreen);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 10 — SACUBITRIL/VALSARTAN (ARNI) DEEP DIVE
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "ARNI: Sacubitril/Valsartan (Entresto) — Landmark Drug in HFrEF");
// Key info box
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 9.5, h: 0.65, fill: { color: C.navyMid } });
s.addText("PARADIGM-HF Trial: Sacubitril/Valsartan reduced CV death by 20% and HHF by 21% vs Enalapril — STOPPED EARLY due to overwhelming benefit", {
x: 0.2, y: 0.85, w: 9.5, h: 0.65, fontSize: 12, bold: true, color: C.gold, align: "center", valign: "middle", fontFace: "Calibri"
});
addBox(s, "Mechanism of Action", [
"Sacubitril = Neprilysin inhibitor → Prevents breakdown of BNP, ANP, CNP",
"↑ Natriuretic peptides → vasodilation, natriuresis, anti-fibrotic",
"Valsartan = ARB → blocks AT1 receptor → prevents RAAS activation",
"Combined: Offload preload + afterload AND block RAAS"
], 0.2, 1.65, 4.6, 1.9, C.boxBlue);
addBox(s, "Clinical Indications", [
"HFrEF (EF <40%) with persistent symptoms (NYHA II-IV)",
"Already on ACEI/ARB: Switch to ARNI (superior)",
"ACC/AHA: Class I recommendation (Level of Evidence B-R)",
"MUST switch from ACEi → ARNI with 36-hour washout (angioedema risk)"
], 5.0, 1.65, 4.7, 1.9, C.boxRed);
addBox(s, "Dosing", [
"Start: 24/26 mg twice daily",
"Target: 97/103 mg twice daily",
"Up-titrate every 2–4 weeks as tolerated",
"Reduce initial dose if: eGFR<60, K+>5, SBP<100",
"Monitor: BP, K+, Renal function, Angioedema"
], 0.2, 3.65, 4.6, 1.75, C.boxGreen);
addBox(s, "Contraindications & Cautions", [
"Pregnancy (teratogenic) — ABSOLUTE CI",
"History of angioedema with ACEI",
"Concomitant ACEi use within 36 hours",
"Severe hepatic impairment",
"eGFR < 30 ml/min (relative CI)",
"SBP < 100 mmHg (start cautiously)"
], 5.0, 3.65, 4.7, 1.75, C.boxOrange);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 11 — SGLT2 INHIBITORS IN HF
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.crimson } });
s.addText("SGLT2 Inhibitors in Heart Failure — A Modern Breakthrough", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 21, bold: true, color: C.white, valign: "middle", fontFace: "Calibri"
});
// Trial results
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.88, w: 4.6, h: 2.2, fill: { color: C.navyMid }, line: { color: C.greenSoft, width: 2 } });
s.addText("DAPA-HF Trial (Dapagliflozin)", { x: 0.3, y: 0.92, w: 4.4, h: 0.35, fontSize: 13, bold: true, color: C.greenSoft, fontFace: "Calibri" });
const dapaItems = [
"HFrEF (EF<40%) patients — diabetic AND non-diabetic",
"↓ Worsening HF or CV death by 26% (RRR)",
"NNT = 21 to prevent one primary outcome",
"Benefit seen regardless of T2DM status",
"Now licensed for HFrEF (10mg OD)"
];
s.addText(dapaItems.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < dapaItems.length - 1, fontSize: 10.5, color: C.offWhite, fontFace: "Calibri" } })), { x: 0.3, y: 1.32, w: 4.4, h: 1.7, valign: "top" });
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 0.88, w: 4.6, h: 2.2, fill: { color: C.navyMid }, line: { color: C.gold, width: 2 } });
s.addText("EMPEROR-Reduced (Empagliflozin)", { x: 5.2, y: 0.92, w: 4.4, h: 0.35, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri" });
const emperItems = [
"HFrEF patients (EF<40%) — EMPEROR-Reduced",
"↓ CV death/worsening HF by 25% (HR 0.75)",
"EMPEROR-Preserved: First drug to reduce hospitalisation in HFpEF",
"Licensed for HFrEF and HFpEF (10mg OD)",
"FDA approved for both EF categories"
];
s.addText(emperItems.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < emperItems.length - 1, fontSize: 10.5, color: C.offWhite, fontFace: "Calibri" } })), { x: 5.2, y: 1.32, w: 4.4, h: 1.7, valign: "top" });
addBox(s, "Mechanisms of Cardioprotection", [
"Osmotic diuresis → ↓ preload (fluid/Na+ excretion)",
"↓ Ventricular wall stress and myocardial oxygen demand",
"Ketone body utilization by the heart (metabolic shift)",
"Direct anti-inflammatory and anti-fibrotic effects",
"↓ Uric acid, ↓ sympathetic activation"
], 0.2, 3.2, 4.6, 2.2, C.boxBlue);
addBox(s, "Side Effects & Monitoring", [
"Genital mycotic infections (most common) — counsel patients",
"Urinary frequency / UTI — monitor symptoms",
"Euglycaemic DKA (rare, especially T1DM) — avoid in T1DM",
"Volume depletion — caution with diuretics",
"Hold 3 days before surgery (DKA risk)",
"NOT recommended in eGFR < 20 ml/min"
], 5.1, 3.2, 4.6, 2.2, C.boxOrange);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 12 — NON-PHARMACOLOGICAL TREATMENT
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Non-Pharmacological Management");
const items = [
{ icon: "🧂", title: "Dietary Sodium", detail: "Restrict to <2g/day of sodium (5g NaCl)\nAvoid processed foods, canned products\nDiscuss with dietitian", color: C.boxBlue },
{ icon: "💧", title: "Fluid Restriction", detail: "Restrict to 1.5–2 L/day in advanced HF\nMonitor daily fluid intake\nAvoid excessive fluid in HFpEF", color: C.boxRed },
{ icon: "⚖️", title: "Weight Monitoring", detail: "Daily morning weight (after toileting, before eating)\nAlert if weight ↑ >2 kg in 3 days\nIndicator of fluid retention", color: C.boxOrange },
{ icon: "🚭", title: "Smoking Cessation", detail: "Major independent risk factor for CAD\nNRT, Bupropion, Varenicline supported\nCardiac benefit within 1 year", color: C.boxPurple },
{ icon: "🏃", title: "Exercise Rehab", detail: "HF-ACTION trial: Supervised exercise training\n↓ HF hospitalizations, ↑ QoL\nStart low-moderate intensity (NYHA I–III)", color: C.greenSoft },
{ icon: "🍺", title: "Alcohol Restriction", detail: "Alcoholic cardiomyopathy: strict abstinence\nGeneral HF: limit to <14 units/week\nCan partially reverse with abstinence", color: C.gold },
];
const cols = 3, rows = 2;
const boxW = 3.1, boxH = 1.85;
const startX = 0.15, startY = 0.9;
items.forEach((item, i) => {
const row = Math.floor(i / cols);
const col = i % cols;
const x = startX + col * 3.25;
const y = startY + row * 2.0;
s.addShape(pres.ShapeType.rect, { x, y, w: boxW, h: boxH, fill: { color: "FDFEFE" }, line: { color: item.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: boxW, h: 0.38, fill: { color: item.color } });
s.addText(item.icon + " " + item.title, { x: x + 0.08, y, w: boxW - 0.16, h: 0.38, fontSize: 12, bold: true, color: C.white, valign: "middle", fontFace: "Calibri" });
s.addText(item.detail, { x: x + 0.1, y: y + 0.42, w: boxW - 0.2, h: boxH - 0.5, fontSize: 10, color: C.darkText, fontFace: "Calibri" });
});
s.addShape(pres.ShapeType.rect, { x: 0.15, y: 4.95, w: 9.7, h: 0.45, fill: { color: C.navyMid } });
s.addText("Vaccination: Annual influenza + pneumococcal vaccines recommended in all HF patients to reduce hospitalization risk", {
x: 0.25, y: 4.95, w: 9.5, h: 0.45, fontSize: 11, color: C.gold, valign: "middle", fontFace: "Calibri"
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 13 — DEVICE THERAPY
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Device Therapy in Heart Failure");
addBox(s, "ICD — Implantable Cardioverter-Defibrillator", [
"Indication: EF ≤35% on GDMT for ≥3 months, NYHA II–III, life expectancy >1 year",
"Primary prevention of sudden cardiac death (SCD)",
"Delivers electrical shock to terminate VF/VT",
"Also provides overdrive pacing",
"Studies: MADIT-II, SCD-HeFT — ↓ mortality by 23%"
], 0.2, 0.9, 4.6, 2.1, C.boxRed);
addBox(s, "CRT — Cardiac Resynchronization Therapy", [
"Indication: EF ≤35% + LBBB (QRS ≥150ms) + NYHA II–IV on GDMT",
"Biventricular pacing → resynchronizes LV-RV contraction",
"↑ EF, ↓ HF symptoms, ↑ exercise tolerance",
"CRT-D (combined CRT + ICD) preferred in eligible patients",
"Studies: CARE-HF, COMPANION — significant mortality benefit"
], 5.0, 0.9, 4.7, 2.1, C.boxBlue);
addBox(s, "LVAD — Left Ventricular Assist Device", [
"Mechanical pump implanted to assist LV ejection",
"Uses: Bridge to transplant (BTT), Destination therapy, Bridge to recovery",
"HeartMate 3 (continuous flow) — current standard",
"MOMENTUM 3 trial: ↓ stroke, pump thrombosis vs older devices",
"Complications: Stroke, Bleeding, Infection, Device malfunction",
"Requires anticoagulation (Warfarin + Aspirin)"
], 0.2, 3.1, 4.6, 2.4, C.boxOrange);
addBox(s, "Heart Transplantation", [
"Gold standard for end-stage HFrEF (Stage D)",
"Indication: NYHA IV refractory to all therapy",
"5-year survival: ~75%; median survival >13 years",
"Contraindications: Active infection, malignancy, severe PHTN, age >70, BMI>35",
"Immunosuppression: Cyclosporine/Tacrolimus + MMF + Steroids",
"Complications: Rejection, infection, coronary allograft vasculopathy"
], 5.0, 3.1, 4.7, 2.4, C.boxPurple);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 14 — ACUTE HF MANAGEMENT
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.crimson } });
s.addText("Acute Decompensated Heart Failure (ADHF) — Emergency Management", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 20, bold: true, color: C.white, valign: "middle", fontFace: "Calibri"
});
// LMNOP mnemonic
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.9, w: 5.0, h: 0.4, fill: { color: C.crimson } });
s.addText("LMNOP Mnemonic for Acute HF", {
x: 0.2, y: 0.9, w: 5.0, h: 0.4, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri"
});
const lmnop = [
["L", "Lasix (Furosemide)", "IV 40–80 mg bolus; target urine output 0.5–1 mL/kg/hr", C.crimsonSoft],
["M", "Morphine", "2–4 mg IV (cautious — may increase mortality; reduces anxiety)", C.boxBlue],
["N", "Nitrates", "GTN spray/infusion (if SBP >90); vasodilator, ↓ preload", C.boxOrange],
["O", "Oxygen / NIV", "Target SpO2 >95%; CPAP preferred in pulmonary oedema", C.greenSoft],
["P", "Position", "Sit upright (45° or legs dependent); ↓ venous return", C.boxPurple],
];
lmnop.forEach((l, i) => {
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.35 + i * 0.72, w: 5.0, h: 0.68, fill: { color: C.navyMid }, line: { color: l[3], width: 1 } });
s.addShape(pres.ShapeType.ellipse, { x: 0.25, y: 1.38 + i * 0.72, w: 0.5, h: 0.5, fill: { color: l[3] } });
s.addText(l[0], { x: 0.25, y: 1.38 + i * 0.72, w: 0.5, h: 0.5, fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText(l[1], { x: 0.85, y: 1.38 + i * 0.72, w: 2.2, h: 0.28, fontSize: 11, bold: true, color: l[3], fontFace: "Calibri" });
s.addText(l[2], { x: 0.85, y: 1.65 + i * 0.72, w: 4.25, h: 0.3, fontSize: 9.5, color: C.offWhite, fontFace: "Calibri" });
});
// Right panel — classification and inotropes
addBox(s, "AHF Phenotypes & Initial Approach", [
"WARM & WET (most common): Diuretics, vasodilators",
"COLD & WET (cardiogenic shock): Inotropes + vasopressors",
"WARM & DRY (compensated): Optimise oral medications",
"COLD & DRY: Cautious fluid challenge; consider LVAD/transplant",
"BP guide: HTN AHF → nitrates; Hypotensive → inotropes"
], 5.4, 0.9, 4.4, 2.25, C.boxBlue);
addBox(s, "Inotropes & Vasopressors (Cardiogenic Shock)", [
"Dobutamine: 2–20 mcg/kg/min IV — β1 agonist, ↑ contractility",
"Dopamine: Low dose (1–5 mcg/kg/min) → renal vasodilatation; High (>10) → vasopressor",
"Noradrenaline: For vasodilatory shock component",
"Milrinone: PDE3 inhibitor — ↑ cAMP → +ve inotropy (avoid in CKD)",
"Levosimendan: Ca2+ sensitizer — +ve inotropy without ↑ O2 demand"
], 5.4, 3.25, 4.4, 2.0, C.boxRed);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 15 — HFpEF MANAGEMENT
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "HFpEF (Heart Failure with Preserved EF) — Management");
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.88, w: 9.5, h: 0.55, fill: { color: C.navyMid } });
s.addText("HFpEF (EF ≥50%) represents ~50% of all HF cases — NO drug has shown clear mortality benefit EXCEPT SGLT2i", {
x: 0.2, y: 0.88, w: 9.5, h: 0.55, fontSize: 12.5, bold: true, color: C.gold, align: "center", valign: "middle", fontFace: "Calibri"
});
addBox(s, "Treat Comorbidities (Priority)", [
"Hypertension: ACEi/ARB, CCBs, MRAs — aggressive BP control",
"Atrial fibrillation: Rate control (BB, digoxin) or rhythm control",
"Diabetes: SGLT2i (empagliflozin) reduces hospitalizations",
"Obesity: Weight loss significantly ↑ exercise capacity",
"Coronary artery disease: Revascularization if ischaemia present",
"Sleep apnoea: CPAP therapy improves diastolic function"
], 0.2, 1.55, 4.6, 2.8, C.boxBlue);
addBox(s, "Symptomatic Treatment", [
"Diuretics: For fluid overload / congestion symptoms (carefully — preload dependent)",
"Avoid excessive diuresis → worsens CO in stiff, non-dilated LV",
"Spironolactone: TOPCAT trial — borderline; may reduce HHF",
"Nitrates: May worsen symptoms in HFpEF (exercise intolerance trial)",
"SGLT2i (Empagliflozin): EMPEROR-Preserved — significant ↓ HHF"
], 5.0, 1.55, 4.7, 2.8, C.boxOrange);
addBox(s, "Emerging / Investigational", [
"Finerenone (non-steroidal MRA): FINEARTS-HF trial — promising",
"GLP-1 agonists (Semaglutide): STEP-HFpEF trial — ↑ exercise capacity, ↓ weight",
"Sacubitril/Valsartan: PARAGON-HF — benefit in EF 45–55%",
"Sodium restriction + exercise remains cornerstone"
], 0.2, 4.45, 9.5, 1.0, C.boxGreen);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 16 — CARDIOGENIC SHOCK
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.crimson } });
s.addText("Cardiogenic Shock — Recognition & Management", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: C.white, valign: "middle", fontFace: "Calibri"
});
addBox(s, "Definition & Diagnostic Criteria", [
"SBP <90 mmHg for >30 min OR vasopressor dependent",
"Signs of hypoperfusion: Cool clammy skin, confusion, oliguria (UO <0.5 mL/kg/hr)",
"Elevated LVEDP / PCWP >18 mmHg",
"Cardiac Index <2.2 L/min/m² on Swan-Ganz catheter",
"Elevated lactate >2 mmol/L (tissue hypoperfusion)"
], 0.2, 0.9, 4.6, 2.1, C.boxRed);
addBox(s, "Causes (MNEMONIC: CHAMP)", [
"C — CAD / Acute MI (most common, ~80%)",
"H — Hypertrophic cardiomyopathy",
"A — Arrhythmia",
"M — Mechanical complication (VSD, acute MR, free wall rupture)",
"P — Pulmonary embolism / Pericardial tamponade"
], 5.0, 0.9, 4.7, 2.1, C.boxOrange);
addBox(s, "Stepwise Management", [
"1. Airway & O2: Intubation if GCS <8 or SpO2 <90% despite NIV",
"2. IV Access: Large-bore x2 + arterial line + CVP monitoring",
"3. IV Fluids: Cautious 250 mL crystalloid if not fluid-overloaded",
"4. Vasopressors: Noradrenaline (first line) to maintain MAP >65",
"5. Inotropes: Dobutamine or Milrinone for low CO",
"6. Revascularization: Emergency PCI for ACS-related shock (SHOCK trial)",
"7. MCS: IABP, Impella, VA-ECMO in refractory cases"
], 0.2, 3.1, 9.5, 2.3, C.boxBlue);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 17 — RIGHT HEART FAILURE
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Right Heart Failure — Aetiology, Features & Management");
addBox(s, "Causes of RHF", [
"Left HF with pulmonary hypertension (most common)",
"Pulmonary arterial hypertension (PAH)",
"Massive pulmonary embolism",
"Cor pulmonale (chronic lung disease — COPD, ILD)",
"RV infarction (inferior STEMI)",
"Tricuspid/pulmonary valve disease",
"ARVC (arrhythmogenic right ventricular cardiomyopathy)"
], 0.2, 0.9, 3.0, 3.5, C.boxBlue);
addBox(s, "Clinical Features", [
"Raised JVP with prominent 'v' waves",
"Peripheral oedema (pitting) bilateral",
"Hepatomegaly → Ascites (cardiac cirrhosis)",
"Right-sided S3 gallop",
"Parasternal heave (RV hypertrophy)",
"Kussmaul's sign (JVP ↑ on inspiration)",
"Symptoms: fatigue, exertional dyspnoea, abdominal distension"
], 3.35, 0.9, 3.3, 3.5, C.boxOrange);
addBox(s, "Management", [
"Treat underlying cause (PAH, PE, COPD)",
"Diuretics: Cautious — avoid over-diuresis (worsens CO)",
"Avoid excessive fluid removal in RV infarction (preload dependent)",
"Pulmonary vasodilators in PAH: Sildenafil, Bosentan, Prostanoids",
"RV infarction: IV fluids (cautious), avoid nitrates",
"Anticoagulation if PE cause",
"Advanced: Balloon septostomy, PAH-specific therapy"
], 6.8, 0.9, 2.95, 3.5, C.boxGreen);
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 4.5, w: 9.5, h: 0.9, fill: { color: C.navyMid } });
s.addText("KEY EXAM POINT: In RV infarction — give FLUIDS, avoid diuretics & nitrates (RV is preload dependent). JVP elevated but lungs are CLEAR.", {
x: 0.3, y: 4.5, w: 9.3, h: 0.9, fontSize: 12, bold: true, color: C.gold, align: "center", valign: "middle", fontFace: "Calibri"
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 18 — CLINICAL CASE 1
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.navyMid } });
s.addText("CLINICAL CASE 1 — Acute Decompensated HF", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: C.gold, valign: "middle", fontFace: "Calibri"
});
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.9, w: 9.5, h: 1.85, fill: { color: "EAF2FF" }, line: { color: C.boxBlue, width: 1.5 } });
s.addText("SCENARIO:", { x: 0.35, y: 0.95, w: 1.5, h: 0.3, fontSize: 11, bold: true, color: C.boxBlue, fontFace: "Calibri" });
s.addText("A 68-year-old male with known ischaemic cardiomyopathy (EF 30%) and T2DM presents to A&E with sudden-onset severe dyspnoea, orthopnoea and leg swelling for 3 days. He stopped his medications 2 weeks ago. On examination: RR 28/min, SpO2 88% on air, BP 160/100, HR 110 irregular. JVP raised 5 cm, bilateral crepitations, pitting oedema to knees. CXR: Cardiomegaly, bilateral pulmonary oedema. BNP: 2400 pg/mL. Echo: EF 28%, dilated LV.", {
x: 0.35, y: 1.28, w: 9.2, h: 1.4, fontSize: 11, color: C.darkText, fontFace: "Calibri"
});
addBox(s, "Immediate Management (First 2 Hours)", [
"Sit upright (45°), high-flow O2, CPAP/BiPAP (SpO2 target >95%)",
"IV Furosemide 80mg stat (double home dose if known diuretic user)",
"IV GTN infusion if SBP >90 mmHg (titrate to symptom relief)",
"Continuous monitoring: ECG, SpO2, hourly UO via catheter",
"Treat AF: Rate control (digoxin or BB when stable)",
"Bloods: U&E, FBC, Troponin, BNP, Glucose, ABG"
], 0.2, 2.85, 4.6, 2.3, C.boxRed);
addBox(s, "Ongoing & Discharge Plan", [
"Resume GDMT: ARNI (sacubitril/valsartan), carvedilol, spironolactone",
"Add Dapagliflozin 10mg OD (SGLT2i — dual benefit in T2DM + HF)",
"Oral furosemide dose titration (target: dry weight, no oedema)",
"HF nurse specialist referral + medication education",
"Anticoagulation for AF: CHA₂DS₂-VASc ≥2 → DOAC",
"Device assessment: EF<35% → ICD ± CRT in 3 months on GDMT"
], 5.0, 2.85, 4.7, 2.3, C.boxGreen);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 19 — CLINICAL CASE 2
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.navyMid } });
s.addText("CLINICAL CASE 2 — New-Onset HFpEF", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: C.gold, valign: "middle", fontFace: "Calibri"
});
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.9, w: 9.5, h: 1.85, fill: { color: "EAF2FF" }, line: { color: C.boxBlue, width: 1.5 } });
s.addText("SCENARIO:", { x: 0.35, y: 0.95, w: 1.5, h: 0.3, fontSize: 11, bold: true, color: C.boxBlue, fontFace: "Calibri" });
s.addText("A 72-year-old female with hypertension, atrial fibrillation, and obesity (BMI 38) presents with progressive breathlessness on exertion and bilateral ankle swelling over 6 weeks. She denies orthopnoea or PND. On exam: BP 165/95, HR 85 irregular, JVP mildly elevated, bilateral ankle oedema, no pulmonary crepitations. Echo: Normal EF (EF 60%), grade 2 diastolic dysfunction, E/e' ratio = 18, mild LA dilation. BNP: 320 pg/mL. ECG: Atrial fibrillation.", {
x: 0.35, y: 1.28, w: 9.2, h: 1.4, fontSize: 11, color: C.darkText, fontFace: "Calibri"
});
addBox(s, "Diagnosis & Investigations", [
"HFpEF (EF ≥50% + diastolic dysfunction + elevated BNP)",
"Echocardiographic criteria: E/e' >15 = elevated filling pressures",
"HFA-PEFF Score: Clinical + functional + morphological assessment",
"Exclude: Ischaemia (coronary CT/angiogram), cardiac amyloid (SPECT, biopsy)",
"Cardiac MRI: Gold standard for morphology and infiltrative diseases"
], 0.2, 2.85, 4.6, 2.1, C.boxOrange);
addBox(s, "Management Plan", [
"Diuretics: Furosemide 40mg OD for oedema (cautious)",
"BP Control: ARB (candesartan) or ACEi — target <130/80",
"AF Rate Control: Bisoprolol + Digoxin (HR target 60–90 bpm)",
"SGLT2i: Empagliflozin 10mg OD (EMPEROR-Preserved evidence)",
"Lifestyle: Salt restriction, weight loss target 10%, exercise rehab",
"DOAC for AF: Apixaban 5mg BD (CHA₂DS₂-VASc 4 = high risk)"
], 5.0, 2.85, 4.7, 2.1, C.boxGreen);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 20 — MONITORING & FOLLOW-UP
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Monitoring, Follow-Up & Prognostic Markers");
addBox(s, "Routine Monitoring Parameters", [
"Symptoms: NYHA class, dyspnoea score, exercise tolerance",
"Fluid: Daily weight, urine output, peripheral oedema",
"Vitals: BP, HR, RR, SpO2",
"Bloods: U&E (K+, Na+, Creatinine) — 1–2 weeks after any dose change",
"BNP/NT-proBNP: Serial measurements to guide therapy titration",
"Renal function: ACEi/ARB/MRA can ↓ GFR — acceptable if <25% rise"
], 0.2, 0.9, 4.6, 2.5, C.boxBlue);
addBox(s, "Echocardiographic Follow-Up", [
"Repeat echo at 3–6 months after initiating GDMT",
"If EF improves to >40% on GDMT — consider LVEF recovery (HFimprovedEF)",
"Caution: Do NOT stop GDMT even if EF normalizes (TRED-HF trial: relapse risk)",
"Annual echo in stable HF; more frequent in unstable or device patients",
"ICD/CRT programming review every 3–6 months"
], 5.0, 0.9, 4.7, 2.5, C.boxRed);
addBox(s, "Poor Prognostic Markers", [
"Very low EF (<20%), NYHA IV, renal impairment",
"Persistently elevated BNP despite GDMT",
"Recurrent hospitalizations (>2/year)",
"Hyponatraemia (Na+ <135 mEq/L) — sign of advanced HF",
"Cardiac cachexia, low BMI",
"Functional MR, Wide QRS without CRT, AF"
], 0.2, 3.5, 4.6, 2.0, C.boxOrange);
addBox(s, "Referral Criteria", [
"Cardiology referral: All newly diagnosed HF",
"Advanced HF team: Stage D, LVAD candidate, transplant evaluation",
"ICD/CRT: EF ≤35% after ≥3 months optimal GDMT",
"Palliative care: Stage D refractory, poor prognosis, poor QoL",
"HF nurse specialist: All patients for education & self-management"
], 5.0, 3.5, 4.7, 2.0, C.boxPurple);
}
// ══════════════════════════════════════════════════════════════
// SLIDE 21 — SPECIAL POPULATIONS
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "Heart Failure in Special Populations");
const pops = [
{ title: "HF in Pregnancy (PPCM)", color: C.boxRed, items: ["Peripartum cardiomyopathy: EF <45% in last month of pregnancy/5 months postpartum", "Avoid: ACEi, ARBs, ARNI, MRAs, SGLT2i (teratogenic)", "Safe: Hydralazine + Nitrates (vasodilators), Furosemide, BB (labetalol)", "Bromocriptine: May ↑ recovery (inhibits prolactin cleavage)", "Prognosis: 50% recover EF fully"] },
{ title: "HF in CKD", color: C.boxBlue, items: ["Major comorbidity: ↑ mortality risk", "ACEi/ARB: Acceptable up to eGFR 30; monitor K+ closely", "SGLT2i: Avoid if eGFR <20 (dapagliflozin) / <25 (empagliflozin)", "MRA: Avoid if eGFR <30 or K+ >5.0 mEq/L", "Digoxin: Renally dosed; narrow TI — drug levels essential"] },
{ title: "HF in Elderly", color: C.boxOrange, items: ["Polypharmacy risk: Review all drugs for interactions", "HFpEF predominates in elderly women", "Diuretics: Higher risk of falls, dehydration, AKI", "Start doses very low; up-titrate slowly", "Cognitive function and ADL: important for compliance", "Falls risk with β-blockers (bradycardia, dizziness)"] },
{ title: "HF with AF", color: C.boxPurple, items: ["AF present in 30-40% of HF patients", "Rate control preferred unless symptoms dictate rhythm control", "Rate targets: resting HR 60-100 bpm", "Anticoagulation: DOAC (apixaban/rivaroxaban) preferred over warfarin", "Ablation: CASTLE-AF trial showed ↑ EF, ↓ mortality post-ablation", "Digoxin: Add for rate control if β-blocker inadequate"] },
];
pops.forEach((p, i) => {
const row = Math.floor(i / 2);
const col = i % 2;
const x = 0.2 + col * 4.9;
const y = 0.9 + row * 2.35;
addBox(s, p.title, p.items, x, y, 4.6, 2.2, p.color);
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 22 — KEY CLINICAL TRIALS
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.75, fill: { color: C.crimson } });
s.addText("Landmark Clinical Trials in Heart Failure", {
x: 0.3, y: 0, w: 9.4, h: 0.75, fontSize: 22, bold: true, color: C.white, valign: "middle", fontFace: "Calibri"
});
const trials = [
{ name: "SOLVD (1991)", drug: "Enalapril (ACEi)", finding: "↓ Mortality 16%, ↓ HHF 26% vs placebo in HFrEF", color: C.boxBlue },
{ name: "MERIT-HF (1999)", drug: "Metoprolol succinate (BB)", finding: "↓ All-cause mortality 34% vs placebo in HFrEF", color: C.boxOrange },
{ name: "RALES (1999)", drug: "Spironolactone (MRA)", finding: "↓ Mortality 30%, ↓ SCD in severe HFrEF", color: C.boxPurple },
{ name: "COPERNICUS (2001)", drug: "Carvedilol (BB)", finding: "↓ All-cause mortality 35% in severe HFrEF (EF<25%)", color: C.boxRed },
{ name: "PARADIGM-HF (2014)", drug: "Sacubitril/Valsartan (ARNI)", finding: "↓ CV death 20%, ↓ HHF 21% vs Enalapril — STOPPED EARLY", color: C.gold },
{ name: "DAPA-HF (2019)", drug: "Dapagliflozin (SGLT2i)", finding: "↓ Worsening HF/CV death 26% (diabetic + non-diabetic HFrEF)", color: C.greenSoft },
{ name: "EMPEROR-Reduced (2020)", drug: "Empagliflozin (SGLT2i)", finding: "↓ CV death/HHF 25% in HFrEF", color: C.boxGreen },
{ name: "EMPEROR-Preserved (2021)", drug: "Empagliflozin (SGLT2i)", finding: "First ever drug to ↓ HHF in HFpEF (26% relative risk reduction)", color: C.crimsonSoft },
{ name: "SHIFT (2010)", drug: "Ivabradine", finding: "↓ HHF 26% in HFrEF with HR ≥70 in sinus rhythm on BB", color: C.grayMid },
{ name: "MADIT-II / SCD-HeFT", drug: "ICD", finding: "↓ Mortality 23-31% in HFrEF (EF≤35%) with prior MI", color: C.navyMid },
];
trials.forEach((t, i) => {
const row = Math.floor(i / 2);
const col = i % 2;
const x = 0.2 + col * 4.9;
const y = 0.9 + row * 0.87;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.8, fill: { color: C.navyMid }, line: { color: t.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 1.6, h: 0.8, fill: { color: t.color } });
s.addText(t.name, { x: x + 0.05, y, w: 1.5, h: 0.4, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(t.drug, { x: x + 0.05, y: y + 0.38, w: 1.5, h: 0.38, fontSize: 8.5, color: C.white, align: "center", valign: "middle", fontFace: "Calibri", italic: true });
s.addText(t.finding, { x: x + 1.68, y, w: 2.88, h: 0.8, fontSize: 9.5, color: C.offWhite, valign: "middle", fontFace: "Calibri" });
});
}
// ══════════════════════════════════════════════════════════════
// SLIDE 23 — EXAM HIGH-YIELD SUMMARY
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.offWhite } });
addTitle(s, "High-Yield Exam Points — Heart Failure");
const hyd = [
"1st choice in HFrEF: ACEi + BB + MRA + SGLT2i (\"Fantastic Four\") — ALL have mortality benefit",
"ARNI (Sacubitril/Valsartan) SUPERIOR to ACEi — switch if tolerated; 36h washout before switching from ACEi",
"Diuretics ONLY for symptoms (decongestion) — NO mortality benefit",
"ICD indication: EF ≤35% after ≥3 months GDMT, NYHA II-III, life expectancy >1 yr",
"CRT indication: EF ≤35% + LBBB + QRS ≥150ms + NYHA II-IV",
"HFpEF: Only SGLT2i (empagliflozin) shown to reduce hospitalization (EMPEROR-Preserved)",
"Cardiogenic shock: Noradrenaline → vasopressor; Dobutamine → inotrope; Emergency PCI if ACS",
"Digoxin: Narrow therapeutic index; toxicity worsened by hypokalaemia; target level 0.5–0.9 ng/mL",
"BB in HF: AVOID in acute decompensation; CONTINUE if already on (do not stop abruptly)",
"RV infarction: Elevated JVP + clear lungs + hypotension → GIVE FLUIDS, avoid nitrates/diuretics",
"PPCM: Avoid ACEi/ARB/SGLT2i/MRA in pregnancy — use Hydralazine + Nitrates + Furosemide",
"Precipitants of AHF (FAILURE): Forgot meds, Arrhythmia, Ischaemia, Lifestyle excess, Uncontrolled HTN, Renal failure, Embolism/Endocarditis"
];
const half = Math.ceil(hyd.length / 2);
const left = hyd.slice(0, half);
const right = hyd.slice(half);
s.addText(left.map((t, i) => ({ text: t, options: { bullet: { type: "number" }, breakLine: i < left.length - 1, fontSize: 10.5, color: C.darkText, fontFace: "Calibri" } })),
{ x: 0.2, y: 0.88, w: 4.7, h: 4.5, valign: "top" });
s.addText(right.map((t, i) => ({ text: t, options: { bullet: { type: "number" }, breakLine: i < right.length - 1, fontSize: 10.5, color: C.darkText, fontFace: "Calibri" } })),
{ x: 5.1, y: 0.88, w: 4.7, h: 4.5, valign: "top" });
}
// ══════════════════════════════════════════════════════════════
// SLIDE 24 — THANK YOU / SUMMARY SLIDE
// ══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.12, fill: { color: C.crimson } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.5, w: "100%", h: 0.12, fill: { color: C.crimson } });
s.addText("♥", { x: 4.2, y: 0.3, w: 1.6, h: 1.4, fontSize: 72, color: C.crimson, align: "center", valign: "middle" });
s.addText("SUMMARY", { x: 1, y: 1.55, w: 7.8, h: 0.65, fontSize: 32, bold: true, color: C.white, align: "center", charSpacing: 6, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: 2, y: 2.25, w: 5.8, h: 0, line: { color: C.crimson, width: 2 } });
const summary = [
"GDMT is the cornerstone: ARNI/ACEi + BB + MRA + SGLT2i for HFrEF",
"Diuretics relieve symptoms; devices (ICD/CRT) improve prognosis",
"HFpEF: Treat comorbidities; SGLT2i now evidence-based",
"Acute HF: LMNOP + identify and treat precipitants",
"Special populations require individualized drug selection",
"Trials: PARADIGM-HF, DAPA-HF, EMPEROR-Preserved are essential"
];
s.addText(summary.map((t, i) => ({
text: t, options: { bullet: true, breakLine: i < summary.length - 1, fontSize: 13, color: C.offWhite, fontFace: "Calibri" }
})), { x: 1.5, y: 2.4, w: 7, h: 2.8, valign: "top" });
s.addText("References: ACC/AHA 2022 HF Guidelines | ESC 2021 HF Guidelines | Goodman & Gilman's Pharmacology | Braunwald's Heart Disease | Tintinalli's Emergency Medicine", {
x: 0.5, y: 5.2, w: 9, h: 0.35, fontSize: 8.5, color: C.grayMid, fontFace: "Calibri", italic: true, align: "center"
});
}
// ══════════════════════════════════════════════════════════════
// SAVE
// ══════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/heart-failure-pptx/Heart_Failure_Treatment_MBBS.pptx" })
.then(() => console.log("DONE: Presentation saved."))
.catch(err => { console.error("ERROR:", err); process.exit(1); });