Make ppt for pharmacology
Cardiovascular drugs
mkdir -p /home/daytona/workspace/cardio-drugs-ppt && ls /home/daytona/workspace/…
~/cardio-drugs-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Cardiovascular Drugs - Pharmacology";
pres.author = "Pharmacology Department";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const DARK_BG = "0D1B2A"; // deep navy (dominant ~60%)
const MID_BG = "1B3A5C"; // mid-blue (sections / cards)
const ACCENT = "E84855"; // red-accent (highlight / headings)
const LIGHT_TXT = "F0F4F8"; // near-white text
const MUTED_TXT = "A8C4D8"; // soft blue-grey subtitles
const WHITE = "FFFFFF";
const YELLOW = "F6C90E"; // key-fact callout
const GREEN_ACC = "4CAF82"; // safe/green info
// ─── HELPERS ─────────────────────────────────────────────────────
function addSlideHeader(slide, title, subtitle = "") {
// Dark top bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: ACCENT } });
slide.addText(title, {
x: 0.35, y: 0, w: 9.3, h: 0.85, fontSize: 24, bold: true,
color: WHITE, valign: "middle", margin: 0, fontFace: "Calibri"
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.35, y: 0.82, w: 9.3, h: 0.35, fontSize: 13,
color: MUTED_TXT, fontFace: "Calibri", italic: true, margin: 0
});
}
}
function addFooter(slide, pageNum) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.28, fill: { color: MID_BG } });
slide.addText("Cardiovascular Drugs — Pharmacology", {
x: 0.2, y: 5.35, w: 7, h: 0.28, fontSize: 9,
color: MUTED_TXT, valign: "middle", margin: 0
});
slide.addText(`${pageNum}`, {
x: 9.3, y: 5.35, w: 0.5, h: 0.28, fontSize: 9,
color: MUTED_TXT, valign: "middle", align: "right", margin: 0
});
}
function card(slide, x, y, w, h, title, bullets, color = MID_BG) {
slide.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill: { color }, line: { color: ACCENT, width: 1.2 }, rectRadius: 0.08 });
slide.addText(title, { x: x + 0.12, y: y + 0.08, w: w - 0.24, h: 0.35, fontSize: 13, bold: true, color: YELLOW, fontFace: "Calibri", margin: 0 });
const items = bullets.map((b, i) => ({ text: b, options: { bullet: { code: "25CF", color: ACCENT }, color: LIGHT_TXT, fontSize: 11, breakLine: i < bullets.length - 1 } }));
slide.addText(items, { x: x + 0.12, y: y + 0.45, w: w - 0.24, h: h - 0.55, fontFace: "Calibri", valign: "top" });
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
// Large left accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: ACCENT } });
// Big title
s.addText("CARDIOVASCULAR\nDRUGS", {
x: 0.45, y: 0.6, w: 9.2, h: 2.2, fontSize: 54, bold: true,
color: WHITE, fontFace: "Calibri", align: "left", charSpacing: 2
});
s.addText("PHARMACOLOGY", {
x: 0.45, y: 2.75, w: 9.2, h: 0.65, fontSize: 26,
color: ACCENT, fontFace: "Calibri", align: "left", charSpacing: 8, bold: true
});
// Subtitle band
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 3.55, w: 5.5, h: 0.04, fill: { color: MUTED_TXT } });
s.addText("Classifications · Mechanisms · Clinical Applications", {
x: 0.45, y: 3.7, w: 9, h: 0.45, fontSize: 15,
color: MUTED_TXT, fontFace: "Calibri", align: "left"
});
s.addText("Based on Katzung's Basic & Clinical Pharmacology · Goodman & Gilman · Braunwald's Heart Disease", {
x: 0.45, y: 4.25, w: 9, h: 0.4, fontSize: 10,
color: MUTED_TXT, fontFace: "Calibri", italic: true
});
// Decorative circles
s.addShape(pres.ShapeType.ellipse, { x: 7.8, y: 0.1, w: 2.5, h: 2.5, fill: { color: MID_BG }, line: { color: MID_BG } });
s.addShape(pres.ShapeType.ellipse, { x: 8.2, y: 2.8, w: 1.5, h: 1.5, fill: { color: ACCENT, transparency: 70 }, line: { color: ACCENT, transparency: 70 } });
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / OUTLINE
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Overview — Drug Categories");
addFooter(s, 2);
const categories = [
{ num: "01", label: "Antihypertensive Drugs", desc: "Diuretics, Beta-blockers, CCBs, ACE-I, ARBs" },
{ num: "02", label: "Antiarrhythmic Drugs", desc: "Class I–IV (Vaughan Williams Classification)" },
{ num: "03", label: "Heart Failure Drugs", desc: "Inotropes, Diuretics, Vasodilators, RAAS blockade" },
{ num: "04", label: "Antianginal Drugs", desc: "Nitrates, Beta-blockers, Calcium channel blockers" },
{ num: "05", label: "Lipid-Lowering Agents", desc: "Statins, Fibrates, Ezetimibe, PCSK9 inhibitors" },
{ num: "06", label: "Anticoagulants & Antiplatelets",desc: "Heparin, Warfarin, DOACs, Aspirin, P2Y12 inhibitors" },
];
categories.forEach((c, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.25 + col * 4.9;
const y = 1.05 + row * 1.38;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.6, h: 1.22, fill: { color: MID_BG }, line: { color: ACCENT, width: 1 }, rectRadius: 0.07 });
s.addShape(pres.ShapeType.roundRect, { x: x + 0.08, y: y + 0.12, w: 0.55, h: 0.55, fill: { color: ACCENT }, rectRadius: 0.05 });
s.addText(c.num, { x: x + 0.08, y: y + 0.12, w: 0.55, h: 0.55, fontSize: 15, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
s.addText(c.label, { x: x + 0.72, y: y + 0.1, w: 3.78, h: 0.38, fontSize: 13, bold: true, color: YELLOW, fontFace: "Calibri", valign: "middle", margin: 0 });
s.addText(c.desc, { x: x + 0.72, y: y + 0.52, w: 3.78, h: 0.6, fontSize: 10.5, color: LIGHT_TXT, fontFace: "Calibri", valign: "top", margin: 0 });
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 3 — ANTIHYPERTENSIVE DRUGS
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Antihypertensive Drugs", "Management of Systemic Hypertension");
addFooter(s, 3);
card(s, 0.2, 1.05, 2.9, 4.3, "Diuretics", [
"Thiazides (HCTZ) — first line",
"Loop diuretics (furosemide) — in HF",
"K+-sparing (spironolactone)",
"MOA: reduce plasma volume & SVR",
"ADR: hypokalemia, hyperuricemia, hyperglycemia"
]);
card(s, 3.25, 1.05, 2.9, 4.3, "Renin-Angiotensin System", [
"ACE Inhibitors (enalapril, lisinopril)",
"ARBs (losartan, valsartan)",
"MOA: block Ang II formation / receptor",
"Preferred in: diabetes, CKD, HF",
"ADR ACE-I: dry cough (bradykinin), angioedema"
]);
card(s, 6.3, 1.05, 3.45, 4.3, "Beta-Blockers & CCBs", [
"β-blockers: metoprolol, atenolol",
"MOA: decrease HR, CO, renin release",
"Avoid in asthma, peripheral vascular disease",
"CCBs: amlodipine (DHP), verapamil (non-DHP)",
"MOA: vasodilation by blocking L-type Ca²⁺",
"ADR: peripheral edema (DHP), constipation (verapamil)"
]);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 4 — ANTIARRHYTHMIC DRUGS (Vaughan Williams)
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Antiarrhythmic Drugs", "Vaughan Williams Classification");
addFooter(s, 4);
const classes = [
{ cls: "Class I", sub: "Na⁺ Channel Blockers", drugs: "IA: quinidine, procainamide\nIB: lidocaine, mexiletine\nIC: flecainide, propafenone", color: "1B3A5C" },
{ cls: "Class II", sub: "Beta-Blockers", drugs: "Metoprolol, atenolol, esmolol\nReduce automaticity & conduction\nUseful in SVT, post-MI arrhythmias", color: "162E45" },
{ cls: "Class III", sub: "K⁺ Channel Blockers", drugs: "Amiodarone, sotalol, dofetilide\nProlong AP duration & refractory period\nUsed in AF, VT, VF", color: "1B3A5C" },
{ cls: "Class IV", sub: "Ca²⁺ Channel Blockers", drugs: "Verapamil, diltiazem\nSlow AV nodal conduction\nUsed in SVT, AF rate control", color: "162E45" },
];
classes.forEach((c, i) => {
const x = 0.2 + i * 2.42;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.0, w: 2.28, h: 4.2, fill: { color: c.color }, line: { color: ACCENT, width: 1.2 }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 2.28, h: 0.52, fill: { color: ACCENT } });
s.addText(c.cls, { x: x + 0.05, y: 1.0, w: 2.18, h: 0.52, fontSize: 16, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
s.addText(c.sub, { x: x + 0.08, y: 1.57, w: 2.12, h: 0.45, fontSize: 11, bold: true, color: YELLOW, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
s.addText(c.drugs, { x: x + 0.1, y: 2.08, w: 2.08, h: 2.9, fontSize: 10.5, color: LIGHT_TXT, fontFace: "Calibri", valign: "top" });
});
// Adenosine note
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y: 5.0, w: 9.6, h: 0.28, fill: { color: MID_BG }, line: { color: YELLOW, width: 0.8 }, rectRadius: 0.04 });
s.addText("✦ Adenosine (unclassified) — drug of choice for terminating paroxysmal SVT; very short half-life (~10 sec)", {
x: 0.35, y: 5.0, w: 9.3, h: 0.28, fontSize: 10, color: YELLOW, valign: "middle", margin: 0
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 5 — HEART FAILURE DRUGS
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Heart Failure — Pharmacotherapy", "Targeting preload, afterload, and contractility");
addFooter(s, 5);
// Left column
card(s, 0.2, 1.05, 4.55, 2.0, "RAAS Blockade (Cornerstone)", [
"ACE inhibitors / ARBs — reduce afterload & prevent remodeling",
"Sacubitril/valsartan (ARNI) — 20% mortality reduction vs. enalapril",
"Spironolactone / eplerenone — aldosterone antagonism"
]);
card(s, 0.2, 3.18, 4.55, 2.0, "Beta-Blockers", [
"Carvedilol, metoprolol succinate, bisoprolol",
"Reduce mortality in HFrEF (LVEF < 40%)",
"Start low, titrate slowly; avoid in acute decompensation"
]);
// Right column
card(s, 5.0, 1.05, 4.75, 2.0, "Diuretics & Vasodilators", [
"Loop diuretics (furosemide) — symptomatic relief",
"Hydralazine + isosorbide dinitrate — reduce preload & afterload",
"Preferred combination when ACE-I intolerant"
]);
card(s, 5.0, 3.18, 4.75, 2.0, "Positive Inotropes & Novel Agents", [
"Digoxin — reduces hospitalizations; toxic in elderly",
"Dobutamine / milrinone — acute decompensation (ICU)",
"SGLT2 inhibitors (dapagliflozin, empagliflozin) — ↓ mortality in HFrEF & HFpEF"
]);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 6 — ANTIANGINAL DRUGS
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Antianginal Drugs", "Reducing myocardial oxygen demand and improving supply");
addFooter(s, 6);
// Three mechanism boxes side by side
const data = [
{ title: "Nitrates", color: MID_BG, items: [
"GTN, ISDN, isosorbide mononitrate",
"MOA: release NO → venodilation → ↓ preload",
"Coronary vasodilation → ↑ O₂ supply",
"Tolerance develops with continuous use",
"ADR: headache, reflex tachycardia, hypotension",
"Nitrate-free period (8–12 h) prevents tolerance"
]},
{ title: "Beta-Blockers", color: "162E45", items: [
"Metoprolol, atenolol, propranolol",
"MOA: block β₁ → ↓ HR, contractility, BP",
"↓ Myocardial O₂ demand",
"First-line for stable angina & post-MI",
"Avoid in vasospastic (Prinzmetal) angina",
"Combined with nitrates for additive benefit"
]},
{ title: "Calcium Channel Blockers", color: MID_BG, items: [
"Amlodipine, felodipine (DHP) — vasodilation",
"Verapamil, diltiazem (non-DHP) — ↓ HR + vasodilation",
"Drug of choice in Prinzmetal angina",
"MOA: block L-type Ca²⁺ → arteriolar dilation",
"Avoid verapamil + beta-blocker (risk of AV block)",
"ADR: edema, constipation, flushing"
]},
];
data.forEach((d, i) => {
const x = 0.2 + i * 3.27;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.05, w: 3.1, h: 4.22, fill: { color: d.color }, line: { color: ACCENT, width: 1.2 }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.rect, { x, y: 1.05, w: 3.1, h: 0.48, fill: { color: ACCENT } });
s.addText(d.title, { x: x + 0.05, y: 1.05, w: 3.0, h: 0.48, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
const items = d.items.map((t, j) => ({ text: t, options: { bullet: { code: "25CF", color: YELLOW }, color: LIGHT_TXT, fontSize: 10.5, breakLine: j < d.items.length - 1 } }));
s.addText(items, { x: x + 0.1, y: 1.6, w: 2.9, h: 3.6, fontFace: "Calibri", valign: "top" });
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 7 — LIPID-LOWERING AGENTS
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Lipid-Lowering Agents", "Prevention of atherosclerotic cardiovascular disease");
addFooter(s, 7);
// Table-style layout
const rows = [
{ drug: "Statins", ex: "Atorvastatin, Rosuvastatin", moa: "HMG-CoA reductase inhibition → ↓LDL by 30–55%", adr: "Myopathy, rhabdomyolysis, elevated LFTs", use: "Primary & secondary CV prevention" },
{ drug: "Fibrates", ex: "Fenofibrate, Gemfibrozil", moa: "PPARα activation → ↓TG, ↑HDL", adr: "Myopathy (esp. with statins), GI upset", use: "Hypertriglyceridemia, mixed dyslipidemia" },
{ drug: "Ezetimibe", ex: "Ezetimibe", moa: "Blocks NPC1L1 → ↓ intestinal cholesterol absorption → ↓LDL 15–20%", adr: "Generally well tolerated; mild GI", use: "Add-on to statins; statin intolerance" },
{ drug: "PCSK9 Inhibitors", ex: "Evolocumab, Alirocumab", moa: "Monoclonal Ab → block PCSK9 → ↑LDL-R → ↓LDL up to 60%", adr: "Injection site reactions, flu-like symptoms", use: "FH, very high CV risk, statin intolerance" },
{ drug: "Bile Acid Sequestrants", ex: "Cholestyramine, Colesevelam", moa: "Bind bile acids → ↑LDL-R expression", adr: "Constipation, bloating, ↓drug absorption", use: "LDL reduction; safe in pregnancy" },
];
const cols = { drug: 0.2, ex: 1.65, moa: 3.45, adr: 6.3, use: 8.1 };
const headers = ["Drug Class", "Examples", "Mechanism of Action", "Key ADRs", "Main Indication"];
// Header row
s.addShape(pres.ShapeType.rect, { x: 0.18, y: 1.02, w: 9.64, h: 0.38, fill: { color: ACCENT } });
Object.entries(cols).forEach(([k, x], i) => {
const widths = [1.35, 1.7, 2.75, 1.7, 1.75];
s.addText(headers[i], { x, y: 1.02, w: widths[i], h: 0.38, fontSize: 11, bold: true, color: WHITE, valign: "middle", margin: [0, 4, 0, 4] });
});
// Data rows
rows.forEach((r, ri) => {
const y = 1.42 + ri * 0.72;
const bg = ri % 2 === 0 ? MID_BG : DARK_BG;
s.addShape(pres.ShapeType.rect, { x: 0.18, y, w: 9.64, h: 0.7, fill: { color: bg } });
const vals = [r.drug, r.ex, r.moa, r.adr, r.use];
const widths = [1.35, 1.7, 2.75, 1.7, 1.75];
Object.values(cols).forEach((x, ci) => {
const color = ci === 0 ? YELLOW : LIGHT_TXT;
const bold = ci === 0;
s.addText(vals[ci], { x, y: y + 0.04, w: widths[ci], h: 0.62, fontSize: ci === 2 ? 9 : 10, color, bold, fontFace: "Calibri", valign: "middle", margin: [0, 4, 0, 4] });
});
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 8 — ANTICOAGULANTS
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Anticoagulants", "Prevention and treatment of thromboembolic disorders");
addFooter(s, 8);
card(s, 0.2, 1.05, 3.05, 2.0, "Heparin (UFH/LMWH)", [
"UFH: activates antithrombin III → inhibits Xa & IIa",
"LMWH (enoxaparin): anti-Xa predominant",
"Reversal: protamine sulfate",
"Monitor: aPTT (UFH), anti-Xa (LMWH)"
]);
card(s, 3.4, 1.05, 3.05, 2.0, "Warfarin (Vitamin K Antagonist)", [
"Inhibits vitamin K epoxide reductase",
"Blocks factors II, VII, IX, X (VKORC1)",
"Narrow TI; many drug/food interactions",
"Reversal: Vit K, FFP, 4-factor PCC"
]);
card(s, 6.75, 1.05, 3.0, 2.0, "Direct Oral Anticoagulants", [
"Dabigatran — direct thrombin inhibitor",
"Rivaroxaban, apixaban, edoxaban — Xa inhibitors",
"Predictable PK; no routine monitoring",
"Reversal: idarucizumab (dabigatran), andexanet alfa (Xa)"
]);
// Antiplatelets
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 3.17, w: 9.6, h: 0.38, fill: { color: ACCENT } });
s.addText("ANTIPLATELETS", { x: 0.2, y: 3.17, w: 9.6, h: 0.38, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
card(s, 0.2, 3.6, 3.05, 1.6, "Aspirin (COX inhibitor)", [
"Irreversibly inhibits COX-1 → ↓ TXA₂",
"Standard: 75–100 mg/day for secondary prevention",
"ADR: GI bleeding, peptic ulcer"
]);
card(s, 3.4, 3.6, 3.05, 1.6, "P2Y12 Inhibitors", [
"Clopidogrel (prodrug), ticagrelor, prasugrel",
"Block ADP-mediated platelet activation",
"Dual antiplatelet therapy (DAPT) post-ACS & stenting"
]);
card(s, 6.75, 3.6, 3.0, 1.6, "GP IIb/IIIa Inhibitors", [
"Abciximab, eptifibatide, tirofiban",
"Block final common pathway of platelet aggregation",
"Used in high-risk PCI, ACS (IV use)"
]);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 9 — DIGOXIN (CARDIAC GLYCOSIDES)
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Cardiac Glycosides — Digoxin", "Positive inotrope & AV nodal blocker");
addFooter(s, 9);
// Left: mechanism diagram (text)
s.addShape(pres.ShapeType.roundRect, { x: 0.2, y: 1.05, w: 4.6, h: 4.3, fill: { color: MID_BG }, line: { color: ACCENT, width: 1.2 }, rectRadius: 0.08 });
s.addText("MECHANISM OF ACTION", { x: 0.28, y: 1.1, w: 4.44, h: 0.38, fontSize: 13, bold: true, color: YELLOW, fontFace: "Calibri", margin: 0 });
const mechSteps = [
"① Inhibits Na⁺/K⁺-ATPase pump",
"② ↑ Intracellular Na⁺",
"③ Activates Na⁺/Ca²⁺ exchanger",
"④ ↑ Intracellular Ca²⁺",
"⑤ ↑ Myocardial contractility (positive inotropy)",
"⑥ Vagal stimulation → ↓ HR, ↓ AV conduction",
];
const mechItems = mechSteps.map((t, i) => ({ text: t, options: { bullet: false, color: LIGHT_TXT, fontSize: 12, breakLine: i < mechSteps.length - 1 } }));
s.addText(mechItems, { x: 0.32, y: 1.55, w: 4.4, h: 3.6, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.4 });
// Right: uses, toxicity, monitoring
card(s, 5.05, 1.05, 4.7, 1.3, "Clinical Uses", [
"Heart failure with reduced EF (HFrEF)",
"Rate control in atrial fibrillation / flutter"
]);
card(s, 5.05, 2.45, 4.7, 1.55, "Toxicity (narrow therapeutic index)", [
"GI: nausea, vomiting, anorexia",
"Cardiac: arrhythmias, heart block, VF",
"CNS: visual disturbances (yellow-green halos), delirium",
"Precipitated by hypokalemia, hypomagnesemia, hypercalcemia"
]);
card(s, 5.05, 4.1, 4.7, 1.25, "Monitoring & Antidote", [
"Therapeutic serum level: 0.5–2.0 ng/mL",
"Monitor: ECG, electrolytes, renal function",
"Antidote: Digoxin-specific antibody fragments (DigiFab)"
]);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 10 — DRUGS IN ACUTE CORONARY SYNDROME
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Acute Coronary Syndrome (ACS) Management", "MONA + DAPT + Anticoagulation");
addFooter(s, 10);
// MONA mnemonic in big boxes
const mona = [
{ letter: "M", word: "Morphine", detail: "Pain relief\n↓ sympathetic activation\nUse cautiously (may↑mortality?)" },
{ letter: "O", word: "Oxygen", detail: "Only if SpO₂ < 90%\nAvoid routine use\nHigh-flow if hypoxic" },
{ letter: "N", word: "Nitrates", detail: "SL GTN → chest pain relief\nCoronary vasodilation\nAvoid if RV infarct, hypotension" },
{ letter: "A", word: "Aspirin", detail: "300 mg loading dose STAT\nIrreversible COX-1 inhibition\n+ clopidogrel or ticagrelor (DAPT)" },
];
mona.forEach((m, i) => {
const x = 0.2 + i * 2.44;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.0, w: 2.28, h: 2.2, fill: { color: MID_BG }, line: { color: ACCENT, width: 1.2 }, rectRadius: 0.08 });
s.addShape(pres.ShapeType.ellipse, { x: x + 0.74, y: 1.08, w: 0.78, h: 0.78, fill: { color: ACCENT } });
s.addText(m.letter, { x: x + 0.74, y: 1.08, w: 0.78, h: 0.78, fontSize: 26, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
s.addText(m.word, { x: x + 0.05, y: 1.93, w: 2.18, h: 0.3, fontSize: 13, bold: true, color: YELLOW, align: "center", fontFace: "Calibri", margin: 0 });
s.addText(m.detail, { x: x + 0.08, y: 2.27, w: 2.12, h: 0.85, fontSize: 10, color: LIGHT_TXT, fontFace: "Calibri", align: "center", valign: "top" });
});
// Additional standard therapy
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 3.32, w: 9.6, h: 0.38, fill: { color: MID_BG } });
s.addText("Additional Standard Pharmacotherapy", { x: 0.3, y: 3.32, w: 9.4, h: 0.38, fontSize: 12, bold: true, color: YELLOW, valign: "middle", margin: 0 });
const extra = [
{ title: "Anticoagulants", body: "UFH, LMWH, or bivalirudin\nDuration: until PCI/CABG or 48h" },
{ title: "P2Y12 Inhibitors", body: "Ticagrelor (preferred) or clopidogrel\nDual antiplatelet for ≥12 months post-stent" },
{ title: "Statins", body: "High-intensity statin ASAP\nAtorvastatin 80 mg or rosuvastatin 40 mg" },
{ title: "Beta-Blockers", body: "Start within 24h if hemodynamically stable\nReduce reinfarction & arrhythmias" },
];
extra.forEach((e, i) => {
const x = 0.2 + i * 2.44;
s.addShape(pres.ShapeType.roundRect, { x, y: 3.78, w: 2.28, h: 1.45, fill: { color: "162E45" }, line: { color: GREEN_ACC, width: 0.8 }, rectRadius: 0.06 });
s.addText(e.title, { x: x + 0.08, y: 3.84, w: 2.12, h: 0.3, fontSize: 11, bold: true, color: GREEN_ACC, fontFace: "Calibri", margin: 0 });
s.addText(e.body, { x: x + 0.08, y: 4.17, w: 2.12, h: 1.0, fontSize: 10, color: LIGHT_TXT, fontFace: "Calibri", valign: "top" });
});
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 11 — KEY DRUG COMPARISONS & MNEMONICS
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addSlideHeader(s, "Clinical Pearls & Key Comparisons");
addFooter(s, 11);
card(s, 0.2, 1.05, 4.55, 2.1, "ACE Inhibitors vs ARBs", [
"ACE-I: cause dry cough (bradykinin ↑) — switch to ARB",
"ARBs: no cough; used if ACE-I intolerant",
"Both contraindicated in pregnancy (teratogenic)",
"Never combine ACE-I + ARB (↑ renal failure risk)"
]);
card(s, 5.0, 1.05, 4.75, 2.1, "DHP vs Non-DHP CCBs", [
"DHP (amlodipine): vascular selective → ↓ BP, angina",
"Non-DHP (verapamil, diltiazem): ↓ HR + ↓ conduction",
"Non-DHP + β-blocker = risk of complete AV block",
"DHP of choice in isolated systolic HTN of elderly"
]);
card(s, 0.2, 3.3, 4.55, 1.95, "Antiarrhythmic Pearls", [
"Amiodarone: broadest spectrum but many ADRs (thyroid, pulmonary fibrosis, photosensitivity)",
"Lidocaine: IV only; used in VT/VF post-MI",
"Digoxin toxicity worsened by hypokalemia → monitor K⁺"
]);
card(s, 5.0, 3.3, 4.75, 1.95, "Heart Failure Drug Hierarchy", [
"HFrEF pillars: ACE-I/ARB/ARNI + β-blocker + MRA + SGLT2i",
"Evidence-based 'Fantastic Four': ARNI + β-blocker + MRA + SGLT2i",
"Digoxin reduces hospitalizations but NOT mortality"
]);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 12 — SUMMARY & TAKEAWAYS
// ══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
// Full dark header
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: ACCENT } });
s.addText("SUMMARY & KEY TAKEAWAYS", {
x: 0.3, y: 0, w: 9.4, h: 1.0, fontSize: 26, bold: true, color: WHITE, valign: "middle", align: "center", charSpacing: 3, fontFace: "Calibri", margin: 0
});
addFooter(s, 12);
const points = [
"Hypertension first-line therapy: thiazide diuretics, ACE-I/ARB, CCBs, and β-blockers — tailor to comorbidities.",
"Antiarrhythmics follow Vaughan Williams classification; amiodarone is broadest-spectrum but most toxic.",
"Heart failure cornerstone drugs: ARNI (sacubitril/valsartan) + β-blocker + MRA + SGLT2 inhibitor ('Fantastic Four').",
"Antianginal triad: nitrates (↓ preload), β-blockers (↓ demand), CCBs (↑ supply); choose based on angina type.",
"Statins are first-line for dyslipidemia; PCSK9 inhibitors for extreme LDL reduction in familial hypercholesterolemia.",
"Anticoagulation: UFH/LMWH (acute), warfarin (chronic, narrow TI), DOACs (predictable, preferred in AF/VTE).",
"Digoxin has a narrow therapeutic index — toxicity worsened by hypokalemia, hypomagnesemia, and renal impairment.",
"ACS management: MONA + DAPT (aspirin + P2Y12 inhibitor) + anticoagulant + high-intensity statin + β-blocker.",
];
const items = points.map((p, i) => ({
text: p,
options: { bullet: { code: "25CF", color: ACCENT }, color: LIGHT_TXT, fontSize: 12.5, breakLine: i < points.length - 1 }
}));
s.addText(items, { x: 0.4, y: 1.08, w: 9.2, h: 4.12, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.35 });
}
// ══════════════════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/cardio-drugs-ppt/Cardiovascular_Drugs_Pharmacology.pptx" })
.then(() => console.log("SUCCESS: Presentation created!"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/cardio-drugs-ppt && node create_ppt.js
ls -lh /home/daytona/workspace/cardio-drugs-ppt/
Cardiovascular Drugs Pharmacology
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Overview - 6 drug category cards |
| 3 | Antihypertensive Drugs - Diuretics, RAAS blockers, Beta-blockers & CCBs |
| 4 | Antiarrhythmic Drugs - Full Vaughan Williams Class I-IV + Adenosine note |
| 5 | Heart Failure Pharmacotherapy - "Fantastic Four" + digoxin + SGLT2i |
| 6 | Antianginal Drugs - Nitrates, Beta-blockers, CCBs side-by-side |
| 7 | Lipid-Lowering Agents - Table covering statins, fibrates, ezetimibe, PCSK9i |
| 8 | Anticoagulants & Antiplatelets - Heparin, warfarin, DOACs + aspirin, P2Y12, GP IIb/IIIa |
| 9 | Digoxin deep-dive - mechanism, toxicity, antidote (DigiFab) |
| 10 | ACS Management - MONA mnemonic + standard pharmacotherapy |
| 11 | Clinical Pearls & Comparisons - ACE-I vs ARB, DHP vs non-DHP, HF hierarchy |
| 12 | Summary & Key Takeaways |
I am unable to download
ls -lh /home/daytona/workspace/cardio-drugs-ppt/ && file /home/daytona/workspace…
Cardiovascular Drugs Pharmacology
Presentation · PPTX
Email the file to me (provide your email)
Cardiovascular Drugs Pharmacology
Presentation · PPTX
drromi.280@gmail.com
Cardiovascular Drugs Pharmacology
Presentation · PPTX