Need a presentation on the topic immune thrombocytopenia in children that includes it's definition pathogenesis clinical features and the management
mkdir -p /home/daytona/workspace/itp-presentation && ls /home/daytona/workspace/…
~/itp-presentation/itp.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Immune Thrombocytopenia in Children";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const DARK_BG = "0D1B2A"; // deep navy — dominant (~65 %)
const MID_NAVY = "1B3A5C"; // mid-navy accent panels
const ACCENT = "4FC3F7"; // sky-blue accent lines/icons
const GOLD = "F4A261"; // warm amber for headings/highlights
const LIGHT_TXT = "E8F4FD"; // near-white body text
const MUTED = "A8C8E8"; // muted blue for secondary text
const WHITE = "FFFFFF";
const RED = "E63946"; // danger / alert colour
// ─── REUSABLE HELPERS ────────────────────────────────────────────
function navySlide() {
const slide = pres.addSlide();
slide.background = { color: DARK_BG };
return slide;
}
function accentBar(slide, y = 0) {
slide.addShape(pres.ShapeType.rect, { x: 0, y, w: 10, h: 0.07, fill: { color: ACCENT } });
}
function sectionLabel(slide, label, y = 0.15) {
slide.addText(label.toUpperCase(), {
x: 0.45, y, w: 9.1, h: 0.3,
fontSize: 8, bold: true, color: ACCENT, charSpacing: 3, align: "left"
});
}
function slideTitle(slide, text, y = 0.5) {
slide.addText(text, {
x: 0.45, y, w: 9.1, h: 0.65,
fontSize: 24, bold: true, color: GOLD, align: "left", margin: 0
});
}
function divider(slide, y) {
slide.addShape(pres.ShapeType.rect, { x: 0.45, y, w: 1.4, h: 0.05, fill: { color: ACCENT } });
}
// bullet helper – returns a rich-text object
function bullet(text, indent = 0, sub = false) {
return {
text,
options: {
bullet: { indent: 15 + indent * 15 },
fontSize: sub ? 13 : 14.5,
color: sub ? MUTED : LIGHT_TXT,
breakLine: true
}
};
}
function infoBox(slide, x, y, w, h, title, lines, titleColor = GOLD) {
// box background
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: MID_NAVY }, line: { color: ACCENT, width: 1 } });
// box title
slide.addText(title, { x: x + 0.12, y: y + 0.1, w: w - 0.24, h: 0.3, fontSize: 12, bold: true, color: titleColor, margin: 0 });
// box content
slide.addText(lines, { x: x + 0.12, y: y + 0.42, w: w - 0.24, h: h - 0.52, fontSize: 12, color: LIGHT_TXT, valign: "top", margin: 0 });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
// full-width accent bar top
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: ACCENT } });
// side stripe
s.addShape(pres.ShapeType.rect, { x: 0, y: 0.12, w: 0.18, h: 5.505, fill: { color: GOLD } });
// big title
s.addText("Immune\nThrombocytopenia", {
x: 0.5, y: 0.55, w: 9, h: 2.2,
fontSize: 46, bold: true, color: WHITE, align: "left", lineSpacingMultiple: 1.1
});
s.addText("in Children", {
x: 0.5, y: 2.55, w: 9, h: 0.85,
fontSize: 36, bold: false, color: ACCENT, align: "left", italic: true
});
// subtitle strip
s.addShape(pres.ShapeType.rect, { x: 0.5, y: 3.55, w: 9, h: 0.05, fill: { color: GOLD } });
s.addText("Definition • Pathogenesis • Clinical Features • Management", {
x: 0.5, y: 3.7, w: 9, h: 0.45,
fontSize: 14, color: MUTED, align: "left", charSpacing: 1
});
// bottom note
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: MID_NAVY } });
s.addText("Pediatric Hematology | 2026", {
x: 0.5, y: 5.32, w: 9, h: 0.28,
fontSize: 11, color: MUTED, align: "left"
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Presentation Outline");
slideTitle(s, "Topics Covered");
divider(s, 1.22);
const topics = [
["01", "Definition & Classification", "What is ITP? Primary vs secondary, acute vs chronic"],
["02", "Epidemiology", "Incidence, age distribution, sex ratio in children"],
["03", "Pathogenesis", "Autoantibodies, T-cell destruction, megakaryocyte dysfunction"],
["04", "Clinical Features", "Bleeding manifestations, petechiae, purpura, exam findings"],
["05", "Diagnosis", "Lab workup, peripheral smear, exclusion criteria"],
["06", "Management", "Observation, corticosteroids, IVIG, anti-D, splenectomy"],
];
topics.forEach(([num, title, sub], i) => {
const col = i < 3 ? 0 : 1;
const row = i % 3;
const x = 0.45 + col * 4.9;
const y = 1.4 + row * 1.3;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 1.1, fill: { color: MID_NAVY }, line: { color: ACCENT, width: 1 } });
s.addText(num, { x: x + 0.12, y: y + 0.08, w: 0.55, h: 0.45, fontSize: 22, bold: true, color: ACCENT, margin: 0 });
s.addText(title, { x: x + 0.7, y: y + 0.08, w: 3.75, h: 0.45, fontSize: 13, bold: true, color: GOLD, margin: 0 });
s.addText(sub, { x: x + 0.12, y: y + 0.56, w: 4.35, h: 0.48, fontSize: 11, color: MUTED, margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 3 — DEFINITION
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Definition & Classification");
slideTitle(s, "What is Immune Thrombocytopenia?");
divider(s, 1.22);
// Definition box
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.35, w: 9.1, h: 1.15, fill: { color: MID_NAVY }, line: { color: GOLD, width: 1.5 } });
s.addText([
{ text: "ITP ", options: { bold: true, color: GOLD } },
{ text: "is an acquired autoimmune condition characterized by isolated thrombocytopenia (platelet count ", options: { color: LIGHT_TXT } },
{ text: "<100 × 10⁹/L", options: { bold: true, color: ACCENT } },
{ text: ") with a normal bone marrow and the absence of other causes of thrombocytopenia. Previously called ", options: { color: LIGHT_TXT } },
{ text: "idiopathic thrombocytopenic purpura", options: { italic: true, color: MUTED } },
{ text: ", renamed in 2009 to reflect better disease understanding.", options: { color: LIGHT_TXT } },
], { x: 0.65, y: 1.42, w: 8.7, h: 1.0, fontSize: 14, valign: "middle" });
// Two columns: types + chronicity
infoBox(s, 0.45, 2.65, 4.35, 2.65, "Types of ITP",
"PRIMARY ITP\nNo identifiable underlying cause.\nAutoantibodies to platelet membrane\nglycoprotein antigens (mainly GpIIb/IIIa,\nGpIb/IX) → destruction + impaired\nproduction\n\nSECONDARY ITP\nAssociated with viral infections, SLE,\nlymphoma, HIV, HCV, medications");
infoBox(s, 5.0, 2.65, 4.55, 2.65, "Chronicity Classification",
"NEWLY DIAGNOSED\n< 3 months since diagnosis\n\nPERSISTENT\n3 – 12 months since diagnosis\n\nCHRONIC\n> 12 months since diagnosis\n\nSEVERE ITP\nPlatelet count < 20,000/µL");
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 4 — EPIDEMIOLOGY
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Epidemiology");
slideTitle(s, "Who Gets ITP?");
divider(s, 1.22);
const stats = [
{ val: "4–8", unit: "per 100,000", label: "Annual incidence\nin children" },
{ val: "2–6", unit: "years", label: "Peak age of\nonset in children" },
{ val: "1:1", unit: "M : F", label: "Equal sex ratio\nin childhood ITP" },
{ val: "80%", unit: "of cases", label: "Spontaneous\nremission rate" },
];
stats.forEach(({ val, unit, label }, i) => {
const x = 0.45 + i * 2.35;
s.addShape(pres.ShapeType.rect, { x, y: 1.4, w: 2.2, h: 2.2, fill: { color: MID_NAVY }, line: { color: ACCENT, width: 1 } });
s.addText(val, { x, y: 1.5, w: 2.2, h: 0.9, fontSize: 38, bold: true, color: GOLD, align: "center", margin: 0 });
s.addText(unit, { x, y: 2.35, w: 2.2, h: 0.35, fontSize: 12, color: ACCENT, align: "center", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: x + 0.35, y: 2.72, w: 1.5, h: 0.04, fill: { color: ACCENT } });
s.addText(label, { x, y: 2.82, w: 2.2, h: 0.65, fontSize: 12, color: MUTED, align: "center", margin: 0 });
});
// bullets below
s.addText([
bullet("Bimodal age distribution: peaks at 1–5 years (childhood) and >60 years (adults)"),
bullet("Childhood acute ITP commonly follows a viral illness by 1–3 weeks (post-infectious)"),
bullet("Chronic ITP (>12 months) is primarily an adult disease, 3× more common in women"),
bullet("Acute form has >90% rate of spontaneous remission; morbidity/mortality low"),
], { x: 0.55, y: 3.75, w: 9.0, h: 1.6, valign: "top", margin: 0 });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 5 — PATHOGENESIS
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Pathogenesis");
slideTitle(s, "How Does ITP Develop?");
divider(s, 1.22);
// Step-by-step flow
const steps = [
{ num: "1", title: "Trigger", body: "Viral infection or unknown antigen stimulus (post-viral in 70% of childhood cases)" },
{ num: "2", title: "Autoantibody Formation", body: "B-cells produce IgG autoantibodies targeting platelet membrane glycoproteins (GpIIb/IIIa, GpIb/IX)" },
{ num: "3", title: "Platelet Destruction", body: "Antibody-coated platelets removed by macrophages & cytotoxic T-cells in the reticuloendothelial system (mainly spleen & liver)" },
{ num: "4", title: "Impaired Production", body: "Megakaryocyte dysfunction — same autoantibodies impair megakaryocyte maturation → reduced platelet production despite normal bone marrow" },
];
steps.forEach(({ num, title, body }, i) => {
const y = 1.38 + i * 1.02;
s.addShape(pres.ShapeType.ellipse, { x: 0.45, y: y + 0.12, w: 0.52, h: 0.52, fill: { color: GOLD } });
s.addText(num, { x: 0.45, y: y + 0.12, w: 0.52, h: 0.52, fontSize: 16, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
s.addText(title, { x: 1.1, y, w: 3.5, h: 0.38, fontSize: 14, bold: true, color: GOLD, margin: 0 });
s.addText(body, { x: 1.1, y: y + 0.38, w: 8.4, h: 0.58, fontSize: 12.5, color: LIGHT_TXT, margin: 0 });
if (i < 3) s.addShape(pres.ShapeType.rect, { x: 0.66, y: y + 0.68, w: 0.08, h: 0.37, fill: { color: ACCENT } });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 6 — PATHOGENESIS (MECHANISM DETAIL)
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Pathogenesis – Mechanism Detail");
slideTitle(s, "Dual Mechanism of Thrombocytopenia");
divider(s, 1.22);
// Left column
infoBox(s, 0.45, 1.38, 4.55, 3.8, "Increased Destruction",
"• IgG autoantibodies (anti-GpIIb/IIIa most common) coat platelet surface\n\n• Fc receptor-mediated phagocytosis by splenic macrophages\n\n• Cytotoxic T-lymphocytes directly lyse platelets\n\n• Spleen is both the major site of autoantibody production AND platelet destruction\n\n• Thrombopoietin (TPO) levels paradoxically normal/low despite thrombocytopenia → megakaryocyte insensitivity");
// Right column
infoBox(s, 5.2, 1.38, 4.35, 3.8, "Impaired Production",
"• Autoantibodies cross-react with megakaryocyte surface antigens\n\n• Inhibit megakaryocyte maturation & proplatelet formation\n\n• Bone marrow shows NORMAL or INCREASED megakaryocytes (functional defect, not numerical)\n\n• T-cell-mediated suppression of thrombopoiesis\n\n• Net result: circulating platelets are young & functional (hence bleeding < expected for count)", RED);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 7 — CLINICAL FEATURES
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Clinical Features");
slideTitle(s, "Presentation in Children");
divider(s, 1.22);
// Feature cards in a 3x2 grid
const cards = [
{ icon: "●", title: "Onset", body: "Sudden, abrupt onset\nTypically within 1–3 weeks\nafter viral illness" },
{ icon: "●", title: "Petechiae", body: "Pin-point non-blanching\nred/purple spots on skin\nMost common finding" },
{ icon: "●", title: "Purpura & Ecchymoses", body: "Bruising without significant\ntrauma; purpuric patches on\nskin and mucous membranes" },
{ icon: "●", title: "Mucosal Bleeding", body: "Epistaxis, gingival bleeding,\noral bullae; prolonged bleeding\nfrom minor wounds" },
{ icon: "●", title: "Absent Organomegaly", body: "Spleen palpable in <10%\nGross splenomegaly → consider\nalternative diagnosis" },
{ icon: "●", title: "Rare Serious Events", body: "Intracranial haemorrhage: <1%\nbut most feared complication;\nurinary/GI bleeding uncommon" },
];
cards.forEach(({ title, body }, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.45 + col * 3.1;
const y = 1.4 + row * 2.0;
s.addShape(pres.ShapeType.rect, { x, y, w: 2.9, h: 1.8, fill: { color: MID_NAVY }, line: { color: (row === 0 ? ACCENT : GOLD), width: 1 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 2.9, h: 0.38, fill: { color: (row === 0 ? ACCENT : GOLD) } });
s.addText(title, { x: x + 0.1, y: y + 0.04, w: 2.7, h: 0.3, fontSize: 12, bold: true, color: DARK_BG, margin: 0 });
s.addText(body, { x: x + 0.1, y: y + 0.44, w: 2.7, h: 1.28, fontSize: 12, color: LIGHT_TXT, valign: "top", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 8 — DIAGNOSIS
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Diagnosis");
slideTitle(s, "Diagnosing ITP — Diagnosis of Exclusion");
divider(s, 1.22);
// Left — workup
s.addText("Laboratory Workup", { x: 0.45, y: 1.38, w: 4.5, h: 0.35, fontSize: 14, bold: true, color: GOLD, margin: 0 });
s.addText([
bullet("CBC: isolated thrombocytopenia; platelets <100 × 10⁹/L"),
bullet("Peripheral blood smear: large/young platelets, rule out fragmented RBCs"),
bullet("Coagulation studies: PT, aPTT — NORMAL in ITP"),
bullet("Bone marrow biopsy: only if atypical features; shows normal/↑ megakaryocytes"),
bullet("ANA, anti-dsDNA if SLE suspected"),
bullet("HIV, HCV, H. pylori serology (secondary ITP workup"),
bullet("Direct Coombs test: if concern for Evans syndrome"),
], { x: 0.45, y: 1.78, w: 4.65, h: 3.5, valign: "top", margin: 0 });
// Right — differential diagnosis box
s.addText("Differential Diagnosis", { x: 5.4, y: 1.38, w: 4.15, h: 0.35, fontSize: 14, bold: true, color: RED, margin: 0 });
const ddx = [
"Gestational/drug-induced thrombocytopenia",
"Thrombotic thrombocytopenic purpura (TTP)",
"Hemolytic-uremic syndrome (HUS)",
"Leukemia / lymphoma",
"Aplastic anemia",
"Congenital thrombocytopenias",
"Bone marrow failure syndromes",
"Hypersplenism / portal hypertension",
"Vitamin B12 or folate deficiency",
"Disseminated intravascular coagulation (DIC)",
];
ddx.forEach((d, i) => {
s.addText("▸ " + d, {
x: 5.4, y: 1.8 + i * 0.34, w: 4.15, h: 0.32,
fontSize: 12, color: i % 2 === 0 ? LIGHT_TXT : MUTED, margin: 0
});
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 9 — MANAGEMENT (OVERVIEW)
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Management");
slideTitle(s, "Treatment Approach in Children");
divider(s, 1.22);
// Key principle box
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.35, w: 9.1, h: 0.8, fill: { color: MID_NAVY }, line: { color: GOLD, width: 1.5 } });
s.addText([
{ text: "Key Principle: ", options: { bold: true, color: GOLD } },
{ text: "Childhood ITP is usually self-limiting. ", options: { color: LIGHT_TXT } },
{ text: "Manage based on BLEEDING SEVERITY, not platelet count alone.", options: { bold: true, color: ACCENT } },
{ text: " Most newly diagnosed children with only cutaneous bleeding can be observed without medication even when platelets <20,000/µL.", options: { color: LIGHT_TXT } },
], { x: 0.65, y: 1.42, w: 8.7, h: 0.65, fontSize: 13, valign: "middle" });
// Three-tier treatment table
const tiers = [
{
label: "TIER 1 — Observation",
color: ACCENT,
items: [
"Mild bleeding: skin manifestations only (petechiae, bruising)",
"Platelet count > 20,000/µL with no bleeding symptoms",
"Regular monitoring; activity restrictions (avoid contact sports)",
"Treat infections that may have triggered ITP",
]
},
{
label: "TIER 2 — Medical Therapy (First-Line)",
color: GOLD,
items: [
"PREDNISONE: 1–2 mg/kg/day PO × 2–4 weeks",
"IVIG: 1 g/kg IV (one dose); use when rapid platelet rise needed",
"ANTI-D IMMUNOGLOBULIN: for Rh(D)-positive non-splenectomized children",
"Indications: mucous membrane bleeding, platelet <10,000/µL, need for surgery",
]
},
{
label: "TIER 3 — Second-Line Therapy",
color: RED,
items: [
"RITUXIMAB: anti-CD20 monoclonal antibody (375 mg/m²/week × 4)",
"TPO RECEPTOR AGONISTS: eltrombopag, romiplostim (stimulate production)",
"SPLENECTOMY: reserved for chronic refractory ITP; avoid < 5 years",
"Response rates: splenectomy ~87%, TPO-RA ~66%, rituximab ~62%",
]
},
];
tiers.forEach(({ label, color, items }, i) => {
const y = 2.3 + i * 1.1;
s.addShape(pres.ShapeType.rect, { x: 0.45, y, w: 9.1, h: 0.3, fill: { color } });
s.addText(label, { x: 0.55, y: y + 0.03, w: 9.0, h: 0.24, fontSize: 12, bold: true, color: DARK_BG, margin: 0 });
items.forEach((item, j) => {
s.addText(" • " + item, {
x: 0.55, y: y + 0.33 + j * 0.175, w: 9.0, h: 0.17,
fontSize: 11, color: LIGHT_TXT, margin: 0
});
});
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 10 — MANAGEMENT DETAIL: MEDICATIONS
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Management – Pharmacotherapy");
slideTitle(s, "Drug Treatments in Detail");
divider(s, 1.22);
const drugs = [
{
name: "Corticosteroids",
dose: "Prednisone 1–2 mg/kg/day; Dexamethasone 0.6 mg/kg/day × 4 days",
mech: "Reduce autoantibody production; inhibit macrophage Fc-receptor function",
note: "First-line; response in 2/3 within 1–3 weeks; taper to avoid side effects"
},
{
name: "IVIG",
dose: "1 g/kg IV as single dose (may repeat)",
mech: "Fc-receptor blockade on macrophages → reduced platelet clearance",
note: "Fastest response (24–72 h); use before surgery or active bleeding"
},
{
name: "Anti-D Immunoglobulin",
dose: "75 µg/kg IV",
mech: "Rh(D)+ RBCs coated → compete with platelets for Fc-receptor clearance",
note: "Only in Rh(D)+ non-splenectomized; risk of hemolysis — monitor Hb"
},
{
name: "Rituximab",
dose: "375 mg/m²/week × 4 doses",
mech: "Anti-CD20 depletes B-lymphocytes → reduces autoantibody production",
note: "Second-line; response ~62%; risk of hypogammaglobulinaemia"
},
{
name: "TPO Receptor Agonists",
dose: "Eltrombopag (oral); Romiplostim (SC weekly)",
mech: "Stimulate megakaryocyte proliferation → increased platelet production",
note: "Slow onset (days–weeks); second/third-line; used for refractory chronic ITP"
},
];
drugs.forEach(({ name, dose, mech, note }, i) => {
const y = 1.38 + i * 0.84;
s.addShape(pres.ShapeType.rect, { x: 0.45, y, w: 9.1, h: 0.76, fill: { color: MID_NAVY }, line: { color: i % 2 === 0 ? ACCENT : GOLD, width: 0.8 } });
s.addText(name, { x: 0.6, y: y + 0.06, w: 2.0, h: 0.28, fontSize: 13, bold: true, color: GOLD, margin: 0 });
s.addText("Dose: " + dose, { x: 2.65, y: y + 0.04, w: 6.8, h: 0.22, fontSize: 10.5, color: MUTED, margin: 0 });
s.addText("Mechanism: " + mech, { x: 2.65, y: y + 0.25, w: 6.8, h: 0.22, fontSize: 10.5, color: LIGHT_TXT, margin: 0 });
s.addText("Note: " + note, { x: 2.65, y: y + 0.47, w: 6.8, h: 0.22, fontSize: 10.5, color: ACCENT, margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 11 — EMERGENCY / PLATELET THRESHOLDS
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Management – Clinical Thresholds");
slideTitle(s, "Platelet Thresholds & Action Points");
divider(s, 1.22);
const thresholds = [
{ count: ">50,000", color: "2E7D32", action: "Observation", detail: "Rarely associated with clinical sequelae; safe for most procedures" },
{ count: "30,000–50,000", color: "F9A825", action: "Monitor closely", detail: "Variable risk; consider treatment if symptomatic or high-risk lifestyle" },
{ count: "20,000–30,000", color: "E65100", action: "Consider treatment", detail: "Initiate glucocorticoids if symptomatic mucous membrane bleeding or active lifestyle" },
{ count: "<20,000", color: "B71C1C", action: "Treat / Admit", detail: "Hospitalization for assessment; IVIG + steroids; hematology consult" },
{ count: "<10,000", color: "880E4F", action: "IVIG + Steroids", detail: "High risk of spontaneous bleeding; dual therapy; platelet transfusion for active severe hemorrhage" },
];
thresholds.forEach(({ count, color, action, detail }, i) => {
const y = 1.38 + i * 0.82;
s.addShape(pres.ShapeType.rect, { x: 0.45, y, w: 2.4, h: 0.72, fill: { color } });
s.addText(count + "\n/µL", { x: 0.45, y, w: 2.4, h: 0.72, fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 3.0, y: y + 0.05, w: 1.8, h: 0.62, fill: { color: MID_NAVY }, line: { color, width: 1.2 } });
s.addText(action, { x: 3.0, y: y + 0.05, w: 1.8, h: 0.62, fontSize: 12, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
s.addText(detail, { x: 5.0, y: y + 0.08, w: 4.55, h: 0.6, fontSize: 12.5, color: LIGHT_TXT, valign: "middle", margin: 0 });
});
// Special procedure note
s.addShape(pres.ShapeType.rect, { x: 0.45, y: 5.52, w: 9.1, h: 0.0, fill: { color: ACCENT } });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 12 — PROGNOSIS & SUMMARY
// ═══════════════════════════════════════════════════════════════
{
const s = navySlide();
accentBar(s);
sectionLabel(s, "Prognosis & Key Takeaways");
slideTitle(s, "Outcomes & Summary");
divider(s, 1.22);
// Prognosis boxes
infoBox(s, 0.45, 1.38, 4.4, 2.25, "Prognosis in Children",
"> 90% of children achieve spontaneous remission\n\n80% complete resolution within 6–12 months\n\nIntracranial haemorrhage: <1% — most feared complication\n\nMortality is rare; quality-of-life impact significant during acute phase\n\nChronic ITP develops in 10–20% of children");
infoBox(s, 5.05, 1.38, 4.5, 2.25, "When to Refer to Haematology",
"• Uncertainty about diagnosis\n• Platelet count < 20,000/µL at presentation\n• No close follow-up available\n• Failure to respond to first-line therapy\n• Chronic ITP (> 12 months)\n• Before any surgical procedure\n• Life-threatening bleeding", RED);
// Key takeaways
s.addText("Key Takeaways", { x: 0.45, y: 3.78, w: 9.1, h: 0.38, fontSize: 16, bold: true, color: GOLD, margin: 0 });
s.addText([
bullet("ITP in children is usually acute, self-limiting, and follows a viral illness"),
bullet("Pathogenesis: anti-platelet IgG autoantibodies → destruction + impaired production"),
bullet("Diagnosis is one of exclusion — rule out other causes of thrombocytopenia"),
bullet("Treat based on bleeding severity, NOT platelet count alone"),
bullet("First-line: observation / corticosteroids / IVIG; second-line: rituximab, TPO-RAs, splenectomy"),
], { x: 0.55, y: 4.18, w: 9.0, h: 1.35, valign: "top", margin: 0 });
}
// ─── WRITE FILE ──────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/itp-presentation/ITP_in_Children.pptx" })
.then(() => console.log("DONE: ITP_in_Children.pptx"))
.catch(err => { console.error(err); process.exit(1); });
cd /home/daytona/workspace/itp-presentation && node itp.js 2>&1
ls -lh /home/daytona/workspace/itp-presentation/ITP_in_Children.pptx
ITP in Children
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Outline / topics covered |
| 3 | Definition - ITP definition, primary vs secondary, chronicity classification (newly diagnosed / persistent / chronic) |
| 4 | Epidemiology - Stat cards: 4-8/100,000 incidence, peak age 2-6 yrs, 1:1 sex ratio, 80% remission |
| 5 | Pathogenesis - 4-step visual flow: trigger → autoantibody formation → platelet destruction → impaired production |
| 6 | Pathogenesis detail - Side-by-side: increased destruction (antibody-coated platelets, splenic macrophages) vs impaired production (megakaryocyte dysfunction) |
| 7 | Clinical features - 6-card grid: onset, petechiae, purpura/ecchymoses, mucosal bleeding, absent organomegaly, rare ICH |
| 8 | Diagnosis - Lab workup (CBC, smear, coags, BMA) + differential diagnosis panel |
| 9 | Management overview - 3-tier treatment table: observation → first-line medical → second-line |
| 10 | Pharmacotherapy - Detailed drug table: steroids, IVIG, anti-D, rituximab, TPO-RAs (dose, mechanism, notes) |
| 11 | Platelet thresholds - Color-coded action guide from >50,000 to <10,000/µL |
| 12 | Prognosis & summary - Outcomes, referral criteria, 5 key takeaways |