Make a presentation on stable vs unstable angina 14 pages make sure your explaining this to mbbs dr. And also add case Report it should be more pictures reports ECG and many more d
stable vs unstable angina ECG comparison
angina pectoris pathophysiology coronary artery atherosclerosis plaque
NSTEMI ECG ST depression T wave inversion unstable angina
coronary angiogram stent angina treatment intervention
troponin biomarker cardiac enzymes acute coronary syndrome
stress treadmill exercise test ECG ischemia positive
plaque rupture thrombus formation unstable angina mechanism diagram
mkdir -p /home/daytona/workspace/angina-pptx && ls /home/daytona/workspace/angina-pptx
~/angina-pptx/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.title = "Stable vs Unstable Angina";
pres.author = "Medical Education";
// ── PALETTE ──────────────────────────────────────────────────────────────────
const C = {
navy: "0A1628", // dominant dark
darkRed: "8B1A1A", // accent
red: "C0392B", // highlight
gold: "D4A017", // accent
white: "FFFFFF",
lightGray:"F0F4F8",
midGray: "B0BEC5",
text: "1A2A3A",
cardBg: "132035",
cardAlt: "1C2E48",
teal: "0D7377",
amber: "E67E22",
};
// ── HELPERS ───────────────────────────────────────────────────────────────────
function addBackground(slide, color) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color } });
}
function sectionHeader(slide, text) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.08, fill: { color: C.gold } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.42, w: "100%", h: 0.08, fill: { color: C.gold } });
slide.addText(text, { x: 0.4, y: 0.14, w: 12, h: 0.5, fontSize: 11, color: C.midGray, bold: false, fontFace: "Calibri" });
}
function slideTitle(slide, title, subtitle) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0.72, w: 0.1, h: 0.55, fill: { color: C.gold } });
slide.addText(title, { x: 0.35, y: 0.7, w: 12.6, h: 0.6, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri Light", charSpacing: 1 });
if (subtitle) {
slide.addText(subtitle, { x: 0.35, y: 1.28, w: 12.6, h: 0.35, fontSize: 14, color: C.gold, fontFace: "Calibri", italic: true });
}
}
function bullet(text, indent) {
return { text, options: { bullet: { code: "25A0", indent: indent || 15 }, breakLine: true, color: C.white, fontSize: 15, fontFace: "Calibri" } };
}
function bulletSub(text) {
return { text, options: { bullet: { code: "25B8", indent: 30 }, breakLine: true, color: C.midGray, fontSize: 13, fontFace: "Calibri" } };
}
// Fetch images as base64
function fetchImgs(urls) {
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024, timeout: 60000 }
);
return JSON.parse(result.toString());
} catch (e) {
console.error("Image fetch error:", e.message);
return urls.map(() => ({ base64: null, error: e.message }));
}
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
// Gradient strip
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 2.2, fill: { color: C.cardBg } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: "100%", fill: { color: C.red } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 2.18, w: "100%", h: 0.06, fill: { color: C.gold } });
s.addText("STABLE vs UNSTABLE", { x: 0.5, y: 0.3, w: 12.3, h: 0.85, fontSize: 48, bold: true, color: C.white, fontFace: "Calibri Light", charSpacing: 3 });
s.addText("ANGINA PECTORIS", { x: 0.5, y: 1.05, w: 12.3, h: 0.85, fontSize: 48, bold: true, color: C.gold, fontFace: "Calibri Light", charSpacing: 3 });
s.addText("A Comprehensive Clinical Guide for MBBS Doctors", { x: 0.5, y: 2.4, w: 12.3, h: 0.45, fontSize: 18, color: C.midGray, fontFace: "Calibri", italic: true });
s.addShape(pres.ShapeType.line, { x: 0.5, y: 3.0, w: 11.8, h: 0, line: { color: C.midGray, width: 0.5, dashType: "dash" } });
const topics = ["Pathophysiology", "Clinical Features", "ECG Interpretation", "Investigations", "Management", "Case Report"];
topics.forEach((t, i) => {
const col = i % 3, row = Math.floor(i / 3);
s.addShape(pres.ShapeType.rect, {
x: 0.5 + col * 4.2, y: 3.25 + row * 1.2, w: 3.9, h: 0.9,
fill: { color: i % 2 === 0 ? C.cardBg : C.cardAlt },
line: { color: C.teal, width: 1 }
});
s.addText(t, { x: 0.55 + col * 4.2, y: 3.28 + row * 1.2, w: 3.8, h: 0.84, fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
});
s.addText("Cardiology | Internal Medicine | Department of Medicine", { x: 0.5, y: 6.9, w: 12.3, h: 0.35, fontSize: 11, color: C.midGray, align: "center", fontFace: "Calibri" });
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW & CLASSIFICATION: ACS Spectrum
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "CLASSIFICATION OF ISCHEMIC HEART DISEASE");
slideTitle(s, "The Angina Spectrum", "From stable coronary disease to acute coronary syndrome");
const imgs = fetchImgs([
"https://cdn.orris.care/cdss_images/GLGCA_3181896_1763373540517_577b1707-2b4e-4be8-9866-2d88bb29184b.png"
]);
if (imgs[0] && !imgs[0].error) {
s.addImage({ data: imgs[0].base64, x: 0.4, y: 1.8, w: 12.5, h: 4.9 });
}
s.addText("ACS Spectrum: ESC Classification — unstable angina → NSTEMI → STEMI", {
x: 0.4, y: 6.85, w: 12.5, h: 0.4, fontSize: 10, color: C.midGray, italic: true, fontFace: "Calibri", align: "center"
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — PATHOPHYSIOLOGY COMPARISON
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "PATHOPHYSIOLOGY");
slideTitle(s, "Pathophysiology: Stable vs Unstable", "Understanding the underlying coronary mechanisms");
// Left column — stable
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.7, w: 5.8, h: 5.3, fill: { color: C.cardBg }, line: { color: C.teal, width: 1 } });
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.7, w: 5.8, h: 0.45, fill: { color: C.teal } });
s.addText("STABLE ANGINA", { x: 0.3, y: 1.7, w: 5.8, h: 0.45, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText([
bullet("Fixed coronary stenosis (≥70%)"),
bullet("Demand-supply mismatch on exertion"),
bullet("Intact fibrous cap — plaque is STABLE"),
bullet("No thrombus formation"),
bullet("Transient, reversible ischemia"),
bulletSub("Relieved by rest or nitrates in 2–5 min"),
bulletSub("O₂ demand exceeds fixed supply"),
bulletSub("Subendocardial ischemia"),
], { x: 0.45, y: 2.2, w: 5.5, h: 4.6, valign: "top", fontFace: "Calibri" });
// Right column — unstable
s.addShape(pres.ShapeType.rect, { x: 7.2, y: 1.7, w: 5.8, h: 5.3, fill: { color: "1A0A0A" }, line: { color: C.red, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x: 7.2, y: 1.7, w: 5.8, h: 0.45, fill: { color: C.red } });
s.addText("UNSTABLE ANGINA", { x: 7.2, y: 1.7, w: 5.8, h: 0.45, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText([
bullet("Plaque RUPTURE or EROSION"),
bullet("Platelet activation & thrombus formation"),
bullet("Dynamic partial coronary occlusion"),
bullet("Inflammatory cytokines destabilize cap"),
bullet("Supply failure — rest pain possible"),
bulletSub("Thin-cap fibroatheroma (TCFA)"),
bulletSub("Lipid-rich necrotic core exposed"),
bulletSub("GP IIb/IIIa activation, fibrin clot"),
], { x: 7.35, y: 2.2, w: 5.5, h: 4.6, valign: "top", fontFace: "Calibri" });
// VS badge
s.addShape(pres.ShapeType.ellipse, { x: 6.0, y: 3.8, w: 1.3, h: 1.3, fill: { color: C.gold } });
s.addText("VS", { x: 6.0, y: 3.8, w: 1.3, h: 1.3, fontSize: 22, bold: true, color: C.navy, align: "center", valign: "middle", fontFace: "Calibri" });
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — PLAQUE PATHOLOGY (images)
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "PLAQUE PATHOLOGY");
slideTitle(s, "Coronary Plaque: From Stable to Ruptured", "Gross pathology and OCT imaging of vulnerable plaques");
const imgs = fetchImgs([
"https://cdn.orris.care/cdss_images/Pathology_1760051681141_931e45fe-0542-4da5-b8c4-ff161e52b246.jpg",
"https://cdn.orris.care/cdss_images/Pathology_1760051678678_18220786-12ba-428d-98a0-e5dcf0e16996.jpg",
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_425d9ec038ffe9dbc4c74bb869488fca9f0f0ca5f784163d384dfefeb71c383f.jpg"
]);
const boxes = [
{ x: 0.3, y: 1.75, w: 4.0, h: 4.5, label: "Gross: Atherosclerotic Plaque with Intraplaque Haemorrhage (RCA)" },
{ x: 4.65, y: 1.75, w: 4.0, h: 4.5, label: "Histology: Plaque Rupture + Superimposed Thrombus (EVG stain)" },
{ x: 8.95, y: 1.75, w: 4.0, h: 4.5, label: "OCT + PET/CT: Stable vs Unstable Plaque Metabolic Activity" },
];
boxes.forEach((b, i) => {
s.addShape(pres.ShapeType.rect, { x: b.x, y: b.y, w: b.w, h: b.h, fill: { color: C.cardBg }, line: { color: C.midGray, width: 0.5 } });
if (imgs[i] && !imgs[i].error) {
s.addImage({ data: imgs[i].base64, x: b.x + 0.1, y: b.y + 0.1, w: b.w - 0.2, h: b.h - 0.6 });
}
s.addText(b.label, { x: b.x + 0.05, y: b.y + b.h - 0.55, w: b.w - 0.1, h: 0.5, fontSize: 9, color: C.midGray, align: "center", fontFace: "Calibri", italic: true });
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — CLINICAL FEATURES TABLE
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "CLINICAL FEATURES");
slideTitle(s, "Clinical Comparison", "Key differentiating features for bedside assessment");
const rows = [
["Feature", "Stable Angina", "Unstable Angina"],
["Onset", "Predictable, exertional", "Unpredictable, at rest or minimal exertion"],
["Duration", "2–5 minutes", "> 10–20 minutes, or crescendo pattern"],
["Precipitants", "Exercise, cold, emotion, meals", "Rest, minimal activity, waking from sleep"],
["Relief", "Rest in 2–5 min; GTN works quickly", "GTN may not relieve; rest often insufficient"],
["Frequency", "Stable pattern, not worsening", "New-onset, increasing freq/severity (crescendo)"],
["Pain character", "Squeezing, pressure, Levine's sign", "Same but more severe or prolonged"],
["Radiation", "Arm, jaw, back (typical)", "Same; may be more atypical in women/elderly"],
["Dyspnoea", "May accompany chest discomfort", "Anginal equivalent; prominent feature"],
["Risk of MI", "Low (chronic stable disease)", "High — medical emergency"],
];
s.addTable(rows, {
x: 0.3, y: 1.7, w: 12.7, h: 5.4,
colW: [2.2, 4.5, 6.0],
border: { type: "solid", color: C.midGray, pt: 0.5 },
fontSize: 12,
fontFace: "Calibri",
color: C.white,
fill: C.cardBg,
align: "left",
valign: "middle",
rowH: 0.48,
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — ECG FINDINGS
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "ECG INTERPRETATION");
slideTitle(s, "ECG in Angina", "What to look for on the 12-lead ECG");
const imgs = fetchImgs([
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_0137e9b1dea03ddad942d6c14c4c54048467b194bf6fdfb9c139df7bcd7576d6.jpg",
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c215fb9417ac543b9a9f45c60351f0c2a5b4f36b1db2efea441f6e07484c05cc.jpg"
]);
// Left — UA ECG
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.75, w: 6.1, h: 5.3, fill: { color: C.cardBg }, line: { color: C.red, width: 1.5 } });
s.addText("UNSTABLE ANGINA / NSTEMI ECG", { x: 0.3, y: 1.75, w: 6.1, h: 0.4, fontSize: 12, bold: true, color: C.red, align: "center", valign: "middle", fontFace: "Calibri" });
if (imgs[0] && !imgs[0].error) {
s.addImage({ data: imgs[0].base64, x: 0.4, y: 2.2, w: 5.9, h: 3.2 });
}
s.addText([
{ text: "• ST-segment depression in I, aVL, V4–V6 ", options: { breakLine: true, fontSize: 11, color: C.white } },
{ text: "• Deep T-wave inversions (V3 shown) ", options: { breakLine: true, fontSize: 11, color: C.white } },
{ text: "• Reciprocal ST elevation in aVR → suggests LMCA/LAD disease ", options: { breakLine: true, fontSize: 11, color: C.gold } },
{ text: "• ⚠ Troponin NEGATIVE = UA; Positive = NSTEMI ", options: { breakLine: true, fontSize: 11, color: C.red, bold: true } },
], { x: 0.4, y: 5.45, w: 5.9, h: 1.5, valign: "top", fontFace: "Calibri" });
// Right — serial NSTEMI ECG
s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.75, w: 6.1, h: 5.3, fill: { color: C.cardBg }, line: { color: C.teal, width: 1 } });
s.addText("SERIAL ECG: NSTEMI EVOLUTION", { x: 6.9, y: 1.75, w: 6.1, h: 0.4, fontSize: 12, bold: true, color: C.teal, align: "center", valign: "middle", fontFace: "Calibri" });
if (imgs[1] && !imgs[1].error) {
s.addImage({ data: imgs[1].base64, x: 7.0, y: 2.2, w: 5.9, h: 3.2 });
}
s.addText([
{ text: "• Serial ECGs a–d showing temporal evolution ", options: { breakLine: true, fontSize: 11, color: C.white } },
{ text: "• (a) Admission: ST depression V3–V5 ", options: { breakLine: true, fontSize: 11, color: C.white } },
{ text: "• (b,c) After nitrates: progressive improvement ", options: { breakLine: true, fontSize: 11, color: C.white } },
{ text: "• (d) Pre-discharge: complete ST normalization ", options: { breakLine: true, fontSize: 11, color: C.gold } },
], { x: 7.0, y: 5.45, w: 5.9, h: 1.5, valign: "top", fontFace: "Calibri" });
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — ACS CLASSIFICATION DIAGRAM + TROPONIN
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "DIAGNOSIS & BIOMARKERS");
slideTitle(s, "ACS Classification & Troponin Interpretation", "NSTEMI vs Unstable Angina vs STEMI — key distinctions");
const imgs = fetchImgs([
"https://cdn.orris.care/cdss_images/GLGCA_4374545_1766840067128_6f367f94-2114-4c1c-a241-8b1354fb2f77_702752f6-9c27-4ad5-a42c-a8c636a7dfe7.png",
"https://cdn.orris.care/cdss_images/GLGCA_4715232_1766470703487_b2ad1a7f-0378-43f2-97b7-833912c97f36_d338a972-9dc6-4eb0-8e1d-dc3fdceee7f5.png"
]);
if (imgs[0] && !imgs[0].error) {
s.addImage({ data: imgs[0].base64, x: 0.3, y: 1.7, w: 6.2, h: 5.5 });
}
if (imgs[1] && !imgs[1].error) {
s.addImage({ data: imgs[1].base64, x: 6.9, y: 1.7, w: 6.1, h: 5.5 });
}
s.addText("Source: Management of Acute Coronary Syndromes / Diagnosing and Managing ACS", {
x: 0.3, y: 7.1, w: 12.7, h: 0.28, fontSize: 9, color: C.midGray, italic: true, align: "center", fontFace: "Calibri"
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — INVESTIGATIONS
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "INVESTIGATIONS");
slideTitle(s, "Investigations", "A systematic approach from bedside to cathlab");
const cards = [
{ title: "ECG (12-lead)", color: C.teal, items: ["Stable angina: often NORMAL at rest", "Exercise-induced ST depression ≥1 mm", "UA: ST depression, T-wave inversions", "STEMI: ST elevation ≥2 mm (≥2 leads)"] },
{ title: "Cardiac Biomarkers", color: C.red, items: ["Troponin I/T (high-sensitivity)", "CK-MB (less sensitive, old MI)", "Myoglobin (early, non-specific)", "BNP if heart failure present"] },
{ title: "Stress Testing (Stable)", color: C.gold, items: ["Exercise treadmill test (Bruce protocol)", "+ve: ST depression ≥1 mm at target HR", "Stress echo / nuclear perfusion scan", "CTCA for intermediate pre-test probability"] },
{ title: "Coronary Angiography", color: C.amber, items: ["Gold standard for anatomy", "Stable: elective/semi-urgent", "UA/NSTEMI: within 24–72h (GRACE risk)", "STEMI: primary PCI within 90 min"] },
{ title: "Echocardiography", color: C.midGray, items: ["RWMA during ischemia (wall motion)", "LV function (EF) — prognostic", "Valve disease assessment", "Pericardial effusion exclusion"] },
{ title: "Other Investigations", color: "7B68EE", items: ["FBC, lipid profile, HbA1c, U&E, TFTs", "CXR: cardiomegaly, pulmonary oedema", "CT calcium score (CAC scoring)", "MRI: viability assessment"] },
];
cards.forEach((c, i) => {
const col = i % 3, row = Math.floor(i / 3);
const x = 0.3 + col * 4.35, y = 1.75 + row * 2.5;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.1, h: 2.3, fill: { color: C.cardBg }, line: { color: c.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 4.1, h: 0.4, fill: { color: c.color } });
s.addText(c.title, { x, y, w: 4.1, h: 0.4, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(c.items.map(i => "▸ " + i).join("\n"), {
x: x + 0.1, y: y + 0.42, w: 3.9, h: 1.8, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "top"
});
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — STRESS ECG & ANGIOGRAM images
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "DIAGNOSTIC IMAGING");
slideTitle(s, "Stress ECG & Coronary Angiography", "Visual demonstration of diagnostic tools in angina");
const imgs = fetchImgs([
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_6067a1b8dea14c1bc52f7c012f494f18c12523301a44da2e9f7d7bfe88bbdd1d.jpg",
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ce31af7e1d5b9812d343ad0f3ec711e4c4190fe16c47f270a54e90d87419ea09.jpg",
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_665f631326cc9fcad2f1b4124080c8726a374b464bf6200af34eefa7ff653107.jpg"
]);
const panels = [
{ x: 0.3, y: 1.75, w: 4.0, h: 4.2, label: "Positive Stress ECG: ST depression −3.7 mm (inferolateral leads) during treadmill test" },
{ x: 4.65, y: 1.75, w: 4.0, h: 4.2, label: "Coronary Angiogram: LAD stenosis pre-PCI (red arrowhead) → post-stent restoration" },
{ x: 9.0, y: 1.75, w: 4.0, h: 4.2, label: "Coronary Angiogram: Critical RCA stenosis (99%) → successful DES deployment" },
];
panels.forEach((p, i) => {
s.addShape(pres.ShapeType.rect, { x: p.x, y: p.y, w: p.w, h: p.h, fill: { color: C.cardBg }, line: { color: C.midGray, width: 0.5 } });
if (imgs[i] && !imgs[i].error) {
s.addImage({ data: imgs[i].base64, x: p.x + 0.05, y: p.y + 0.05, w: p.w - 0.1, h: p.h - 0.7 });
}
s.addText(p.label, { x: p.x + 0.05, y: p.y + p.h - 0.65, w: p.w - 0.1, h: 0.6, fontSize: 9, color: C.midGray, italic: true, fontFace: "Calibri", align: "center" });
});
// Key learning point
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 6.05, w: 12.7, h: 0.9, fill: { color: C.cardAlt }, line: { color: C.gold, width: 1 } });
s.addText("🔑 KEY POINT: For unstable angina/NSTEMI, angiography is performed within 24–72 h based on GRACE score. For STEMI, primary PCI must occur within 90 min of first medical contact.", {
x: 0.5, y: 6.05, w: 12.5, h: 0.9, fontSize: 12, color: C.gold, bold: false, valign: "middle", fontFace: "Calibri"
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — MANAGEMENT: STABLE ANGINA
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "MANAGEMENT — STABLE ANGINA");
slideTitle(s, "Management of Stable Angina", "Medical therapy, lifestyle modification, and revascularization");
// Three pillars
const pillars = [
{
title: "Lifestyle & Risk Factor Modification",
color: C.teal,
points: ["Smoking cessation (most impactful single intervention)", "Regular aerobic exercise (30 min, 5×/week)", "Weight reduction & Mediterranean diet", "Strict BP control (<130/80 mmHg)", "Glycaemic control in diabetics (HbA1c <7%)"]
},
{
title: "Pharmacological Therapy",
color: C.gold,
points: ["Aspirin 75 mg OD (antiplatelet — primary therapy)", "β-blockers (1st line anti-anginal — atenolol/metoprolol)", "CCBs (if β-blocker contraindicated — amlodipine)", "Long-acting nitrates (isosorbide mononitrate)", "Ranolazine (add-on, late Na⁺ channel inhibitor)", "Statins (atorvastatin 40–80 mg — plaque stabilisation)", "ACE inhibitors/ARBs (if HTN, DM, or LV dysfunction)"]
},
{
title: "Revascularization",
color: C.amber,
points: ["PCI (percutaneous coronary intervention) — drug-eluting stent (DES)", "CABG (coronary artery bypass grafting) — 3-vessel or LMCA disease", "Indications: ongoing symptoms despite optimal medical therapy", "Evidence: COURAGE trial — PCI ≈ medical Rx for stable angina", "FFR-guided PCI (fractional flow reserve ≤0.80)"]
}
];
pillars.forEach((p, i) => {
const x = 0.3 + i * 4.35;
s.addShape(pres.ShapeType.rect, { x, y: 1.7, w: 4.1, h: 5.4, fill: { color: C.cardBg }, line: { color: p.color, width: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 1.7, w: 4.1, h: 0.5, fill: { color: p.color } });
s.addText(p.title, { x, y: 1.7, w: 4.1, h: 0.5, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(p.points.map(pt => "▶ " + pt).join("\n"), {
x: x + 0.12, y: 2.25, w: 3.85, h: 4.7, fontSize: 11.5, color: C.white, fontFace: "Calibri", valign: "top"
});
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — MANAGEMENT: UNSTABLE ANGINA (ACS)
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "MANAGEMENT — UNSTABLE ANGINA / NSTEMI");
slideTitle(s, "Acute Management: Unstable Angina/NSTEMI", "MONA + anticoagulation + early invasive strategy");
// MONA row
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.75, w: 12.7, h: 0.55, fill: { color: "1C0A14" }, line: { color: C.red, width: 1 } });
s.addText("IMMEDIATE MANAGEMENT — MONAB: Morphine · Oxygen · Nitrates · Aspirin · Beta-blocker", {
x: 0.35, y: 1.75, w: 12.6, h: 0.55, fontSize: 13, bold: true, color: C.red, align: "center", valign: "middle", fontFace: "Calibri"
});
const steps = [
{ step: "01", label: "Aspirin + P2Y12", detail: "Aspirin 300 mg stat (loading)\n+ Ticagrelor 180 mg OR Clopidogrel 600 mg\n(DAPT — dual antiplatelet therapy)" },
{ step: "02", label: "Anticoagulation", detail: "Fondaparinux 2.5 mg SC OD (preferred)\nOR LMWH enoxaparin 1 mg/kg BD\nOR UFH IV (if PCI imminent)" },
{ step: "03", label: "Nitrates", detail: "GTN SL (0.5 mg) for immediate relief\nIV GTN infusion if ongoing pain\nAvoid if hypotension (SBP <90)" },
{ step: "04", label: "Beta-Blocker", detail: "IV metoprolol if tachycardic, hypertensive\nOral atenolol/metoprolol when stable\nContraindicated: acute HF, bradycardia" },
{ step: "05", label: "GRACE Score", detail: "Risk stratify ALL patients\nHigh risk: angio within 24 h\nIntermediate: within 72 h\nLow risk: outpatient workup" },
{ step: "06", label: "PCI / CABG", detail: "Early invasive strategy preferred\nDrug-eluting stent (DES) for culprit\nCABG if 3-vessel / LM disease\nContinue DAPT × 12 months post-PCI" },
];
steps.forEach((st, i) => {
const col = i % 3, row = Math.floor(i / 3);
const x = 0.3 + col * 4.35, y = 2.4 + row * 2.3;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.1, h: 2.1, fill: { color: C.cardBg }, line: { color: C.red, width: 1 } });
s.addShape(pres.ShapeType.ellipse, { x: x + 0.1, y: y + 0.1, w: 0.55, h: 0.55, fill: { color: C.red } });
s.addText(st.step, { x: x + 0.1, y: y + 0.1, w: 0.55, h: 0.55, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(st.label, { x: x + 0.72, y: y + 0.12, w: 3.25, h: 0.45, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri" });
s.addText(st.detail, { x: x + 0.15, y: y + 0.62, w: 3.85, h: 1.4, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "top" });
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — PLATELET / THROMBUS MECHANISM + DRUGS
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "ANTITHROMBOTIC PHARMACOLOGY");
slideTitle(s, "Plaque Rupture → Thrombus → Drug Targets", "Platelet activation cascade and antithrombotic intervention points");
const imgs = fetchImgs([
"https://cdn.orris.care/cdss_images/GLGCA_3181896_1763373728336_b7e59e43-62c6-4383-a335-ae27768ae6cb.png"
]);
if (imgs[0] && !imgs[0].error) {
s.addImage({ data: imgs[0].base64, x: 0.3, y: 1.7, w: 7.5, h: 5.5 });
}
// Right side — drug summary boxes
const drugs = [
{ name: "Antiplatelet Agents", color: C.teal, list: "Aspirin (COX-1 inhibitor → ↓TXA₂)\nClopidogrel / Ticagrelor / Prasugrel (P2Y₁₂)\nAbciximab / Eptifibatide (GPIIb/IIIa)" },
{ name: "Anticoagulants", color: C.amber, list: "Fondaparinux (anti-Xa)\nEnoxaparin LMWH (anti-Xa + IIa)\nUFH (anti-Xa + anti-IIa, reversible)\nBivalirudin (direct thrombin inhibitor)" },
{ name: "Fibrinolytics (STEMI only)", color: C.red, list: "Streptokinase / Alteplase (tPA)\nContraindicated in UA/NSTEMI\nUsed when PCI unavailable ≤12h STEMI" },
];
drugs.forEach((d, i) => {
const y = 1.7 + i * 1.75;
s.addShape(pres.ShapeType.rect, { x: 8.1, y, w: 5.0, h: 1.6, fill: { color: C.cardBg }, line: { color: d.color, width: 1.5 } });
s.addText(d.name, { x: 8.1, y, w: 5.0, h: 0.38, fontSize: 12, bold: true, color: d.color, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(d.list, { x: 8.2, y: y + 0.38, w: 4.8, h: 1.18, fontSize: 11, color: C.white, fontFace: "Calibri", valign: "top" });
});
s.addText("Source: Management of Acute Coronary Syndromes (ESC)", { x: 0.3, y: 7.1, w: 12.7, h: 0.28, fontSize: 9, color: C.midGray, italic: true, align: "center", fontFace: "Calibri" });
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — CASE REPORT
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "CLINICAL CASE REPORT");
slideTitle(s, "Case Report: A 58-Year-Old Man with Chest Pain", "Applying clinical knowledge — stable to unstable transition");
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.75, w: 12.7, h: 5.45, fill: { color: C.cardBg }, line: { color: C.gold, width: 1 } });
// Case sections
const sections = [
{ title: "PRESENTATION", color: C.gold, text: "Mr. H.S., 58-year-old male, hypertensive, diabetic, smoker (30 pack-years). Known stable exertional chest tightness for 2 years, relieved by rest. Tonight, awoke at 2 AM with severe central chest pressure (8/10), radiation to left arm and jaw. No relief with 3× GTN tablets over 30 min. Diaphoresis, nausea, dyspnoea. BP 158/96, HR 102 bpm, SpO₂ 94% on air." },
{ title: "ECG FINDINGS", color: C.red, text: "12-lead ECG: Sinus tachycardia 102 bpm. ST-segment depression 2–3 mm in leads I, aVL, V4–V6. Deep T-wave inversions in V3–V5. ST elevation in aVR (~1 mm) — suggests proximal LAD or LMCA ischemia. No ST elevation in inferior or precordial leads. Previous ECGs: normal." },
{ title: "INVESTIGATIONS", color: C.teal, text: "Troponin I (0 h): 0.08 ng/mL [↑ — normal <0.04]. Troponin I (3 h): 0.42 ng/mL [rising]. CK-MB: 28 U/L [↑]. eGFR 68, Hb 13.2, INR 1.0. Echo: mild anterior wall hypokinesia, EF 48%. GRACE score: 145 → HIGH RISK. Diagnosis: NSTEMI (was Unstable Angina until troponin returned)." },
{ title: "MANAGEMENT", color: C.amber, text: "• Aspirin 300 mg + Ticagrelor 180 mg STAT\n• Fondaparinux 2.5 mg SC\n• IV GTN infusion; metoprolol 25 mg PO\n• Coronary angiography at 14 h: severe proximal LAD stenosis 95%\n• PCI: DES implanted to proximal LAD — TIMI-3 flow restored\n• Discharge: DAPT + statin + ACEi + beta-blocker\n• 30-day MACE: none; follow-up ETT: negative at 4 weeks" },
];
let y = 1.85;
sections.forEach((sec, i) => {
const col = i % 2, row = Math.floor(i / 2);
const x = 0.4 + col * 6.4;
const baseY = 1.85 + row * 2.65;
s.addShape(pres.ShapeType.rect, { x, y: baseY, w: 6.1, h: 2.5, fill: { color: C.cardAlt }, line: { color: sec.color, width: 1.5 } });
s.addShape(pres.ShapeType.rect, { x, y: baseY, w: 6.1, h: 0.38, fill: { color: sec.color } });
s.addText(sec.title, { x, y: baseY, w: 6.1, h: 0.38, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri" });
s.addText(sec.text, { x: x + 0.1, y: baseY + 0.42, w: 5.9, h: 2.0, fontSize: 10.5, color: C.white, fontFace: "Calibri", valign: "top" });
});
})();
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — SUMMARY COMPARISON TABLE + KEY TAKEAWAYS
// ════════════════════════════════════════════════════════════════════════════
(function() {
const s = pres.addSlide();
addBackground(s, C.navy);
sectionHeader(s, "SUMMARY");
slideTitle(s, "Key Takeaways", "Stable vs Unstable Angina — Final Summary");
const rows = [
["Parameter", "STABLE ANGINA", "UNSTABLE ANGINA"],
["Pathology", "Fixed stenosis, intact plaque", "Plaque rupture + partial thrombus"],
["Pain", "Exertional, predictable, <5 min", "Rest pain, crescendo, >10 min, not relieved by GTN"],
["ECG (at rest)", "Usually normal", "ST depression / T inversion ± aVR elevation"],
["Troponin", "Normal", "Normal (UA) or elevated (NSTEMI)"],
["Urgency", "Elective/outpatient", "⚠ Medical emergency — admit & monitor"],
["Angiography", "Elective (if medical Rx fails)", "Within 24–72 h (GRACE-guided)"],
["First-line Rx", "Aspirin + β-blocker + statin", "DAPT + anticoagulation + early PCI"],
["Prognosis", "Good with optimal medical Rx", "High short-term MACE risk without treatment"],
];
s.addTable(rows, {
x: 0.3, y: 1.7, w: 12.7, h: 4.5,
colW: [2.8, 4.5, 5.4],
border: { type: "solid", color: C.midGray, pt: 0.5 },
fontSize: 12,
fontFace: "Calibri",
color: C.white,
fill: C.cardBg,
align: "left",
valign: "middle",
rowH: 0.44,
});
// Bottom takeaway strip
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 6.32, w: 12.7, h: 1.0, fill: { color: "1A1000" }, line: { color: C.gold, width: 1.5 } });
s.addText([
{ text: "REMEMBER: ", options: { bold: true, color: C.gold, fontSize: 13 } },
{ text: "Any patient with NEW-ONSET angina at rest, crescendo angina, or angina unrelieved by 3 GTN doses must be treated as Unstable Angina (ACS) until proven otherwise. Admit, monitor, DAPT, anticoagulate, and stratify for early invasive strategy.", options: { color: C.white, fontSize: 12 } }
], { x: 0.5, y: 6.32, w: 12.5, h: 1.0, valign: "middle", fontFace: "Calibri" });
})();
// Save
pres.writeFile({ fileName: "/home/daytona/workspace/angina-pptx/Stable_vs_Unstable_Angina.pptx" })
.then(() => console.log("✅ PPTX saved successfully"))
.catch(e => console.error("Error:", e));
cd /home/daytona/workspace/angina-pptx && node build.js 2>&1
Find latest cardiac intervention guidelines for unstable angina