Make a ppt on MI ...with proper images and flowchart and for medicine department seminar purpose
myocardial infarction pathophysiology ECG changes STEMI NSTEMI management 2024 guidelines images
STEMI management flowchart algorithm 2025 ACC AHA guidelines primary PCI fibrinolysis
mkdir -p /home/daytona/workspace/MI-seminar && ls /home/daytona/workspace/MI-seminar/
~/MI-seminar/build_mi_pptx.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
const React = require("react");
const ReactDOMServer = require("react-dom/server");
const sharp = require("sharp");
// ── Color palette ──────────────────────────────────────────────
const C = {
bg: "0D1B2A", // deep navy
bgLight: "112233", // slightly lighter navy
card: "172A3A", // card background
accent: "E63946", // vivid crimson (heart red)
accent2: "F4A261", // amber
teal: "2EC4B6", // teal highlight
white: "FFFFFF",
lightGray: "CBD5E0",
midGray: "8899AA",
green: "4CC9A0",
};
// ── Image URLs to embed ────────────────────────────────────────
const IMAGE_URLS = [
// Coronary atherosclerosis cross-section (Robbins)
"https://cdn.orris.care/cdss_images/c25e55f0ebe26e74e47efb9a7a971d85f3064bafb8d3880b2ff977ea6b47abd9.png",
// Coronary thrombosis (Robbins)
"https://cdn.orris.care/cdss_images/b3d63c9d3407bdd7a3ce9a5abb6262c92b82d69821e5a1bbf96b509487f45ea3.png",
// Myocardial perfusion/necrosis wavefront diagram
"https://cdn.orris.care/cdss_images/caa3ad3e817d1d71344be795be7da1b45e17d7b029c678d8e1272235039471f8.png",
// ACC/AHA reperfusion strategies
"https://ecgwaves.com/wp-content/uploads/2024/07/reperfusion-strategies-guidelines-stemi-nstemi-pci-fibrinolysis-revascularization.png",
// ACS spectrum (ECG classification)
"https://cardvasc.org/wp-content/uploads/2016/09/acute-coronary-syndrome-nstemi-diagnosis-criteria-myocardial-infarction-unstable-angina-ecg.jpg",
];
// Download images as base64
let images = [];
try {
const raw = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${IMAGE_URLS.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
images = JSON.parse(raw);
} catch(e) {
console.error("Image fetch error:", e.message);
images = IMAGE_URLS.map(() => ({ base64: null, error: "failed" }));
}
function img(i) { return images[i] && !images[i].error ? images[i].base64 : null; }
// ── Helper: bold accent text ───────────────────────────────────
function accentText(text, rest) {
return [{ text, options: { color: C.accent, bold: true } }, { text: rest || "", options: {} }];
}
// ── Build presentation ─────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Myocardial Infarction – Medicine Department Seminar";
pres.author = "Medicine Department";
// ── Shared background helper ───────────────────────────────────
function darkBg(slide) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.bg } });
}
function sectionHeader(slide, title, subtitle) {
darkBg(slide);
// accent bar left
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: 5.625, fill: { color: C.accent } });
slide.addText(title, {
x: 0.4, y: 1.6, w: 9.2, h: 1.0,
fontSize: 40, bold: true, color: C.white, fontFace: "Calibri", align: "center"
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.4, y: 2.7, w: 9.2, h: 0.6,
fontSize: 20, color: C.accent2, fontFace: "Calibri", align: "center"
});
}
}
function contentSlide(slide, title) {
darkBg(slide);
// top accent bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.55, fill: { color: C.accent } });
slide.addText(title, {
x: 0.3, y: 0.06, w: 9.4, h: 0.44,
fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
// thin teal bottom bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.17, fill: { color: C.teal } });
slide.addText("Medicine Department Seminar · MI 2025", {
x: 0.3, y: 5.45, w: 9.4, h: 0.17, fontSize: 8, color: C.bg, fontFace: "Calibri", valign: "middle"
});
}
function addBullets(slide, items, opts = {}) {
const textArr = items.map((it, i) => ({
text: typeof it === "string" ? it : it.text,
options: {
bullet: { indent: typeof it === "object" && it.sub ? 30 : 10 },
color: typeof it === "object" && it.sub ? C.lightGray : C.white,
fontSize: typeof it === "object" && it.sub ? 13 : 15,
breakLine: true,
bold: typeof it === "object" && it.bold ? true : false,
...((typeof it === "object" && it.options) ? it.options : {})
}
}));
slide.addText(textArr, {
x: opts.x ?? 0.4,
y: opts.y ?? 0.65,
w: opts.w ?? 9.2,
h: opts.h ?? 4.6,
fontFace: "Calibri",
valign: "top",
lineSpacingMultiple: 1.3,
});
}
function card(slide, x, y, w, h, title, body, titleColor) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: C.card },
line: { color: titleColor || C.teal, width: 1.5 },
rectRadius: 0.1
});
slide.addText(title, {
x: x + 0.12, y: y + 0.07, w: w - 0.24, h: 0.32,
fontSize: 12, bold: true, color: titleColor || C.teal, fontFace: "Calibri"
});
slide.addText(body, {
x: x + 0.12, y: y + 0.38, w: w - 0.24, h: h - 0.5,
fontSize: 12, color: C.lightGray, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.25
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 1 — Title
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkBg(s);
// decorative heart-red circle backdrop
s.addShape(pres.ShapeType.ellipse, { x: 6.5, y: -1, w: 5, h: 5, fill: { color: C.accent }, line: { type: "none" }, transparency: 80 });
s.addShape(pres.ShapeType.ellipse, { x: -1.5, y: 2.5, w: 4, h: 4, fill: { color: C.teal }, line: { type: "none" }, transparency: 85 });
s.addText("MYOCARDIAL INFARCTION", {
x: 0.5, y: 0.8, w: 9, h: 0.8,
fontSize: 38, bold: true, color: C.accent, fontFace: "Calibri",
charSpacing: 4, align: "center"
});
s.addText("Heart Attack – Pathophysiology, Diagnosis & Management", {
x: 0.5, y: 1.7, w: 9, h: 0.55,
fontSize: 20, color: C.lightGray, fontFace: "Calibri", align: "center"
});
s.addShape(pres.ShapeType.rect, { x: 2.5, y: 2.35, w: 5, h: 0.04, fill: { color: C.accent2 } });
s.addText("Medicine Department Seminar", {
x: 0.5, y: 2.5, w: 9, h: 0.4,
fontSize: 16, color: C.accent2, fontFace: "Calibri", align: "center"
});
s.addText("Based on Braunwald's Heart Disease | Robbins Pathology | 2025 ACC/AHA Guidelines", {
x: 0.5, y: 3.1, w: 9, h: 0.35,
fontSize: 11, color: C.midGray, fontFace: "Calibri", align: "center", italic: true
});
s.addText("June 2026", {
x: 0.5, y: 4.9, w: 9, h: 0.3,
fontSize: 12, color: C.midGray, fontFace: "Calibri", align: "center"
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 2 — Overview / Agenda
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Seminar Agenda");
const topics = [
"01 Epidemiology & Burden of Disease",
"02 Pathophysiology – Plaque Rupture & Coronary Occlusion",
"03 Universal Definition – Types of MI",
"04 Clinical Presentation",
"05 ECG Changes & Localisation",
"06 Biomarkers – Troponin & More",
"07 Imaging – Echo, Angiography",
"08 Risk Stratification – TIMI & GRACE",
"09 STEMI Management Flowchart",
"10 NSTE-ACS Management Flowchart",
"11 Pharmacotherapy",
"12 Complications",
"13 Secondary Prevention",
"14 Emerging Concepts (OMI Paradigm)",
"15 Take-Home Messages"
];
const col1 = topics.slice(0, 8);
const col2 = topics.slice(8);
col1.forEach((t, i) => {
const y = 0.75 + i * 0.59;
s.addShape(pres.ShapeType.rect, { x: 0.35, y: y + 0.05, w: 0.28, h: 0.3, fill: { color: C.accent }, line: { type: "none" } });
s.addText(t, { x: 0.72, y: y, w: 4.3, h: 0.38, fontSize: 13, color: C.white, fontFace: "Calibri" });
});
col2.forEach((t, i) => {
const y = 0.75 + i * 0.59;
s.addShape(pres.ShapeType.rect, { x: 5.2, y: y + 0.05, w: 0.28, h: 0.3, fill: { color: C.teal }, line: { type: "none" } });
s.addText(t, { x: 5.58, y: y, w: 4.1, h: 0.38, fontSize: 13, color: C.white, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 3 — Epidemiology
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Epidemiology & Global Burden");
// 4 stat cards
const stats = [
{ title: "Global MI Deaths/Year", val: "~9 Million", sub: "#1 cause of death worldwide", col: C.accent },
{ title: "US STEMI Events/Year", val: "~500,000", sub: "0.5M STEMI events annually", col: C.accent2 },
{ title: "Age at First MI – Men", val: "<65 years", sub: "45% of all MIs occur <65 yrs", col: C.teal },
{ title: "Gender Gap", val: "M > F", sub: "Gap narrows after female menopause", col: C.green },
];
stats.forEach((st, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.ShapeType.roundRect, { x, y: 0.72, w: 2.25, h: 1.5, fill: { color: C.card }, line: { color: st.col, width: 2 }, rectRadius: 0.12 });
s.addText(st.title, { x: x + 0.1, y: 0.75, w: 2.05, h: 0.4, fontSize: 11, color: st.col, bold: true, fontFace: "Calibri" });
s.addText(st.val, { x: x + 0.1, y: 1.15, w: 2.05, h: 0.45, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", align: "center" });
s.addText(st.sub, { x: x + 0.1, y: 1.6, w: 2.05, h: 0.55, fontSize: 10, color: C.lightGray, fontFace: "Calibri", align: "center" });
});
// Key risk factors
s.addText("KEY RISK FACTORS", { x: 0.3, y: 2.42, w: 4, h: 0.3, fontSize: 12, bold: true, color: C.accent2, fontFace: "Calibri" });
const rf = ["Hypertension", "Diabetes mellitus", "Dyslipidaemia", "Smoking", "Obesity / metabolic syndrome", "Family history", "Physical inactivity", "Age & male sex"];
rf.forEach((r, i) => {
const col = i < 4 ? 0.3 : 5.1;
const row = i < 4 ? i : i - 4;
s.addShape(pres.ShapeType.ellipse, { x: col, y: 2.82 + row * 0.55, w: 0.18, h: 0.18, fill: { color: C.accent }, line: { type: "none" } });
s.addText(r, { x: col + 0.26, y: 2.8 + row * 0.55, w: 4.2, h: 0.28, fontSize: 13, color: C.white, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 4 — Pathophysiology with image
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Pathophysiology – Plaque Rupture & Coronary Occlusion");
addBullets(s, [
{ text: "Atherosclerotic plaque erosion/rupture exposes subendothelial collagen", bold: true },
{ text: "→ Platelet adhesion → aggregation → thromboxane A2, ADP, serotonin release", sub: true },
{ text: "Coagulation activation via tissue factor exposure → growing thrombus", bold: true },
{ text: "→ Complete occlusion within minutes", sub: true },
{ text: "Aerobic metabolism ceases within seconds → ATP drop + lactic acid", bold: true },
{ text: "→ Irreversible necrosis if ischemia persists > 20–40 minutes", sub: true },
{ text: "Subendocardial zone is most vulnerable (furthest from epicardial supply)", bold: true },
{ text: "Cell death wavefront progresses from subendocardium → epicardium", sub: true },
{ text: "80–90% of cardiac deaths: ventricular fibrillation from myocardial irritability", bold: true },
], { x: 0.35, y: 0.65, w: 5.3, h: 4.65 });
// Image: coronary thrombosis
if (img(1)) {
s.addImage({ data: img(1), x: 5.85, y: 0.7, w: 3.8, h: 2.4, sizing: { type: "contain", w: 3.8, h: 2.4 } });
s.addText("Coronary thrombosis – nearly occluded artery (Robbins Pathology)", {
x: 5.85, y: 3.12, w: 3.8, h: 0.32, fontSize: 9, color: C.midGray, fontFace: "Calibri", italic: true, align: "center"
});
}
// Image: wavefront necrosis
if (img(2)) {
s.addImage({ data: img(2), x: 5.85, y: 3.5, w: 3.8, h: 1.75, sizing: { type: "contain", w: 3.8, h: 1.75 } });
s.addText("Wavefront of cell death: subendocardium → epicardium", {
x: 5.85, y: 5.25, w: 3.8, h: 0.2, fontSize: 9, color: C.midGray, fontFace: "Calibri", italic: true, align: "center"
});
}
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 5 — Universal Definition / Types of MI
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Universal Definition – Types of MI (4th Universal Definition 2018)");
s.addText("MI = acute myocardial injury detected by abnormal cardiac biomarkers + evidence of acute myocardial ischemia", {
x: 0.3, y: 0.65, w: 9.4, h: 0.45, fontSize: 13, color: C.accent2, fontFace: "Calibri", bold: true
});
const types = [
{ type: "Type 1", name: "Spontaneous MI", desc: "Plaque rupture/erosion → coronary thrombosis", col: C.accent },
{ type: "Type 2", name: "Demand Ischaemia MI", desc: "O2 supply-demand mismatch (e.g. tachyarrhythmia, anaemia, vasospasm)", col: C.accent2 },
{ type: "Type 3", name: "MI causing death", desc: "Sudden cardiac death before biomarkers obtained", col: C.teal },
{ type: "Type 4a", name: "PCI-related MI", desc: "≥5× 99th percentile of URL in first 48 h after PCI", col: C.green },
{ type: "Type 4b", name: "Stent thrombosis MI", desc: "Confirmed by angiography or autopsy", col: C.green },
{ type: "Type 5", name: "CABG-related MI", desc: "≥10× 99th percentile of URL + new LBBB or graft occlusion", col: C.midGray },
];
types.forEach((t, i) => {
const row = Math.floor(i / 3);
const col = i % 3;
const x = 0.3 + col * 3.2;
const y = 1.25 + row * 1.75;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 3.1, h: 1.6, fill: { color: C.card }, line: { color: t.col, width: 2 }, rectRadius: 0.1 });
s.addText(t.type, { x: x + 0.12, y: y + 0.1, w: 1.2, h: 0.32, fontSize: 13, bold: true, color: t.col, fontFace: "Calibri" });
s.addText(t.name, { x: x + 0.12, y: y + 0.42, w: 2.85, h: 0.3, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri" });
s.addText(t.desc, { x: x + 0.12, y: y + 0.74, w: 2.85, h: 0.8, fontSize: 11, color: C.lightGray, fontFace: "Calibri", lineSpacingMultiple: 1.2 });
});
s.addText("URL = Upper Reference Limit of 99th percentile · PCI = Percutaneous Coronary Intervention · CABG = Coronary Artery Bypass Graft", {
x: 0.3, y: 5.25, w: 9.4, h: 0.2, fontSize: 8, color: C.midGray, fontFace: "Calibri", italic: true
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 6 — Clinical Presentation
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Clinical Presentation");
// typical
s.addText("TYPICAL PRESENTATION", { x: 0.3, y: 0.65, w: 4.4, h: 0.3, fontSize: 12, bold: true, color: C.accent, fontFace: "Calibri" });
const typical = [
"Severe crushing/pressure chest pain radiating to jaw, left arm, shoulder",
"Duration > 20 min, NOT relieved by nitrates",
"Diaphoresis, nausea, vomiting",
"Dyspnoea, anxiety, sense of impending doom",
"S4 gallop (stiff, non-compliant LV)",
"New MR murmur (papillary muscle dysfunction)",
"Hypotension / cardiogenic shock (large infarcts)",
];
addBullets(s, typical, { x: 0.3, y: 0.97, w: 4.6, h: 3.5 });
// atypical
s.addText("ATYPICAL / SILENT MI", { x: 5.2, y: 0.65, w: 4.4, h: 0.3, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri" });
const atypical = [
"Epigastric pain, indigestion (inferior MI)",
"Jaw/neck pain only",
"Syncope or sudden collapse",
"Acute confusion (elderly)",
"Diabetics – minimal/no symptoms",
"Women – fatigue, nausea more prominent",
"Silent MI: ~20% of all cases",
];
addBullets(s, atypical, { x: 5.2, y: 0.97, w: 4.5, h: 3.5 });
// divider
s.addShape(pres.ShapeType.line, { x: 4.95, y: 0.65, w: 0, h: 4.6, line: { color: C.midGray, width: 1 } });
s.addText("'Time is Myocardium' – every 30 min delay costs ~150,000 cardiomyocytes", {
x: 0.3, y: 4.75, w: 9.4, h: 0.4,
fontSize: 12, color: C.accent2, bold: true, fontFace: "Calibri", align: "center"
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 7 — ECG Changes (with ACS spectrum image)
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "ECG Changes & Localisation of MI");
const ecgData = [
["Hyperacute T-waves", "Tall, peaked T-waves", "Earliest change, minutes"],
["ST elevation (STEMI)", "≥1 mm (limb leads), ≥2 mm (V1–V4)", "Transmural injury current"],
["ST depression", "Horizontal/downsloping", "NSTEMI / reciprocal"],
["T-wave inversion", "Symmetric deep inversion", "Ischaemia, hours-days"],
["Pathologic Q-waves", ">40 ms wide, >25% R height", "Necrosis (irreversible)"],
["New LBBB", "Occludes LAD", "STEMI equivalent"],
];
const hdrs = ["ECG Finding", "Criteria", "Significance"];
hdrs.forEach((h, i) => {
s.addText(h, { x: 0.3 + i * 2.35, y: 0.65, w: 2.3, h: 0.3, fontSize: 11, bold: true, color: C.accent, fontFace: "Calibri" });
});
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.93, w: 7.05, h: 0.03, fill: { color: C.accent } });
ecgData.forEach((row, i) => {
const bgColor = i % 2 === 0 ? C.card : C.bgLight;
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.96 + i * 0.52, w: 7.05, h: 0.5, fill: { color: bgColor }, line: { type: "none" } });
row.forEach((cell, j) => {
s.addText(cell, { x: 0.35 + j * 2.35, y: 0.98 + i * 0.52, w: 2.28, h: 0.46, fontSize: 11.5, color: j === 0 ? C.white : C.lightGray, fontFace: "Calibri", valign: "middle", bold: j === 0 });
});
});
// Localisation table header
s.addText("ECG LOCALISATION", { x: 0.3, y: 4.15, w: 5, h: 0.3, fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri" });
const locData = [
["Anterior", "V1–V4", "LAD (proximal)"],
["Inferior", "II, III, aVF", "RCA (80%) / LCx"],
["Lateral", "I, aVL, V5–V6", "LCx / Diagonal"],
["Posterior", "V1–V2 (tall R, ST↓)", "RCA / LCx"],
["Right Ventricle", "V3R–V4R (ST↑)", "RCA proximal"],
];
locData.forEach((r, i) => {
s.addText(`${r[0]} – Leads: ${r[1]} – ${r[2]}`, {
x: 0.3, y: 4.48 + i * 0.19, w: 7.05, h: 0.2,
fontSize: 10.5, color: i % 2 === 0 ? C.white : C.lightGray, fontFace: "Calibri"
});
});
// ACS spectrum image
if (img(4)) {
s.addImage({ data: img(4), x: 7.5, y: 0.65, w: 2.3, h: 4.55, sizing: { type: "contain", w: 2.3, h: 4.55 } });
}
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 8 — Biomarkers
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Cardiac Biomarkers – Diagnosis & Kinetics");
const markers = [
{ name: "hsTroponin I / T", rise: "1–3 h", peak: "12–24 h", norm: "14 days", note: "Gold standard; highly sensitive", col: C.accent },
{ name: "CK-MB", rise: "3–8 h", peak: "18–24 h", norm: "48–72 h", note: "Useful for re-infarction detection", col: C.accent2 },
{ name: "Myoglobin", rise: "1–4 h", peak: "6–10 h", norm: "24 h", note: "Early marker, low specificity", col: C.teal },
{ name: "LDH", rise: "6–12 h", peak: "24–48 h", norm: "10–14 days", note: "Useful in late presentation", col: C.green },
];
markers.forEach((m, i) => {
const x = 0.28 + i * 2.38;
s.addShape(pres.ShapeType.roundRect, { x, y: 0.7, w: 2.28, h: 3.2, fill: { color: C.card }, line: { color: m.col, width: 2 }, rectRadius: 0.1 });
s.addText(m.name, { x: x + 0.1, y: 0.74, w: 2.08, h: 0.45, fontSize: 13, bold: true, color: m.col, fontFace: "Calibri" });
s.addText(`Rises: ${m.rise}`, { x: x + 0.1, y: 1.2, w: 2.08, h: 0.3, fontSize: 12, color: C.lightGray, fontFace: "Calibri" });
s.addText(`Peaks: ${m.peak}`, { x: x + 0.1, y: 1.5, w: 2.08, h: 0.3, fontSize: 12, color: C.lightGray, fontFace: "Calibri" });
s.addText(`Normalises: ${m.norm}`, { x: x + 0.1, y: 1.8, w: 2.08, h: 0.3, fontSize: 12, color: C.lightGray, fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x: x + 0.1, y: 2.15, w: 2.05, h: 0.02, fill: { color: C.midGray } });
s.addText(m.note, { x: x + 0.1, y: 2.2, w: 2.08, h: 0.65, fontSize: 11, color: C.white, fontFace: "Calibri", lineSpacingMultiple: 1.2 });
});
s.addText("High-Sensitivity Troponin (hsTn) Protocol – Rapid Rule-Out:", {
x: 0.3, y: 3.95, w: 9.4, h: 0.3, fontSize: 12, bold: true, color: C.accent2, fontFace: "Calibri"
});
const protocols = [
"0h/1h algorithm: hsTn at 0 h and 1 h – Rule-out if both < 5 ng/L (ESC 2023)",
"0h/3h algorithm: alternative when 0h/1h not available",
"Delta rule: >5 ng/L rise in 1 h OR >52 ng/L absolute = rule-in for NSTEMI",
"Serial troponin levels × 2 mandatory in all suspected ACS presentations",
];
addBullets(s, protocols, { x: 0.3, y: 4.3, w: 9.4, h: 1.0 });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 9 — Imaging
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Imaging Modalities in MI");
card(s, 0.28, 0.7, 3.1, 4.55,
"Echocardiography (Echo)",
"• Bedside POCUS within minutes\n• Regional wall motion abnormalities (RWMA)\n• Estimate LVEF – key for prognosis\n• Detect complications: MR, VSD, pericardial effusion, free wall rupture\n• Strain imaging: subclinical dysfunction\n• Mandatory in ALL ACS presentations",
C.teal
);
card(s, 3.52, 0.7, 3.1, 4.55,
"Coronary Angiography (Gold Standard)",
"• Defines coronary anatomy\n• Identifies culprit lesion\n• Enables primary PCI in STEMI\n• FFR / iFR for functional assessment\n• Target: within 90 min (door-to-balloon)\n• Contrast-induced AKI: limit contrast < 3× eGFR",
C.accent
);
card(s, 6.76, 0.7, 3.0, 4.55,
"Advanced Imaging",
"• CMR: gold standard for infarct size, myocardial viability, LGE\n• CT Coronary Angiography (CTCA): rule-out in low-intermediate risk\n• Nuclear imaging (SPECT/PET): viability/perfusion\n• CT angiography: 3D anatomy, calcium scoring",
C.accent2
);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 10 — Risk Stratification
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Risk Stratification – TIMI & GRACE Scores");
s.addText("TIMI Score (NSTE-ACS)", { x: 0.3, y: 0.67, w: 4.4, h: 0.3, fontSize: 13, bold: true, color: C.accent, fontFace: "Calibri" });
const timiItems = [
"Age ≥ 65 years",
"≥3 CAD risk factors",
"Known CAD (stenosis ≥50%)",
"ASA use in past 7 days",
"Severe angina (≥2 events in 24 h)",
"ST deviation ≥0.5 mm",
"Positive cardiac markers",
];
timiItems.forEach((item, i) => {
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.02 + i * 0.44, w: 0.22, h: 0.22, fill: { color: C.accent }, line: { type: "none" } });
s.addText(`+1 ${item}`, { x: 0.6, y: 1.0 + i * 0.44, w: 4.1, h: 0.28, fontSize: 12, color: C.white, fontFace: "Calibri" });
});
s.addText("Score 0–2: Low risk (4.7%)\nScore 3–4: Intermediate (13–20%)\nScore 5–7: High risk (26–41%)", {
x: 0.3, y: 4.1, w: 4.5, h: 0.9, fontSize: 11, color: C.accent2, fontFace: "Calibri", lineSpacingMultiple: 1.3
});
s.addShape(pres.ShapeType.line, { x: 5.0, y: 0.65, w: 0, h: 4.7, line: { color: C.midGray, width: 1 } });
s.addText("GRACE Score", { x: 5.15, y: 0.67, w: 4.5, h: 0.3, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri" });
const graceItems = [
{ label: "Age", detail: "Continuous variable" },
{ label: "Heart rate", detail: "Continuous" },
{ label: "SBP", detail: "Continuous" },
{ label: "Creatinine", detail: "Continuous" },
{ label: "Killip class", detail: "I–IV (HF severity)" },
{ label: "Cardiac arrest at admission", detail: "+39 points" },
{ label: "ST deviation", detail: "+28 points" },
{ label: "Elevated troponin", detail: "+14 points" },
];
graceItems.forEach((g, i) => {
s.addText(`• ${g.label}: `, { x: 5.15, y: 1.02 + i * 0.44, w: 2.0, h: 0.28, fontSize: 12, color: C.white, fontFace: "Calibri", bold: true });
s.addText(g.detail, { x: 6.45, y: 1.02 + i * 0.44, w: 3.2, h: 0.28, fontSize: 12, color: C.lightGray, fontFace: "Calibri" });
});
s.addText("GRACE <109: Low (<3%)\nGRACE 109–140: Intermediate (3–6%)\nGRACE >140: High (>6%) in-hospital mortality", {
x: 5.15, y: 4.1, w: 4.5, h: 0.9, fontSize: 11, color: C.teal, fontFace: "Calibri", lineSpacingMultiple: 1.3
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 11 — STEMI Management Flowchart
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "STEMI Management Flowchart (2025 ACC/AHA Guidelines)");
// Flowchart boxes
function fbox(x, y, w, h, text, fill, textColor, fontSize) {
s.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill: { color: fill }, line: { color: C.white, width: 1 }, rectRadius: 0.08 });
s.addText(text, { x: x + 0.05, y: y + 0.04, w: w - 0.1, h: h - 0.08, fontSize: fontSize || 11, color: textColor || C.white, fontFace: "Calibri", align: "center", valign: "middle", bold: true });
}
function arrow(x, y, h) {
s.addShape(pres.ShapeType.line, { x, y, w: 0, h, line: { color: C.accent2, width: 2 } });
s.addShape(pres.ShapeType.triangle, { x: x - 0.08, y: y + h - 0.04, w: 0.16, h: 0.16, fill: { color: C.accent2 }, line: { type: "none" } });
}
function harrow(x, y, w, dir) {
s.addShape(pres.ShapeType.line, { x, y, w, h: 0, line: { color: C.accent2, width: 2 } });
const ax = dir === "right" ? x + w - 0.04 : x;
s.addShape(pres.ShapeType.triangle, { x: ax - 0.08, y: y - 0.08, w: 0.16, h: 0.16, fill: { color: C.accent2 }, line: { type: "none" }, rotate: dir === "right" ? 90 : 270 });
}
fbox(3.2, 0.67, 3.6, 0.5, "Suspected STEMI: Chest Pain + ECG Changes", C.accent, C.white, 10.5);
arrow(5.0, 1.17, 0.2);
fbox(3.2, 1.37, 3.6, 0.45, "12-Lead ECG within 10 min + hsTroponin", C.card, C.accent2, 10.5);
arrow(5.0, 1.82, 0.2);
fbox(3.2, 2.02, 3.6, 0.42, "STEMI Criteria Met? (ST↑ ≥2 mm ≥2 contiguous leads / LBBB)", C.bgLight, C.white, 9.5);
arrow(5.0, 2.44, 0.22);
// YES branch
fbox(1.0, 2.66, 1.6, 0.4, "YES →", C.green, C.bg, 11);
// branch
harrow(1.8, 2.86, 1.35, "right");
fbox(0.15, 3.1, 1.8, 0.55, "PCI-capable centre\nwithin 120 min?", C.card, C.teal, 10);
arrow(1.05, 3.65, 0.22);
fbox(0.15, 3.87, 1.8, 0.5, "Primary PCI\nD2B ≤ 90 min", C.green, C.bg, 11);
fbox(2.05, 3.1, 1.8, 0.55, "No PCI available\n< 120 min", C.card, C.accent2, 10);
arrow(2.95, 3.65, 0.22);
fbox(2.05, 3.87, 1.8, 0.5, "Fibrinolysis\nwithin 30 min", C.accent2, C.bg, 11);
// medications
fbox(4.5, 2.66, 5.35, 0.4, "Immediate Medications: Aspirin 300 mg + P2Y12 (Ticagrelor 180 mg) + Heparin UFH/LMWH", C.accent, C.white, 10);
fbox(4.5, 3.1, 5.35, 0.5, "Supplemental O2 (if SaO2 < 90%) · GTN (if not hypotensive)\nMorphine/Fentanyl · β-Blocker (if no contraindication)", C.card, C.lightGray, 10);
fbox(4.5, 3.65, 5.35, 0.5, "Post-PCI: Dual antiplatelet × 12 months · Statin · ACEi/ARB · β-Blocker\nICU monitoring · Echo within 24 h · Cardiac rehabilitation referral", C.bgLight, C.lightGray, 10);
fbox(4.5, 4.2, 5.35, 0.5, "Killip Classification for prognosis:\nI: No HF | II: Crackles | III: Pulmonary oedema | IV: Cardiogenic shock", C.card, C.accent2, 10);
// ACC/AHA ref
s.addText("Source: 2025 ACC/AHA/ACEP/NAEMSP/SCAI Guideline (PMID: 40014670)", {
x: 0.3, y: 5.2, w: 9.4, h: 0.2, fontSize: 8, color: C.midGray, fontFace: "Calibri", italic: true
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 12 — NSTE-ACS Management Flowchart
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "NSTE-ACS Management Flowchart (NSTEMI / Unstable Angina)");
function fbox(x, y, w, h, text, fill, textColor, fontSize) {
s.addShape(pres.ShapeType.roundRect, { x, y, w, h, fill: { color: fill }, line: { color: C.white, width: 1 }, rectRadius: 0.08 });
s.addText(text, { x: x + 0.05, y: y + 0.04, w: w - 0.1, h: h - 0.08, fontSize: fontSize || 11, color: textColor || C.white, fontFace: "Calibri", align: "center", valign: "middle", bold: true });
}
function arrow(x, y, h) {
s.addShape(pres.ShapeType.line, { x, y, w: 0, h, line: { color: C.teal, width: 2 } });
s.addShape(pres.ShapeType.triangle, { x: x - 0.08, y: y + h - 0.04, w: 0.16, h: 0.16, fill: { color: C.teal }, line: { type: "none" } });
}
fbox(2.9, 0.65, 4.2, 0.45, "Suspected NSTE-ACS: Chest Pain, ECG (ST↓/T-inv), hsTroponin+", C.accent, C.white, 10);
arrow(5.0, 1.1, 0.18);
fbox(2.9, 1.28, 4.2, 0.42, "Risk Stratify: GRACE Score + TIMI Score + Clinical Assessment", C.card, C.accent2, 10);
arrow(5.0, 1.7, 0.18);
// 3 branches
const branches = [
{ x: 0.15, lbl: "VERY HIGH RISK", detail: "Haemodynamic instability\nCardiogenic shock\nRecurrent refractory ischaemia\nMechanical complications\nNew VT/VF", action: "Immediate invasive\n< 2 hours", col: C.accent },
{ x: 3.35, lbl: "HIGH RISK", detail: "GRACE >140\nTroponin rise/fall\nNew ST changes\nNew regional RWMA", action: "Early invasive\n< 24 hours", col: C.accent2 },
{ x: 6.55, lbl: "LOW–INTERMEDIATE", detail: "GRACE <140\nNo troponin rise\nNo ST changes\nStable haemodynamics", action: "Conservative or\nelective angiography\n< 72 hours", col: C.teal },
];
branches.forEach(b => {
s.addShape(pres.ShapeType.roundRect, { x: b.x, y: 1.9, w: 3.1, h: 0.35, fill: { color: b.col }, line: { type: "none" }, rectRadius: 0.05 });
s.addText(b.lbl, { x: b.x + 0.1, y: 1.9, w: 2.9, h: 0.35, fontSize: 11, bold: true, color: b.col === C.accent2 ? C.bg : C.white, fontFace: "Calibri", align: "center", valign: "middle" });
s.addShape(pres.ShapeType.roundRect, { x: b.x, y: 2.28, w: 3.1, h: 1.2, fill: { color: C.card }, line: { color: b.col, width: 1.5 }, rectRadius: 0.07 });
s.addText(b.detail, { x: b.x + 0.1, y: 2.3, w: 2.9, h: 1.14, fontSize: 11, color: C.lightGray, fontFace: "Calibri", valign: "middle" });
s.addShape(pres.ShapeType.roundRect, { x: b.x, y: 3.53, w: 3.1, h: 0.55, fill: { color: b.col }, line: { type: "none" }, rectRadius: 0.07 });
s.addText(b.action, { x: b.x + 0.1, y: 3.53, w: 2.9, h: 0.55, fontSize: 11, bold: true, color: b.col === C.accent2 ? C.bg : C.white, fontFace: "Calibri", align: "center", valign: "middle" });
});
fbox(0.15, 4.15, 9.7, 0.42, "Pharmacotherapy (ALL): Aspirin + P2Y12 + Anticoagulation (UFH/LMWH/Fondaparinux) + High-dose statin + β-Blocker + ACEi", C.bgLight, C.lightGray, 10);
fbox(0.15, 4.6, 9.7, 0.42, "Additional: GP IIb/IIIa inhibitors for high-risk PCI · Glycaemic control · Treat precipitating factors (anaemia, infection)", C.card, C.lightGray, 10);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 13 — Pharmacotherapy
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Pharmacotherapy – Acute & Long-Term");
const drugs = [
{
cat: "Antiplatelets",
col: C.accent,
items: ["Aspirin 300 mg loading → 75 mg OD life-long", "Ticagrelor 180 mg → 90 mg BD (preferred over clopidogrel)", "Clopidogrel 600 mg if ticagrelor/prasugrel contraindicated", "DAPT × 12 months post-ACS"],
},
{
cat: "Anticoagulants",
col: C.accent2,
items: ["UFH: 60 U/kg bolus → infusion (target aPTT 50–70 s)", "LMWH: Enoxaparin 1 mg/kg SC BD", "Fondaparinux: 2.5 mg SC OD (NSTE-ACS)", "Bivalirudin: preferred in primary PCI (less bleeding)"],
},
{
cat: "Other Acute Agents",
col: C.teal,
items: ["GTN: sublingual/IV (not if BP < 90 mmHg)", "Opioids: Morphine/Fentanyl for pain (use judiciously)", "O2: only if SaO2 < 90%", "β-Blocker: IV Metoprolol if HR>60, no HF"],
},
{
cat: "Long-Term Secondary Prev.",
col: C.green,
items: ["High-intensity statin: Atorvastatin 40–80 mg (target LDL < 1.4 mmol/L)", "ACEi: Ramipril 10 mg OD (all post-MI, especially if LVEF <40%)", "β-Blocker: Bisoprolol/Carvedilol (LVEF <40%)", "Eplerenone/Spironolactone: LVEF <35%"],
},
];
drugs.forEach((d, i) => {
const row = Math.floor(i / 2);
const col = i % 2;
const x = 0.25 + col * 4.88;
const y = 0.67 + row * 2.36;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.72, h: 2.22, fill: { color: C.card }, line: { color: d.col, width: 2 }, rectRadius: 0.1 });
s.addText(d.cat, { x: x + 0.12, y: y + 0.07, w: 4.48, h: 0.33, fontSize: 13, bold: true, color: d.col, fontFace: "Calibri" });
s.addShape(pres.ShapeType.rect, { x: x + 0.12, y: y + 0.4, w: 4.45, h: 0.02, fill: { color: d.col } });
const textArr = d.items.map((t, ii) => ({
text: t, options: { bullet: { indent: 10 }, color: C.lightGray, fontSize: 11.5, breakLine: ii < d.items.length - 1 }
}));
s.addText(textArr, { x: x + 0.12, y: y + 0.46, w: 4.48, h: 1.65, fontFace: "Calibri", lineSpacingMultiple: 1.25, valign: "top" });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 14 — Complications
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Complications of MI");
const comps = [
{ time: "Immediate\n(0–24 h)", items: ["VF / VT – most common cause of death", "Heart block (esp. inferior MI → RCA)", "Cardiogenic shock", "Electromechanical dissociation"], col: C.accent },
{ time: "Early\n(1–3 days)", items: ["Reinfarction", "Pericarditis (transmural MI)", "Free wall rupture (risk 3–5 days)", "Papillary muscle rupture → acute MR"], col: C.accent2 },
{ time: "Late\n(Days–Weeks)", items: ["Ventricular septal defect (VSD)", "LV aneurysm formation", "Dressler syndrome (2–6 weeks)", "Mural thrombus → systemic emboli"], col: C.teal },
{ time: "Chronic", items: ["Heart failure (systolic/diastolic)", "Ischaemic cardiomyopathy", "Recurrent ischaemia", "Sudden cardiac death"], col: C.green },
];
comps.forEach((c, i) => {
const x = 0.25 + i * 2.42;
s.addShape(pres.ShapeType.roundRect, { x, y: 0.68, w: 2.32, h: 4.55, fill: { color: C.card }, line: { color: c.col, width: 2 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.roundRect, { x, y: 0.68, w: 2.32, h: 0.55, fill: { color: c.col }, line: { type: "none" }, rectRadius: 0.1 });
s.addText(c.time, { x: x + 0.1, y: 0.7, w: 2.12, h: 0.5, fontSize: 11, bold: true, color: C.bg, fontFace: "Calibri", align: "center", valign: "middle" });
const textArr = c.items.map((t, ii) => ({ text: t, options: { bullet: { indent: 10 }, color: C.lightGray, fontSize: 12, breakLine: ii < c.items.length - 1 } }));
s.addText(textArr, { x: x + 0.12, y: 1.28, w: 2.08, h: 3.85, fontFace: "Calibri", lineSpacingMultiple: 1.5, valign: "top" });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 15 — Secondary Prevention
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Secondary Prevention Post-MI");
const pillars = [
{ icon: "💊", title: "Medications", items: ["Life-long Aspirin 75 mg", "Statin: LDL < 1.4 mmol/L", "ACEi/ARB post-MI", "β-Blocker if LVEF <40%", "Eplerenone if LVEF <35%"] },
{ icon: "🏃", title: "Lifestyle", items: ["Cardiac rehab × 8 weeks", "150 min aerobic exercise/week", "Mediterranean diet", "Complete smoking cessation", "Alcohol ≤ 14 units/week"] },
{ icon: "🩺", title: "Monitoring", items: ["Echo at 6–8 weeks post-MI", "Follow-up at 2 weeks, 3 months", "Annual review", "Monitor for HF symptoms", "Holter if arrhythmia suspected"] },
{ icon: "🔬", title: "Targets", items: ["BP < 130/80 mmHg", "HbA1c < 53 mmol/mol", "BMI < 25 kg/m²", "LDL < 1.4 mmol/L", "HR 55–65 bpm (β-blocker)"] },
];
pillars.forEach((p, i) => {
const x = 0.25 + i * 2.42;
s.addShape(pres.ShapeType.roundRect, { x, y: 0.68, w: 2.32, h: 4.55, fill: { color: C.card }, line: { color: C.teal, width: 1.5 }, rectRadius: 0.12 });
s.addText(p.icon + " " + p.title, { x: x + 0.1, y: 0.72, w: 2.12, h: 0.45, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri", align: "center" });
s.addShape(pres.ShapeType.rect, { x: x + 0.1, y: 1.16, w: 2.08, h: 0.03, fill: { color: C.teal } });
const textArr = p.items.map((t, ii) => ({ text: t, options: { bullet: { indent: 10 }, color: C.lightGray, fontSize: 12, breakLine: ii < p.items.length - 1 } }));
s.addText(textArr, { x: x + 0.12, y: 1.24, w: 2.1, h: 3.85, fontFace: "Calibri", lineSpacingMultiple: 1.55, valign: "top" });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 16 — Emerging Concepts: OMI Paradigm
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Emerging Concepts – The OMI Paradigm (2024–2025)");
s.addText("From STEMI/NSTEMI → Occlusion MI (OMI) vs. Non-Occlusion MI (NOMI)", {
x: 0.3, y: 0.65, w: 9.4, h: 0.38, fontSize: 14, bold: true, color: C.accent2, fontFace: "Calibri", align: "center"
});
const cols = [
{
title: "Traditional STEMI Paradigm", col: C.midGray,
items: ["Binary: STEMI vs NSTEMI based on ECG", "~25–30% of acute coronary occlusions MISSED by STE criteria alone", "Standard 12-lead ECG misses posterior, RV, subtle STEMI equivalents", "Treatment delay if no STE even with total occlusion"],
},
{
title: "OMI Paradigm (New)", col: C.teal,
items: ["Focus on acute coronary OCCLUSION (ACO) regardless of STE", "STEMI equivalents: Hyperacute T, de Winter pattern, Wellens, posterior MI, LBBB with Sgarbossa", "Goal: identify occluded artery → immediate cath regardless of STE", "Reduces missed STEMIs, improves outcomes"],
},
];
cols.forEach((c, i) => {
const x = 0.25 + i * 4.88;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.12, w: 4.72, h: 3.5, fill: { color: C.card }, line: { color: c.col, width: 2 }, rectRadius: 0.1 });
s.addText(c.title, { x: x + 0.12, y: 1.16, w: 4.48, h: 0.4, fontSize: 13, bold: true, color: c.col, fontFace: "Calibri" });
const textArr = c.items.map((t, ii) => ({ text: t, options: { bullet: { indent: 10 }, color: C.lightGray, fontSize: 12.5, breakLine: ii < c.items.length - 1 } }));
s.addText(textArr, { x: x + 0.12, y: 1.6, w: 4.48, h: 2.9, fontFace: "Calibri", lineSpacingMultiple: 1.4, valign: "top" });
});
addBullets(s, [
{ text: "Key ECG STEMI Equivalents to Recognise:", bold: true, options: { color: C.accent } },
{ text: "De Winter pattern: upsloping ST↓ + peaked T-waves in V1–V6 = proximal LAD occlusion", sub: true },
{ text: "Wellens syndrome: deep T-wave inversions in V2–V3 = critical LAD stenosis", sub: true },
{ text: "Sgarbossa criteria (≥3 points): concordant STE ≥1 mm, concordant STD V1–V3, discordant STE ≥5 mm", sub: true },
{ text: "2025 ACC/AHA: 'Standard ECG criteria will miss a significant minority of acute coronary occlusions'", sub: true },
], { x: 0.3, y: 4.68, w: 9.4, h: 0.85 });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 17 — Coronary anatomy image slide
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Pathological Images – Coronary Atherosclerosis");
if (img(0)) {
s.addImage({ data: img(0), x: 0.5, y: 0.67, w: 4.2, h: 3.2, sizing: { type: "contain", w: 4.2, h: 3.2 } });
s.addText("Coronary Atherosclerosis: Left – 60–70% narrowing; Right – near-total occlusion from organised thrombus\n(Robbins & Kumar Basic Pathology, Elsevier)", {
x: 0.5, y: 3.9, w: 4.2, h: 0.7, fontSize: 10.5, color: C.lightGray, fontFace: "Calibri", italic: true, align: "center"
});
}
if (img(2)) {
s.addImage({ data: img(2), x: 5.3, y: 0.67, w: 4.3, h: 3.2, sizing: { type: "contain", w: 4.3, h: 3.2 } });
s.addText("Wavefront necrosis: Subendocardial ischaemia progresses transmurally with time\n(Robbins & Kumar Basic Pathology, Elsevier)", {
x: 5.3, y: 3.9, w: 4.3, h: 0.7, fontSize: 10.5, color: C.lightGray, fontFace: "Calibri", italic: true, align: "center"
});
}
s.addText("Key message: Time-critical intervention limits infarct size and preserves myocardium", {
x: 0.3, y: 4.8, w: 9.4, h: 0.35, fontSize: 12, bold: true, color: C.accent2, fontFace: "Calibri", align: "center"
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 18 — Killip Classification & Prognosis
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Killip Classification & Prognosis");
const killip = [
{ cls: "I", desc: "No signs of heart failure", mort: "5–6%", note: "No crackles, no S3", col: C.green },
{ cls: "II", desc: "Mild HF: crackles < 50% lung fields, S3 gallop, raised JVP", mort: "10–15%", note: "Treat with diuretics", col: C.teal },
{ cls: "III", desc: "Acute pulmonary oedema: crackles > 50% lung fields", mort: "25–40%", note: "IV diuretics, NIV", col: C.accent2 },
{ cls: "IV", desc: "Cardiogenic shock: SBP < 90 mmHg + signs of hypoperfusion", mort: "55–70%", note: "IABP, vasopressors, urgent PCI", col: C.accent },
];
killip.forEach((k, i) => {
const x = 0.25 + i * 2.42;
s.addShape(pres.ShapeType.roundRect, { x, y: 0.68, w: 2.32, h: 4.55, fill: { color: C.card }, line: { color: k.col, width: 2.5 }, rectRadius: 0.12 });
s.addText(`CLASS ${k.cls}`, { x: x + 0.1, y: 0.72, w: 2.12, h: 0.45, fontSize: 18, bold: true, color: k.col, fontFace: "Calibri", align: "center" });
s.addShape(pres.ShapeType.rect, { x: x + 0.1, y: 1.18, w: 2.12, h: 0.03, fill: { color: k.col } });
s.addText(k.desc, { x: x + 0.12, y: 1.25, w: 2.08, h: 1.3, fontSize: 11, color: C.white, fontFace: "Calibri", lineSpacingMultiple: 1.3 });
s.addShape(pres.ShapeType.roundRect, { x: x + 0.12, y: 2.6, w: 2.08, h: 0.55, fill: { color: k.col }, line: { type: "none" }, rectRadius: 0.07 });
s.addText(`Mortality\n${k.mort}`, { x: x + 0.12, y: 2.6, w: 2.08, h: 0.55, fontSize: 13, bold: true, color: C.bg, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText(k.note, { x: x + 0.12, y: 3.22, w: 2.08, h: 1.8, fontSize: 11, color: C.lightGray, fontFace: "Calibri", lineSpacingMultiple: 1.3 });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 19 — Take-Home Messages
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
contentSlide(s, "Take-Home Messages");
const msgs = [
{ num: "01", msg: "Time is myocardium – D2B ≤ 90 min for STEMI; every 30 min delay = 150,000 cardiomyocytes lost" },
{ num: "02", msg: "hsTroponin 0h/1h protocol is the standard for rapid rule-in/rule-out of NSTEMI" },
{ num: "03", msg: "Primary PCI is superior to fibrinolysis – organise systems of care to achieve timely PCI" },
{ num: "04", msg: "GRACE score guides invasive timing in NSTE-ACS; very-high risk = immediate invasive < 2 hours" },
{ num: "05", msg: "Standard STEMI criteria miss ~25% of acute occlusions – learn OMI ECG equivalents (de Winter, Wellens, Sgarbossa)" },
{ num: "06", msg: "Post-MI: Life-long DAPT × 12 months, high-intensity statin, ACEi/ARB, β-blocker, cardiac rehab" },
{ num: "07", msg: "Echo is mandatory – assess LVEF, RWMA, and mechanical complications in all ACS patients" },
{ num: "08", msg: "Killip class at admission is a powerful independent predictor of in-hospital mortality" },
];
msgs.forEach((m, i) => {
const row = Math.floor(i / 2);
const col = i % 2;
const x = 0.25 + col * 4.88;
const y = 0.67 + row * 1.15;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.72, h: 1.05, fill: { color: C.card }, line: { color: i < 4 ? C.accent : C.teal, width: 1.5 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.roundRect, { x: x + 0.08, y: y + 0.08, w: 0.45, h: 0.45, fill: { color: i < 4 ? C.accent : C.teal }, line: { type: "none" }, rectRadius: 0.05 });
s.addText(m.num, { x: x + 0.08, y: y + 0.08, w: 0.45, h: 0.45, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText(m.msg, { x: x + 0.62, y: y + 0.1, w: 4.0, h: 0.85, fontSize: 11.5, color: C.white, fontFace: "Calibri", lineSpacingMultiple: 1.2, valign: "middle" });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 20 — References + End
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
darkBg(s);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.6, fill: { color: C.accent } });
s.addText("References & Further Reading", { x: 0.3, y: 0.05, w: 9.4, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
const refs = [
"1. Braunwald's Heart Disease, 12th Ed. – Zipes, Libby, Bonow, Mann, Tomaselli (2022, Elsevier)",
"2. Robbins & Kumar Basic Pathology, 10th Ed. – Kumar, Abbas, Aster (2023, Elsevier)",
"3. Ganong's Review of Medical Physiology, 26th Ed. – Barrett, Barman (2019, McGraw-Hill)",
"4. 2025 ACC/AHA/ACEP/NAEMSP/SCAI Guideline for the Management of ACS (PMID: 40014670)",
"5. Thygesen K, et al. Fourth Universal Definition of MI. Eur Heart J. 2019;40(3):237-269",
"6. Collet JP, et al. 2020 ESC Guidelines for NSTE-ACS. Eur Heart J. 2021;42(14):1289-1367",
"7. Ibanez B, et al. 2017 ESC Guidelines for STEMI. Eur Heart J. 2018;39(2):119-177",
"8. Smith SW, et al. The OMI Manifesto – Occlusion MI paradigm. JACC Advances 2024",
];
refs.forEach((r, i) => {
s.addText(r, {
x: 0.3, y: 0.7 + i * 0.53, w: 9.4, h: 0.45,
fontSize: 11.5, color: i % 2 === 0 ? C.white : C.lightGray, fontFace: "Calibri"
});
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.42, fill: { color: C.card } });
s.addText("Thank You | Medicine Department Seminar | Myocardial Infarction | June 2026", {
x: 0.3, y: 5.22, w: 9.4, h: 0.35, fontSize: 13, color: C.accent2, fontFace: "Calibri", align: "center", bold: true
});
}
// ═══════════════════════════════════════════════════════════════
// Write file
// ═══════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/MI-seminar/Myocardial_Infarction_Seminar.pptx" })
.then(() => console.log("SUCCESS: PPTX written"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/MI-seminar && node build_mi_pptx.js 2>&1
~/MI-seminar/build_mi_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/MI-seminar/build_mi_pptx.js'
cd /home/daytona/workspace/MI-seminar && node build_mi_pptx.js 2>&1
ls -la /home/daytona/workspace/MI-seminar/
~/MI-seminar/build_mi_pptx.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/MI-seminar/build_mi_pptx.js'
cd /home/daytona/workspace/MI-seminar && timeout 90 node build_mi_pptx.js 2>&1
ls -lh /home/daytona/workspace/MI-seminar/Myocardial_Infarction_Seminar.pptx
Myocardial Infarction Seminar
Presentation · PPTX
| # | Slide | Highlights |
|---|---|---|
| 1 | Title | Deep navy + crimson design, department branding |
| 2 | Agenda | 15-topic numbered outline with colour-coded columns |
| 3 | Epidemiology | 4 stat cards (9M deaths, 500K STEMI/yr) + risk factor grid |
| 4 | Pathophysiology | Step-by-step plaque rupture cascade + Robbins textbook images (coronary thrombosis + wavefront necrosis diagram) |
| 5 | Universal Definition | All 6 Types of MI (4th Universal Definition 2018) in card layout |
| 6 | Clinical Presentation | Typical vs Atypical/Silent MI side-by-side; "time is myocardium" banner |
| 7 | ECG Changes | Criteria table + localisation grid (anterior/inferior/lateral/posterior/RV) |
| 8 | Biomarkers | hsTroponin, CK-MB, Myoglobin, LDH cards with rise/peak/normalise times + 0h/1h protocol |
| 9 | Imaging | Echo, Angiography, CMR/CTCA cards |
| 10 | Risk Scores | Full TIMI (7 items) vs GRACE (8 variables) with mortality thresholds |
| 11 | STEMI Flowchart | Visual algorithm: D2B ≤90 min, PCI vs fibrinolysis decision, immediate meds, post-PCI regimen |
| 12 | NSTE-ACS Flowchart | 3-tier risk stratification (very-high/high/low) with invasive timing targets |
| 13 | Pharmacotherapy | 4 drug category cards: antiplatelets, anticoagulants, acute agents, long-term secondary prevention |
| 14 | Complications | Timeline columns: immediate/early/late/chronic |
| 15 | Secondary Prevention | 4 pillars: medications, lifestyle, monitoring, targets |
| 16 | OMI Paradigm | STEMI vs OMI comparison + de Winter, Wellens, Sgarbossa explained |
| 17 | Pathology Images | Coronary atherosclerosis + wavefront necrosis (Robbins Pathology) with captions |
| 18 | Killip Classification | 4 class cards with mortality data (5–70%) |
| 19 | Take-Home Messages | 8 numbered key points |
| 20 | References | 8 cited sources including 2025 ACC/AHA guidelines (PMID: 40014670) |