Summarise all key exam aspects from long answer to short answer amd mcq aspects of sickle cell disease in paediatrics.include patjophysiology as a haematologist expert.Make a ppt

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Searching Images

sickle cell disease red blood cells sickling pathophysiology

Running Command

mkdir -p /home/daytona/workspace/scd-paediatrics && ls /home/daytona/workspace/scd-paediatrics/

Writing File

~/scd-paediatrics/build_scd_ppt.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

// ── Fetch images ──────────────────────────────────────────────────────────────
const imgUrls = [
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_f8dbf9a0401d7490eb41f3739219b79ded37bcca788b00b1e8efca32aa66b099.jpg",
  "https://cdn.orris.care/cdss_images/HARRISON_1763036071170_b52af39c-ae90-4f8b-9826-2f200ccfcfd6.png",
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_8fdd1550f591aa025e29843049a3a66072520c600f105eb5ce8ffb802ef998ea.jpg"
];

let imgs = [];
try {
  const raw = execSync(
    `node /home/daytona/skills/shared/scripts/fetch_images.js ${imgUrls.map(u => `"${u}"`).join(" ")}`,
    { maxBuffer: 50 * 1024 * 1024 }
  ).toString();
  imgs = JSON.parse(raw);
} catch(e) {
  console.warn("Image fetch failed:", e.message);
  imgs = imgUrls.map(u => ({ url: u, base64: null, error: e.message }));
}

// ── Color Palette ─────────────────────────────────────────────────────────────
const C = {
  bg:       "0D1B2A",   // deep navy
  accent1:  "C0392B",   // crimson (sickle/blood)
  accent2:  "E67E22",   // amber
  accent3:  "27AE60",   // green
  accent4:  "2980B9",   // blue
  white:    "FFFFFF",
  offwhite: "ECF0F1",
  grey:     "BDC3C7",
  darkcard: "1A2940",
  midcard:  "14243A",
};

// ── Helpers ───────────────────────────────────────────────────────────────────
function hdr(slide, text, sub) {
  slide.addShape("rect", { x: 0, y: 0, w: 10, h: 1.1, fill: { color: C.accent1 } });
  slide.addText(text, {
    x: 0.3, y: 0.08, w: 9.4, h: 0.7,
    fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", margin: 0
  });
  if (sub) {
    slide.addText(sub, {
      x: 0.3, y: 0.72, w: 9.4, h: 0.35,
      fontSize: 13, color: "FDEBD0", fontFace: "Calibri", margin: 0
    });
  }
  slide.addShape("rect", { x: 0, y: 0, w: 0.18, h: 1.1, fill: { color: C.accent2 } });
}

function card(slide, x, y, w, h, title, bullets, titleColor, bgColor) {
  bgColor = bgColor || C.darkcard;
  titleColor = titleColor || C.accent2;
  slide.addShape("rect", {
    x, y, w, h,
    fill: { color: bgColor },
    line: { color: titleColor, width: 1.2 },
    shadow: { type: "outer", color: "000000", blur: 6, offset: 3, angle: 135, opacity: 0.3 }
  });
  slide.addText(title, {
    x: x + 0.12, y: y + 0.08, w: w - 0.2, h: 0.38,
    fontSize: 13, bold: true, color: titleColor, fontFace: "Calibri", margin: 0
  });
  const items = bullets.map((b, i) => ({
    text: b,
    options: { bullet: { type: "bullet" }, color: C.offwhite, fontSize: 10.5, fontFace: "Calibri", breakLine: i < bullets.length - 1 }
  }));
  slide.addText(items, {
    x: x + 0.12, y: y + 0.5, w: w - 0.22, h: h - 0.6,
    valign: "top", margin: 0
  });
}

function bgFill(slide) {
  slide.background = { color: C.bg };
}

function footerSlide(slide, num, total) {
  slide.addShape("rect", { x: 0, y: 5.35, w: 10, h: 0.28, fill: { color: C.midcard } });
  slide.addText("Sickle Cell Disease in Paediatrics  |  Expert Haematology Review", {
    x: 0.3, y: 5.36, w: 7, h: 0.24, fontSize: 8.5, color: C.grey, fontFace: "Calibri", margin: 0
  });
  slide.addText(`${num} / ${total}`, {
    x: 8.9, y: 5.36, w: 0.8, h: 0.24, fontSize: 8.5, color: C.grey, fontFace: "Calibri", align: "right", margin: 0
  });
}

// ─────────────────────────────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Sickle Cell Disease in Paediatrics";
const TOTAL = 18;

// ══ SLIDE 1 — TITLE ══════════════════════════════════════════════════════════
{
  const sl = pres.addSlide();
  sl.background = { color: C.bg };
  // Large bold accent stripe
  sl.addShape("rect", { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.bg } });
  sl.addShape("rect", { x: 0, y: 0, w: 0.45, h: 5.625, fill: { color: C.accent1 } });
  sl.addShape("rect", { x: 0, y: 4.7, w: 10, h: 0.93, fill: { color: C.accent1 } });

  sl.addText("SICKLE CELL DISEASE", {
    x: 0.7, y: 0.55, w: 8.8, h: 1.1,
    fontSize: 44, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 3
  });
  sl.addText("IN PAEDIATRICS", {
    x: 0.7, y: 1.55, w: 8.8, h: 0.7,
    fontSize: 32, bold: false, color: C.accent2, fontFace: "Calibri", charSpacing: 2
  });
  sl.addText("Comprehensive Exam Review  |  Long Answer · Short Answer · MCQ", {
    x: 0.7, y: 2.35, w: 8.8, h: 0.5,
    fontSize: 14, color: C.grey, fontFace: "Calibri"
  });
  sl.addText("Expert Haematologist Perspective  •  Pathophysiology to Management", {
    x: 0.7, y: 2.85, w: 8.8, h: 0.4,
    fontSize: 12, color: C.grey, fontFace: "Calibri", italic: true
  });

  if (imgs[1] && imgs[1].base64) {
    sl.addImage({ data: imgs[1].base64, x: 7.5, y: 1.2, w: 2.2, h: 2.2, rounding: true });
  }

  sl.addText("Sources: Tintinalli's Emergency Medicine · Rosen's Emergency Medicine · Henry's Clinical Lab Methods · Swanson's Family Medicine Review", {
    x: 0.3, y: 4.75, w: 9.4, h: 0.4,
    fontSize: 8, color: "FDEBD0", fontFace: "Calibri"
  });
}

