~/raas-blockers-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "RAAS Blockers: A Comprehensive Comparison";
pres.author = "Orris Medical";
// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
navy: "0D2B55", // dominant dark bg
teal: "0E7C7B", // ACE inhibitor accent
crimson: "C0392B", // ARB accent
gold: "E8A838", // Renin inhibitor accent
purple: "6C3483", // MRA accent
slate: "1C3A5E", // section header bg
light: "EAF2FB", // content bg light
white: "FFFFFF",
offwhite:"F4F6F7",
ltgray: "D5D8DC",
dktext: "1A252F",
subtext: "566573",
};
// ─── HELPER FUNCTIONS ────────────────────────────────────────────────────────
function titleSlide(slide, title, subtitle) {
// Full dark bg
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
// Teal accent bar left
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal } });
// Gold accent bar
slide.addShape(pres.ShapeType.rect, { x: 0.18, y: 0, w: 0.06, h: 5.625, fill: { color: C.gold } });
// Crimson bar bottom
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.425, fill: { color: C.crimson } });
slide.addText(title, {
x: 0.6, y: 1.2, w: 8.8, h: 1.6,
fontSize: 40, bold: true, color: C.white,
fontFace: "Calibri", align: "left", valign: "middle",
});
slide.addText(subtitle, {
x: 0.6, y: 2.9, w: 8, h: 0.8,
fontSize: 20, color: C.gold, fontFace: "Calibri",
align: "left", bold: false, italic: true,
});
slide.addText("Sources: Lippincott Pharmacology • Katzung • Goodman & Gilman • Braunwald's Heart Disease", {
x: 0.6, y: 5.05, w: 8.8, h: 0.25,
fontSize: 9, color: C.white, fontFace: "Calibri", align: "left",
});
}
function sectionDivider(slide, sectionNum, title, accent, subtitle) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: accent } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.545, w: 10, h: 0.08, fill: { color: accent } });
slide.addText(`0${sectionNum}`, {
x: 0.5, y: 0.8, w: 2, h: 2,
fontSize: 100, bold: true, color: accent,
fontFace: "Calibri", align: "left", valign: "middle",
transparency: 60,
});
slide.addText(title, {
x: 2.8, y: 1.6, w: 6.5, h: 1.2,
fontSize: 36, bold: true, color: C.white,
fontFace: "Calibri", align: "left", valign: "middle",
});
if (subtitle) {
slide.addText(subtitle, {
x: 2.8, y: 2.85, w: 6.5, h: 0.7,
fontSize: 16, color: C.ltgray, fontFace: "Calibri", align: "left", italic: true,
});
}
}
function slideHeader(slide, title, accentColor) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: accentColor || C.slate } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 10, h: 5.0, fill: { color: C.offwhite } });
slide.addText(title, {
x: 0.3, y: 0, w: 9.4, h: 0.75,
fontSize: 22, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle", margin: 0,
});
}
function colorBox(slide, x, y, w, h, color, label, labelColor) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color }, line: { color: C.white, width: 1 } });
if (label) {
slide.addText(label, {
x, y, w, h,
fontSize: 11, bold: true, color: labelColor || C.white,
fontFace: "Calibri", align: "center", valign: "middle",
});
}
}
function pillBadge(slide, x, y, w, label, color, textColor) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h: 0.32,
fill: { color },
line: { color, width: 0 },
rectRadius: 0.06,
});
slide.addText(label, {
x, y, w, h: 0.32,
fontSize: 10, bold: true, color: textColor || C.white,
fontFace: "Calibri", align: "center", valign: "middle",
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ════════════════════════════════════════════════════════════════════════════
let s = pres.addSlide();
titleSlide(s,
"RAAS Blockers:\nA Comprehensive Comparison",
"ACE Inhibitors • ARBs • Renin Inhibitors • Mineralocorticoid Receptor Antagonists"
);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — RAAS PATHWAY OVERVIEW (text diagram)
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "The RAAS Pathway & Sites of Drug Action", C.slate);
// Pathway boxes
const pathway = [
{ label: "Angiotensinogen\n(α₂-globulin)", x: 0.3, color: "2C3E50" },
{ label: "Angiotensin I\n(inactive)", x: 2.4, color: "2C3E50" },
{ label: "Angiotensin II\n(active)", x: 4.5, color: "922B21" },
{ label: "AT1 Receptor\nActivation", x: 6.6, color: "78281F" },
];
pathway.forEach(p => {
colorBox(s, p.x, 0.95, 1.9, 0.75, p.color, p.label, C.white);
});
// Arrows between pathway boxes
[2.3, 4.4, 6.5].forEach(x => {
s.addShape(pres.ShapeType.rightArrow, { x, y: 1.15, w: 0.25, h: 0.35, fill: { color: C.ltgray } });
});
// Drug intervention labels
const interventions = [
{ label: "RENIN INHIBITORS\n(Aliskiren)\nBlock here ↑", x: 0.3, y: 1.85, color: C.gold },
{ label: "ACE INHIBITORS\n(Captopril, Lisinopril…)\nBlock conversion ↑", x: 2.4, y: 1.85, color: C.teal },
{ label: "ARBs\n(Losartan, Valsartan…)\nBlock AT1 receptor ↑", x: 6.6, y: 1.85, color: C.crimson },
];
interventions.forEach(iv => {
slide_addRoundedBox(s, iv.x, iv.y, 1.9, 0.9, iv.color, iv.label);
});
function slide_addRoundedBox(sl, x, y, w, h, color, label) {
sl.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color },
line: { color: C.white, width: 1 },
rectRadius: 0.05,
});
sl.addText(label, {
x, y, w, h,
fontSize: 9.5, color: C.white, bold: true,
fontFace: "Calibri", align: "center", valign: "middle",
});
}
// Aldosterone pathway
colorBox(s, 4.5, 1.85, 1.9, 0.5, "7D6608", "Aldosterone\nRelease", C.white);
s.addShape(pres.ShapeType.downArrow, { x: 5.35, y: 1.72, w: 0.3, h: 0.18, fill: { color: "7D6608" } });
// MRA label
slide_addRoundedBox(s, 4.5, 2.5, 1.9, 0.7, C.purple, "MRAs\n(Spironolactone, Eplerenone)\nBlock aldosterone receptor");
// Effects boxes (right side)
const effects = [
{ label: "↓ Vasoconstriction", color: "1A5276" },
{ label: "↓ Aldosterone", color: "1A5276" },
{ label: "↓ SNS activity", color: "1A5276" },
{ label: "→ ↓ Blood Pressure", color: "145A32" },
];
effects.forEach((e, i) => {
colorBox(s, 8.6, 0.88 + i * 0.55, 1.3, 0.45, e.color, e.label, C.white);
if (i < 3) s.addShape(pres.ShapeType.downArrow, { x: 9.12, y: 0.88 + i * 0.55 + 0.45, w: 0.25, h: 0.15, fill: { color: C.ltgray } });
});
// Legend note
s.addText("Blue arrows = drug blocks pathway | All RAAS blockers ultimately reduce blood pressure, cardiac remodeling, and renal damage", {
x: 0.3, y: 3.45, w: 9.4, h: 0.35,
fontSize: 10, italic: true, color: C.subtext, fontFace: "Calibri",
});
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — ACE INHIBITORS OVERVIEW
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "ACE Inhibitors — Overview", C.teal);
// Left panel
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 4.5, h: 4.6, fill: { color: "EBF5FB" }, line: { color: C.teal, width: 1.5 } });
pillBadge(s, 0.35, 0.92, 1.6, "MECHANISM", C.teal);
s.addText([
{ text: "Block ACE enzyme", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Prevent Ang I → Ang II conversion", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Bradykinin NOT degraded → accumulates", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "↑ Nitric oxide + Prostacyclin (vasodilation)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "↓ Aldosterone → ↓ Na+/H₂O retention", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "↓ Cardiac preload AND afterload", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Efferent arteriolar dilation → ↓ intraglomerular pressure", options: { bullet: { code: "2022" } } },
], { x: 0.3, y: 1.3, w: 4.3, h: 2.5, fontSize: 11, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.3 });
pillBadge(s, 0.35, 3.85, 1.2, "KEY DRUGS", C.teal);
s.addText("Captopril • Enalapril • Lisinopril\nRamipril • Fosinopril • Quinapril\nPerindopril • Trandolapril", {
x: 0.3, y: 4.17, w: 4.3, h: 0.9,
fontSize: 11, color: C.dktext, fontFace: "Calibri", italic: true,
});
// Right panel
s.addShape(pres.ShapeType.rect, { x: 4.9, y: 0.85, w: 4.9, h: 4.6, fill: { color: "EBF5FB" }, line: { color: C.teal, width: 1.5 } });
pillBadge(s, 5.05, 0.92, 1.5, "USES", C.teal);
const uses_ace = [
"Hypertension (first-line)",
"Heart failure / HFrEF",
"Post-MI (ventricular remodeling)",
"Diabetic nephropathy",
"Chronic kidney disease",
"LV hypertrophy regression",
"Asymptomatic LV dysfunction",
"High CV risk patients",
];
s.addText(uses_ace.map((u, i) => ({ text: u, options: { bullet: { code: "2022" }, breakLine: i < uses_ace.length - 1 } })),
{ x: 5.0, y: 1.3, w: 4.6, h: 2.5, fontSize: 11, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.3 });
pillBadge(s, 5.05, 3.85, 1.8, "ADVERSE EFFECTS", C.crimson);
const ae_ace = [
{ text: "Dry cough (up to 10%)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Angioedema (rare, life-threatening)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Hyperkalemia", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Hypotension (first dose)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Renal insufficiency", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Teratogenic (avoid in pregnancy)", options: { bullet: { code: "2022" } } },
];
s.addText(ae_ace, { x: 5.0, y: 4.2, w: 4.6, h: 1.8, fontSize: 10.5, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.25 });
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — ARBs OVERVIEW
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "Angiotensin Receptor Blockers (ARBs) — Overview", C.crimson);
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 4.5, h: 4.6, fill: { color: "FDEDEC" }, line: { color: C.crimson, width: 1.5 } });
pillBadge(s, 0.35, 0.92, 1.6, "MECHANISM", C.crimson);
s.addText([
{ text: "Competitive antagonists at AT1 receptor", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Block Ang II regardless of how it was made", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "More complete Ang II blockade than ACEi", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Do NOT affect bradykinin levels", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "↑ Ang II → stimulates unopposed AT2 receptor", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "AT2 stimulation → vasodilation + antiproliferative", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "↓ Aldosterone, ↓ preload and afterload", options: { bullet: { code: "2022" } } },
], { x: 0.3, y: 1.3, w: 4.3, h: 2.5, fontSize: 11, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.3 });
pillBadge(s, 0.35, 3.85, 1.2, "KEY DRUGS", C.crimson);
s.addText("Losartan • Valsartan • Candesartan\nIrbesartan • Telmisartan • Olmesartan\nAzilsartan • Eprosartan", {
x: 0.3, y: 4.17, w: 4.3, h: 0.9,
fontSize: 11, color: C.dktext, fontFace: "Calibri", italic: true,
});
s.addShape(pres.ShapeType.rect, { x: 4.9, y: 0.85, w: 4.9, h: 4.6, fill: { color: "FDEDEC" }, line: { color: C.crimson, width: 1.5 } });
pillBadge(s, 5.05, 0.92, 1.5, "USES", C.crimson);
const uses_arb = [
"Hypertension (first-line)",
"HFrEF (substitute for ACEi)",
"Post-MI with LV dysfunction",
"Diabetic nephropathy (Type 2 DM)",
"Chronic kidney disease",
"ACEi-intolerant patients",
"Marfan syndrome (Losartan)",
"LV hypertrophy",
];
s.addText(uses_arb.map((u, i) => ({ text: u, options: { bullet: { code: "2022" }, breakLine: i < uses_arb.length - 1 } })),
{ x: 5.0, y: 1.3, w: 4.6, h: 2.5, fontSize: 11, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.3 });
pillBadge(s, 5.05, 3.85, 1.8, "ADVERSE EFFECTS", "922B21");
const ae_arb = [
{ text: "Hypotension (first dose)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Hyperkalemia", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Renal insufficiency", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Cough — much rarer than ACEi", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Angioedema — very rare", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Olmesartan → sprue-like enteropathy", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Teratogenic (avoid in pregnancy)", options: { bullet: { code: "2022" } } },
];
s.addText(ae_arb, { x: 5.0, y: 4.2, w: 4.6, h: 1.8, fontSize: 10.5, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.25 });
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — RENIN INHIBITORS + MRAs
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "Renin Inhibitors & Mineralocorticoid Receptor Antagonists (MRAs)", C.slate);
// Renin Inhibitors left
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 4.6, h: 4.6, fill: { color: "FEF9E7" }, line: { color: C.gold, width: 2 } });
pillBadge(s, 0.35, 0.9, 1.8, "RENIN INHIBITORS", C.gold, C.dktext);
s.addText("Aliskiren (Tekturna)", {
x: 0.3, y: 1.29, w: 4.4, h: 0.35,
fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri",
});
s.addText([
{ text: "Mechanism", options: { bold: true, breakLine: true } },
{ text: "Directly inhibit renin enzyme", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Act earliest in RAAS cascade", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Block Angiotensinogen → Ang I step", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "", options: { breakLine: true } },
{ text: "Uses", options: { bold: true, breakLine: true } },
{ text: "Hypertension (monotherapy or add-on)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "", options: { breakLine: true } },
{ text: "Adverse Effects", options: { bold: true, breakLine: true } },
{ text: "Diarrhea (especially high dose)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Hyperkalemia, renal impairment", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Cough, angioedema (less than ACEi)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "", options: { breakLine: true } },
{ text: "Contraindications", options: { bold: true, breakLine: true } },
{ text: "Pregnancy, diabetes + ACEi/ARB combo", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Renal insufficiency", options: { bullet: { code: "2022" } } },
], { x: 0.3, y: 1.65, w: 4.4, h: 3.6, fontSize: 10.5, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.2 });
// MRAs right
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 0.85, w: 4.7, h: 4.6, fill: { color: "F5EEF8" }, line: { color: C.purple, width: 2 } });
pillBadge(s, 5.25, 0.9, 1.2, "MRAs", C.purple);
s.addText("Spironolactone • Eplerenone • Finerenone", {
x: 5.2, y: 1.29, w: 4.5, h: 0.35,
fontSize: 12, bold: true, color: C.purple, fontFace: "Calibri",
});
s.addText([
{ text: "Mechanism", options: { bold: true, breakLine: true } },
{ text: "Block aldosterone at mineralocorticoid receptor", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Prevent Na+ retention and K+ excretion", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Prevent myocardial fibrosis and hypertrophy", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "", options: { breakLine: true } },
{ text: "Uses", options: { bold: true, breakLine: true } },
{ text: "Symptomatic HFrEF", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Post-MI with LV dysfunction + HF", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Resistant hypertension (add-on)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Primary hyperaldosteronism", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "", options: { breakLine: true } },
{ text: "Adverse Effects", options: { bold: true, breakLine: true } },
{ text: "Hyperkalemia (monitor K+)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Gynecomastia, dysmenorrhea (spironolactone)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Eplerenone: selective → fewer endocrine SE", options: { bullet: { code: "2022" } } },
], { x: 5.2, y: 1.65, w: 4.5, h: 3.65, fontSize: 10.5, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.2 });
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — HEAD-TO-HEAD COMPARISON TABLE: ACEi vs ARBs
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "ACE Inhibitors vs ARBs — Head-to-Head Comparison", C.navy);
const rows = [
["Feature", "ACE Inhibitors", "ARBs"],
["Site of Action", "ACE enzyme (blocks Ang I → Ang II)", "AT1 receptor (blocks Ang II binding)"],
["Bradykinin effect", "↑ Bradykinin accumulation", "No effect on bradykinin"],
["Completeness of AngII block", "Partial (chymase pathway remains)", "More complete"],
["Dry Cough", "Common (~10% patients)", "Rare (<2%)"],
["Angioedema", "Rare (~0.3%)", "Very rare (~0.1%)"],
["AT2 stimulation", "Minimal", "Yes — Ang II ↑ stimulates AT2"],
["Hyperkalemia", "Yes", "Yes"],
["Teratogenicity", "Yes — avoid in pregnancy", "Yes — avoid in pregnancy"],
["Preferred role", "First choice", "Substitute if ACEi not tolerated"],
["IV formulation", "Yes (Enalaprilat)", "None"],
["Unique effects", "Rash/dysgeusia (captopril)", "Sprue enteropathy (olmesartan); Uricosuric (losartan)"],
["Cost", "Generally lower", "Generally higher"],
];
const colW = [2.6, 3.4, 3.4];
const colX = [0.15, 2.75, 6.15];
const rowH = 0.33;
const startY = 0.82;
rows.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isHeader = ri === 0;
const isFeatureCol = ci === 0;
const bg = isHeader ? C.navy : (ri % 2 === 0 ? "EBF5FB" : C.white);
const textColor = isHeader ? C.gold : (isFeatureCol ? C.navy : C.dktext);
s.addShape(pres.ShapeType.rect, {
x: colX[ci], y: startY + ri * rowH, w: colW[ci], h: rowH,
fill: { color: bg }, line: { color: C.ltgray, width: 0.5 },
});
s.addText(cell, {
x: colX[ci] + 0.05, y: startY + ri * rowH, w: colW[ci] - 0.1, h: rowH,
fontSize: isHeader ? 11 : 9.5,
bold: isHeader || isFeatureCol,
color: textColor, fontFace: "Calibri",
valign: "middle", margin: 2,
});
});
});
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — FULL 4-WAY COMPARISON TABLE
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "All RAAS Blockers — 4-Way Comparison", C.slate);
const rows4 = [
["Property", "ACE Inhibitors", "ARBs", "Renin Inhibitors", "MRAs"],
["Target", "ACE enzyme", "AT1 receptor", "Renin enzyme", "Aldosterone receptor"],
["BP lowering", "✓✓✓", "✓✓✓", "✓✓", "✓✓"],
["Cough", "Common (~10%)", "Rare", "Rare", "No"],
["Angioedema", "Rare", "Very rare", "Rare", "No"],
["Hyperkalemia", "Yes", "Yes", "Yes", "Yes (main SE)"],
["Pregnancy", "CI", "CI", "CI", "CI"],
["Heart failure", "First-line", "ACEi substitute", "Not established", "First-line (add-on)"],
["Diabetic nephropathy", "Yes", "Yes", "Limited", "Yes (Finerenone)"],
["Unique SE", "Rash (captopril)", "Enteropathy (olmesartan)", "Diarrhea", "Gynecomastia (spiro)"],
];
const cW4 = [2.1, 1.95, 1.95, 1.95, 1.95];
const cX4 = [0.1, 2.2, 4.15, 6.1, 8.05];
const headerColors4 = [C.slate, C.teal, C.crimson, C.gold, C.purple];
rows4.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isHeader = ri === 0;
let bg;
if (isHeader) {
bg = headerColors4[ci];
} else if (ci === 0) {
bg = "D5DBDB";
} else {
bg = ri % 2 === 0 ? "F2F3F4" : C.white;
}
const textColor = (isHeader || ci === 0) ? (ci === 3 ? C.dktext : C.white) : C.dktext;
s.addShape(pres.ShapeType.rect, {
x: cX4[ci], y: 0.82 + ri * 0.46, w: cW4[ci], h: 0.46,
fill: { color: bg }, line: { color: C.ltgray, width: 0.5 },
});
s.addText(cell, {
x: cX4[ci] + 0.04, y: 0.82 + ri * 0.46, w: cW4[ci] - 0.08, h: 0.46,
fontSize: isHeader ? 9.5 : 9,
bold: isHeader || ci === 0,
color: textColor, fontFace: "Calibri",
valign: "middle", align: ci === 0 ? "left" : "center", margin: 2,
});
});
});
// CI note
s.addText("CI = Contraindicated | ✓✓✓ = Strong evidence | ✓✓ = Moderate evidence", {
x: 0.1, y: 5.4, w: 9.8, h: 0.22,
fontSize: 8, italic: true, color: C.subtext, fontFace: "Calibri",
});
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — PHARMACOKINETICS COMPARISON
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "Pharmacokinetics — Key Differences", C.slate);
// ACE inhibitors PK box
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 4.6, h: 4.6, fill: { color: "EBF5FB" }, line: { color: C.teal, width: 2 } });
s.addText("ACE Inhibitors", { x: 0.35, y: 0.9, w: 4.3, h: 0.38, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri" });
s.addText([
{ text: "Route: All orally bioavailable", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Prodrugs: Most (except captopril, lisinopril)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "IV form: Enalaprilat only", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Renal elimination: Most (except fosinopril)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Fosinopril: Dual renal + fecal — safe in renal impairment", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Captopril: Short-acting; take on empty stomach", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Half-life of active compounds: 2–12 hours", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "ACE inhibition lasts longer than plasma t½", options: { bullet: { code: "2022" } } },
], { x: 0.3, y: 1.33, w: 4.4, h: 3.9, fontSize: 11, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.35 });
// ARBs PK box
s.addShape(pres.ShapeType.rect, { x: 5.1, y: 0.85, w: 4.7, h: 4.6, fill: { color: "FDEDEC" }, line: { color: C.crimson, width: 2 } });
s.addText("ARBs", { x: 5.25, y: 0.9, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: C.crimson, fontFace: "Calibri" });
s.addText([
{ text: "Route: All orally active", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Dosing: Once daily (most); valsartan twice daily", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Highly plasma protein bound", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Losartan: Active metabolite EXP-3174 (extensive first-pass)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Other ARBs: Inactive metabolites", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Elimination: Urine and feces (dual)", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "Full antihypertensive effect: ~4 weeks", options: { bullet: { code: "2022" }, breakLine: true } },
{ text: "No IV formulation available", options: { bullet: { code: "2022" } } },
], { x: 5.2, y: 1.33, w: 4.5, h: 3.9, fontSize: 11, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.35 });
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — SIMILARITIES
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "ACE Inhibitors & ARBs — Shared Properties", C.slate);
const simCols = [
{
title: "Shared Pharmacology",
color: C.teal,
items: [
"Arteriolar + venous vasodilation",
"Reduce aldosterone secretion",
"Reduce Na+/H₂O retention",
"Reduce cardiac preload & afterload",
"Anti-hypertrophic (LV regression)",
"Efferent arteriolar dilation",
"Renoprotective effects",
],
},
{
title: "Shared Clinical Uses",
color: C.crimson,
items: [
"Hypertension (first-line)",
"Heart failure (HFrEF)",
"Post-MI / LV remodeling",
"Diabetic nephropathy",
"Chronic kidney disease",
"LV hypertrophy regression",
"High cardiovascular risk",
],
},
{
title: "Shared Adverse Effects",
color: "6C3483",
items: [
"Hypotension (first-dose effect)",
"Hyperkalemia",
"Renal insufficiency",
"Teratogenicity",
"Bilateral renal artery stenosis risk",
],
},
];
simCols.forEach((col, ci) => {
const x = 0.2 + ci * 3.25;
s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 3.1, h: 4.6, fill: { color: "F4F6F7" }, line: { color: col.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 3.1, h: 0.45, fill: { color: col.color } });
s.addText(col.title, { x: x + 0.08, y: 0.85, w: 2.94, h: 0.45, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addText(
col.items.map((item, i) => ({ text: item, options: { bullet: { code: "2713" }, breakLine: i < col.items.length - 1 } })),
{ x: x + 0.08, y: 1.35, w: 2.94, h: 3.9, fontSize: 11, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.45 }
);
});
// Shared note at bottom
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 5.22, w: 9.6, h: 0.32, fill: { color: "D6EAF8" }, line: { color: C.teal, width: 0.5 } });
s.addText("Both classes are NOT recommended in combination — dual RAAS blockade increases hyperkalemia, hypotension, and renal dysfunction without added mortality benefit (ON-TARGET trial)", {
x: 0.35, y: 5.22, w: 9.3, h: 0.32,
fontSize: 9, italic: true, color: C.navy, fontFace: "Calibri", valign: "middle",
});
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — WHEN TO CHOOSE WHICH
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "Clinical Decision Guide — When to Choose Which RAAS Blocker", C.navy);
const decisions = [
{ situation: "Standard hypertension, no comorbidities", choice: "ACE Inhibitor", reason: "First-line, cheaper, well-established", color: C.teal },
{ situation: "Hypertension + cough on ACEi", choice: "Switch to ARB", reason: "No bradykinin accumulation → no cough", color: C.crimson },
{ situation: "Angioedema on ACEi", choice: "ARB (with caution)", reason: "Much lower incidence of angioedema", color: C.crimson },
{ situation: "HFrEF (primary)", choice: "ACE Inhibitor", reason: "Most established; survival benefit proven", color: C.teal },
{ situation: "HFrEF + ACEi-intolerant", choice: "ARB (candesartan, valsartan)", reason: "Non-inferior to ACEi; CHARM-Alt trial", color: C.crimson },
{ situation: "Symptomatic HFrEF + tolerating ACEi/ARB", choice: "Switch to ARNI (sacubitril/valsartan)", reason: "Superior to ACEi in PARADIGM-HF trial", color: "1A5276" },
{ situation: "Hypertension + gout", choice: "Losartan (ARB)", reason: "Unique uricosuric effect lowers uric acid", color: C.crimson },
{ situation: "Marfan syndrome", choice: "Losartan (ARB)", reason: "Blocks AT1-mediated TGF-β signaling", color: C.crimson },
{ situation: "Symptomatic HFrEF on ACEi + BB", choice: "Add MRA (spironolactone/eplerenone)", reason: "Reduces mortality (RALES, EMPHASIS-HF)", color: C.purple },
{ situation: "Pregnancy", choice: "Both CONTRAINDICATED", reason: "Both are teratogenic", color: "C0392B" },
];
decisions.forEach((d, i) => {
const y = 0.86 + i * 0.47;
s.addShape(pres.ShapeType.rect, { x: 0.1, y, w: 3.6, h: 0.43, fill: { color: "EAF2FB" }, line: { color: C.ltgray, width: 0.5 } });
s.addText(d.situation, { x: 0.15, y, w: 3.5, h: 0.43, fontSize: 9.5, color: C.dktext, fontFace: "Calibri", valign: "middle", bold: false });
s.addShape(pres.ShapeType.rect, { x: 3.7, y, w: 2.5, h: 0.43, fill: { color: d.color }, line: { color: C.white, width: 0.5 } });
s.addText(d.choice, { x: 3.75, y, w: 2.4, h: 0.43, fontSize: 9.5, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 6.2, y, w: 3.7, h: 0.43, fill: { color: "F4F6F7" }, line: { color: C.ltgray, width: 0.5 } });
s.addText(d.reason, { x: 6.25, y, w: 3.6, h: 0.43, fontSize: 9, italic: true, color: C.subtext, fontFace: "Calibri", valign: "middle" });
});
// Column headers
["Clinical Situation", "Drug Choice", "Reason"].forEach((h, i) => {
const xs = [0.1, 3.7, 6.2];
const ws = [3.6, 2.5, 3.7];
s.addShape(pres.ShapeType.rect, { x: xs[i], y: 0.78, w: ws[i], h: 0.08, fill: { color: C.gold } });
});
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — CONTRAINDICATIONS
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "Contraindications & Cautions for RAAS Blockers", "922B21");
const ciData = [
{
drug: "ALL RAAS Blockers",
color: "922B21",
items: [
"Pregnancy (all trimesters — teratogenic)",
"Bilateral renal artery stenosis",
"Severe hyperkalemia (K+ > 5.5 mEq/L)",
"Combination ACEi + ARB (dual RAAS blockade)",
],
},
{
drug: "ACE Inhibitors",
color: C.teal,
items: [
"History of ACEi-induced angioedema",
"Severe aortic stenosis (relative)",
"Caution: severe renal impairment (most need dose adjustment, except fosinopril)",
],
},
{
drug: "ARBs",
color: C.crimson,
items: [
"History of ARB-induced angioedema",
"Olmesartan: sprue-like enteropathy history",
"Combination with aliskiren in diabetes/renal impairment",
],
},
{
drug: "MRAs",
color: C.purple,
items: [
"Severe renal impairment (GFR < 30)",
"Hyperkalemia",
"Spironolactone: caution in men (gynecomastia)",
],
},
];
ciData.forEach((d, i) => {
const col = i < 2 ? i : i - 2;
const row = i < 2 ? 0 : 1;
const x = 0.2 + col * 4.85;
const y = 0.85 + row * 2.4;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 2.2, fill: { color: "FDFEFE" }, line: { color: d.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.4, fill: { color: d.color } });
s.addText(d.drug, { x: x + 0.08, y, w: 4.44, h: 0.4, fontSize: 12, bold: true, color: i === 2 ? C.white : C.white, fontFace: "Calibri", valign: "middle" });
s.addText(
d.items.map((item, ii) => ({ text: item, options: { bullet: { code: "26A0" }, breakLine: ii < d.items.length - 1 } })),
{ x: x + 0.08, y: y + 0.45, w: 4.44, h: 1.65, fontSize: 10.5, color: C.dktext, fontFace: "Calibri", lineSpacingMultiple: 1.35 }
);
});
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — KEY CLINICAL TRIALS
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
slideHeader(s, "Landmark Clinical Trials for RAAS Blockers", C.navy);
const trials = [
{ trial: "HOPE (2000)", drug: "Ramipril (ACEi)", finding: "↓ CV death, MI, stroke by 22% in high-risk patients", color: C.teal },
{ trial: "SOLVD (1991)", drug: "Enalapril (ACEi)", finding: "↓ Mortality + HF hospitalizations in HFrEF", color: C.teal },
{ trial: "CHARM-Alt (2003)", drug: "Candesartan (ARB)", finding: "↓ Mortality/hospitalizations in ACEi-intolerant HF", color: C.crimson },
{ trial: "VALIANT (2003)", drug: "Valsartan (ARB)", finding: "Non-inferior to captopril in post-MI LV dysfunction", color: C.crimson },
{ trial: "HEAAL (2009)", drug: "Losartan (ARB)", finding: "High-dose (150mg) superior to low-dose (50mg) in HFrEF", color: C.crimson },
{ trial: "ON-TARGET (2008)", drug: "Telmisartan vs Ramipril", finding: "Equal efficacy; less cough & angioedema with ARB; combo not better", color: "7D6608" },
{ trial: "RALES (1999)", drug: "Spironolactone (MRA)", finding: "↓ Mortality by 30% in severe HFrEF", color: C.purple },
{ trial: "EMPHASIS-HF (2011)", drug: "Eplerenone (MRA)", finding: "↓ CV death/hospitalizations in mild symptomatic HFrEF", color: C.purple },
{ trial: "PARADIGM-HF (2014)", drug: "Sacubitril/Valsartan (ARNI)", finding: "Superior to enalapril → ↓ CV death/HF hospitalizations by 20%", color: "1A5276" },
];
trials.forEach((t, i) => {
const y = 0.86 + i * 0.51;
s.addShape(pres.ShapeType.rect, { x: 0.1, y, w: 1.8, h: 0.47, fill: { color: t.color }, line: { color: C.white, width: 0.5 } });
s.addText(t.trial, { x: 0.12, y, w: 1.76, h: 0.47, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", align: "center" });
s.addShape(pres.ShapeType.rect, { x: 1.9, y, w: 2.4, h: 0.47, fill: { color: "EAF2FB" }, line: { color: C.ltgray, width: 0.5 } });
s.addText(t.drug, { x: 1.95, y, w: 2.3, h: 0.47, fontSize: 10, bold: true, color: C.dktext, fontFace: "Calibri", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 4.3, y, w: 5.6, h: 0.47, fill: { color: i % 2 === 0 ? "F2F3F4" : C.white }, line: { color: C.ltgray, width: 0.5 } });
s.addText(t.finding, { x: 4.35, y, w: 5.5, h: 0.47, fontSize: 9.5, color: C.dktext, fontFace: "Calibri", valign: "middle" });
});
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — SUMMARY / CONCLUSION
// ════════════════════════════════════════════════════════════════════════════
s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.06, fill: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.565, w: 10, h: 0.06, fill: { color: C.crimson } });
s.addText("Key Takeaways", {
x: 0.4, y: 0.25, w: 9.2, h: 0.65,
fontSize: 28, bold: true, color: C.gold, fontFace: "Calibri", align: "center",
});
const takeaways = [
{ icon: "→", text: "All RAAS blockers ultimately reduce Ang II activity — but at different points in the cascade", color: C.teal },
{ icon: "→", text: "ACEi and ARBs have near-identical clinical efficacy across HTN, HF, and CKD", color: C.crimson },
{ icon: "→", text: "The key difference: ACEi raise bradykinin → cough (10%) and angioedema; ARBs do not", color: C.gold },
{ icon: "→", text: "ARBs are the preferred substitute when ACEi are not tolerated", color: C.crimson },
{ icon: "→", text: "MRAs (spironolactone/eplerenone) add mortality benefit in HFrEF on top of ACEi/ARB + beta-blocker", color: C.purple },
{ icon: "→", text: "ARNI (sacubitril/valsartan) is now preferred over ACEi in HFrEF when tolerated", color: "5DADE2" },
{ icon: "→", text: "All RAAS blockers are CONTRAINDICATED in pregnancy and bilateral renal artery stenosis", color: "E74C3C" },
{ icon: "→", text: "Do NOT combine ACEi + ARB — dual RAAS blockade causes more harm than benefit", color: "E74C3C" },
];
takeaways.forEach((t, i) => {
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.05 + i * 0.55, w: 0.04, h: 0.38, fill: { color: t.color } });
s.addText(t.text, {
x: 0.5, y: 1.05 + i * 0.55, w: 9.1, h: 0.42,
fontSize: 12, color: C.white, fontFace: "Calibri", valign: "middle",
});
});
// ════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ════════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/raas-blockers-ppt/RAAS_Blockers_Comparison.pptx" })
.then(() => console.log("✅ Presentation saved successfully."))
.catch(err => console.error("❌ Error:", err));