Create PPT for hypertension with reason guidelines
hypertension guidelines 2024 JNC ACC AHA classification treatment
https://www.acc.org/latest-in-cardiology/ten-points-to-remem…
mkdir -p /home/daytona/workspace/hypertension-ppt && ls /home/daytona/workspace/hypertension-ppt/
~/hypertension-ppt/hypertension.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Orris Medical";
pres.title = "Hypertension: Guidelines & Management";
// ── Palette ──────────────────────────────────────────────────────────────────
const DARK_BG = "0D1B2A"; // deep navy
const MID_BG = "1B2E45"; // medium navy
const ACCENT = "E84545"; // vivid red (HTN color)
const ACCENT2 = "F4A261"; // warm amber
const WHITE = "FFFFFF";
const LIGHT = "D4E3F7"; // pale blue for body text
const SUBTLE = "7BA7CC"; // muted blue
const DIVIDER = "E84545";
// ── Helper: section label banner ─────────────────────────────────────────────
function addSectionBanner(slide, label, color) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.55, fill: { color: color || ACCENT } });
slide.addText(label.toUpperCase(), {
x: 0.3, y: 0, w: 9.4, h: 0.55,
fontSize: 11, bold: true, color: WHITE, valign: "middle", charSpacing: 3, margin: 0
});
}
// ── Helper: left stripe ───────────────────────────────────────────────────────
function addLeftStripe(slide, color) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.2, h: 5.625, fill: { color: color || ACCENT } });
}
// ── Helper: slide title (content slides) ─────────────────────────────────────
function addSlideTitle(slide, title) {
slide.addText(title, {
x: 0.45, y: 0.6, w: 9.2, h: 0.65,
fontSize: 24, bold: true, color: WHITE, margin: 0
});
slide.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.2, w: 1.2, h: 0.06, fill: { color: ACCENT } });
}
// ── Helper: bullet list ───────────────────────────────────────────────────────
function addBullets(slide, items, x, y, w, h, opts) {
const arr = items.map((item, i) => {
if (typeof item === "string") {
return { text: item, options: { bullet: { type: "bullet" }, breakLine: i < items.length - 1, fontSize: opts?.fontSize || 13, color: opts?.color || LIGHT, paraSpaceAfter: 6 } };
}
return item;
});
slide.addText(arr, { x, y, w, h, valign: "top", ...opts });
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 1 – TITLE
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
// Large accent block left
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.6, h: 5.625, fill: { color: ACCENT } });
// Subtle top bar
s.addShape(pres.ShapeType.rect, { x: 0.6, y: 0, w: 9.4, h: 0.08, fill: { color: ACCENT2 } });
s.addText("HYPERTENSION", {
x: 1, y: 0.8, w: 8.5, h: 1.1,
fontSize: 52, bold: true, color: WHITE, charSpacing: 4, margin: 0
});
s.addText("Evidence-Based Guidelines & Clinical Management", {
x: 1, y: 1.95, w: 8.2, h: 0.6,
fontSize: 19, color: ACCENT2, italic: true, margin: 0
});
s.addShape(pres.ShapeType.rect, { x: 1, y: 2.65, w: 4.5, h: 0.04, fill: { color: SUBTLE } });
s.addText([
{ text: "2025 AHA/ACC Guidelines | 2024 ESC Guidelines", options: { color: LIGHT } }
], { x: 1, y: 2.8, w: 8, h: 0.45, fontSize: 13 });
s.addText([
{ text: "Classification • Pathophysiology • Diagnosis • Treatment • Special Populations", options: { color: SUBTLE } }
], { x: 1, y: 3.3, w: 8, h: 0.4, fontSize: 11 });
// BP illustration (stylized gauge)
s.addShape(pres.ShapeType.ellipse, { x: 7.5, y: 3.6, w: 1.8, h: 1.8, fill: { color: MID_BG }, line: { color: ACCENT, width: 3 } });
s.addText("140/90\nmmHg", { x: 7.5, y: 3.7, w: 1.8, h: 1.6, fontSize: 14, bold: true, color: ACCENT, align: "center", valign: "middle" });
s.addText("Orris Medical | June 2026", { x: 1, y: 5.1, w: 8, h: 0.35, fontSize: 10, color: SUBTLE, margin: 0 });
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 2 – AGENDA / OVERVIEW
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Overview");
addSlideTitle(s, "What We Will Cover");
const topics = [
["01", "Definition & Epidemiology"],
["02", "BP Classification (2025 AHA/ACC & 2024 ESC)"],
["03", "Pathophysiology & Causes"],
["04", "Clinical Evaluation & Diagnosis"],
["05", "Lifestyle Modifications"],
["06", "Pharmacological Treatment"],
["07", "Compelling Indications for Drug Classes"],
["08", "Resistant & Secondary Hypertension"],
["09", "Special Populations"],
["10", "Target Blood Pressure & Monitoring"],
];
const col1 = topics.slice(0, 5);
const col2 = topics.slice(5);
col1.forEach(([num, label], i) => {
const y = 1.4 + i * 0.76;
s.addShape(pres.ShapeType.rect, { x: 0.45, y, w: 0.5, h: 0.5, fill: { color: ACCENT } });
s.addText(num, { x: 0.45, y, w: 0.5, h: 0.5, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle" });
s.addText(label, { x: 1.05, y: y + 0.05, w: 3.8, h: 0.45, fontSize: 12.5, color: LIGHT, valign: "middle" });
});
col2.forEach(([num, label], i) => {
const y = 1.4 + i * 0.76;
s.addShape(pres.ShapeType.rect, { x: 5.3, y, w: 0.5, h: 0.5, fill: { color: ACCENT2 } });
s.addText(num, { x: 5.3, y, w: 0.5, h: 0.5, fontSize: 13, bold: true, color: DARK_BG, align: "center", valign: "middle" });
s.addText(label, { x: 5.9, y: y + 0.05, w: 3.8, h: 0.45, fontSize: 12.5, color: LIGHT, valign: "middle" });
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 3 – DEFINITION & EPIDEMIOLOGY
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Definition & Epidemiology");
addSlideTitle(s, "What Is Hypertension?");
// Definition box
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.35, w: 5.6, h: 1.1, fill: { color: MID_BG }, line: { color: ACCENT, width: 2 } });
s.addText([
{ text: "Definition: ", options: { bold: true, color: ACCENT2 } },
{ text: "Persistently elevated blood pressure ≥130/80 mmHg (AHA/ACC 2025) or ≥140/90 mmHg (ESC 2024)", options: { color: LIGHT } }
], { x: 0.6, y: 1.4, w: 5.2, h: 1.0, fontSize: 12.5, valign: "middle" });
// Stats
const stats = [
{ val: "1.3B", label: "Adults affected globally" },
{ val: "46%", label: "Unaware of their condition" },
{ val: "#1", label: "Preventable cause of CVD death" },
];
stats.forEach((st, i) => {
const x = 0.45 + i * 3.1;
const y = 2.7;
s.addShape(pres.ShapeType.rect, { x, y, w: 2.8, h: 1.3, fill: { color: MID_BG }, line: { color: ACCENT2, width: 1.5 } });
s.addText(st.val, { x, y: y + 0.1, w: 2.8, h: 0.7, fontSize: 30, bold: true, color: ACCENT2, align: "center" });
s.addText(st.label, { x, y: y + 0.75, w: 2.8, h: 0.45, fontSize: 11, color: LIGHT, align: "center" });
});
addBullets(s, [
"Affects ~47% of US adults (≥130/80 threshold)",
"Leading risk factor for MI, stroke, HF, CKD, aortic aneurysm",
"Prevalence rises sharply with age (>70% in adults ≥65 yrs)",
"Disproportionately affects Black adults (higher prevalence & severity)",
], 0.45, 4.15, 9, 1.3, { fontSize: 11.5, color: SUBTLE });
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 4 – BP CLASSIFICATION TABLE
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Classification");
addSlideTitle(s, "Blood Pressure Classification (2025 AHA/ACC)");
const rows = [
["Category", "Systolic (mmHg)", "", "Diastolic (mmHg)", "Action"],
["Normal", "< 120", "AND", "< 80", "Promote healthy lifestyle"],
["Elevated", "120–129", "AND", "< 80", "Lifestyle changes, recheck in 3–6 months"],
["Stage 1 HTN", "130–139", "OR", "80–89", "Lifestyle ± drug therapy (based on CVD risk)"],
["Stage 2 HTN", "≥ 140", "OR", "≥ 90", "Lifestyle + drug therapy"],
["Hypertensive\nCrisis", "≥ 180", "and/or", "> 120", "Immediate evaluation / emergency treatment"],
];
const rowColors = [MID_BG, "1A3A1A", "2A3A1A", "3A2A1A", "4A1A1A", "6A0000"];
const textColors = [ACCENT2, "55E055", "AADD44", ACCENT2, "FF8844", "FF4444"];
rows.forEach((row, ri) => {
const y = 1.35 + ri * 0.68;
const bg = rowColors[ri] || MID_BG;
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 0.66, fill: { color: bg } });
const cols = [
{ x: 0.35, w: 1.9 },
{ x: 2.3, w: 1.4 },
{ x: 3.75, w: 0.55 },
{ x: 4.35, w: 1.4 },
{ x: 5.8, w: 3.85 },
];
row.forEach((cell, ci) => {
const isHeader = ri === 0;
s.addText(cell, {
x: cols[ci].x, y: y + 0.06, w: cols[ci].w, h: 0.55,
fontSize: isHeader ? 11 : 12,
bold: isHeader,
color: isHeader ? WHITE : (ci === 0 ? textColors[ri] : LIGHT),
valign: "middle",
align: ci === 2 ? "center" : "left"
});
});
});
s.addText("† 2024 ESC uses ≥140/90 as hypertension threshold; introduces 'elevated BP' (120-139/70-89)", {
x: 0.3, y: 5.35, w: 9.4, h: 0.22, fontSize: 9, color: SUBTLE, italic: true
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 5 – ESC 2024 vs AHA/ACC 2025 COMPARISON
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Guideline Comparison");
addSlideTitle(s, "2025 AHA/ACC vs 2024 ESC Guidelines");
// Left panel
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.35, w: 4.2, h: 4.0, fill: { color: MID_BG }, line: { color: ACCENT, width: 2 } });
s.addText("🇺🇸 2025 AHA/ACC", { x: 0.55, y: 1.42, w: 4.0, h: 0.45, fontSize: 14, bold: true, color: ACCENT });
const accPoints = [
"HTN defined as ≥130/80 mmHg",
"Stage 1: 130-139/80-89 mmHg",
"Stage 2: ≥140/90 mmHg",
"Drug therapy threshold: ≥130/80 for high-risk; ≥140/90 others",
"BP target: <130/80 for most patients",
"ABPM / HBPM for confirmation",
"Two-drug start for Stage 2 or >20/10 above goal",
"Absolute CVD risk guides treatment decisions",
];
addBullets(s, accPoints, 0.65, 1.88, 3.9, 3.4, { fontSize: 11, color: LIGHT });
// Right panel
s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.35, w: 4.2, h: 4.0, fill: { color: MID_BG }, line: { color: ACCENT2, width: 2 } });
s.addText("🇪🇺 2024 ESC", { x: 5.3, y: 1.42, w: 4.0, h: 0.45, fontSize: 14, bold: true, color: ACCENT2 });
const escPoints = [
"HTN defined as ≥140/90 mmHg",
"New 'Elevated BP' category: 120-139/70-89",
"Grade 1: 140-159/90-99 mmHg",
"Grade 2: ≥160/100 mmHg",
"3-month lifestyle trial before drugs (low risk)",
"Out-of-office BP preferred for diagnosis",
"Screen for secondary HTN if onset <40 yrs",
"Risk-based approach to intensification",
];
addBullets(s, escPoints, 5.35, 1.88, 3.9, 3.4, { fontSize: 11, color: LIGHT });
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 6 – PATHOPHYSIOLOGY
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Pathophysiology");
addSlideTitle(s, "How Hypertension Develops");
s.addText("BP = Cardiac Output × Total Peripheral Resistance", {
x: 0.45, y: 1.35, w: 9.2, h: 0.55,
fontSize: 16, bold: true, color: ACCENT2, align: "center",
fill: { color: MID_BG }
});
const mechanisms = [
{ title: "Increased CO", points: ["↑ HR / stroke volume", "Fluid retention (Na+)", "Sympathetic activation", "RAAS overactivation"] },
{ title: "Increased TPR", points: ["Vasoconstriction (AngII, NE)", "Vascular remodeling", "Endothelial dysfunction", "Reduced nitric oxide"] },
{ title: "Neurohormonal", points: ["RAAS: AngII → aldosterone", "SNS: ↑ catecholamines", "ADH/vasopressin", "Endothelin release"] },
{ title: "Structural", points: ["Arterial stiffness", "LVH (compensatory)", "Glomerulosclerosis", "Baroreceptor resetting"] },
];
mechanisms.forEach((m, i) => {
const x = 0.35 + i * 2.35;
s.addShape(pres.ShapeType.rect, { x, y: 2.05, w: 2.2, h: 0.44, fill: { color: ACCENT }, line: { color: ACCENT, width: 1 } });
s.addText(m.title, { x, y: 2.05, w: 2.2, h: 0.44, fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle" });
m.points.forEach((pt, pi) => {
s.addShape(pres.ShapeType.rect, { x, y: 2.54 + pi * 0.56, w: 2.2, h: 0.52, fill: { color: MID_BG } });
s.addText("• " + pt, { x: x + 0.05, y: 2.54 + pi * 0.56, w: 2.1, h: 0.52, fontSize: 10.5, color: LIGHT, valign: "middle" });
});
});
s.addText("Primary (essential) HTN: 90-95% of cases — multifactorial. Secondary HTN: 5-10% — identifiable cause.", {
x: 0.45, y: 5.2, w: 9.1, h: 0.3, fontSize: 10.5, color: SUBTLE, italic: true, align: "center"
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 7 – CAUSES / RISK FACTORS
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Etiology");
addSlideTitle(s, "Causes & Risk Factors");
// Primary HTN
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.35, w: 4.4, h: 3.9, fill: { color: MID_BG }, line: { color: ACCENT, width: 2 } });
s.addText("PRIMARY (Essential) HTN", { x: 0.55, y: 1.42, w: 4.2, h: 0.38, fontSize: 12, bold: true, color: ACCENT });
addBullets(s, [
"Age (arterial stiffness)",
"Genetic predisposition",
"High sodium / low potassium diet",
"Obesity & metabolic syndrome",
"Physical inactivity",
"Excessive alcohol intake",
"Chronic stress",
"Sleep apnea",
"Smoking / tobacco use",
], 0.6, 1.85, 4.1, 3.3, { fontSize: 11.5, color: LIGHT });
// Secondary HTN
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.35, w: 4.4, h: 3.9, fill: { color: MID_BG }, line: { color: ACCENT2, width: 2 } });
s.addText("SECONDARY HTN (5-10%)", { x: 5.25, y: 1.42, w: 4.2, h: 0.38, fontSize: 12, bold: true, color: ACCENT2 });
addBullets(s, [
"Primary aldosteronism (#1 secondary cause)",
"Renovascular disease (renal artery stenosis)",
"CKD / renal parenchymal disease",
"Obstructive sleep apnea",
"Thyroid / adrenal disorders",
"Pheochromocytoma",
"Cushing's syndrome",
"Coarctation of aorta",
"Drugs: NSAIDs, OCPs, stimulants, steroids",
], 5.3, 1.85, 4.1, 3.3, { fontSize: 11.5, color: LIGHT });
s.addText("Screen for secondary HTN when: onset <40 yrs, resistant to ≥3 drugs, sudden deterioration, or clinical clues present", {
x: 0.45, y: 5.3, w: 9.1, h: 0.25, fontSize: 9.5, color: SUBTLE, italic: true
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 8 – CLINICAL EVALUATION & DIAGNOSIS
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Evaluation & Diagnosis");
addSlideTitle(s, "Clinical Evaluation & Accurate BP Measurement");
// Steps for measurement
s.addText("Accurate Office BP Measurement", { x: 0.45, y: 1.35, w: 5.5, h: 0.4, fontSize: 14, bold: true, color: ACCENT2 });
addBullets(s, [
"Seat patient quietly for ≥5 minutes before measurement",
"Supported back, feet flat, arm at heart level",
"No caffeine, exercise, or smoking for 30 min prior",
"Appropriate cuff size (cuff too small → overestimates)",
"2+ readings, 1 min apart — average values",
"Confirm in contralateral arm on first visit",
], 0.45, 1.8, 5.3, 2.8, { fontSize: 11.5, color: LIGHT });
// Out-of-office monitoring
s.addShape(pres.ShapeType.rect, { x: 5.95, y: 1.35, w: 3.6, h: 1.6, fill: { color: MID_BG }, line: { color: ACCENT2, width: 1.5 } });
s.addText("ABPM Thresholds", { x: 6.1, y: 1.42, w: 3.3, h: 0.36, fontSize: 12, bold: true, color: ACCENT2 });
s.addText([
{ text: "Awake average: ", options: { bold: true, color: LIGHT } },
{ text: "≥135/85", options: { color: ACCENT } },
{ text: "\nAsleep average: ", options: { bold: true, color: LIGHT, breakLine: true } },
{ text: "≥120/70", options: { color: ACCENT } },
{ text: "\n24-hr average: ", options: { bold: true, color: LIGHT, breakLine: true } },
{ text: "≥130/80", options: { color: ACCENT } },
], { x: 6.1, y: 1.82, w: 3.3, h: 1.05, fontSize: 11.5 });
// White-coat / Masked
const boxes = [
{ title: "White-Coat HTN", desc: "High in office, normal at home\n→ Confirm with ABPM/HBPM\nLower CVD risk", col: ACCENT },
{ title: "Masked HTN", desc: "Normal in office, elevated at home\n→ Increased CVD risk\nHBPM essential", col: "FF8844" },
];
boxes.forEach((b, i) => {
const x = 5.95 + i * 1.85;
s.addShape(pres.ShapeType.rect, { x, y: 3.05, w: 1.75, h: 1.55, fill: { color: MID_BG }, line: { color: b.col, width: 1.5 } });
s.addText(b.title, { x, y: 3.1, w: 1.75, h: 0.38, fontSize: 10.5, bold: true, color: b.col, align: "center" });
s.addText(b.desc, { x: x + 0.05, y: 3.5, w: 1.65, h: 1.05, fontSize: 9.5, color: LIGHT, valign: "top" });
});
// Labs
s.addText("Initial Workup", { x: 0.45, y: 4.65, w: 5.5, h: 0.35, fontSize: 13, bold: true, color: ACCENT2 });
s.addText("BMP (electrolytes, creatinine, eGFR) | Fasting glucose & lipids | CBC | TSH | Urinalysis + albumin/creatinine | ECG | Echo (if LVH suspected)", {
x: 0.45, y: 5.0, w: 9.1, h: 0.5, fontSize: 11, color: LIGHT
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 9 – LIFESTYLE MODIFICATIONS
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Non-Pharmacological Treatment");
addSlideTitle(s, "Lifestyle Modifications (DASH + Lifestyle)");
const mods = [
{ icon: "🥗", title: "DASH Diet", desc: "Rich in fruits, vegetables, whole grains, low-fat dairy; low in saturated fat & sodium\n↓ SBP by 8-14 mmHg" },
{ icon: "🧂", title: "Sodium Restriction", desc: "Target <1.5 g/day (optimal) or ≤2.3 g/day\n↓ SBP by 2-8 mmHg" },
{ icon: "🏃", title: "Physical Activity", desc: "Aerobic exercise 150 min/wk moderate intensity or 75 min vigorous\n↓ SBP by 4-9 mmHg" },
{ icon: "⚖️", title: "Weight Loss", desc: "~1 mmHg reduction per kg lost\nTarget BMI <25 kg/m²\n↓ SBP by 5-20 mmHg (10 kg loss)" },
{ icon: "🍷", title: "Limit Alcohol", desc: "Men ≤2 drinks/day; Women ≤1 drink/day\n↓ SBP by 2-4 mmHg" },
{ icon: "🚭", title: "Quit Smoking", desc: "Smoking causes acute BP spikes & accelerates atherosclerosis; improves overall CVD risk significantly" },
];
const perRow = 3;
mods.forEach((m, i) => {
const col = i % perRow;
const row = Math.floor(i / perRow);
const x = 0.35 + col * 3.15;
const y = 1.4 + row * 1.9;
s.addShape(pres.ShapeType.rect, { x, y, w: 2.95, h: 1.75, fill: { color: MID_BG }, line: { color: ACCENT2, width: 1 } });
s.addText(m.icon + " " + m.title, { x: x + 0.1, y: y + 0.1, w: 2.7, h: 0.4, fontSize: 12, bold: true, color: ACCENT2 });
s.addText(m.desc, { x: x + 0.1, y: y + 0.5, w: 2.75, h: 1.1, fontSize: 10, color: LIGHT, valign: "top" });
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 10 – DRUG CLASSES
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Pharmacological Treatment");
addSlideTitle(s, "First-Line Antihypertensive Drug Classes");
const drugs = [
{ cls: "Thiazide Diuretics", eg: "HCTZ, Chlorthalidone", mech: "Inhibit Na+/Cl- cotransporter in DCT → ↓ fluid volume", se: "Hypokalemia, hyperuricemia, hyperglycemia" },
{ cls: "ACE Inhibitors", eg: "Lisinopril, Ramipril, Enalapril", mech: "Block conversion of AngI → AngII → vasodilation, ↓ aldosterone", se: "Dry cough, angioedema, hyperkalemia, CI in pregnancy" },
{ cls: "ARBs", eg: "Losartan, Valsartan, Olmesartan", mech: "Block AT1 receptor → same as ACEI without kinin effect", se: "Hyperkalemia; no cough; avoid in pregnancy" },
{ cls: "CCBs (Dihydropyridine)", eg: "Amlodipine, Nifedipine", mech: "Block L-type Ca++ channels → arterial vasodilation", se: "Peripheral edema, flushing, reflex tachycardia" },
{ cls: "CCBs (Non-DHP)", eg: "Verapamil, Diltiazem", mech: "Block cardiac + vascular Ca++ channels → ↓ HR & contractility", se: "Bradycardia, constipation, heart block" },
{ cls: "Beta-Blockers", eg: "Metoprolol, Carvedilol, Atenolol", mech: "Block β1 receptors → ↓ HR, CO, renin release", se: "Fatigue, bronchospasm, erectile dysfunction, mask hypoglycemia" },
];
drugs.forEach((d, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.35 + col * 4.85;
const y = 1.38 + row * 1.4;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 1.32, fill: { color: MID_BG } });
s.addShape(pres.ShapeType.rect, { x, y, w: 0.12, h: 1.32, fill: { color: ACCENT } });
s.addText(d.cls, { x: x + 0.2, y: y + 0.05, w: 4.3, h: 0.35, fontSize: 12, bold: true, color: ACCENT2 });
s.addText("e.g. " + d.eg, { x: x + 0.2, y: y + 0.35, w: 4.3, h: 0.22, fontSize: 9.5, color: SUBTLE, italic: true });
s.addText("MOA: " + d.mech, { x: x + 0.2, y: y + 0.56, w: 4.3, h: 0.38, fontSize: 9.5, color: LIGHT });
s.addText("SE: " + d.se, { x: x + 0.2, y: y + 0.93, w: 4.3, h: 0.32, fontSize: 9.5, color: "FF9999" });
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 11 – COMPELLING INDICATIONS
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Compelling Indications");
addSlideTitle(s, "Drug Selection by Comorbidity (Compelling Indications)");
const data = [
["Comorbidity", "Preferred Drug Class(es)", "Rationale"],
["Heart Failure (HFrEF)", "ACEI/ARB + β-blocker + diuretic + MRA", "Proven mortality benefit"],
["Post-MI", "ACEI/ARB + β-blocker", "Reduce remodeling & mortality"],
["Diabetes Mellitus", "ACEI or ARB (first line)", "Renoprotective, reduce proteinuria"],
["CKD with proteinuria", "ACEI or ARB", "Slow CKD progression, reduce proteinuria"],
["Stroke prevention", "ACEI + thiazide combination", "PROGRESS trial evidence"],
["Atrial fibrillation (rate)", "β-blocker or non-DHP CCB", "HR control"],
["Angina / CAD", "β-blocker or CCB", "Anti-ischemic"],
["Isolated systolic HTN (elderly)", "Thiazide or DHP-CCB", "SHEP/HYVET trial support"],
["Pregnancy", "Methyldopa, Labetalol, Nifedipine", "ACEI/ARBs contraindicated"],
];
const colW = [3.0, 3.6, 2.9];
const colX = [0.3, 3.35, 6.98];
data.forEach((row, ri) => {
const y = 1.3 + ri * 0.43;
const bg = ri === 0 ? ACCENT : (ri % 2 === 0 ? "1A2A3A" : MID_BG);
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 0.42, fill: { color: bg } });
row.forEach((cell, ci) => {
s.addText(cell, {
x: colX[ci] + 0.08, y: y + 0.03, w: colW[ci] - 0.1, h: 0.38,
fontSize: ri === 0 ? 11 : 10.5,
bold: ri === 0,
color: ri === 0 ? WHITE : (ci === 0 ? ACCENT2 : LIGHT),
valign: "middle"
});
});
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 12 – TREATMENT ALGORITHM
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Treatment Algorithm");
addSlideTitle(s, "Step-Care Treatment Algorithm (2025 AHA/ACC)");
const steps = [
{ label: "STEP 1 — Confirm Diagnosis", sub: "Confirm HTN with ABPM/HBPM. Evaluate CVD risk, target organ damage, comorbidities.", col: ACCENT },
{ label: "STEP 2 — Lifestyle Modifications", sub: "DASH diet, Na+ restriction, weight loss, exercise, limit alcohol — trial 3 months.", col: ACCENT2 },
{ label: "STEP 3 — Initiate Drug Therapy", sub: "Stage 1 high-risk or Stage 2: Start 1 drug. Stage 2 (>20/10 above goal): Start 2 drugs.", col: "4488FF" },
{ label: "STEP 4 — Intensify Therapy", sub: "If goal not reached in 1 month: Maximize dose or add second drug from complementary class.", col: "44BB88" },
{ label: "STEP 5 — Resistant HTN", sub: "BP uncontrolled on ≥3 drugs (including diuretic): add spironolactone (MRA), evaluate for secondary causes.", col: "AA66FF" },
];
steps.forEach((st, i) => {
const y = 1.38 + i * 0.84;
s.addShape(pres.ShapeType.rect, { x: 0.45, y, w: 9.1, h: 0.78, fill: { color: MID_BG } });
s.addShape(pres.ShapeType.rect, { x: 0.45, y, w: 0.18, h: 0.78, fill: { color: st.col } });
// Connector arrow
if (i < steps.length - 1) {
s.addText("▼", { x: 4.7, y: y + 0.72, w: 0.6, h: 0.2, fontSize: 9, color: SUBTLE, align: "center" });
}
s.addText(st.label, { x: 0.75, y: y + 0.06, w: 8.7, h: 0.35, fontSize: 13, bold: true, color: st.col });
s.addText(st.sub, { x: 0.75, y: y + 0.38, w: 8.7, h: 0.35, fontSize: 11, color: LIGHT });
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 13 – SPECIAL POPULATIONS
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "Special Populations");
addSlideTitle(s, "Hypertension in Special Populations");
const pops = [
{ grp: "Elderly (≥65 yrs)", recs: "Target <130 systolic if tolerated (SPRINT). Use thiazides or DHP-CCBs. Start low, go slow. Assess orthostatic hypotension." },
{ grp: "Pregnancy", recs: "Use Methyldopa, Labetalol, or Nifedipine. ACEI/ARBs absolutely contraindicated. Preeclampsia: MgSO4 + antihypertensives. Treat if ≥160/110 urgently." },
{ grp: "Diabetes Mellitus", recs: "Target BP <130/80. ACEI or ARB first-line (renoprotective). Add DHP-CCB or thiazide. Monitor eGFR and potassium." },
{ grp: "CKD", recs: "ACEI/ARB to reduce proteinuria & slow progression. Target <130/80. Watch for hyperkalemia. Adjust doses for eGFR." },
{ grp: "Black Patients", recs: "Higher prevalence & severity. DHP-CCBs + thiazides preferred (less ACE inhibitor response to monotherapy). Combination therapy often needed early." },
{ grp: "Resistant HTN", recs: "BP uncontrolled on ≥3 maximal-dose drugs (include thiazide). Add spironolactone. Rule out white-coat & pseudoresistance. Screen for secondary causes." },
];
const perRow = 3;
pops.forEach((p, i) => {
const col = i % perRow;
const row = Math.floor(i / perRow);
const x = 0.35 + col * 3.15;
const y = 1.35 + row * 2.0;
s.addShape(pres.ShapeType.rect, { x, y, w: 2.95, h: 1.85, fill: { color: MID_BG }, line: { color: ACCENT, width: 1.5 } });
s.addText(p.grp, { x: x + 0.12, y: y + 0.08, w: 2.7, h: 0.38, fontSize: 12, bold: true, color: ACCENT2 });
s.addText(p.recs, { x: x + 0.12, y: y + 0.48, w: 2.72, h: 1.3, fontSize: 9.5, color: LIGHT, valign: "top" });
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 14 – HYPERTENSIVE EMERGENCY & URGENCY
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s, ACCENT);
addSectionBanner(s, "Hypertensive Crisis", ACCENT);
addSlideTitle(s, "Hypertensive Emergency vs Urgency");
// Emergency
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.35, w: 4.5, h: 4.0, fill: { color: "2A0A0A" }, line: { color: ACCENT, width: 2.5 } });
s.addText("⚠ EMERGENCY (HTN + TOD)", { x: 0.55, y: 1.42, w: 4.3, h: 0.45, fontSize: 13, bold: true, color: ACCENT });
s.addText("BP ≥180/120 + acute target organ damage", { x: 0.6, y: 1.88, w: 4.2, h: 0.32, fontSize: 11, color: LIGHT, italic: true });
addBullets(s, [
"Hypertensive encephalopathy",
"Acute ischemic / hemorrhagic stroke",
"Acute MI / ACS",
"Acute aortic dissection",
"Acute pulmonary edema",
"Acute kidney injury",
"Preeclampsia / eclampsia",
], 0.6, 2.22, 4.2, 1.8, { fontSize: 11, color: LIGHT });
s.addShape(pres.ShapeType.rect, { x: 0.55, y: 4.12, w: 4.25, h: 1.05, fill: { color: MID_BG }, line: { color: ACCENT, width: 1 } });
s.addText("Tx: IV drugs (Labetalol, Nicardipine, Nitroprusside, Hydralazine)\n↓ BP by ≤25% in 1st hr, then toward 160/100 over next 2-6 hrs\nICU admission required", {
x: 0.65, y: 4.16, w: 4.1, h: 1.0, fontSize: 10, color: LIGHT
});
// Urgency
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.35, w: 4.5, h: 4.0, fill: { color: "1A1A0A" }, line: { color: ACCENT2, width: 2.5 } });
s.addText("⚡ URGENCY (No TOD)", { x: 5.25, y: 1.42, w: 4.3, h: 0.45, fontSize: 13, bold: true, color: ACCENT2 });
s.addText("BP ≥180/120, no acute organ damage", { x: 5.3, y: 1.88, w: 4.2, h: 0.32, fontSize: 11, color: LIGHT, italic: true });
addBullets(s, [
"Severe headache (no papilledema)",
"Epistaxis",
"Anxiety / agitation",
"Markedly elevated BP (asymptomatic)",
], 5.3, 2.22, 4.2, 1.4, { fontSize: 11, color: LIGHT });
s.addShape(pres.ShapeType.rect, { x: 5.25, y: 4.12, w: 4.25, h: 1.05, fill: { color: MID_BG }, line: { color: ACCENT2, width: 1 } });
s.addText("Tx: Oral medications (Captopril, Labetalol, Clonidine)\nGradual BP reduction over 24-48 hrs\nAvoid rapid correction — risk of hypoperfusion", {
x: 5.35, y: 4.16, w: 4.1, h: 1.0, fontSize: 10, color: LIGHT
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 15 – TARGET BP & MONITORING
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addLeftStripe(s);
addSectionBanner(s, "BP Targets & Monitoring");
addSlideTitle(s, "Target BP Goals & Follow-Up");
const targets = [
["Patient Group", "BP Target", "Guideline"],
["General adult (most patients)", "< 130/80 mmHg", "AHA/ACC 2025"],
["Elderly ≥65 yrs", "< 130 systolic (SBP)", "SPRINT; AHA/ACC"],
["Diabetes Mellitus", "< 130/80 mmHg", "ADA + AHA/ACC"],
["CKD without proteinuria", "< 130/80 mmHg", "KDIGO + AHA/ACC"],
["CKD with proteinuria", "< 130/80 mmHg", "KDIGO"],
["Post-stroke / TIA", "< 130/80 mmHg", "AHA/ACC"],
["Pregnancy (chronic HTN)", "< 140/90 mmHg", "ACOG"],
];
targets.forEach((row, ri) => {
const y = 1.35 + ri * 0.54;
const bg = ri === 0 ? MID_BG : (ri % 2 === 0 ? "1A2A3A" : "131E2C");
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 9.25, h: 0.52, fill: { color: bg } });
const colX = [0.45, 4.2, 7.5];
const colW = [3.65, 3.2, 2.0];
row.forEach((cell, ci) => {
s.addText(cell, {
x: colX[ci], y: y + 0.06, w: colW[ci], h: 0.42,
fontSize: ri === 0 ? 11.5 : 11,
bold: ri === 0 || ci === 1,
color: ri === 0 ? ACCENT2 : (ci === 1 ? ACCENT : LIGHT),
valign: "middle"
});
});
});
s.addText("Follow-up: Recheck in 1 month after initiating or changing therapy; 3-6 months once stable. Annual labs.", {
x: 0.35, y: 5.62, w: 9.25, h: 0.3, fontSize: 10, color: SUBTLE, italic: true
});
s.addText("SPRINT trial used unattended automated office BP — may not directly translate to standard office readings.", {
x: 0.35, y: 5.44, w: 9.25, h: 0.2, fontSize: 9, color: SUBTLE, italic: true
});
}
// ──────────────────────────────────────────────────────────────────────────────
// SLIDE 16 – KEY TAKEAWAYS
// ──────────────────────────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSectionBanner(s, "Key Takeaways");
// Full-width accent top
s.addShape(pres.ShapeType.rect, { x: 0, y: 0.55, w: 10, h: 0.5, fill: { color: MID_BG } });
s.addText("Clinical Pearls & Key Takeaways", {
x: 0.5, y: 0.55, w: 9, h: 0.5, fontSize: 22, bold: true, color: WHITE, valign: "middle"
});
const pearls = [
{ n: "1", t: "Accurate measurement is foundational — confirm elevated readings with ABPM or HBPM" },
{ n: "2", t: "AHA/ACC 2025 defines HTN as ≥130/80; ESC 2024 uses ≥140/90 — know which guideline you're following" },
{ n: "3", t: "Lifestyle changes (DASH + exercise + Na+ reduction) can lower SBP by 10-20 mmHg" },
{ n: "4", t: "First-line drugs: thiazides, ACEI/ARBs, DHP-CCBs — tailor to comorbidities (compelling indications)" },
{ n: "5", t: "Start two drugs for Stage 2 or BP >20/10 above goal — reduces time to control" },
{ n: "6", t: "Resistant HTN: add spironolactone (MRA) and rule out secondary causes" },
{ n: "7", t: "Hypertensive emergency requires IV therapy with controlled reduction — do NOT drop BP rapidly" },
{ n: "8", t: "Pregnancy: Methyldopa, Labetalol, Nifedipine are safe — ACEI/ARBs are contraindicated" },
];
pearls.forEach((p, i) => {
const y = 1.2 + i * 0.54;
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.42, h: 0.44, fill: { color: i < 4 ? ACCENT : ACCENT2 } });
s.addText(p.n, { x: 0.3, y, w: 0.42, h: 0.44, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle" });
s.addText(p.t, { x: 0.85, y: y + 0.02, w: 8.9, h: 0.42, fontSize: 11.5, color: LIGHT, valign: "middle" });
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.28, fill: { color: ACCENT } });
s.addText("Sources: 2025 AHA/ACC Hypertension Guidelines | 2024 ESC BP Guidelines | JNC 8 | SPRINT Trial | Textbook of Family Medicine 9e", {
x: 0.3, y: 5.37, w: 9.4, h: 0.22, fontSize: 8.5, color: WHITE
});
}
// ── Write file ────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/hypertension-ppt/Hypertension_Guidelines.pptx" })
.then(() => console.log("✅ PPT saved!"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });
cd /home/daytona/workspace/hypertension-ppt && node hypertension.js 2>&1
ls -lh /home/daytona/workspace/hypertension-ppt/
Hypertension Guidelines
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title Slide - Bold cover with BP gauge visual |
| 2 | Agenda - All 10 topics with numbered icons |
| 3 | Definition & Epidemiology - 1.3B affected globally, key stats |
| 4 | BP Classification Table - Full AHA/ACC 2025 color-coded table (Normal → Hypertensive Crisis) |
| 5 | AHA/ACC 2025 vs ESC 2024 Comparison - Side-by-side differences |
| 6 | Pathophysiology - BP = CO × TPR; 4-column mechanism breakdown |
| 7 | Causes & Risk Factors - Primary (95%) vs Secondary HTN side-by-side |
| 8 | Clinical Evaluation & Diagnosis - Accurate BP measurement, ABPM thresholds, white-coat vs masked HTN, labs |
| 9 | Lifestyle Modifications - DASH diet, Na+ restriction, exercise, weight loss, alcohol, smoking (with mmHg reduction data) |
| 10 | Drug Classes - 6 first-line classes with MOA and side effects |
| 11 | Compelling Indications - 9-row table matching comorbidities to drug classes |
| 12 | Treatment Algorithm - 5-step step-care flowchart |
| 13 | Special Populations - Elderly, Pregnancy, DM, CKD, Black patients, Resistant HTN |
| 14 | Hypertensive Emergency vs Urgency - Red-alert slide with IV vs oral treatment |
| 15 | Target BP Goals - Table by patient group with guideline sources |
| 16 | Key Takeaways - 8 clinical pearls with sources |