// ══ SLIDE 2 — OUTLINE ════════════════════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl); hdr(sl, "Lecture Outline", "Key exam themes covered in this deck");
  footerSlide(sl, 2, TOTAL);
  const topics = [
    ["01", "Definition, Genetics & Epidemiology", C.accent4],
    ["02", "Molecular Pathophysiology (HbS mutation → polymerisation)", C.accent1],
    ["03", "Vaso-occlusion cascade & endothelial dysfunction", C.accent1],
    ["04", "Clinical Types & Haemoglobin Genotypes", C.accent2],
    ["05", "Acute Crises — VOC, ACS, Splenic Sequestration, Aplastic, Stroke", C.accent2],
    ["06", "Chronic Complications (Organ damage)", C.accent3],
    ["07", "Diagnosis — Newborn Screening, Electrophoresis, Lab Findings", C.accent4],
    ["08", "Management — Analgesia, Hydroxyurea, Transfusion, HSCT", C.accent3],
    ["09", "Prevention — Penicillin, Vaccines, TCD Screening", C.accent3],
    ["10", "MCQ Bank + Short Answer Key Points", C.accent2],
  ];
  topics.forEach(([num, text, col], i) => {
    const row = Math.floor(i / 2), colIdx = i % 2;
    const x = 0.3 + colIdx * 4.85, y = 1.25 + row * 0.82;
    sl.addShape("rect", { x, y, w: 4.6, h: 0.68, fill: { color: C.darkcard }, line: { color: col, width: 1 } });
    sl.addText(`${num}`, { x: x + 0.1, y: y + 0.1, w: 0.45, h: 0.45, fontSize: 16, bold: true, color: col, fontFace: "Calibri", margin: 0 });
    sl.addText(text, { x: x + 0.6, y: y + 0.1, w: 3.9, h: 0.48, fontSize: 11, color: C.offwhite, fontFace: "Calibri", valign: "middle", margin: 0 });
  });
}

// ══ SLIDE 3 — DEFINITION & GENETICS ══════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Definition, Genetics & Epidemiology", "Long Answer — Foundational Concepts");
  footerSlide(sl, 3, TOTAL);

  card(sl, 0.2, 1.2, 4.65, 2.1, "🔬 Genetic Basis", [
    "Autosomal RECESSIVE — both β-globin alleles mutated",
    "Point mutation: adenine→thymine in β-globin gene",
    "Amino acid change: Glutamic acid → Valine at position 6 of β-chain",
    "HbSS (homozygous) = most severe disease; >85% HbS",
    "Other genotypes: HbSC, HbS-β⁺thal, HbS-β⁰thal"
  ], C.accent1);

  card(sl, 0.2, 3.4, 4.65, 2.0, "🌍 Epidemiology", [
    "~100,000 people in USA affected; 1/365 African-American births",
    "1 in 13 African-Americans carries sickle cell trait (HbAS)",
    "Also: Mediterranean, Indian, Middle Eastern, Caribbean",
    "~250,000 new births/year globally",
    "Heterozygous trait (HbAS) confers partial malaria protection"
  ], C.accent4);

  card(sl, 5.15, 1.2, 4.65, 2.1, "🧬 Haemoglobin Types", [
    "HbA (α²β²) — normal adult, >95% in adults",
    "HbF (α²γ²) — fetal Hb; NO β-globin → NO sickling in newborns",
    "HbS (α²βˢ²) — abnormal sickle Hb",
    "Symptoms begin as HbF declines (after ~6 months of age)",
    "HbA2 (α²δ²) — minor adult component"
  ], C.accent2);

  card(sl, 5.15, 3.4, 4.65, 2.0, "📋 Exam Key Points", [
    "Inheritance: autosomal recessive (both parents must carry gene)",
    "Trait (HbAS): ~40% HbS, usually asymptomatic",
    "MCQ: glutamic acid REPLACED by valine (not lysine, not Hb C)",
    "HbF protective — fetal period is symptom-free",
    "Screening: neonatal Hb electrophoresis (universal in many countries)"
  ], C.accent3);
}

