Make ppt on malaria
malaria Plasmodium life cycle diagram
malaria blood smear Plasmodium falciparum ring form
ls /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace/
mkdir -p /home/daytona/workspace/malaria-ppt && ls /home/daytona/workspace/malaria-ppt
~/malaria-ppt/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch images
const imageUrls = [
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_973c8c3fd48c379aa4cf2d20c0083eff10daacd03458edc6d6838f8a3c86e51b.jpg",
"https://cdn.orris.care/cdss_images/HARRISON_1763035608729_b2db38ac-83f1-4ee5-bf66-674ec93ae609.png",
"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ab33cc98baff0108d0fca990f4eef9afb43d7608a4f48ff6b0877be31f958910.jpg"
];
let imgs = [];
try {
const result = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`,
{ maxBuffer: 50 * 1024 * 1024 }
).toString();
imgs = JSON.parse(result);
} catch(e) {
console.error("Image fetch error:", e.message);
imgs = imageUrls.map(() => ({ base64: null, error: "fetch failed" }));
}
// ── Color palette ──────────────────────────────────────────────
const DARK_BG = "0D1B2A"; // deep navy
const MID_BG = "132437"; // slightly lighter navy
const ACCENT1 = "E63946"; // vivid red (malaria / urgency)
const ACCENT2 = "F4A261"; // warm amber
const WHITE = "FFFFFF";
const LIGHT_GRY = "B0C4DE";
const SUBTITLE = "90B4CE";
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Malaria – Clinical Overview";
pres.author = "Orris Medical";
// ── Helper: full-width dark slide header strip ──────────────────
function addHeader(slide, text, accent = ACCENT1) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.85,
fill: { color: accent }, line: { color: accent }
});
slide.addText(text, {
x: 0, y: 0, w: 10, h: 0.85,
fontSize: 22, bold: true, color: WHITE,
align: "center", valign: "middle", margin: 0
});
}
// ── Helper: section pill label ──────────────────────────────────
function addPill(slide, label, x, y, color = ACCENT1) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w: 1.8, h: 0.32,
fill: { color: color }, line: { color: color },
rectRadius: 0.08
});
slide.addText(label, {
x, y, w: 1.8, h: 0.32,
fontSize: 10, bold: true, color: WHITE,
align: "center", valign: "middle", margin: 0
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 1 – Title
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
// Red diagonal accent bar
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.28, h: 5.625,
fill: { color: ACCENT1 }, line: { color: ACCENT1 }
});
// Title
s.addText("MALARIA", {
x: 0.55, y: 1.4, w: 9.1, h: 1.5,
fontSize: 68, bold: true, color: WHITE,
align: "left", charSpacing: 8
});
// Red underline
s.addShape(pres.ShapeType.rect, {
x: 0.55, y: 3.0, w: 4.5, h: 0.07,
fill: { color: ACCENT1 }, line: { color: ACCENT1 }
});
// Subtitle
s.addText("A Clinical Overview for Medical Students & Clinicians", {
x: 0.55, y: 3.2, w: 7.5, h: 0.55,
fontSize: 18, color: SUBTITLE, italic: true, align: "left"
});
// Bottom tag
s.addText("Sources: Harrison's 22E · Rosen's Emergency Medicine · Goldman-Cecil Medicine", {
x: 0.55, y: 5.1, w: 9, h: 0.35,
fontSize: 9, color: LIGHT_GRY, align: "left"
});
// Decorative circles
s.addShape(pres.ShapeType.ellipse, {
x: 7.5, y: 0.2, w: 3.2, h: 3.2,
fill: { color: ACCENT1, transparency: 85 },
line: { color: ACCENT1, transparency: 60 }
});
s.addShape(pres.ShapeType.ellipse, {
x: 8.2, y: 2.5, w: 2.0, h: 2.0,
fill: { color: ACCENT2, transparency: 80 },
line: { color: ACCENT2, transparency: 60 }
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 2 – Epidemiology & Burden
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "EPIDEMIOLOGY & GLOBAL BURDEN", ACCENT1);
// Stat cards row 1
const stats = [
{ val: ">249 M", lbl: "Clinical cases\nannually (WHO 2022)" },
{ val: "608,000", lbl: "Deaths per year\n(mostly children)" },
{ val: ">90%", lbl: "Deaths in\nSub-Saharan Africa" },
{ val: "41%", lbl: "World population\nat risk" },
];
stats.forEach((st, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.ShapeType.rect, {
x, y: 1.05, w: 2.1, h: 1.45,
fill: { color: MID_BG }, line: { color: ACCENT1, pt: 1.5 }
});
s.addText(st.val, {
x, y: 1.05, w: 2.1, h: 0.7,
fontSize: 24, bold: true, color: ACCENT1,
align: "center", valign: "bottom", margin: 0
});
s.addText(st.lbl, {
x, y: 1.75, w: 2.1, h: 0.75,
fontSize: 10.5, color: LIGHT_GRY,
align: "center", valign: "top", margin: 4
});
});
// Key facts bullets
s.addText("Key Facts", {
x: 0.35, y: 2.7, w: 9, h: 0.38,
fontSize: 14, bold: true, color: ACCENT2
});
const facts = [
"Caused by Plasmodium spp. — transmitted by female Anopheles mosquito",
"P. falciparum: most lethal species; responsible for majority of deaths",
"P. vivax: most geographically widespread; relapsing due to hypnozoites",
"Endemic in Africa, South-East Asia, Americas, Middle East, Western Pacific",
"High-risk groups: children <5 years, pregnant women, non-immune travellers",
];
s.addText(facts.map((f, i) => ({
text: f,
options: { bullet: { code: "25B6", color: ACCENT1 }, breakLine: i < facts.length - 1, color: WHITE, fontSize: 12.5, paraSpaceAfter: 4 }
})), { x: 0.35, y: 3.1, w: 9.3, h: 2.3 });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 3 – Life Cycle (with image)
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "PLASMODIUM LIFE CYCLE", ACCENT1);
// Image on right
const lcImg = imgs[0];
if (lcImg && !lcImg.error && lcImg.base64) {
s.addImage({ data: lcImg.base64, x: 5.45, y: 0.95, w: 4.35, h: 4.45 });
}
// Left side stages
const stages = [
{ title: "① Mosquito Bite", desc: "Sporozoites injected into bloodstream by infected female Anopheles", color: ACCENT1 },
{ title: "② Liver Stage (Exo-erythrocytic)", desc: "Sporozoites infect hepatocytes → schizont → merozoites released\nP. vivax / P. ovale: hypnozoites persist → relapse", color: ACCENT2 },
{ title: "③ Blood Stage (Erythrocytic)", desc: "Merozoites invade RBCs → ring → trophozoite → schizont → lysis\nSymptoms occur during RBC rupture (fever paroxysms)", color: ACCENT1 },
{ title: "④ Sexual Stage → Transmission", desc: "Some merozoites → male/female gametocytes\nMosquito ingests gametocytes → sporogony → sporozoites in salivary glands", color: ACCENT2 },
];
let yPos = 1.05;
stages.forEach((st) => {
s.addShape(pres.ShapeType.rect, {
x: 0.2, y: yPos, w: 5.0, h: 0.96,
fill: { color: MID_BG }, line: { color: st.color, pt: 1.5 }
});
s.addText(st.title, {
x: 0.28, y: yPos + 0.04, w: 4.85, h: 0.28,
fontSize: 11.5, bold: true, color: st.color, margin: 0
});
s.addText(st.desc, {
x: 0.28, y: yPos + 0.33, w: 4.85, h: 0.57,
fontSize: 9.5, color: WHITE, margin: 0
});
yPos += 1.05;
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 4 – Pathophysiology
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "PATHOPHYSIOLOGY", ACCENT1);
// Two column layout
const left = [
{ h: "Cytoadherence & Sequestration", b: "P. falciparum-infected RBCs express PfEMP1 → bind ICAM-1, CD36 on endothelium → sequestration in microvasculature → ischemia & organ dysfunction" },
{ h: "Rosetting", b: "Infected RBCs bind uninfected RBCs forming rosettes → microvascular obstruction, especially in cerebral vessels" },
{ h: "Haemolysis & Anaemia", b: "Cyclical RBC lysis releases merozoites, haemozoin (malarial pigment) & pyrogenic cytokines (TNF, IL-1, IL-6) → fever paroxysms every 48 h (P. falciparum/vivax) or 72 h (P. malariae)" },
];
const right = [
{ h: "Cerebral Malaria", b: "Sequestration + rosetting → occlusion of cerebral capillaries → coma, seizures. Direct BBB disruption by PfEMP1 & pro-inflammatory cytokines (TNF, CXCL10)" },
{ h: "Metabolic Derangements", b: "Hypoglycaemia (parasite glucose consumption + quinine-stimulated insulin), lactic acidosis, hyponatraemia, thrombocytopaenia" },
{ h: "Immune Evasion", b: "Antigenic variation of PfEMP1, intracellular parasite hiding, rosetting, suppression of dendritic-cell function" },
];
let y = 1.05;
left.forEach(item => {
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 4.7, h: 1.26, fill: { color: MID_BG }, line: { color: ACCENT1, pt: 1 } });
s.addText(item.h, { x: 0.3, y: y + 0.05, w: 4.5, h: 0.3, fontSize: 11, bold: true, color: ACCENT1, margin: 0 });
s.addText(item.b, { x: 0.3, y: y + 0.37, w: 4.5, h: 0.82, fontSize: 9.5, color: WHITE, margin: 0 });
y += 1.36;
});
y = 1.05;
right.forEach(item => {
s.addShape(pres.ShapeType.rect, { x: 5.1, y, w: 4.7, h: 1.26, fill: { color: MID_BG }, line: { color: ACCENT2, pt: 1 } });
s.addText(item.h, { x: 5.2, y: y + 0.05, w: 4.5, h: 0.3, fontSize: 11, bold: true, color: ACCENT2, margin: 0 });
s.addText(item.b, { x: 5.2, y: y + 0.37, w: 4.5, h: 0.82, fontSize: 9.5, color: WHITE, margin: 0 });
y += 1.36;
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 5 – Clinical Features
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "CLINICAL FEATURES", ACCENT1);
// Uncomplicated box
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.0, w: 4.55, h: 4.4, fill: { color: MID_BG }, line: { color: ACCENT2, pt: 1.5 } });
s.addText("UNCOMPLICATED MALARIA", { x: 0.3, y: 1.05, w: 4.35, h: 0.38, fontSize: 13, bold: true, color: ACCENT2, margin: 0 });
const uncx = [
"• Incubation: 7–30 days",
"• Prodrome: malaise, myalgia, headache",
"• Fever: 37.5–41°C — initially continuous,\n later classic tertian/quartan paroxysms",
"• Paroxysm: chills/rigors → spiking fever → drenching sweat",
"• Splenomegaly, mild anaemia, nausea, vomiting",
"• Thrombocytopaenia common (plt ~105/μL)",
];
s.addText(uncx.join("\n"), {
x: 0.3, y: 1.5, w: 4.35, h: 2.8,
fontSize: 11, color: WHITE, valign: "top", margin: 4
});
// Severe malaria box
s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.0, w: 4.8, h: 4.4, fill: { color: MID_BG }, line: { color: ACCENT1, pt: 1.5 } });
s.addText("SEVERE MALARIA (P. falciparum)", { x: 5.1, y: 1.05, w: 4.6, h: 0.38, fontSize: 13, bold: true, color: ACCENT1, margin: 0 });
const sevx = [
"• Cerebral malaria: impaired consciousness, seizures, coma",
"• Severe anaemia (Hb <7 g/dL in adults, <5 in children)",
"• Acute pulmonary oedema / ARDS",
"• Acute kidney injury (blackwater fever in severe haemolysis)",
"• Hypoglycaemia (<2.2 mmol/L)",
"• Circulatory collapse / algid malaria",
"• Spontaneous bleeding / DIC",
"• Hyperparasitaemia: >5% parasitised RBCs",
];
s.addText(sevx.map((t, i) => ({
text: t,
options: { breakLine: i < sevx.length - 1, color: WHITE, fontSize: 10.5, paraSpaceAfter: 3 }
})), { x: 5.1, y: 1.5, w: 4.6, h: 2.8 });
// Warning banner
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 5.05, w: 9.6, h: 0.42, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });
s.addText("⚠ Falciparum malaria with ANY feature of severity = MEDICAL EMERGENCY — initiate IV artesunate immediately", {
x: 0.2, y: 5.05, w: 9.6, h: 0.42,
fontSize: 10.5, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 6 – Species Comparison
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "PLASMODIUM SPECIES — CLINICAL COMPARISON", ACCENT1);
const rows = [
["Feature", "P. falciparum", "P. vivax", "P. ovale", "P. malariae", "P. knowlesi"],
["Fever cycle", "Irregular/36–48 h", "Tertian (48 h)", "Tertian (48 h)", "Quartan (72 h)", "Daily (24 h)"],
["Relapse\n(hypnozoite)", "No", "Yes", "Yes", "No", "No"],
["Severity", "Most lethal", "Moderate", "Mild", "Mild/NS", "Can be severe"],
["RBC preference", "All ages", "Reticulocytes", "Reticulocytes", "Older RBCs", "All ages"],
["Chloroquine\nresistance", "Widespread", "Emerging", "Rare", "Rare", "Partial"],
["Diagnostic\nfeature", "Banana gametocytes\nMultiple rings/RBC", "Schüffner's dots,\namoeboid forms", "Schüffner's dots,\noval/fimbriated RBC", "Band trophozoite", "Very small ring\nforms"],
];
const colW = [1.85, 1.65, 1.65, 1.6, 1.6, 1.45];
const colX = [0.1];
colW.forEach((w, i) => { if (i < colW.length - 1) colX.push(colX[i] + colW[i]); });
const rowH = 0.6;
const startY = 0.92;
rows.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isHeader = ri === 0;
const isFirstCol = ci === 0;
const bgCol = isHeader ? ACCENT1 : (isFirstCol ? MID_BG : (ri % 2 === 0 ? "182B3E" : MID_BG));
s.addShape(pres.ShapeType.rect, {
x: colX[ci], y: startY + ri * rowH, w: colW[ci], h: rowH,
fill: { color: bgCol }, line: { color: "2A4060", pt: 0.5 }
});
s.addText(cell, {
x: colX[ci] + 0.05, y: startY + ri * rowH, w: colW[ci] - 0.1, h: rowH,
fontSize: isHeader ? 9.5 : 9,
bold: isHeader || isFirstCol,
color: isHeader ? WHITE : (isFirstCol ? ACCENT2 : WHITE),
align: "center", valign: "middle", margin: 2
});
});
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 7 – Diagnosis (with blood smear image)
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "DIAGNOSIS", ACCENT1);
// Blood smear image
const smearImg = imgs[1];
if (smearImg && !smearImg.error && smearImg.base64) {
s.addImage({ data: smearImg.base64, x: 6.0, y: 0.95, w: 3.8, h: 3.2 });
s.addText("Thin blood film: P. falciparum\n(Rings, trophozoites, gametocytes)\nHarrison's 22E", {
x: 6.0, y: 4.15, w: 3.8, h: 0.6,
fontSize: 8.5, color: LIGHT_GRY, align: "center", italic: true
});
}
const diagItems = [
{ n: "1. Thick & Thin Blood Smear", d: "Gold standard. Giemsa stain. Identifies species & parasitaemia (%)\nRepeat every 12–24 h if initial negative (3× before excluding)", color: ACCENT1 },
{ n: "2. Rapid Diagnostic Tests (RDTs)", d: "Detects HRP-2 (P. falciparum) and pLDH (all species)\nResult in 15–20 min; sensitivity 95–99% for P. falciparum\n⚠ Cannot replace microscopy; false negatives with high parasitaemia (prozone effect)", color: ACCENT2 },
{ n: "3. PCR", d: "Most sensitive (ultrasensitive variants 1000× > microscopy)\nUsed for low parasitaemia, species confirmation, resistance genotyping\nNot practical for routine acute management", color: ACCENT1 },
{ n: "4. Lab Findings", d: "Anaemia (normochromic normocytic), thrombocytopaenia, ↑ LFTs, ↑ LDH\nMetabolic acidosis, ↓ glucose, ↑ creatinine in severe disease", color: ACCENT2 },
];
let y = 1.02;
diagItems.forEach((item) => {
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 5.65, h: 1.08, fill: { color: MID_BG }, line: { color: item.color, pt: 1.2 } });
s.addText(item.n, { x: 0.3, y: y + 0.04, w: 5.45, h: 0.28, fontSize: 11, bold: true, color: item.color, margin: 0 });
s.addText(item.d, { x: 0.3, y: y + 0.33, w: 5.45, h: 0.69, fontSize: 9.5, color: WHITE, margin: 0 });
y += 1.16;
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 8 – Treatment
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "TREATMENT", ACCENT1);
// Uncomplicated P. falciparum
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.0, w: 9.6, h: 0.55, fill: { color: "1A3050" }, line: { color: ACCENT1, pt: 1 } });
s.addText("UNCOMPLICATED P. FALCIPARUM — First-line: Artemisinin-Based Combination Therapy (ACT)", {
x: 0.3, y: 1.0, w: 9.4, h: 0.55, fontSize: 12, bold: true, color: ACCENT1, valign: "middle", margin: 0
});
const actRows = [
["Regimen", "Dose", "Duration", "Notes"],
["Artemether–Lumefantrine (CoArtem)", "Adult: 4 tabs at 0, 8, 24, 36, 48, 60 h", "3 days", "Preferred; take with fatty food"],
["Artesunate–Amodiaquine", "4 mg/kg + 10 mg/kg once daily", "3 days", "SE Africa preferred"],
["Dihydroartemisinin–Piperaquine", "Weight-based dosing once daily", "3 days", "High efficacy"],
["Atovaquone–Proguanil (Malarone)", "Adult: 4 tabs once daily", "3 days", "Travellers/resistant areas"],
];
const actColW = [3.0, 2.9, 1.3, 2.2];
const actColX = [0.2, 3.2, 6.1, 7.4];
const actStartY = 1.58;
const actRowH = 0.5;
actRows.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isH = ri === 0;
s.addShape(pres.ShapeType.rect, {
x: actColX[ci], y: actStartY + ri * actRowH, w: actColW[ci], h: actRowH,
fill: { color: isH ? "1A3050" : (ri % 2 === 0 ? "182B3E" : MID_BG) },
line: { color: "2A4060", pt: 0.5 }
});
s.addText(cell, {
x: actColX[ci] + 0.04, y: actStartY + ri * actRowH, w: actColW[ci] - 0.08, h: actRowH,
fontSize: isH ? 10 : 9.5,
bold: isH,
color: isH ? ACCENT2 : WHITE,
valign: "middle", margin: 3
});
});
});
// Severe malaria
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 4.15, w: 9.6, h: 0.5, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });
s.addText("SEVERE MALARIA — IV Artesunate 2.4 mg/kg at 0, 12, 24 h → then every 24 h; switch to oral ACT once tolerating", {
x: 0.3, y: 4.15, w: 9.4, h: 0.5, fontSize: 11, bold: true, color: WHITE, valign: "middle", margin: 0
});
// Non-falciparum
s.addText("NON-FALCIPARUM: Chloroquine-sensitive → Chloroquine phosphate 10 mg/kg (Day 1–2) + 5 mg/kg (Day 3) | P. vivax/ovale: Add Primaquine 0.25 mg/kg/day × 14 days (check G6PD first!) | P. malariae: Chloroquine", {
x: 0.2, y: 4.75, w: 9.6, h: 0.65,
fontSize: 9.5, color: LIGHT_GRY, italic: false,
fill: { color: MID_BG }, margin: 6
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 9 – Prevention & Control
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "PREVENTION & CONTROL", ACCENT1);
// Prevention image
const prevImg = imgs[2];
if (prevImg && !prevImg.error && prevImg.base64) {
s.addImage({ data: prevImg.base64, x: 6.0, y: 1.0, w: 3.8, h: 3.3 });
s.addText("Insecticide-treated bed net & P. falciparum\ngametocytes on blood smear", {
x: 6.0, y: 4.35, w: 3.8, h: 0.55,
fontSize: 8.5, color: LIGHT_GRY, align: "center", italic: true
});
}
const sections = [
{
title: "Vector Control",
color: ACCENT1,
items: [
"Insecticide-treated bed nets (ITNs/LLINs) — ~50% reduction in mortality",
"Indoor residual spraying (IRS) — DDT, pyrethroids",
"Larval source management, environmental modification",
]
},
{
title: "Chemoprophylaxis (Travellers)",
color: ACCENT2,
items: [
"Atovaquone-proguanil (Malarone) — start 1–2 days before, continue 7 days after",
"Doxycycline 100 mg daily — start 1–2 days before, continue 4 weeks after",
"Mefloquine — start 2–3 weeks before; avoid in cardiac conduction disorders",
"Chloroquine-sensitive areas: Chloroquine (weekly)",
]
},
{
title: "Vaccines",
color: ACCENT1,
items: [
"RTS,S/AS01 (Mosquirix) — WHO recommended (2021) for children in sub-Saharan Africa; ~30–40% efficacy against clinical malaria",
"R21/Matrix-M — Phase 3 data shows ~75% efficacy; WHO approved 2023",
"Pre-erythrocytic target: circumsporozoite protein (CSP)",
]
},
];
let y = 1.0;
sections.forEach((sec) => {
s.addText(sec.title, { x: 0.25, y, w: 5.55, h: 0.3, fontSize: 12.5, bold: true, color: sec.color, margin: 0 });
y += 0.3;
sec.items.forEach((item) => {
s.addText([
{ text: "▶ ", options: { color: sec.color, bold: true } },
{ text: item, options: { color: WHITE } }
], { x: 0.35, y, w: 5.45, h: 0.42, fontSize: 10.5, valign: "middle" });
y += 0.42;
});
y += 0.18;
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 10 – Key Takeaways
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: DARK_BG };
addHeader(s, "KEY CLINICAL TAKEAWAYS", ACCENT1);
const takeaways = [
{ icon: "🦟", text: "Always take a travel history — consider malaria in ANY febrile patient returning from endemic areas" },
{ icon: "🔬", text: "Thick/thin blood smear × 3 is the gold standard; RDT gives rapid screen but must confirm with microscopy" },
{ icon: "⚠", text: "Altered consciousness, severe anaemia, AKI, hypoglycaemia, or hyperparasitaemia = SEVERE MALARIA → ICU + IV artesunate immediately" },
{ icon: "💊", text: "Uncomplicated P. falciparum: ACT (artemether–lumefantrine) 3-day course; never monotherapy" },
{ icon: "🟢", text: "P. vivax / P. ovale: always add Primaquine for radical cure — check G6PD status first" },
{ icon: "🤰", text: "Malaria in pregnancy = high risk (low birth weight, prematurity, maternal anaemia) — use ACT in 2nd/3rd trimester; IV artesunate in severe disease regardless of trimester" },
{ icon: "💉", text: "RTS,S and R21 vaccines now available — a milestone but partial protection; still need vector control + chemoprophylaxis" },
];
takeaways.forEach((tk, i) => {
const y = 1.05 + i * 0.64;
s.addShape(pres.ShapeType.rect, {
x: 0.2, y, w: 9.6, h: 0.56,
fill: { color: i % 2 === 0 ? MID_BG : "182B3E" },
line: { color: i % 2 === 0 ? ACCENT1 : ACCENT2, pt: 1 }
});
s.addText([
{ text: tk.icon + " ", options: { fontSize: 14 } },
{ text: tk.text, options: { fontSize: 11, color: WHITE } }
], { x: 0.35, y, w: 9.3, h: 0.56, valign: "middle" });
});
// Footer
s.addText("Sources: Harrison's Principles of Internal Medicine 22E · Rosen's Emergency Medicine 10E · Goldman-Cecil Medicine · WHO Guidelines 2023", {
x: 0.2, y: 5.3, w: 9.6, h: 0.25,
fontSize: 7.5, color: SUBTITLE, italic: true, align: "center"
});
}
// ── Write file ──────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/malaria-ppt/Malaria_Clinical_Overview.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("SUCCESS: " + outPath);
}).catch(err => {
console.error("ERROR:", err);
process.exit(1);
});
cd /home/daytona/workspace/malaria-ppt && node build.js 2>&1
ls -lh /home/daytona/workspace/malaria-ppt/Malaria_Clinical_Overview.pptx
Malaria Clinical Overview
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title |
| 2 | Epidemiology & Global Burden — stat cards + key facts |
| 3 | Plasmodium Life Cycle — 4 annotated stages + life-cycle diagram |
| 4 | Pathophysiology — cytoadherence, sequestration, cerebral malaria, metabolic derangements |
| 5 | Clinical Features — uncomplicated vs. severe malaria table, emergency alert banner |
| 6 | Species Comparison Table — P. falciparum, vivax, ovale, malariae, knowlesi |
| 7 | Diagnosis — smear, RDT, PCR, lab findings + blood smear image |
| 8 | Treatment — ACT regimens table, IV artesunate for severe disease, non-falciparum |
| 9 | Prevention & Control — ITNs, IRS, chemoprophylaxis regimens, RTS,S & R21 vaccines + bednet photo |
| 10 | Key Clinical Takeaways — 7 high-yield clinical pearls |