Stroke
"stroke" AND "management"
| Type | Frequency | Mechanism |
|---|---|---|
| Ischemic stroke | ~87% | Arterial occlusion (thrombotic or embolic) |
| Hemorrhagic stroke | ~13% | Vessel rupture (ICH or SAH) |

| Common Causes | Uncommon Causes |
|---|---|
| Lacunar (small vessel) stroke | Hypercoagulable disorders |
| Large-vessel thrombosis | Antiphospholipid syndrome |
| Cardioembolic (AFib, MI, valve disease) | Arterial dissection |
| Carotid bifurcation atherosclerosis | CADASIL |
| Aortic arch atherosclerosis | Moyamoya disease |
| Sickle cell disease | |
| Vasculitis |
| Location | Frequency |
|---|---|
| Putamen | 44% |
| Other cortical areas | 25% |
| Thalamus | 13% |
| Cerebellum | 9% |
| Pons | 9% |

Now make full ppt on this
ls /home/daytona/workspace/ 2>/dev/null && echo "---" && ls /home/daytona/skills/pptx/ 2>/dev/null
mkdir -p /home/daytona/workspace/stroke-ppt && echo "done"
~/stroke-ppt/stroke.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Orris Medical";
pres.title = "Stroke - A Comprehensive Overview";
// ─── COLOR PALETTE ───────────────────────────────────────────────
// Deep navy dominant, crimson red accent, white text, light gray panels
const C = {
navy: "0D2B4E", // dominant background
navyMid: "1A3F6F", // lighter navy for panels
navyLight: "1E4D8C", // card backgrounds
red: "C0392B", // accent / danger / highlight
redLight: "E74C3C", // lighter red
orange: "E67E22", // warning / moderate
teal: "1ABC9C", // secondary accent
tealDark: "148F77",
white: "FFFFFF",
offWhite: "F0F4F8",
gray: "BDC3C7",
grayDark: "7F8C8D",
grayPanel: "EAF0FB",
black: "000000",
yellow: "F1C40F",
green: "27AE60",
};
// ─── HELPER: dark slide background ───────────────────────────────
function darkBg(slide) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: C.navy }, line: { color: C.navy }
});
}
// ─── HELPER: light slide background ─────────────────────────────
function lightBg(slide) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 5.625,
fill: { color: "F5F8FF" }, line: { color: "F5F8FF" }
});
// subtle left accent bar
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 0.07, h: 5.625,
fill: { color: C.red }, line: { color: C.red }
});
}
// ─── HELPER: section divider slide ───────────────────────────────
function sectionSlide(title, subtitle) {
const slide = pres.addSlide();
darkBg(slide);
// diagonal accent shape
slide.addShape(pres.shapes.RECTANGLE, {
x: 6.5, y: -0.5, w: 4, h: 7,
fill: { color: C.navyMid }, line: { color: C.navyMid },
rotate: 12
});
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 4.8, w: 10, h: 0.825,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText(title, {
x: 0.6, y: 1.4, w: 8.8, h: 1.5,
fontSize: 44, bold: true, color: C.white,
fontFace: "Calibri"
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.6, y: 3.0, w: 8.8, h: 0.8,
fontSize: 20, color: C.gray,
fontFace: "Calibri"
});
}
slide.addText("STROKE", {
x: 0, y: 4.82, w: 10, h: 0.78,
fontSize: 13, color: C.white, bold: true,
align: "right", valign: "middle",
fontFace: "Calibri", margin: [0, 0.3, 0, 0]
});
return slide;
}
// ─── HELPER: standard content slide ─────────────────────────────
function contentSlide(title) {
const slide = pres.addSlide();
lightBg(slide);
// Top title bar
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 0.72,
fill: { color: C.navy }, line: { color: C.navy }
});
slide.addText(title, {
x: 0.25, y: 0, w: 9.5, h: 0.72,
fontSize: 22, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle", margin: 0
});
// footer
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 5.35, w: 10, h: 0.275,
fill: { color: C.navy }, line: { color: C.navy }
});
slide.addText("Harrison's 22e | Bradley & Daroff's Neurology | Rosen's Emergency Medicine", {
x: 0.3, y: 5.35, w: 9.4, h: 0.275,
fontSize: 8, color: C.gray, valign: "middle", fontFace: "Calibri"
});
return slide;
}
// ─── HELPER: card shape ──────────────────────────────────────────
function card(slide, x, y, w, h, fillColor, lineColor) {
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x, y, w, h,
fill: { color: fillColor || "FFFFFF" },
line: { color: lineColor || C.navyLight, pt: 1.2 },
rectRadius: 0.08,
shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.10 }
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
darkBg(slide);
// large angled accent
slide.addShape(pres.shapes.RECTANGLE, {
x: 6.2, y: -1, w: 5, h: 8,
fill: { color: C.navyMid }, line: { color: C.navyMid },
rotate: 10
});
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 4.45, w: 10, h: 1.175,
fill: { color: C.red }, line: { color: C.red }
});
// Brain icon placeholder text (decorative)
slide.addText("🧠", {
x: 6.8, y: 0.7, w: 2.5, h: 2.5,
fontSize: 96, align: "center"
});
slide.addText("STROKE", {
x: 0.5, y: 0.7, w: 6, h: 1.5,
fontSize: 64, bold: true, color: C.white,
fontFace: "Calibri", charSpacing: 8
});
slide.addText("A Comprehensive Clinical Overview", {
x: 0.5, y: 2.3, w: 6, h: 0.6,
fontSize: 20, color: C.gray,
fontFace: "Calibri"
});
slide.addText("Definition • Pathophysiology • Classification • Clinical Features", {
x: 0.5, y: 2.95, w: 6, h: 0.45,
fontSize: 13, color: C.teal,
fontFace: "Calibri"
});
slide.addText("Diagnosis • Acute Management • Secondary Prevention • Complications", {
x: 0.5, y: 3.4, w: 6, h: 0.45,
fontSize: 13, color: C.teal,
fontFace: "Calibri"
});
// Bottom bar text
slide.addText("Based on Harrison's 22e • Bradley & Daroff's Neurology • Rosen's EM • Adams & Victor's", {
x: 0.3, y: 4.5, w: 9.4, h: 0.6,
fontSize: 10, color: C.white,
fontFace: "Calibri", valign: "middle"
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 2 — TABLE OF CONTENTS
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Table of Contents");
const topics = [
["01", "Definition & Epidemiology"],
["02", "Classification of Stroke"],
["03", "Pathophysiology"],
["04", "Etiology of Ischemic Stroke"],
["05", "Risk Factors"],
["06", "Clinical Features & Syndromes"],
["07", "Diagnosis & Imaging"],
["08", "Acute Management - Ischemic Stroke"],
["09", "Acute Management - Hemorrhagic Stroke"],
["10", "Secondary Prevention"],
["11", "Complications"],
["12", "Rehabilitation & Prognosis"],
];
const cols = [topics.slice(0, 6), topics.slice(6)];
cols.forEach((col, ci) => {
col.forEach((item, i) => {
const x = ci === 0 ? 0.25 : 5.15;
const y = 0.82 + i * 0.73;
card(slide, x, y, 4.65, 0.62, i % 2 === 0 ? "FFFFFF" : "F0F5FF", C.navyLight);
slide.addText(item[0], {
x: x + 0.1, y: y, w: 0.55, h: 0.62,
fontSize: 14, bold: true, color: C.red,
fontFace: "Calibri", align: "center", valign: "middle"
});
slide.addShape(pres.shapes.RECTANGLE, {
x: x + 0.65, y: y + 0.15, w: 0.03, h: 0.32,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText(item[1], {
x: x + 0.75, y: y, w: 3.8, h: 0.62,
fontSize: 13, color: C.navy,
fontFace: "Calibri", valign: "middle"
});
});
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: OVERVIEW
// ════════════════════════════════════════════════════════════════
sectionSlide("01 Definition & Epidemiology", "What is a stroke and why does it matter?");
// ════════════════════════════════════════════════════════════════
// SLIDE 3 — DEFINITION & EPIDEMIOLOGY
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Definition & Epidemiology");
// Definition box
card(slide, 0.25, 0.82, 9.5, 1.05, "EAF4FF", C.navyLight);
slide.addText("DEFINITION", {
x: 0.35, y: 0.88, w: 1.5, h: 0.35,
fontSize: 10, bold: true, color: C.red, fontFace: "Calibri"
});
slide.addText(
"A stroke (cerebrovascular accident, CVA) is the sudden onset of a focal neurological deficit caused by disruption of cerebral blood supply, either due to ischemia or hemorrhage, lasting >24 hours or causing death.",
{ x: 0.35, y: 1.17, w: 9.1, h: 0.6, fontSize: 13, color: C.navy, fontFace: "Calibri" }
);
// Stats cards
const stats = [
{ val: "#2", label: "Leading cause of\ndeath worldwide", color: C.red },
{ val: "#1", label: "Leading cause of\nadult disability", color: C.navyLight },
{ val: "87%", label: "Ischemic strokes\n(majority)", color: C.tealDark },
{ val: "13%", label: "Hemorrhagic\nstrokes", color: C.orange },
];
stats.forEach((s, i) => {
const x = 0.25 + i * 2.4;
card(slide, x, 2.05, 2.2, 1.55, "FFFFFF", s.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y: 2.05, w: 2.2, h: 0.25,
fill: { color: s.color }, line: { color: s.color }
});
slide.addText(s.val, {
x, y: 2.3, w: 2.2, h: 0.75,
fontSize: 40, bold: true, color: s.color,
fontFace: "Calibri", align: "center", valign: "middle"
});
slide.addText(s.label, {
x, y: 3.05, w: 2.2, h: 0.55,
fontSize: 11, color: C.grayDark,
fontFace: "Calibri", align: "center", valign: "middle"
});
});
// TIA note
card(slide, 0.25, 3.75, 9.5, 0.85, "FFF8EC", C.orange);
slide.addText("⚠ TIA (Transient Ischemic Attack):", {
x: 0.4, y: 3.78, w: 3.2, h: 0.35,
fontSize: 11, bold: true, color: C.orange, fontFace: "Calibri"
});
slide.addText(
"Transient episode of neurological dysfunction caused by focal ischemia WITHOUT infarction on imaging. High short-term stroke risk — now tissue-based (not time-based) definition.",
{ x: 0.4, y: 4.1, w: 9.1, h: 0.42, fontSize: 11, color: C.navy, fontFace: "Calibri" }
);
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: CLASSIFICATION
// ════════════════════════════════════════════════════════════════
sectionSlide("02 Classification of Stroke", "Ischemic vs. Hemorrhagic");
// ════════════════════════════════════════════════════════════════
// SLIDE 4 — CLASSIFICATION
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Classification of Stroke");
// Left column — Ischemic
card(slide, 0.25, 0.82, 4.55, 4.3, "EAF4FF", C.navyLight);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.82, w: 4.55, h: 0.42,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText("ISCHEMIC STROKE (87%)", {
x: 0.25, y: 0.82, w: 4.55, h: 0.42,
fontSize: 13, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
const iTypes = [
["Large Vessel", "Atherosclerosis of major cerebral arteries (ICA, MCA, basilar)"],
["Small Vessel\n(Lacunar)", "Lipohyalinosis of small penetrating arteries; <1.5 cm infarcts"],
["Cardioembolic", "Atrial fibrillation, mural thrombus, valve disease"],
["Cryptogenic", "No identifiable cause despite full workup (~25–30%)"],
["Other", "Dissection, hypercoagulable states, vasculitis, moyamoya"],
];
iTypes.forEach((t, i) => {
const y = 1.37 + i * 0.7;
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.35, y: y + 0.08, w: 0.15, h: 0.28,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText(t[0], {
x: 0.58, y: y, w: 4.0, h: 0.3,
fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri"
});
slide.addText(t[1], {
x: 0.58, y: y + 0.28, w: 4.0, h: 0.37,
fontSize: 10, color: C.grayDark, fontFace: "Calibri"
});
});
// Right column — Hemorrhagic
card(slide, 5.2, 0.82, 4.55, 4.3, "FFF0EE", C.red);
slide.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 0.82, w: 4.55, h: 0.42,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("HEMORRHAGIC STROKE (13%)", {
x: 5.2, y: 0.82, w: 4.55, h: 0.42,
fontSize: 13, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
const hTypes = [
["Intracerebral\nHemorrhage (ICH)", "Spontaneous bleeding into brain parenchyma; hypertension most common cause"],
["Subarachnoid\nHemorrhage (SAH)", "Bleeding into subarachnoid space; ruptured saccular aneurysm (#1 cause)"],
["Cerebral Amyloid\nAngiopathy (CAA)", "Amyloid deposition in vessel walls; lobar hemorrhages in elderly"],
["Secondary ICH", "AVM, tumor, venous sinus thrombosis, hemorrhagic transformation"],
];
hTypes.forEach((t, i) => {
const y = 1.37 + i * 0.82;
slide.addShape(pres.shapes.RECTANGLE, {
x: 5.3, y: y + 0.08, w: 0.15, h: 0.28,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText(t[0], {
x: 5.53, y: y, w: 4.0, h: 0.35,
fontSize: 12, bold: true, color: C.red, fontFace: "Calibri"
});
slide.addText(t[1], {
x: 5.53, y: y + 0.35, w: 4.0, h: 0.4,
fontSize: 10, color: C.grayDark, fontFace: "Calibri"
});
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: PATHOPHYSIOLOGY
// ════════════════════════════════════════════════════════════════
sectionSlide("03 Pathophysiology", "The ischemic cascade & hemorrhagic injury");
// ════════════════════════════════════════════════════════════════
// SLIDE 5 — PATHOPHYSIOLOGY: ISCHEMIC
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Pathophysiology — Ischemic Stroke");
// CBF threshold boxes
const thresholds = [
{ cbf: "40–60", label: "Normal CBF", sub: "Normal neuronal function", color: C.green },
{ cbf: "16–18", label: "Electrical silence", sub: "Neurons viable but not firing — PENUMBRA", color: C.orange },
{ cbf: "<10", label: "Membrane failure", sub: "K⁺ efflux, Ca²⁺ influx → cell death → INFARCT CORE", color: C.red },
];
thresholds.forEach((t, i) => {
const x = 0.25 + i * 3.25;
card(slide, x, 0.85, 3.0, 1.4, "FFFFFF", t.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y: 0.85, w: 3.0, h: 0.32,
fill: { color: t.color }, line: { color: t.color }
});
slide.addText(`CBF: ${t.cbf} mL/100g/min`, {
x, y: 0.85, w: 3.0, h: 0.32,
fontSize: 11, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
slide.addText(t.label, {
x: x + 0.1, y: 1.2, w: 2.8, h: 0.4,
fontSize: 13, bold: true, color: t.color, fontFace: "Calibri"
});
slide.addText(t.sub, {
x: x + 0.1, y: 1.6, w: 2.8, h: 0.55,
fontSize: 10, color: C.grayDark, fontFace: "Calibri"
});
});
// Ischemic cascade
card(slide, 0.25, 2.42, 9.5, 0.85, "EAF4FF", C.navyLight);
slide.addText("THE ISCHEMIC CASCADE", {
x: 0.4, y: 2.44, w: 9.0, h: 0.3,
fontSize: 11, bold: true, color: C.navyLight, fontFace: "Calibri"
});
slide.addText("Glutamate release → NMDA receptor activation → Ca²⁺ overload → Free radical production → Mitochondrial dysfunction → Inflammation → Apoptosis & Necrosis",
{ x: 0.4, y: 2.72, w: 9.1, h: 0.48, fontSize: 11, color: C.navy, fontFace: "Calibri" }
);
// Penumbra concept
const zones = [
{ label: "Infarct Core", sub: "CBF <10\nIrreversible damage\nDeath within minutes", color: C.red, x: 0.25 },
{ label: "Ischemic Penumbra", sub: "CBF 10–18\nVIABLE but at risk\nPrimary therapeutic target", color: C.orange, x: 3.55 },
{ label: "Oligemia / At Risk", sub: "CBF slightly reduced\nClinically silent\nMay progress without Rx", color: C.yellow, x: 6.85 },
];
zones.forEach(z => {
card(slide, z.x, 3.4, 3.0, 1.5, "FFFFFF", z.color);
slide.addShape(pres.shapes.RECTANGLE, {
x: z.x, y: 3.4, w: 3.0, h: 0.3,
fill: { color: z.color }, line: { color: z.color }
});
slide.addText(z.label, {
x: z.x, y: 3.4, w: 3.0, h: 0.3,
fontSize: 10, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
slide.addText(z.sub, {
x: z.x + 0.1, y: 3.73, w: 2.8, h: 1.1,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 6 — PATHOPHYSIOLOGY: HEMORRHAGIC
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Pathophysiology — Hemorrhagic Stroke");
// Two main causes
card(slide, 0.25, 0.85, 4.55, 2.0, "FFF0EE", C.red);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.85, w: 4.55, h: 0.35,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("HYPERTENSIVE VASCULOPATHY", {
x: 0.25, y: 0.85, w: 4.55, h: 0.35,
fontSize: 12, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
slide.addText([
{ text: "• ", options: { bullet: false } },
{ text: "Lipohyalinosis", options: { bold: true } },
{ text: " of small penetrating arteries from chronic hypertension\n", options: {} },
{ text: "• Deep brain structures affected: putamen (44%), thalamus (13%), pons (9%), cerebellum (9%)\n", options: {} },
{ text: "• Results in microaneurysm formation (Charcot-Bouchard) → rupture", options: {} },
], { x: 0.35, y: 1.22, w: 4.35, h: 1.55, fontSize: 11, color: C.navy, fontFace: "Calibri" });
card(slide, 5.2, 0.85, 4.55, 2.0, "FFF0EE", C.orange);
slide.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 0.85, w: 4.55, h: 0.35,
fill: { color: C.orange }, line: { color: C.orange }
});
slide.addText("CEREBRAL AMYLOID ANGIOPATHY (CAA)", {
x: 5.2, y: 0.85, w: 4.55, h: 0.35,
fontSize: 12, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
slide.addText([
{ text: "• Amyloid-β deposition in cortical and leptomeningeal vessel walls\n", options: {} },
{ text: "• Causes ", options: {} },
{ text: "lobar hemorrhages", options: { bold: true } },
{ text: " in elderly patients\n", options: {} },
{ text: "• Associated with multiple microbleeds on GRE/SWI MRI\n", options: {} },
{ text: "• Recurrent spontaneous lobar ICH = hallmark", options: {} },
], { x: 5.3, y: 1.22, w: 4.35, h: 1.55, fontSize: 11, color: C.navy, fontFace: "Calibri" });
// ICH injury mechanism
card(slide, 0.25, 3.0, 9.5, 1.2, "EAF4FF", C.navyLight);
slide.addText("MECHANISM OF INJURY IN ICH", {
x: 0.4, y: 3.03, w: 9.0, h: 0.3,
fontSize: 11, bold: true, color: C.navyLight, fontFace: "Calibri"
});
const mechs = [
"① Direct tissue\ndestruction",
"② Perihematomal\nedema (hours–days)",
"③ ↑ Intracranial\npressure (ICP)",
"④ Herniation\n(severe cases)",
"⑤ Hematoma\nexpansion (24–48h)",
];
mechs.forEach((m, i) => {
slide.addText(m, {
x: 0.35 + i * 1.87, y: 3.38, w: 1.75, h: 0.72,
fontSize: 10, bold: i < 2, color: i >= 3 ? C.red : C.navy,
fontFace: "Calibri", align: "center"
});
if (i < mechs.length - 1) {
slide.addText("→", {
x: 0.35 + i * 1.87 + 1.77, y: 3.6, w: 0.1, h: 0.3,
fontSize: 14, color: C.grayDark, fontFace: "Calibri", align: "center"
});
}
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: ETIOLOGY
// ════════════════════════════════════════════════════════════════
sectionSlide("04 Etiology of Ischemic Stroke", "TOAST Classification & common causes");
// ════════════════════════════════════════════════════════════════
// SLIDE 7 — ETIOLOGY
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Etiology of Ischemic Stroke — TOAST Classification");
const etiologies = [
{
title: "Large Artery Atherosclerosis",
pct: "~30%",
color: C.navy,
points: ["Carotid bifurcation plaque", "Aortic arch atherosclerosis", "Intracranial atherosclerosis", "Mechanism: artery-to-artery embolism or flow-limiting stenosis"],
},
{
title: "Cardioembolism",
pct: "~30%",
color: C.red,
points: ["Atrial fibrillation (most common)", "Mural thrombus post-MI", "Dilated cardiomyopathy", "Valvular disease (mitral stenosis, prosthetic valve)", "Infective endocarditis"],
},
{
title: "Small Vessel / Lacunar",
pct: "~25%",
color: C.tealDark,
points: ["Lipohyalinosis of <200 µm vessels", "Infarcts <1.5 cm ('lacunes')", "Classic syndromes: pure motor, pure sensory, ataxic hemiparesis", "Strong association with HTN + DM"],
},
{
title: "Other Determined Cause",
pct: "~5%",
color: C.orange,
points: ["Arterial dissection (young patients)", "Hypercoagulable states", "Vasculitis / CADASIL / Moyamoya", "Sickle cell disease"],
},
];
etiologies.forEach((e, i) => {
const x = 0.25 + (i % 2) * 4.88;
const y = i < 2 ? 0.85 : 3.02;
card(slide, x, y, 4.65, 2.0, "FFFFFF", e.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w: 4.65, h: 0.35,
fill: { color: e.color }, line: { color: e.color }
});
slide.addText(`${e.title} (${e.pct})`, {
x: x + 0.1, y, w: 4.45, h: 0.35,
fontSize: 11, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle"
});
const bulletItems = e.points.map((p, pi) => ({
text: p,
options: { bullet: true, breakLine: pi < e.points.length - 1 }
}));
slide.addText(bulletItems, {
x: x + 0.1, y: y + 0.38, w: 4.45, h: 1.55,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 8 — RISK FACTORS
// ════════════════════════════════════════════════════════════════
sectionSlide("05 Risk Factors", "Modifiable and non-modifiable");
{
const slide = contentSlide("Risk Factors for Stroke");
// Non-modifiable
card(slide, 0.25, 0.85, 4.55, 3.0, "F5F5F5", C.grayDark);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.85, w: 4.55, h: 0.38,
fill: { color: C.grayDark }, line: { color: C.grayDark }
});
slide.addText("NON-MODIFIABLE", {
x: 0.25, y: 0.85, w: 4.55, h: 0.38,
fontSize: 13, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
const nonMod = ["Age (risk doubles every decade after 55)", "Male sex", "Race (higher in Black, Hispanic populations)", "Family history / genetics", "Prior stroke or TIA"];
nonMod.forEach((item, i) => {
slide.addText(`• ${item}`, {
x: 0.4, y: 1.32 + i * 0.48, w: 4.25, h: 0.44,
fontSize: 12, color: C.navy, fontFace: "Calibri"
});
});
// Modifiable
card(slide, 5.2, 0.85, 4.55, 4.3, "FFFFFF", C.red);
slide.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 0.85, w: 4.55, h: 0.38,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("MODIFIABLE ⟵ Key to Prevention", {
x: 5.2, y: 0.85, w: 4.55, h: 0.38,
fontSize: 12, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
const modItems = [
["Hypertension", "Most important modifiable risk factor"],
["Atrial Fibrillation", "5x increased stroke risk; anticoagulation is key"],
["Diabetes mellitus", "2–3x increased risk; poor glycemic control worsens outcome"],
["Dyslipidemia", "LDL lowering with statins reduces risk"],
["Smoking", "2x risk; cessation rapidly reduces risk"],
["Carotid stenosis", "Symptomatic stenosis ≥50–70% — consider CEA"],
["Obesity & Inactivity", "Metabolic syndrome increases risk"],
];
modItems.forEach((item, i) => {
slide.addText(item[0], {
x: 5.35, y: 1.32 + i * 0.52, w: 2.1, h: 0.28,
fontSize: 11, bold: true, color: C.red, fontFace: "Calibri"
});
slide.addText(item[1], {
x: 5.35, y: 1.57 + i * 0.52, w: 4.25, h: 0.25,
fontSize: 10, color: C.grayDark, fontFace: "Calibri"
});
});
// ABCD2 note
card(slide, 0.25, 4.0, 4.55, 0.62, "EAF4FF", C.navyLight);
slide.addText("ABCD² Score: predicts short-term stroke risk after TIA (Age, BP, Clinical features, Duration, Diabetes)", {
x: 0.38, y: 4.03, w: 4.3, h: 0.56,
fontSize: 10, color: C.navyLight, fontFace: "Calibri"
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: CLINICAL FEATURES
// ════════════════════════════════════════════════════════════════
sectionSlide("06 Clinical Features", "Stroke syndromes by vascular territory");
// ════════════════════════════════════════════════════════════════
// SLIDE 9 — CLINICAL FEATURES
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Clinical Features — Vascular Territory Syndromes");
const territories = [
{
name: "MCA (Middle Cerebral A.)",
color: C.navyLight,
features: ["Contralateral hemiplegia & hemisensory loss (face > arm > leg)", "Contralateral homonymous hemianopia", "Dominant hemisphere: aphasia (Broca/Wernicke)", "Non-dominant: neglect, anosognosia", "Gaze deviation toward lesion"],
},
{
name: "ACA (Anterior Cerebral A.)",
color: C.tealDark,
features: ["Contralateral leg > arm weakness", "Urinary incontinence", "Abulia / personality change", "Grasp reflex"],
},
{
name: "PCA (Posterior Cerebral A.)",
color: C.orange,
features: ["Contralateral homonymous hemianopia", "Alexia without agraphia (dominant)", "CN III palsy with contralateral hemiplegia (Weber syndrome)", "Contralateral sensory loss (thalamic involvement)"],
},
{
name: "Vertebrobasilar",
color: C.red,
features: ["Ipsilateral CN deficits + contralateral hemiparesis (crossed signs)", "Wallenberg (lateral medullary): vertigo, Horner, ipsilateral face numbness, contralateral pain/temp loss", "Basilar artery occlusion: 'locked-in syndrome', coma, death"],
},
{
name: "Lacunar Syndromes",
color: C.grayDark,
features: ["Pure motor hemiplegia (posterior internal capsule/pons)", "Pure sensory stroke (thalamus)", "Ataxic hemiparesis", "Dysarthria-clumsy hand syndrome"],
},
];
territories.forEach((t, i) => {
const col = i < 3 ? 0 : 1;
const row = i < 3 ? i : i - 3;
const x = col === 0 ? 0.25 : 5.15;
const y = 0.85 + row * 1.47;
const h = (col === 1 && row === 1) ? 2.1 : 1.38;
card(slide, x, y, 4.65, h, "FFFFFF", t.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w: 4.65, h: 0.3,
fill: { color: t.color }, line: { color: t.color }
});
slide.addText(t.name, {
x: x + 0.1, y, w: 4.45, h: 0.3,
fontSize: 11, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle"
});
const bullets = t.features.map((f, fi) => ({
text: f,
options: { bullet: true, breakLine: fi < t.features.length - 1 }
}));
slide.addText(bullets, {
x: x + 0.1, y: y + 0.33, w: 4.45, h: h - 0.36,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 10 — HEMORRHAGIC CLINICAL FEATURES + NIHSS
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Clinical Features — Hemorrhagic Stroke & NIHSS");
// ICH vs Ischemic comparison
card(slide, 0.25, 0.85, 9.5, 1.5, "FFFFFF", C.navy);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.85, w: 9.5, h: 0.32,
fill: { color: C.navy }, line: { color: C.navy }
});
slide.addText("Clinical Clues: ICH vs. Ischemic Stroke", {
x: 0.35, y: 0.85, w: 9.3, h: 0.32,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
const rows = [
["Feature", "Ischemic Stroke", "ICH / Hemorrhagic"],
["Onset", "Maximal at onset; may remit", "Progressive over minutes–hours"],
["Headache", "Absent or mild", "Severe ('thunderclap' in SAH)"],
["Vomiting", "Uncommon", "Common"],
["Blood Pressure", "Variable", "Markedly elevated"],
["Consciousness", "Usually preserved", "Often impaired / declining LOC"],
];
rows.forEach((row, ri) => {
const y = 1.18 + ri * 0.36;
const isHeader = ri === 0;
[row[0], row[1], row[2]].forEach((cell, ci) => {
const x = ci === 0 ? 0.3 : ci === 1 ? 3.0 : 6.5;
const w = ci === 0 ? 2.65 : 3.4;
if (isHeader) {
slide.addText(cell, {
x, y, w, h: 0.32,
fontSize: 10, bold: true, color: ci === 0 ? C.navy : ci === 1 ? C.navyLight : C.red,
fontFace: "Calibri", align: "center"
});
} else {
slide.addText(cell, {
x, y, w, h: 0.33,
fontSize: 10, color: ci === 2 ? C.red : C.navy,
fontFace: "Calibri", align: ci === 0 ? "left" : "center"
});
if (ri % 2 === 0) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y, w: 9.4, h: 0.33,
fill: { color: "F0F5FF", transparency: 0 },
line: { color: "F0F5FF" }
});
slide.addText(cell, {
x, y, w, h: 0.33,
fontSize: 10, color: ci === 2 ? C.red : C.navy,
fontFace: "Calibri", align: ci === 0 ? "left" : "center"
});
}
}
});
});
// NIHSS
card(slide, 0.25, 3.4, 9.5, 1.62, "FFFFFF", C.navyLight);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 3.4, w: 9.5, h: 0.32,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText("NIH Stroke Scale (NIHSS) — Score 0–42", {
x: 0.35, y: 3.4, w: 9.3, h: 0.32,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
const nihssItems = [
["1–4", "Minor", C.green],
["5–15", "Moderate", C.orange],
["16–20", "Mod–Severe", C.redLight],
["21–42", "Severe", C.red],
];
nihssItems.forEach((n, i) => {
const x = 0.4 + i * 2.38;
slide.addText(n[0], { x, y: 3.78, w: 2.2, h: 0.42, fontSize: 22, bold: true, color: n[2], fontFace: "Calibri", align: "center" });
slide.addText(n[1], { x, y: 4.2, w: 2.2, h: 0.3, fontSize: 11, color: C.navy, fontFace: "Calibri", align: "center" });
});
slide.addText("Assesses: LOC, gaze, visual fields, facial palsy, motor (arm/leg), ataxia, sensation, language, dysarthria, extinction", {
x: 0.35, y: 4.54, w: 9.3, h: 0.38,
fontSize: 10, color: C.grayDark, fontFace: "Calibri"
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: DIAGNOSIS
// ════════════════════════════════════════════════════════════════
sectionSlide("07 Diagnosis & Imaging", "Emergency workup and neuroimaging");
// ════════════════════════════════════════════════════════════════
// SLIDE 11 — DIAGNOSIS
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Diagnosis — Emergency Workup");
// Imaging modalities
const imaging = [
{
title: "Non-contrast CT Head",
role: "FIRST-LINE — ALWAYS",
color: C.red,
points: ["Immediately identifies hemorrhage", "Free of hemorrhage → thrombolysis eligible", "Ischemic changes lag: 6–12 h for visible infarct", "Early signs: hyperdense artery sign, loss of insular ribbon, gray-white blurring"],
},
{
title: "CT Angiography (CTA)",
role: "LVO detection",
color: C.navyLight,
points: ["Identifies large vessel occlusion (LVO)", "Carotid stenosis, dissection", "Can be obtained concurrently with NCCT", "Essential for thrombectomy triage"],
},
{
title: "CT Perfusion (CTP)",
role: "Extended window (6–24h)",
color: C.tealDark,
points: ["Identifies penumbra vs. infarct core", "DAWN/DEFUSE-3 trial selection criteria", "Not routinely needed in first 6h", "Mismatch = salvageable tissue"],
},
{
title: "MRI (DWI)",
role: "Most sensitive",
color: C.orange,
points: ["DWI detects ischemia within minutes", "Best for posterior fossa/brainstem strokes", "Identifies small lacunes not seen on CT", "GRE/SWI: microbleeds (amyloid angiopathy)"],
},
];
imaging.forEach((img, i) => {
const x = 0.25 + (i % 2) * 4.88;
const y = i < 2 ? 0.85 : 3.1;
card(slide, x, y, 4.65, 2.08, "FFFFFF", img.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w: 4.65, h: 0.32,
fill: { color: img.color }, line: { color: img.color }
});
slide.addText(`${img.title} · ${img.role}`, {
x: x + 0.1, y, w: 4.45, h: 0.32,
fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
const bullets = img.points.map((p, pi) => ({
text: p,
options: { bullet: true, breakLine: pi < img.points.length - 1 }
}));
slide.addText(bullets, {
x: x + 0.1, y: y + 0.35, w: 4.45, h: 1.65,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 12 — LAB WORKUP
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Diagnosis — Laboratory & Cardiac Workup");
card(slide, 0.25, 0.85, 4.55, 3.7, "FFFFFF", C.navyLight);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.85, w: 4.55, h: 0.35,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText("IMMEDIATE LABORATORY TESTS", {
x: 0.25, y: 0.85, w: 4.55, h: 0.35,
fontSize: 12, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
const labs = [
"Glucose (fingerstick — treat hypo/hyperglycemia first)",
"CBC (thrombocytopenia, polycythemia)",
"PT / INR / aPTT (anticoagulant status, coagulopathy)",
"BMP (electrolytes, renal function)",
"Troponin (concurrent MI in 3–20%)",
"12-lead ECG (AFib, ST changes, arrhythmias)",
"Lipid panel, HbA1c",
"Blood cultures (if endocarditis suspected)",
];
labs.forEach((l, i) => {
slide.addText(`• ${l}`, {
x: 0.38, y: 1.25 + i * 0.41, w: 4.3, h: 0.38,
fontSize: 11, color: C.navy, fontFace: "Calibri"
});
});
card(slide, 5.2, 0.85, 4.55, 3.7, "FFFFFF", C.red);
slide.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 0.85, w: 4.55, h: 0.35,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("CARDIAC & VASCULAR WORKUP", {
x: 5.2, y: 0.85, w: 4.55, h: 0.35,
fontSize: 12, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
const cardiac = [
["Cardiac monitoring", "Continuous ≥48 hours to detect paroxysmal AFib"],
["Echocardiography", "Identify mural thrombus, PFO, valvular disease"],
["Holter / event monitor", "Prolonged AFib surveillance (ambulatory)"],
["Carotid Doppler / CTA", "Carotid stenosis — done before discharge in TIA"],
["MRA / CTA of vessels", "Dissection, intracranial atherosclerosis, aneurysm"],
["LP (xanthochromia)", "SAH if CT negative but clinical suspicion high"],
];
cardiac.forEach((c, i) => {
slide.addText(c[0], {
x: 5.35, y: 1.25 + i * 0.56, w: 1.9, h: 0.28,
fontSize: 11, bold: true, color: C.red, fontFace: "Calibri"
});
slide.addText(c[1], {
x: 5.35, y: 1.52 + i * 0.56, w: 4.25, h: 0.28,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
// Time is brain
card(slide, 0.25, 4.72, 9.5, 0.54, C.red, C.red);
slide.addText('⏱ "TIME IS BRAIN" — Every 15 minutes of delay to treatment = ~120 million neurons lost', {
x: 0.4, y: 4.74, w: 9.2, h: 0.48,
fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center"
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: ACUTE MANAGEMENT
// ════════════════════════════════════════════════════════════════
sectionSlide("08 Acute Management", "Ischemic Stroke");
// ════════════════════════════════════════════════════════════════
// SLIDE 13 — ACUTE ISCHEMIC GENERAL MANAGEMENT
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Acute Ischemic Stroke — General Management (ABCs)");
const mgmt = [
{ icon: "A", title: "Airway & Breathing", color: C.navyLight, items: ["Maintain O₂ sat >94%; avoid supplemental O₂ if sat normal", "Intubate if GCS ≤8 or airway at risk", "Head of bed ≥30° to prevent aspiration", "Aspiration pneumonia mortality: 15–25%"] },
{ icon: "B", title: "Blood Pressure", color: C.red, items: ["Do NOT lower BP below 220/120 mmHg (ischemic)", "If tPA eligible: maintain <185/110 mmHg before, <180/105 after", "Avoid hypotension — collateral flow depends on BP", "Preferred IV agents: labetalol, nicardipine"] },
{ icon: "G", title: "Glucose", color: C.orange, items: ["Target: 60–180 mg/dL (avoid hypo- AND hyperglycemia)", "Treat immediately if glucose <60 or >180 mg/dL", "Intensive glucose control NOT beneficial (SHINE trial)", "Hyperglycemia worsens ischemic injury"] },
{ icon: "T", title: "Temperature", color: C.tealDark, items: ["Fever worsens ischemic outcome — treat aggressively", "Target normothermia with antipyretics + surface cooling", "Mild hypothermia is neuroprotective (not routine practice)", "Identify source of fever (aspiration, UTI, DVT)"] },
];
mgmt.forEach((m, i) => {
const x = 0.25 + (i % 2) * 4.88;
const y = i < 2 ? 0.85 : 3.0;
card(slide, x, y, 4.65, 2.0, "FFFFFF", m.color);
// Icon circle
slide.addShape(pres.shapes.ELLIPSE, {
x: x + 0.12, y: y + 0.07, w: 0.42, h: 0.42,
fill: { color: m.color }, line: { color: m.color }
});
slide.addText(m.icon, {
x: x + 0.12, y: y + 0.07, w: 0.42, h: 0.42,
fontSize: 16, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle"
});
slide.addText(m.title, {
x: x + 0.62, y: y + 0.07, w: 3.9, h: 0.42,
fontSize: 13, bold: true, color: m.color, fontFace: "Calibri", valign: "middle"
});
const bullets = m.items.map((item, ii) => ({
text: item,
options: { bullet: true, breakLine: ii < m.items.length - 1 }
}));
slide.addText(bullets, {
x: x + 0.15, y: y + 0.52, w: 4.4, h: 1.42,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
// DVT note
card(slide, 0.25, 5.1, 9.5, 0.4, "EAF4FF", C.navyLight);
slide.addText("DVT Prevention: Subcutaneous heparin (unfractionated or LMWH) + Pneumatic compression stockings — start immediately", {
x: 0.38, y: 5.12, w: 9.2, h: 0.35,
fontSize: 10, color: C.navyLight, fontFace: "Calibri"
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 14 — THROMBOLYSIS
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Acute Ischemic Stroke — IV Thrombolysis (tPA)");
// tPA box
card(slide, 0.25, 0.85, 5.9, 2.15, "FFFFFF", C.red);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.85, w: 5.9, h: 0.35,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("IV ALTEPLASE (tPA) — DOSING & TIMING", {
x: 0.35, y: 0.85, w: 5.7, h: 0.35,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText([
{ text: "Dose: ", options: { bold: true } },
{ text: "0.9 mg/kg IV (max 100 mg)\n", options: {} },
{ text: "Administration: ", options: { bold: true } },
{ text: "10% as IV bolus → remaining 90% over 60 min\n", options: {} },
{ text: "Window: ", options: { bold: true } },
{ text: "≤4.5 hours from symptom onset\n", options: {} },
{ text: "BP requirement: ", options: { bold: true } },
{ text: "<185/110 mmHg BEFORE; <180/105 during/after\n", options: {} },
{ text: "Goal door-to-needle: ", options: { bold: true } },
{ text: "≤60 min (target ≤45 min)\n", options: {} },
{ text: "Risk of symptomatic ICH: ", options: { bold: true } },
{ text: "2–7%", options: {} },
], { x: 0.38, y: 1.23, w: 5.65, h: 1.7, fontSize: 11, color: C.navy, fontFace: "Calibri" });
// Tenecteplase note
card(slide, 6.4, 0.85, 3.35, 2.15, "FFF8EC", C.orange);
slide.addShape(pres.shapes.RECTANGLE, {
x: 6.4, y: 0.85, w: 3.35, h: 0.35,
fill: { color: C.orange }, line: { color: C.orange }
});
slide.addText("TENECTEPLASE", {
x: 6.5, y: 0.85, w: 3.15, h: 0.35,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText("• Single IV bolus (0.25 mg/kg, max 25 mg)\n• Equal or superior efficacy in some trials\n• Simpler administration\n• Increasingly preferred in LVO patients prior to thrombectomy", {
x: 6.5, y: 1.23, w: 3.15, h: 1.7,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
// Contraindications
card(slide, 0.25, 3.1, 5.9, 2.15, "FFF0EE", C.red);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 3.1, w: 5.9, h: 0.32,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("KEY CONTRAINDICATIONS TO tPA", {
x: 0.35, y: 3.1, w: 5.7, h: 0.32,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
const contra = [
"Hemorrhage on CT / active internal bleeding",
"BP >185/110 mmHg (that cannot be controlled)",
"Recent major surgery or trauma (<3 months)",
"Prior ICH or structural CNS lesion",
"INR >1.7 / platelet count <100,000",
"Current anticoagulation (DOAC within 48h)",
"Blood glucose <50 or >400 mg/dL",
];
contra.forEach((c, i) => {
slide.addText(`✗ ${c}`, {
x: 0.38, y: 3.47 + i * 0.27, w: 5.65, h: 0.26,
fontSize: 10, color: C.red, fontFace: "Calibri"
});
});
// Mild/disabling note
card(slide, 6.4, 3.1, 3.35, 2.15, "EAF4FF", C.navyLight);
slide.addShape(pres.shapes.RECTANGLE, {
x: 6.4, y: 3.1, w: 3.35, h: 0.32,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText("SPECIAL CASES", {
x: 6.5, y: 3.1, w: 3.15, h: 0.32,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText("• Mild non-disabling: tPA NOT recommended\n• Mild DISABLING: tPA recommended within 4.5h\n• Extended window (4.5–9h): MRI DWI/FLAIR mismatch criterion\n• Wake-up stroke: treat by perfusion imaging criteria", {
x: 6.5, y: 3.46, w: 3.15, h: 1.72,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 15 — MECHANICAL THROMBECTOMY
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Acute Ischemic Stroke — Mechanical Thrombectomy (EVT)");
// Main criteria box
card(slide, 0.25, 0.85, 9.5, 1.6, "FFFFFF", C.navyLight);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.85, w: 9.5, h: 0.35,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText("ENDOVASCULAR THROMBECTOMY (EVT) — Target Vessels & Time Windows", {
x: 0.35, y: 0.85, w: 9.3, h: 0.35,
fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
const windows = [
{ time: "0–6 h", label: "Standard window", desc: "IV tPA first (if eligible)\n→ CTA → EVT if ICA/M1-M2/basilar occlusion", color: C.green },
{ time: "6–24 h", label: "Extended window", desc: "CTA/CTP perfusion mismatch\nDAWN or DEFUSE-3 criteria\ntPA NOT given", color: C.orange },
];
windows.forEach((w, i) => {
const x = 0.4 + i * 4.8;
slide.addShape(pres.shapes.RECTANGLE, {
x, y: 1.25, w: 0.75, h: 0.75,
fill: { color: w.color }, line: { color: w.color }
});
slide.addText(w.time, {
x, y: 1.25, w: 0.75, h: 0.75,
fontSize: 10, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle"
});
slide.addText(w.label, {
x: x + 0.85, y: 1.25, w: 3.7, h: 0.3,
fontSize: 12, bold: true, color: w.color, fontFace: "Calibri"
});
slide.addText(w.desc, {
x: x + 0.85, y: 1.55, w: 3.7, h: 0.65,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
// Key points
const evtPoints = [
{ title: "Target Vessels", body: "ICA (terminus), M1 or M2 MCA, Basilar artery, Vertebral artery" },
{ title: "Technical Success", body: "mTICI ≥2b reperfusion is the goal; stent retrievers + aspiration catheters" },
{ title: "Combine with tPA", body: "Bridging tPA + EVT is recommended if both eligible; do NOT delay tPA for CTA" },
{ title: "Outcomes", body: "NNT ~2.6 for functional independence in LVO; most impactful treatment for large strokes" },
{ title: "Posterior Circulation", body: "Basilar artery thrombosis: EVT up to 24h (high mortality without treatment)" },
{ title: "Time Goal", body: "Door-to-groin puncture ≤60 min; every 20 min delay = 1% less functional independence" },
];
evtPoints.forEach((p, i) => {
const x = 0.25 + (i % 3) * 3.25;
const y = 2.6 + Math.floor(i / 3) * 1.22;
card(slide, x, y, 3.1, 1.1, "FFFFFF", C.navyLight);
slide.addText(p.title, {
x: x + 0.12, y: y + 0.08, w: 2.86, h: 0.3,
fontSize: 11, bold: true, color: C.navyLight, fontFace: "Calibri"
});
slide.addText(p.body, {
x: x + 0.12, y: y + 0.38, w: 2.86, h: 0.65,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: HEMORRHAGIC MANAGEMENT
// ════════════════════════════════════════════════════════════════
sectionSlide("09 Acute Management", "Hemorrhagic Stroke (ICH & SAH)");
// ════════════════════════════════════════════════════════════════
// SLIDE 16 — ICH MANAGEMENT
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Acute Hemorrhagic Stroke — ICH Management");
const ichSections = [
{
title: "Blood Pressure Control",
color: C.red,
body: "• SBP 150–220: acute lowering to <140 mmHg within 1 hour is safe & may limit hematoma expansion\n• SBP >220: use continuous IV infusion (nicardipine, labetalol)\n• Avoid SBP drops >25% in first hour",
},
{
title: "Anticoagulation Reversal",
color: C.orange,
body: "• Warfarin: PCC (prothrombin complex concentrate) + Vit K — preferred over FFP\n (faster INR correction, lower volume, lower infection risk)\n• Dabigatran: Idarucizumab (Praxbind) 5g IV\n• Xa inhibitors (apixaban/rivaroxaban): Andexanet alfa\n• Heparin: Protamine sulfate",
},
{
title: "ICP Management",
color: C.navyLight,
body: "• Head of bed 30°\n• Osmotic therapy: Mannitol (0.25–1 g/kg) or Hypertonic saline (23.4%)\n• Hyperventilation (target pCO₂ 30–35): temporizing measure only\n• EVD (external ventricular drain) for hydrocephalus\n• Avoid hypotonic fluids",
},
{
title: "Surgical Intervention",
color: C.tealDark,
body: "• Cerebellar hemorrhage >3 cm with brainstem compression or hydrocephalus → urgent evacuation\n• Supratentorial ICH: surgery controversial; selected patients with lobar hemorrhage\n• Decompressive craniectomy for malignant MCA infarction (large ischemic +edema)\n• SAH: surgical clipping or endovascular coiling of ruptured aneurysm",
},
];
ichSections.forEach((s, i) => {
const x = 0.25 + (i % 2) * 4.88;
const y = i < 2 ? 0.85 : 3.0;
card(slide, x, y, 4.65, 2.05, "FFFFFF", s.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w: 4.65, h: 0.32,
fill: { color: s.color }, line: { color: s.color }
});
slide.addText(s.title, {
x: x + 0.1, y, w: 4.45, h: 0.32,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText(s.body, {
x: x + 0.12, y: y + 0.35, w: 4.4, h: 1.65,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
// Key contraindication
card(slide, 0.25, 5.12, 9.5, 0.42, "FFF0EE", C.red);
slide.addText("✗ NO tPA / antithrombotic / anticoagulant in hemorrhagic stroke. Reversal agents are the priority.", {
x: 0.38, y: 5.14, w: 9.2, h: 0.36,
fontSize: 11, bold: true, color: C.red, fontFace: "Calibri"
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: SECONDARY PREVENTION
// ════════════════════════════════════════════════════════════════
sectionSlide("10 Secondary Prevention", "Preventing recurrent stroke");
// ════════════════════════════════════════════════════════════════
// SLIDE 17 — SECONDARY PREVENTION
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Secondary Prevention of Stroke");
const prevSections = [
{
title: "Antiplatelet Therapy",
color: C.navyLight,
sub: "(Non-cardioembolic ischemic stroke)",
body: [
"Aspirin 75–100 mg/day — first-line",
"Dual antiplatelet (aspirin + clopidogrel or ticagrelor) for 21–30 days after minor stroke/TIA, then aspirin alone",
"Clopidogrel: 75 mg/day (alternative to aspirin)",
"Ticagrelor: not affected by CYP2C19 polymorphisms (advantage over clopidogrel)",
],
},
{
title: "Anticoagulation",
color: C.red,
sub: "(Cardioembolic — Atrial Fibrillation)",
body: [
"DOACs preferred over warfarin (lower ICH risk, no INR monitoring)",
"Apixaban 5 mg BID (2.5 mg BID if impaired renal function)",
"Rivaroxaban, dabigatran, edoxaban also used",
"Timing: start 2–14 days post-stroke (balance hemorrhagic transformation risk)",
"Warfarin (INR 2–3) if DOAC contraindicated",
],
},
{
title: "BP & Lipid Management",
color: C.tealDark,
sub: "(All ischemic stroke patients)",
body: [
"BP target: <130/80 mmHg (restart antihypertensives 24–48h post-stroke)",
"High-intensity statin therapy regardless of LDL level",
"Statin reduces recurrent stroke by ~25–35%",
"Ezetimibe add-on if LDL target not reached",
],
},
{
title: "Carotid Revascularization",
color: C.orange,
sub: "(Symptomatic carotid stenosis)",
body: [
"Symptomatic stenosis 50–70%: CEA + medical therapy (NNT = 6)",
"Symptomatic stenosis ≥70%: CEA strongly recommended, ideally within 2 weeks",
"Carotid artery stenting (CAS): alternative in high surgical risk patients",
"Intracranial stenting: reserved for recurrent stroke on optimal medical therapy",
],
},
];
prevSections.forEach((s, i) => {
const x = 0.25 + (i % 2) * 4.88;
const y = i < 2 ? 0.85 : 3.05;
card(slide, x, y, 4.65, 2.05, "FFFFFF", s.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w: 4.65, h: 0.35,
fill: { color: s.color }, line: { color: s.color }
});
slide.addText(s.title, {
x: x + 0.1, y, w: 4.45, h: 0.35,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText(s.sub, {
x: x + 0.12, y: y + 0.38, w: 4.4, h: 0.25,
fontSize: 9, color: s.color, fontFace: "Calibri", italic: true
});
const bullets = s.body.map((item, ii) => ({
text: item,
options: { bullet: true, breakLine: ii < s.body.length - 1 }
}));
slide.addText(bullets, {
x: x + 0.12, y: y + 0.62, w: 4.4, h: 1.35,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
});
// Lifestyle
card(slide, 0.25, 5.15, 9.5, 0.38, "EAF4FF", C.navyLight);
slide.addText("Lifestyle: Smoking cessation • BP monitoring at home • Regular physical activity • Mediterranean diet • Moderate alcohol (<2 units/day) • Weight management",
{ x: 0.38, y: 5.17, w: 9.2, h: 0.32, fontSize: 10, color: C.navyLight, fontFace: "Calibri", align: "center" }
);
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: COMPLICATIONS
// ════════════════════════════════════════════════════════════════
sectionSlide("11 Complications", "Neurological and systemic");
// ════════════════════════════════════════════════════════════════
// SLIDE 18 — COMPLICATIONS
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Complications of Stroke");
const comps = [
{
title: "Cerebral Edema",
color: C.red,
body: "Peaks day 2–3 (up to 10 days). Cytotoxic then vasogenic. Largest risk in young patients and large MCA infarcts. May cause herniation. Treat: mannitol, hypertonic saline; hemicraniectomy for malignant MCA infarction.",
},
{
title: "Hemorrhagic Transformation",
color: C.orange,
body: "Ischemic brain reperfusion can lead to petechial or frank hemorrhage. Risk increased with tPA, large infarcts, early anticoagulation. Symptomatic HT with tPA = 2–7%. Monitor with 24h CT post-tPA.",
},
{
title: "Aspiration Pneumonia",
color: C.navyLight,
body: "Mortality 15–25%. Common due to dysphagia. Documented in >1/3 of brainstem strokes, 1/4 of bilateral hemispheric, 1/10 of unilateral strokes. Mandatory: swallow screen before oral intake; NPO until speech therapy evaluation.",
},
{
title: "Post-Stroke Seizures & Epilepsy",
color: C.tealDark,
body: "Most common cause of new seizures in elderly. Early seizures (<2 weeks): don't require long-term AED. Chronic epilepsy risk: 16–17x increased. ~30% of early seizures → late epilepsy. Higher risk with cortical and hemorrhagic strokes.",
},
{
title: "DVT & Pulmonary Embolism",
color: C.grayDark,
body: "Bedridden patients at high risk. Pneumatic compression stockings proven beneficial. Subcutaneous LMWH or UFH are safe. Avoid therapeutic anticoagulation acutely unless PE confirmed.",
},
{
title: "Post-Stroke Depression",
color: C.navy,
body: "Affects ~30% of patients. Worsens rehabilitation outcomes and mortality. Screen all patients. SSRIs (escitalopram, fluoxetine) are first-line treatment. Early mobilization and psychological support are protective.",
},
];
comps.forEach((c, i) => {
const x = 0.25 + (i % 3) * 3.25;
const y = i < 3 ? 0.85 : 3.1;
card(slide, x, y, 3.1, 2.1, "FFFFFF", c.color);
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w: 3.1, h: 0.3,
fill: { color: c.color }, line: { color: c.color }
});
slide.addText(c.title, {
x: x + 0.08, y, w: 2.95, h: 0.3,
fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText(c.body, {
x: x + 0.08, y: y + 0.33, w: 2.95, h: 1.72,
fontSize: 9.5, color: C.navy, fontFace: "Calibri"
});
});
}
// ════════════════════════════════════════════════════════════════
// SECTION DIVIDER: REHABILITATION
// ════════════════════════════════════════════════════════════════
sectionSlide("12 Rehabilitation & Prognosis", "Recovery, neuroplasticity & outcome");
// ════════════════════════════════════════════════════════════════
// SLIDE 19 — REHABILITATION
// ════════════════════════════════════════════════════════════════
{
const slide = contentSlide("Rehabilitation & Prognosis");
// Stroke unit benefit
card(slide, 0.25, 0.85, 9.5, 0.95, "EAF4FF", C.navyLight);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 0.85, w: 9.5, h: 0.32,
fill: { color: C.navyLight }, line: { color: C.navyLight }
});
slide.addText("STROKE UNIT CARE — Evidence Base", {
x: 0.35, y: 0.85, w: 9.3, h: 0.32,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText("Dedicated stroke unit care vs. general ward: Lower mortality • Shorter hospital stay • Reduced discharge to nursing home • Lower rate of complications",
{ x: 0.38, y: 1.18, w: 9.2, h: 0.55, fontSize: 11, color: C.navy, fontFace: "Calibri" }
);
// Rehab disciplines
const rehabItems = [
{ icon: "PT", title: "Physical Therapy", body: "Motor recovery, balance, gait retraining\nEarly mobilization within 24–48h if hemodynamically stable" },
{ icon: "OT", title: "Occupational Therapy", body: "ADL retraining, fine motor coordination\nHome modifications, adaptive equipment" },
{ icon: "ST", title: "Speech Therapy", body: "Aphasia therapy, dysphagia evaluation (MBSS)\nCognitive-communication rehabilitation" },
{ icon: "Psy", title: "Psychological Support", body: "Screen for post-stroke depression (PHQ-9)\nSSRI therapy, cognitive rehabilitation" },
];
rehabItems.forEach((r, i) => {
const x = 0.25 + i * 2.4;
card(slide, x, 2.0, 2.2, 1.85, "FFFFFF", C.tealDark);
slide.addShape(pres.shapes.ELLIPSE, {
x: x + 0.72, y: 2.08, w: 0.72, h: 0.72,
fill: { color: C.tealDark }, line: { color: C.tealDark }
});
slide.addText(r.icon, {
x: x + 0.72, y: 2.08, w: 0.72, h: 0.72,
fontSize: 13, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle"
});
slide.addText(r.title, {
x, y: 2.83, w: 2.2, h: 0.3,
fontSize: 11, bold: true, color: C.tealDark, fontFace: "Calibri", align: "center"
});
slide.addText(r.body, {
x: x + 0.1, y: 3.15, w: 2.0, h: 0.65,
fontSize: 9.5, color: C.navy, fontFace: "Calibri", align: "center"
});
});
// Neuroplasticity
card(slide, 0.25, 4.0, 4.55, 1.25, "FFFFFF", C.orange);
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.25, y: 4.0, w: 4.55, h: 0.3,
fill: { color: C.orange }, line: { color: C.orange }
});
slide.addText("NEUROPLASTICITY", {
x: 0.35, y: 4.0, w: 4.35, h: 0.3,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText("Greatest recovery window: first 3–6 months post-stroke. Axonal sprouting, synaptic remodeling, and cortical remapping support functional recovery. Constraint-induced movement therapy (CIMT) exploits neuroplasticity.", {
x: 0.38, y: 4.33, w: 4.3, h: 0.85,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
// Prognosis factors
card(slide, 5.2, 4.0, 4.55, 1.25, "FFFFFF", C.red);
slide.addShape(pres.shapes.RECTANGLE, {
x: 5.2, y: 4.0, w: 4.55, h: 0.3,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("POOR PROGNOSIS FACTORS", {
x: 5.3, y: 4.0, w: 4.35, h: 0.3,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle"
});
slide.addText("High NIHSS • Large infarct volume • Advanced age • Fever / hyperglycemia on admission • Concurrent cardiac failure • Hemorrhagic transformation • Delayed treatment", {
x: 5.33, y: 4.33, w: 4.3, h: 0.85,
fontSize: 10, color: C.navy, fontFace: "Calibri"
});
}
// ════════════════════════════════════════════════════════════════
// SLIDE 20 — SUMMARY / CONCLUSION
// ════════════════════════════════════════════════════════════════
{
const slide = pres.addSlide();
darkBg(slide);
slide.addShape(pres.shapes.RECTANGLE, {
x: 6.5, y: -0.5, w: 4, h: 7,
fill: { color: C.navyMid }, line: { color: C.navyMid },
rotate: 12
});
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 4.8, w: 10, h: 0.825,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText("KEY TAKEAWAYS", {
x: 0.5, y: 0.25, w: 8, h: 0.55,
fontSize: 30, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 4
});
const takeaways = [
["Time is brain", "Every minute without reperfusion = ~2 million neurons lost"],
["Non-contrast CT first", "Always rule out hemorrhage before thrombolysis or anticoagulation"],
["tPA within 4.5 h", "0.9 mg/kg IV; door-to-needle goal ≤60 min (target ≤45 min)"],
["EVT for LVO", "Up to 24 h with perfusion imaging; most impactful treatment for large strokes"],
["ICH: reverse & control", "PCC for warfarin reversal; BP <140 mmHg within 1 h"],
["Secondary prevention", "AFib → anticoagulate; carotid stenosis → CEA; all patients → statins + BP control"],
["Stroke unit care", "Reduces mortality, complications, and disability — always admit to dedicated unit"],
];
takeaways.forEach((t, i) => {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.5, y: 0.9 + i * 0.52, w: 0.06, h: 0.35,
fill: { color: C.red }, line: { color: C.red }
});
slide.addText(t[0] + ": ", {
x: 0.66, y: 0.9 + i * 0.52, w: 2.1, h: 0.35,
fontSize: 12, bold: true, color: C.teal,
fontFace: "Calibri", valign: "middle"
});
slide.addText(t[1], {
x: 2.76, y: 0.9 + i * 0.52, w: 5.8, h: 0.35,
fontSize: 12, color: C.white,
fontFace: "Calibri", valign: "middle"
});
});
slide.addText("Harrison's 22e | Bradley & Daroff's Neurology | Rosen's Emergency Medicine 9e | Adams & Victor's 12e", {
x: 0.3, y: 4.83, w: 9.4, h: 0.75,
fontSize: 10, color: C.white,
fontFace: "Calibri", valign: "middle", align: "center"
});
}
// ════════════════════════════════════════════════════════════════
// WRITE FILE
// ════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/stroke-ppt/Stroke_Comprehensive.pptx" })
.then(() => console.log("SUCCESS: /home/daytona/workspace/stroke-ppt/Stroke_Comprehensive.pptx"))
.catch(err => { console.error("ERROR:", err); process.exit(1); });
cd /home/daytona/workspace/stroke-ppt && node stroke.js 2>&1
node -e "const p = require('pptxgenjs'); const pr = new p(); console.log(Object.keys(pr.shapes).filter(k => k.toLowerCase().includes('ell') || k.toLowerCase().includes('circ')))"
sed -i 's/pres\.shapes\.ELLIPSE/pres.shapes.ROUNDED_RECTANGLE/g' /home/daytona/workspace/stroke-ppt/stroke.js && echo "done"
~/stroke-ppt/stroke.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/stroke-ppt/stroke.js'
"ELLIPSE" in ~/stroke-ppt
"ELLIPSE" in ~/stroke-ppt
~/stroke-ppt/stroke.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/stroke-ppt/stroke.js'
cd /home/daytona/workspace/stroke-ppt && node stroke.js 2>&1
Stroke Comprehensive
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title Slide |
| 2 | Table of Contents (12 topics) |
| 3 | Definition & Epidemiology (stats cards + TIA note) |
| 4 | Classification - Ischemic vs. Hemorrhagic |
| 5 | Pathophysiology - Ischemic (CBF thresholds, penumbra, ischemic cascade) |
| 6 | Pathophysiology - Hemorrhagic (hypertensive vasculopathy, CAA, injury mechanism) |
| 7 | Etiology - TOAST Classification |
| 8 | Risk Factors (modifiable vs. non-modifiable) |
| 9 | Clinical Features - Vascular Territory Syndromes |
| 10 | Clinical Features - ICH vs. Ischemic comparison + NIHSS table |
| 11 | Diagnosis - Imaging Modalities (CT, CTA, CTP, MRI/DWI) |
| 12 | Diagnosis - Labs & Cardiac Workup + "Time is Brain" banner |
| 13 | Acute Management - General (ABCs: Airway, BP, Glucose, Temp) |
| 14 | Acute Management - IV Thrombolysis (tPA dosing, contraindications, tenecteplase) |
| 15 | Acute Management - Mechanical Thrombectomy (time windows, EVT criteria) |
| 16 | Acute Management - Hemorrhagic Stroke (BP control, reversal agents, surgery) |
| 17 | Secondary Prevention (antiplatelet, anticoagulation, carotid CEA, statins) |
| 18 | Complications (edema, hemorrhagic transformation, aspiration, seizures, DVT, depression) |
| 19 | Rehabilitation & Prognosis (PT/OT/ST, neuroplasticity, prognosis factors) |
| 20 | Key Takeaways (summary slide) |