// ══ SLIDE 4 — MOLECULAR PATHOPHYSIOLOGY ═════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Molecular Pathophysiology", "Long Answer — The HbS Polymerisation Cascade");
  footerSlide(sl, 4, TOTAL);

  // Flow diagram: 5 boxes in a cascade
  const steps = [
    { label: "Deoxygenation", desc: "HbS exposed to low O₂ tension", col: C.accent1 },
    { label: "HbS Polymerisation", desc: "Hydrophobic Val-6 exposes valine pocket → HbS tetramers aggregate into long rigid fibres (Hb polymer)", col: C.accent1 },
    { label: "RBC Sickling", desc: "Flexible biconcave disc → rigid crescent/sickle cell; membrane damage; irreversible sickling with repeated episodes", col: C.accent2 },
    { label: "Vascular Effects", desc: "↑ blood viscosity, sludging, RBC-endothelial adhesion, microvascular obstruction → tissue ischaemia", col: C.accent2 },
    { label: "Haemolysis", desc: "RBC lifespan 20 days (normal 120 days); chronic anaemia; free Hb scavenges NO → endothelial dysfunction", col: C.accent3 },
  ];

  steps.forEach((s, i) => {
    const y = 1.22 + i * 0.84;
    sl.addShape("rect", { x: 0.25, y, w: 9.5, h: 0.72, fill: { color: C.darkcard }, line: { color: s.col, width: 1.5 } });
    sl.addShape("rect", { x: 0.25, y, w: 0.38, h: 0.72, fill: { color: s.col } });
    sl.addText(`${i+1}`, { x: 0.25, y, w: 0.38, h: 0.72, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    sl.addText(s.label, { x: 0.75, y: y + 0.05, w: 2.5, h: 0.35, fontSize: 12, bold: true, color: s.col, fontFace: "Calibri", margin: 0 });
    sl.addText(s.desc, { x: 0.75, y: y + 0.35, w: 9.0, h: 0.32, fontSize: 10, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });
}

// ══ SLIDE 5 — VASO-OCCLUSION MECHANISM ══════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Vaso-Occlusion — The Multi-Hit Model", "Long Answer — Beyond Simple Polymerisation");
  footerSlide(sl, 5, TOTAL);

  card(sl, 0.2, 1.2, 4.6, 3.7, "Cellular Mechanisms of VOC", [
    "1. Sickled RBC rigidity & adhesion to endothelium",
    "2. Leukocyte (neutrophil) activation & rolling on endothelium",
    "3. Activated vascular endothelium → ↑ VCAM-1, ICAM-1, P-selectin",
    "4. Altered NO metabolism: Hb scavenges NO → vasoconstriction",
    "5. Hypercoagulable state (↑ thrombin generation, microparticles)",
    "6. Ischaemia-reperfusion injury: ROS generation → oxidative stress",
    "7. Inflammatory cytokines: IL-8, IL-1, TNF-α → NF-κB cascade",
    "⚠️ MCQ: VOC involves leukocytes + endothelium + NO + hypercoagulability (NOT hypocoagulability)"
  ], C.accent1);

  if (imgs[0] && imgs[0].base64) {
    sl.addImage({ data: imgs[0].base64, x: 5.0, y: 1.2, w: 4.8, h: 3.7 });
    sl.addText("HbS polymerisation → vaso-occlusion (SEM)", {
      x: 5.0, y: 4.85, w: 4.8, h: 0.25, fontSize: 8, color: C.grey, fontFace: "Calibri", italic: true, align: "center"
    });
  } else {
    card(sl, 5.0, 1.2, 4.8, 3.7, "Precipitating Factors", [
      "Dehydration → ↑ HbS concentration → polymerisation",
      "Hypoxia → deoxygenation → sickling",
      "Acidosis → Bohr effect → O₂ offloading → sickling",
      "Cold exposure → vasoconstriction → stasis",
      "Infection → systemic inflammatory state",
      "Stress / trauma / overexertion"
    ], C.accent3);
  }
}

// ══ SLIDE 6 — HAEMOGLOBIN GENOTYPES TABLE ═══════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Haemoglobin Genotypes & Clinical Severity", "Short Answer / MCQ — Know the Genotypes");
  footerSlide(sl, 6, TOTAL);

  sl.addTable([
    [
      { text: "Genotype", options: { bold: true, color: C.bg, fill: C.accent1, fontSize: 11, fontFace: "Calibri" } },
      { text: "HbS %", options: { bold: true, color: C.bg, fill: C.accent1, fontSize: 11, fontFace: "Calibri" } },
      { text: "Severity", options: { bold: true, color: C.bg, fill: C.accent1, fontSize: 11, fontFace: "Calibri" } },
      { text: "Key Features", options: { bold: true, color: C.bg, fill: C.accent1, fontSize: 11, fontFace: "Calibri" } }
    ],
    [
      { text: "HbSS (Sickle Cell Anaemia)", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } },
      { text: ">85%", options: { color: C.accent1, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Most Severe", options: { color: C.accent1, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Classic disease; all complications", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } }
    ],
    [
      { text: "HbSC", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } },
      { text: "~50% each", options: { color: C.accent2, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Moderate", options: { color: C.accent2, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Retinopathy, avascular necrosis prominent; less anaemia", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } }
    ],
    [
      { text: "HbS-β⁰ thalassaemia", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } },
      { text: ">90%", options: { color: C.accent1, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Severe (like HbSS)", options: { color: C.accent1, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "No HbA produced; clinically = HbSS", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } }
    ],
    [
      { text: "HbS-β⁺ thalassaemia", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } },
      { text: "~70%", options: { color: C.accent2, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Mild-Moderate", options: { color: C.accent2, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Some HbA produced; milder course", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } }
    ],
    [
      { text: "HbAS (Sickle Cell Trait)", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } },
      { text: "~40%", options: { color: C.accent3, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Benign/Carrier", options: { color: C.accent3, bold: true, fontSize: 10, fontFace: "Calibri" } },
      { text: "Usually asymptomatic; haematuria, splenic infarct at altitude", options: { color: C.offwhite, fontSize: 10, fontFace: "Calibri" } }
    ],
  ], {
    x: 0.25, y: 1.25, w: 9.5, h: 3.9,
    rowH: 0.6,
    border: { type: "solid", color: "2C3E50", pt: 1 }
  });

  sl.addText("⭐ MCQ TIP: HbS-β⁰ thal is clinically indistinguishable from HbSS. HbAS trait is usually benign.", {
    x: 0.25, y: 5.18, w: 9.5, h: 0.25,
    fontSize: 9.5, color: C.accent2, bold: true, fontFace: "Calibri", margin: 0
  });
}

// ══ SLIDE 7 — ACUTE CRISES OVERVIEW ═════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Acute Crises in Sickle Cell Disease", "Long Answer — Recognise, Diagnose, Treat");
  footerSlide(sl, 7, TOTAL);

  const crises = [
    { name: "Vaso-Occlusive Crisis (VOC)", col: C.accent1, desc: "Most common; bone/joint/back pain; tissue ischaemia; precipitated by cold, dehydration, infection" },
    { name: "Acute Chest Syndrome (ACS)", col: C.accent1, desc: "New CXR infiltrate + fever/cough/hypoxia/chest pain; leading cause of death; infection, fat embolism, in-situ sickling" },
    { name: "Splenic Sequestration", col: C.accent2, desc: "Sudden trapping of blood in spleen → acute anaemia, ↓ Hb >2g/dL from baseline; massive splenomegaly; haemodynamic collapse; common <5 yrs" },
    { name: "Aplastic Crisis", col: C.accent2, desc: "Parvovirus B19 → transient red cell aplasia; reticulocytopenia; severe anaemia; self-limiting (7-10 days)" },
    { name: "Stroke / CVA", col: C.accent4, desc: "Ischaemic >> haemorrhagic; peak age 2-10 yrs; TCD velocity >200 cm/s = high risk; 11% lifetime risk untreated" },
    { name: "Hyperhemolytic Crisis", col: C.accent3, desc: "Abrupt ↑ haemolysis rate; Hb drops acutely with ↑ reticulocytes; differentiate from aplastic (latter has low reticulocytes)" },
  ];

  crises.forEach((c, i) => {
    const col_ = i % 2, row_ = Math.floor(i / 2);
    const x = 0.2 + col_ * 4.9, y = 1.22 + row_ * 1.38;
    sl.addShape("rect", { x, y, w: 4.7, h: 1.25, fill: { color: C.darkcard }, line: { color: c.col, width: 1.5 } });
    sl.addShape("rect", { x, y, w: 4.7, h: 0.36, fill: { color: c.col } });
    sl.addText(c.name, { x: x + 0.12, y: y + 0.06, w: 4.46, h: 0.28, fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
    sl.addText(c.desc, { x: x + 0.12, y: y + 0.42, w: 4.46, h: 0.78, fontSize: 9.5, color: C.offwhite, fontFace: "Calibri", valign: "top", margin: 0 });
  });
}

// ══ SLIDE 8 — ACS DETAIL ════════════════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Acute Chest Syndrome (ACS)", "Long Answer — Management Protocol");
  footerSlide(sl, 8, TOTAL);

  card(sl, 0.2, 1.2, 4.6, 4.15, "Definition & Diagnosis", [
    "NEW pulmonary infiltrate on CXR PLUS ≥1 of:",
    "  • Fever (>38.5°C)",
    "  • Respiratory symptoms: cough, wheeze, dyspnoea",
    "  • Chest/rib/bone pain",
    "  • SpO₂ drop from baseline",
    "Most common cause of death in SCD",
    "Occurs in 30% after VOC hospitalisation",
    "Causes: infection (Chlamydia, Mycoplasma, RSV), fat/bone marrow embolism, in-situ sickling, pulmonary infarction",
  ], C.accent1);

  card(sl, 5.05, 1.2, 4.75, 2.0, "Investigations", [
    "CBC + reticulocyte count (baseline Hb essential)",
    "Blood cultures, sputum cultures",
    "CXR — new infiltrate required for diagnosis",
    "ABG if SpO₂ <95% or severe respiratory distress",
    "Cross-match — if transfusion likely",
    "Bronchoalveolar lavage: fat-laden macrophages (fat embolism)"
  ], C.accent2);

  card(sl, 5.05, 3.28, 4.75, 2.07, "Treatment (Mnemonic: OAHATE)", [
    "O — Oxygen (titrate to SpO₂ ≥95%)",
    "A — Analgesics (opioids; incentive spirometry mandatory)",
    "H — Hydration: D5 0.45%NaCl ×1–1.5 maintenance",
    "A — Antibiotics: cover atypicals (azithromycin ± ceftriaxone)",
    "T — Transfusion: simple (Hb <6) or exchange (severe/worsening)",
    "E — Exchange transfusion if: prior ventilation, multiorgan failure, neurological signs, no improvement"
  ], C.accent3);
}

// ══ SLIDE 9 — SPLENIC SEQUESTRATION & APLASTIC ══════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Splenic Sequestration & Aplastic Crisis", "Short Answer / MCQ — Age-Specific Crises");
  footerSlide(sl, 9, TOTAL);

  card(sl, 0.2, 1.22, 4.65, 3.6, "Splenic Sequestration Crisis", [
    "Pathogenesis: Sickled cells pool in splenic sinusoids → sudden ↓ circulating Hb",
    "Definition: Hb falls >2 g/dL from baseline + splenomegaly",
    "Age: Most common <5 years (before autosplenectomy)",
    "Clinical: Lethargy, pallor, LUQ mass/pain, shock, tachycardia",
    "Hb may fall to 1–3 g/dL; haemodynamic collapse possible",
    "Reticulocytes: ELEVATED (distinguishes from aplastic crisis)",
    "Treatment: Urgent IV fluids, simple transfusion (cautious — avoid over-transfusion)",
    "Recurrence: 50% → consider splenectomy",
    "Prevention: Parents taught spleen palpation at home"
  ], C.accent1);

  card(sl, 5.15, 1.22, 4.65, 3.6, "Aplastic Crisis", [
    "Pathogenesis: Parvovirus B19 infects erythroid progenitors → transient arrest of RBC production",
    "Duration: Self-limited 7–10 days (bone marrow recovers)",
    "Clinical: Severe anaemia, fatigue, pallor; fever +/−",
    "KEY DIFFERENTIATOR: Reticulocytes LOW/ABSENT (vs. high in sequestration)",
    "Platelet/WBC count typically preserved initially",
    "Diagnosis: Parvovirus B19 IgM or PCR; bone marrow shows absent erythroblasts",
    "Treatment: RBC transfusion (may require repeated); supportive care",
    "Isolation: Parvovirus B19 infectious — avoid pregnant contacts",
    "⭐ MCQ: Aplastic crisis = Parvo B19 + LOW reticulocytes"
  ], C.accent2);
}

// ══ SLIDE 10 — STROKE & NEUROLOGICAL ════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Cerebrovascular Disease & Stroke", "Long Answer — TCD Screening Protocol");
  footerSlide(sl, 10, TOTAL);

  card(sl, 0.2, 1.22, 4.65, 3.9, "Stroke in SCD", [
    "11% of HbSS children have stroke before age 20 (untreated)",
    "Ischaemic > haemorrhagic (ischaemic in younger children)",
    "Mechanism: Large vessel vasculopathy (internal carotid, MCA) → thrombosis",
    "Moyamoya: 30% of cerebral vasculopathy in paediatric SCD",
    "Presentation: Focal neurological deficit, seizure, altered consciousness",
    "Imaging: MRI + MRA preferred (may also use CT acutely)",
    "Acute treatment: Emergency exchange transfusion (target HbS <30%)",
    "Secondary prevention: Chronic transfusion programme to keep HbS <30%",
    "Hx of stroke → keep HbS <30% lifelong"
  ], C.accent4);

  card(sl, 5.15, 1.22, 4.65, 1.9, "TCD Screening", [
    "Transcranial Doppler from age 2–16 years, annually",
    "Time-averaged mean velocity (TAMV) >200 cm/s = HIGH RISK",
    "TAMV 170–199 cm/s = CONDITIONAL (repeat in 3–6 months)",
    "High risk → prophylactic chronic transfusion reduces stroke risk by 90%",
    "⭐ TCD is a KEY paediatric intervention (STOP trial)"
  ], C.accent3);

  card(sl, 5.15, 3.25, 4.65, 1.9, "Silent Cerebral Infarcts (SCI)", [
    "MRI lesions WITHOUT clinical stroke symptoms",
    "Present in 20–35% of children with HbSS",
    "Associated with cognitive impairment, school difficulties",
    "Diagnosed on MRI brain (routine screening recommended)",
    "Management: hydroxyurea; consider transfusion if progressive"
  ], C.accent2);
}

// ══ SLIDE 11 — CHRONIC COMPLICATIONS ════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Chronic Organ Complications", "Long Answer — Systematic Review");
  footerSlide(sl, 11, TOTAL);

  const organs = [
    { organ: "Spleen", col: C.accent1, points: ["Autosplenectomy by age 5–8 years (repeated infarction)", "Functional asplenia → encapsulated organisms (Strep pneumo, H. influenzae, Neisseria)", "↑ Risk: sepsis, meningitis"] },
    { organ: "Lung", col: C.accent2, points: ["Recurrent ACS → restrictive lung disease", "Pulmonary hypertension (TRV >2.5 m/s)", "SpO₂ monitoring; annual echo for PH screening"] },
    { organ: "Brain", col: C.accent4, points: ["Overt stroke (11%), Silent cerebral infarcts (20–35%)", "Cognitive impairment, learning disabilities", "Moyamoya syndrome"] },
    { organ: "Bone", col: C.accent3, points: ["Avascular necrosis: femoral/humeral heads", "Dactylitis (hand-foot syndrome) — first crisis in infants", "Osteomyelitis (Salmonella, Staph aureus)"] },
    { organ: "Kidney", col: C.accent2, points: ["Sickle nephropathy: papillary necrosis, proteinuria, haematuria", "Hyposthenuria (inability to concentrate urine) — early sign", "CKD in adults; glomerulosclerosis"] },
    { organ: "Eye", col: C.accent3, points: ["Proliferative retinopathy (especially HbSC)", "Annual ophthalmology screening", "Can cause retinal detachment and blindness"] },
  ];

  organs.forEach((o, i) => {
    const col_ = i % 3, row_ = Math.floor(i / 3);
    const x = 0.2 + col_ * 3.25, y = 1.22 + row_ * 2.05;
    sl.addShape("rect", { x, y, w: 3.1, h: 1.88, fill: { color: C.darkcard }, line: { color: o.col, width: 1.4 } });
    sl.addShape("rect", { x, y, w: 3.1, h: 0.35, fill: { color: o.col } });
    sl.addText(o.organ, { x: x + 0.1, y: y + 0.06, w: 2.9, h: 0.26, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
    const items = o.points.map((p, pi) => ({
      text: p, options: { bullet: { type: "bullet" }, color: C.offwhite, fontSize: 9, fontFace: "Calibri", breakLine: pi < o.points.length - 1 }
    }));
    sl.addText(items, { x: x + 0.08, y: y + 0.4, w: 2.94, h: 1.42, valign: "top", margin: 0 });
  });
}

// ══ SLIDE 12 — DIAGNOSIS ════════════════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Diagnosis & Laboratory Findings", "Short Answer — Know Your Lab Values");
  footerSlide(sl, 12, TOTAL);

  card(sl, 0.2, 1.22, 4.65, 4.1, "Neonatal Screening & Confirmatory Tests", [
    "Neonatal screening: Haemoglobin ELECTROPHORESIS (HPLC) — gold standard",
    "Pattern HbSS: FS (Fetal + Sickle bands; no A band)",
    "Pattern HbSC: FSC",
    "Pattern HbAS (trait): FAS",
    "Confirmatory: repeat electrophoresis at 3–6 months",
    "Sickling test (Sickledex/sodium metabisulfite): cheap screening but does NOT distinguish SS from AS",
    "MRI brain: silent cerebral infarcts",
    "TCD ultrasonography: stroke risk stratification",
    "Echo: pulmonary hypertension screening",
    "Urine: haematuria, hyposthenuria (inability to concentrate)",
  ], C.accent4);

  card(sl, 5.15, 1.22, 4.65, 2.0, "Peripheral Blood Film", [
    "Sickle cells (drepanocytes) — crescent/boat shapes",
    "Target cells (HbSC, S-thal)",
    "Polychromasia — ↑ reticulocytes (compensatory haematopoiesis)",
    "Howell-Jolly bodies — evidence of functional asplenia",
    "Nucleated RBCs in severe anaemia",
    "⭐ Howell-Jolly bodies = functional asplenia (MCQ favourite)"
  ], C.accent2);

  card(sl, 5.15, 3.28, 4.65, 2.1, "Routine Labs in SCD", [
    "Hb: 6–9 g/dL (baseline in HbSS)",
    "MCV: Normal or mildly ↓ (macrocytosis if on hydroxyurea)",
    "WBC: Elevated (leukocytosis common — marker of inflammation)",
    "Reticulocytes: 5–15% (elevated baseline)",
    "Bilirubin: ↑ unconjugated (haemolysis)",
    "LDH: ↑ (marker of haemolysis intensity)",
    "Urinalysis: haematuria, proteinuria, low SG"
  ], C.accent3);
}

// ══ SLIDE 13 — MANAGEMENT OVERVIEW ═════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Management — Comprehensive Overview", "Long Answer — Acute + Chronic + Curative");
  footerSlide(sl, 13, TOTAL);

  card(sl, 0.2, 1.22, 3.05, 4.1, "Acute VOC Management", [
    "Hydration: oral preferred; IV D5 0.45% NS ×1–1.5 maintenance",
    "Analgesia: WHO ladder",
    "  • Mild: paracetamol + NSAID (ketorolac)",
    "  • Moderate-Severe: opioids (morphine)",
    "  • PCA morphine for inpatients",
    "Oxygen ONLY if SpO₂ <95%",
    "Incentive spirometry (prevents ACS)",
    "Treat precipitating infection",
    "Avoid over-hydration (risk of ACS)",
    "Monitor resp rate hourly on opioids"
  ], C.accent1);

  card(sl, 3.5, 1.22, 3.05, 4.1, "Hydroxyurea (HU)", [
    "Mechanism: ↑ HbF → inhibits HbS polymerisation",
    "Also: ↓ leukocytes, ↓ RBC adhesion, ↑ RBC hydration",
    "Indications (paeds): ≥9 months all HbSS/HbS-β⁰thal (2014 ASH)",
    "BABY HUG trial: HU in infants → ↓ VOC, ACS, dactylitis",
    "Dose: 20 mg/kg/day, titrate to response (max ~35 mg/kg)",
    "Monitor: CBC every 2–4 weeks initially (myelosuppression)",
    "Side effects: neutropenia, thrombocytopenia, teratogenic",
    "⭐ HU is disease-modifying — reduces mortality"
  ], C.accent3);

  card(sl, 6.8, 1.22, 3.0, 4.1, "Transfusion Therapy", [
    "Simple transfusion: ACS, splenic sequestration, aplastic crisis, preoperative",
    "Chronic transfusion: stroke prevention (TCD >200 cm/s), recurrent ACS",
    "Target: Hb ≤10 g/dL; HbS <30%",
    "Exchange transfusion: acute stroke, severe ACS, multiorgan failure",
    "Complications: alloimmunisation, iron overload (treat with deferasirox), transfusion reactions, infections",
    "Iron chelation: deferasirox (oral) or desferrioxamine (SC) when ferritin >1000",
    "Asymptomatic: do NOT transfuse for Hb level alone"
  ], C.accent2);
}

// ══ SLIDE 14 — PREVENTION & PROPHYLAXIS ══════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Prevention, Prophylaxis & Long-Term Care", "Short Answer — Paediatric Surveillance");
  footerSlide(sl, 14, TOTAL);

  card(sl, 0.2, 1.22, 4.65, 1.72, "Antibiotic Prophylaxis", [
    "Penicillin V: start at 2–3 months (before spleen dysfunction complete)",
    "Dose: 125 mg BD (<3 yrs), 250 mg BD (≥3 yrs)",
    "Continue until at least age 5 years",
    "Penicillin-allergic: erythromycin",
    "⭐ Prevents pneumococcal septicaemia — most important early intervention"
  ], C.accent1);

  card(sl, 0.2, 3.0, 4.65, 2.3, "Vaccination Schedule", [
    "Pneumococcal: PCV-13 (routine childhood) + PPSV-23 (from age 2)",
    "Haemophilus influenzae type b (Hib)",
    "Meningococcal: MenACWY + MenB",
    "Annual influenza vaccine",
    "Hepatitis B (blood product exposure)",
    "⭐ MCQ: Vaccinate against ENCAPSULATED organisms (Pneumococcus, Hib, Meningococcus)"
  ], C.accent2);

  card(sl, 5.15, 1.22, 4.65, 1.72, "TCD & Stroke Prevention", [
    "TCD screening: Annual from age 2–16 years",
    "High risk (>200 cm/s) → chronic transfusion reduces stroke by 90%",
    "Conditional (170–199) → repeat in 3–6 months",
    "STOP & STOP 2 trials established TCD-based protocol",
    "Hydroxyurea now shown non-inferior to transfusion (TWiTCH trial)"
  ], C.accent4);

  card(sl, 5.15, 3.0, 4.65, 2.3, "Curative & Novel Therapies", [
    "HSCT (Haematopoietic Stem Cell Transplant): only current CURE",
    "Requires HLA-matched sibling donor; survival >90%",
    "Gene therapy: lentiviral HbF-inducing vectors (FDA-approved 2023: Casgevy — CRISPR)",
    "Voxelotor: HbS anti-polymerisation agent (increases O₂ affinity)",
    "Crizanlizumab: anti-P-selectin antibody (reduces VOC frequency)",
    "L-glutamine: reduces oxidative stress; FDA-approved supplement"
  ], C.accent3);
}

// ══ SLIDE 15 — DACTYLITIS & INFECTION ════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Dactylitis, Infection & Osteomyelitis", "Short Answer / MCQ — Infant Presentations");
  footerSlide(sl, 15, TOTAL);

  card(sl, 0.2, 1.22, 4.65, 3.8, "Dactylitis (Hand-Foot Syndrome)", [
    "FIRST clinical manifestation of SCD in infants (age 6–24 months)",
    "Cause: Vaso-occlusion in small bones of hands/feet → infarction",
    "Presentation: Painful, non-pitting swelling of hands/feet; fever",
    "Bilateral and symmetric common",
    "Resolves spontaneously in 1–2 weeks",
    "Differential: osteomyelitis (persistent fever, elevated WBC, CRP)",
    "Treatment: analgesia, hydration, treat fever",
    "⭐ Dactylitis = first crisis in infant → always test for SCD in infant with hand/foot swelling + fever",
    "Radiograph: normal initially; periosteal reaction later"
  ], C.accent2);

  card(sl, 5.15, 1.22, 4.65, 3.8, "Infection & Sepsis", [
    "Functional asplenia → encapsulated organism susceptibility",
    "Most feared: Streptococcus pneumoniae septicaemia (can be fulminant)",
    "Also: Haemophilus influenzae, Neisseria meningitidis, Salmonella",
    "FEVER in SCD child: MEDICAL EMERGENCY until proven otherwise",
    "  • Temp ≥38.5°C → blood culture + empiric IV antibiotics",
    "  • Ceftriaxone (covers pneumococcus + Gram-negatives)",
    "Osteomyelitis: Salmonella spp. (most specific to SCD), Staph aureus",
    "Differentiate AVN from osteomyelitis: MRI, bone scan, WBC, CRP",
    "⭐ MCQ: Salmonella osteomyelitis = pathognomonic association with SCD"
  ], C.accent1);
}

// ══ SLIDE 16 — MCQ BANK ══════════════════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "MCQ Bank — High-Yield Questions", "Exam Drill — Cover the answers first!");
  footerSlide(sl, 16, TOTAL);

  const mcqs = [
    { q: "Q1. Molecular basis of HbS?", a: "A. Glu→Val substitution at β-globin position 6", col: C.accent1 },
    { q: "Q2. First crisis in infant with SCD?", a: "A. Dactylitis (hand-foot syndrome)", col: C.accent2 },
    { q: "Q3. Aplastic crisis pathogen?", a: "A. Parvovirus B19 (low/absent reticulocytes)", col: C.accent3 },
    { q: "Q4. TCD cut-off for stroke high-risk?", a: "A. ≥200 cm/s TAMV → start chronic transfusion", col: C.accent4 },
    { q: "Q5. Most specific osteomyelitis organism in SCD?", a: "A. Salmonella spp.", col: C.accent1 },
    { q: "Q6. Blood film finding of functional asplenia?", a: "A. Howell-Jolly bodies", col: C.accent2 },
    { q: "Q7. Mechanism of hydroxyurea?", a: "A. ↑ HbF production → inhibits HbS polymerisation", col: C.accent3 },
    { q: "Q8. Key differentiator: splenic sequestration vs aplastic?", a: "A. Sequestration: HIGH reticulocytes; Aplastic: LOW reticulocytes", col: C.accent4 },
  ];

  mcqs.forEach((m, i) => {
    const col_ = i % 2, row_ = Math.floor(i / 2);
    const x = 0.2 + col_ * 4.9, y = 1.22 + row_ * 1.04;
    sl.addShape("rect", { x, y, w: 4.7, h: 0.95, fill: { color: C.darkcard }, line: { color: m.col, width: 1 } });
    sl.addText(m.q, { x: x + 0.12, y: y + 0.07, w: 4.46, h: 0.3, fontSize: 10.5, bold: true, color: m.col, fontFace: "Calibri", margin: 0 });
    sl.addText(m.a, { x: x + 0.12, y: y + 0.42, w: 4.46, h: 0.46, fontSize: 10, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });
}

// ══ SLIDE 17 — SHORT ANSWER KEYS ════════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  hdr(sl, "Short Answer Key Points", "Quick-Recall Summary for SAQ Questions");
  footerSlide(sl, 17, TOTAL);

  card(sl, 0.2, 1.22, 4.65, 4.15, "Pathophysiology SAQ", [
    "1. β-globin point mutation: adenine→thymine → Glu→Val (position 6)",
    "2. Deoxygenation triggers HbS polymerisation into rigid fibres",
    "3. Sickled RBC lifespan: ~20 days (normal: 120 days) → haemolytic anaemia",
    "4. VOC involves: sickled RBCs + leukocytes + endothelium + ↓NO + hypercoagulability",
    "5. HbF is protective — no β-globin chains, does not sickle",
    "6. Autosplenectomy by age 5–8: repeated splenic infarction → functional asplenia",
    "7. Free Hb from haemolysis scavenges NO → ↑ vasoconstriction, platelet aggregation",
    "8. Ischaemia-reperfusion injury → reactive oxygen species → endothelial damage"
  ], C.accent1);

  card(sl, 5.15, 1.22, 4.65, 4.15, "Clinical & Management SAQ", [
    "1. Neonatal screening: HPLC/Hb electrophoresis — FS pattern = HbSS",
    "2. Penicillin prophylaxis from 2–3 months of age, continue to age 5+",
    "3. Fever in SCD = emergency: blood culture + IV ceftriaxone stat",
    "4. VOC management: analgesia (opioids) + hydration + treat precipitant",
    "5. ACS treatment: O₂, antibiotics, incentive spirometry, +/− transfusion",
    "6. Hydroxyurea: ↑ HbF — 1st-line disease-modifying therapy",
    "7. Transfusion target: Hb ≤10 g/dL, HbS <30%",
    "8. Curative: HLA-matched sibling HSCT; gene therapy (Casgevy/CRISPR)",
    "9. TCD >200 cm/s → 90% stroke reduction with chronic transfusion programme"
  ], C.accent3);
}

// ══ SLIDE 18 — SUMMARY ═══════════════════════════════════════════════════════
{
  const sl = pres.addSlide(); bgFill(sl);
  sl.addShape("rect", { x: 0, y: 0, w: 10, h: 1.1, fill: { color: C.accent1 } });
  sl.addShape("rect", { x: 0, y: 0, w: 0.18, h: 1.1, fill: { color: C.accent2 } });
  sl.addText("EXAM SUMMARY — 10 MUST-KNOW FACTS", {
    x: 0.3, y: 0.2, w: 9.4, h: 0.7,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 2, margin: 0
  });

  const facts = [
    ["1", "Mutation: Glu→Val at β-globin position 6 (adenine→thymine DNA substitution)", C.accent1],
    ["2", "HbF is protective; symptoms begin as HbF falls after 6 months of age", C.accent2],
    ["3", "Autosplenectomy by age 5 → encapsulated organisms → penicillin prophylaxis + vaccines", C.accent1],
    ["4", "Dactylitis = FIRST crisis in infants (6–24 months); Parvovirus B19 = aplastic crisis", C.accent2],
    ["5", "Aplastic crisis: LOW reticulocytes; Splenic sequestration: HIGH reticulocytes", C.accent3],
    ["6", "ACS: NEW CXR infiltrate + fever/resp symptoms = most common cause of death", C.accent4],
    ["7", "TCD >200 cm/s → high stroke risk → chronic transfusion → 90% stroke reduction", C.accent4],
    ["8", "Hydroxyurea: ↑ HbF; BABY HUG trial → recommend from 9 months in all HbSS", C.accent3],
    ["9", "Howell-Jolly bodies = functional asplenia; Salmonella osteomyelitis = SCD-specific", C.accent2],
    ["10","VOC: multi-hit model (sickled RBCs + leukocytes + ↓NO + hypercoag + ischaemia-reperfusion)", C.accent1],
  ];

  facts.forEach(([num, text, col], i) => {
    const row_ = Math.floor(i / 2), col_ = i % 2;
    const x = 0.2 + col_ * 4.9, y = 1.22 + row_ * 0.84;
    sl.addShape("rect", { x, y, w: 4.7, h: 0.72, fill: { color: C.darkcard }, line: { color: col, width: 1 } });
    sl.addShape("rect", { x, y, w: 0.42, h: 0.72, fill: { color: col } });
    sl.addText(num, { x, y, w: 0.42, h: 0.72, fontSize: 16, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
    sl.addText(text, { x: x + 0.5, y: y + 0.1, w: 4.16, h: 0.54, fontSize: 9.8, color: C.offwhite, fontFace: "Calibri", valign: "middle", margin: 0 });
  });

  footerSlide(sl, 18, TOTAL);
}

// ── Write File ────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/scd-paediatrics/SickleCell_Paediatrics_Exam_Review.pptx" })
  .then(() => console.log("✅ PPT saved successfully"))
  .catch(e => { console.error("❌ Error:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/scd-paediatrics && node build_scd_ppt.js 2>&1

You've run out of free credits. Sign up for a free account to continue using Orris.
This is a shared conversation. Sign in to Orris to start your own chat.