Explain me each and everything about this case and in slides accrd ti Nelson pediatrics.. what is normal what abnormal why how when everything with clinical pls

Reading File
Reading File
Reading File
Running Command

cd /home/daytona/workspace/attachments/b6dee3f4-9232-4ea1-a782-7cf66ec92ad8 && p…

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

biliary atresia neonatal cholestasis jaundice

Reading File
Finding Sources
Finding Sources
Reading File
Running Command

mkdir -p /home/daytona/workspace/biliary-atresia-pptx && ls /home/daytona/worksp…

Explain me

It looks like your message got cut off! Could you finish your question?
What would you like me to explain? For example:
  • The case (Biliary Atresia in the neonate Mikey)?
  • A specific part of the case (pathophysiology, diagnosis, management, prognosis)?
  • Something else entirely?

Yes finish my question

Your original request was:
"Explain me each and everything about this case and in slides accrd to Nelson pediatrics.. what is normal what abnormal why how when everything with clinical pls"
So you want me to:
  1. Explain the full case (Mikey, 4-week-old neonate with Biliary Atresia)
  2. Create a PPTX presentation with everything covered according to Nelson Pediatrics
  3. Cover: normal vs abnormal findings, pathophysiology (why/how), clinical presentation, workup, management, prognosis
Shall I go ahead and build the complete slide deck now? It will include:
  • Case summary & clinical findings
  • Normal neonatal bilirubin physiology (what's normal)
  • What's abnormal in this case & why
  • Neonatal cholestasis — causes & approach
  • Biliary Atresia — definition, types, pathogenesis
  • Differential diagnosis with reasoning
  • Investigations (labs, imaging, confirmatory)
  • Management (Kasai procedure + medical)
  • Prognosis
All referenced to Nelson Pediatrics standards. Just confirm and I'll build it right away!

Yes

Running Command

cd /home/daytona/workspace/attachments/b6dee3f4-9232-4ea1-a782-7cf66ec92ad8 && p…

Finding Sources
Finding Sources
Searching Images

biliary atresia neonatal jaundice acholic stools

Reading File
Reading File
Searching Images

Kasai portoenterostomy biliary atresia surgery procedure

Reading File
Reading File
Searching Images

triangular cord sign ultrasound biliary atresia neonatal

Running Command

mkdir -p /home/daytona/workspace/biliary-atresia-pptx && ls /home/daytona/worksp…

Writing File

~/biliary-atresia-pptx/build.js

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

// ── Fetch images ──────────────────────────────────────────────────────────────
const imageUrls = [
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d91ddf406254072860b3d24d29ac4a53ce6fc40f48da83cf2c2f6f1a0648816b.jpg", // acholic stool
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_f2c8a6cdf6d2c08aad60ffc6cc0579cf21211677481c63b038c80ccc03a192c7.jpg", // stool colour card
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_af52b5b15d64d1f505da24838476bab9ab62b3a17c3932e3bc7c93973defb26b.jpg", // triangular cord US
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_34fc1a3de86963010a82708a8c366246a2df2512de92e8102ada9e692f60b3e5.jpg", // US features panel
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b261808e43235011aabab80fc8a3e8caebcc76f12bbee8c45b05ad56f3add61f.jpg", // IOC BA vs normal
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_43a9cb5b21738db5ebc4ac9b70ec0ca06bcfff2602781da4b802dd55156952ea.jpg", // Kasai intraop
  "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_e29b929dbf3a6030915657e76192b3a80346fae40f8249368d4758bd288ee0c4.jpg", // Kasai Roux-en-Y
  "https://cdn.orris.care/cdss_images/e29febf1e2e1520641edb63c5d8a32d525ad4b5c44190f91a23514d37ef1f6a7.png",  // histology BA
  "https://cdn.orris.care/cdss_images/48576a33df708b1b162d4cfca1e5961233d8d74741bac59bbb05adf893f66c4f.png",  // neonatal hepatitis
];

console.log("Fetching images...");
const fetched = JSON.parse(execSync(
  `node /home/daytona/skills/shared/scripts/fetch_images.js ${imageUrls.map(u => `"${u}"`).join(" ")}`
).toString());

const img = {};
const keys = ["acholicStool","stoolCard","triangularCord","usPanel","ioc","kasai1","kasai2","histBA","histNH"];
keys.forEach((k,i) => { img[k] = fetched[i] && !fetched[i].error ? fetched[i].base64 : null; });
console.log("Images fetched:", keys.filter(k=>img[k]).length, "/", keys.length);

// ── Theme ──────────────────────────────────────────────────────────────────────
const NAVY   = "0A2342";  // dominant dark navy
const TEAL   = "0E8B8B";  // teal accent
const GOLD   = "F5A623";  // warm gold highlight
const WHITE  = "FFFFFF";
const LGRAY  = "EDF1F7";
const DGRAY  = "3A3A4A";
const RED    = "D0021B";
const GREEN  = "27AE60";
const ORANGE = "E67E22";

// ── PptxGen ───────────────────────────────────────────────────────────────────
const pres = new pptxgen();
pres.layout  = "LAYOUT_16x9";
pres.author  = "Orris AI";
pres.title   = "Biliary Atresia – Neonatal Cholestatic Jaundice";

// ── Helper functions ──────────────────────────────────────────────────────────
function addFullBg(slide, color) {
  slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color} });
}

function sectionHeader(slide, title, subtitle, accent) {
  addFullBg(slide, NAVY);
  slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.5, h:"100%", fill:{color: accent||TEAL} });
  slide.addShape(pres.ShapeType.rect, { x:0.5, y:2.5, w:9.5, h:0.06, fill:{color: accent||TEAL} });
  slide.addText(title, { x:0.8, y:1.5, w:9, h:0.8, fontSize:36, bold:true, color:WHITE, fontFace:"Calibri" });
  if (subtitle) slide.addText(subtitle, { x:0.8, y:2.7, w:9, h:0.5, fontSize:16, color:TEAL, fontFace:"Calibri", italic:true });
}

function addTitleBar(slide, title, color) {
  slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:"100%", h:0.9, fill:{color: color||NAVY} });
  slide.addText(title, { x:0.2, y:0, w:9.6, h:0.9, fontSize:22, bold:true, color:WHITE, fontFace:"Calibri", valign:"middle" });
}

function addBullets(slide, items, opts) {
  const defaults = { x:0.3, y:1.0, w:9.4, h:4.4, fontSize:15, color:DGRAY, fontFace:"Calibri", valign:"top" };
  const o = Object.assign({}, defaults, opts);
  slide.addText(items.map((item, i) => {
    if (typeof item === "string") {
      return { text: item, options: { bullet: { indent:15 }, breakLine: i < items.length-1 } };
    }
    return item;
  }), o);
}

function addTwoCol(slide, leftItems, rightItems, leftTitle, rightTitle, leftColor, rightColor) {
  // Left column
  slide.addShape(pres.ShapeType.rect, { x:0.2, y:0.95, w:4.5, h:0.4, fill:{color: leftColor||TEAL} });
  slide.addText(leftTitle, { x:0.2, y:0.95, w:4.5, h:0.4, fontSize:13, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
  slide.addText(leftItems.map((t,i)=>({ text:t, options:{ bullet:{indent:10}, breakLine:i<leftItems.length-1 }})),
    { x:0.2, y:1.4, w:4.5, h:3.9, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });
  // Right column
  slide.addShape(pres.ShapeType.rect, { x:5.1, y:0.95, w:4.7, h:0.4, fill:{color: rightColor||NAVY} });
  slide.addText(rightTitle, { x:5.1, y:0.95, w:4.7, h:0.4, fontSize:13, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
  slide.addText(rightItems.map((t,i)=>({ text:t, options:{ bullet:{indent:10}, breakLine:i<rightItems.length-1 }})),
    { x:5.1, y:1.4, w:4.7, h:3.9, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, NAVY);
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.08, h:"100%", fill:{color:GOLD} });
  s.addShape(pres.ShapeType.rect, { x:0.08, y:0, w:0.08, h:"100%", fill:{color:TEAL} });
  s.addShape(pres.ShapeType.rect, { x:0, y:3.6, w:"100%", h:0.06, fill:{color:TEAL} });
  s.addText("BILIARY ATRESIA", { x:0.5, y:0.7, w:9.2, h:0.9, fontSize:44, bold:true, color:WHITE, fontFace:"Calibri", charSpacing:3 });
  s.addText("Neonatal Cholestatic Jaundice", { x:0.5, y:1.7, w:9.2, h:0.55, fontSize:22, color:TEAL, fontFace:"Calibri", italic:true });
  s.addShape(pres.ShapeType.rect, { x:0.5, y:2.35, w:3.5, h:0.04, fill:{color:GOLD} });
  s.addText([
    { text:"Case of Mikey, 4-Week-Old Neonate", options:{ breakLine:true } },
    { text:"Pathophysiology • Diagnosis • Management • Prognosis", options:{} },
  ], { x:0.5, y:2.5, w:9, h:0.9, fontSize:15, color:LGRAY, fontFace:"Calibri" });
  s.addText("Based on Nelson Textbook of Pediatrics & Major Medical Literature", { x:0.5, y:5.0, w:9, h:0.4, fontSize:12, color:TEAL, fontFace:"Calibri", italic:true });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 2 – CASE OVERVIEW
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🧒 Case Summary — Mikey, 4 Weeks Old");
  s.addShape(pres.ShapeType.rect, { x:0.2, y:1.0, w:9.6, h:4.45, fill:{color:WHITE}, line:{color:"CCCCCC",pt:1} });

  // Three columns: Prenatal/Natal | Postnatal/Feeding | Examination
  const col1 = [
    "👩 Mother: 25 yrs, G1P0",
    "PNC done at local clinic",
    "CBC, UA, UTZ, Blood typing, HBsAg — all unremarkable",
    "No maternal illness or vices",
    "Tetanus toxoid completed",
    "Normal vaginal delivery",
    "Good APGAR score",
    "Birth weight: 2,500 g (normal)",
    "Vaccinations: BCG, Vit K, Hep B given at birth",
  ];
  const col2 = [
    "Day 14: Yellow skin on face noticed → NO consult",
    "Day 21: Jaundice progressed to whole body → sunlight exposure only",
    "Day 21: Pale/gray stools + dark urine noted",
    "Bottle-fed from Day 2 (insufficient breast milk)",
    "Good suck and feeding pattern",
    "No vomiting, no fever",
    "Patient arrived for consult at 4 weeks old",
  ];

  s.addShape(pres.ShapeType.rect, { x:0.25, y:1.05, w:4.5, h:0.35, fill:{color:NAVY} });
  s.addText("Prenatal & Natal History", { x:0.25, y:1.05, w:4.5, h:0.35, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
  s.addText(col1.map((t,i)=>({ text:t, options:{ bullet:{indent:10}, breakLine:i<col1.length-1 }})),
    { x:0.25, y:1.45, w:4.5, h:3.9, fontSize:11.5, color:DGRAY, fontFace:"Calibri", valign:"top" });

  s.addShape(pres.ShapeType.rect, { x:5.0, y:1.05, w:4.7, h:0.35, fill:{color:TEAL} });
  s.addText("Postnatal History & Feeding", { x:5.0, y:1.05, w:4.7, h:0.35, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
  s.addText(col2.map((t,i)=>({ text:t, options:{ bullet:{indent:10}, breakLine:i<col2.length-1 }})),
    { x:5.0, y:1.45, w:4.7, h:3.9, fontSize:11.5, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 3 – PHYSICAL EXAMINATION
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🩺 Physical Examination Findings");

  // Vitals box
  s.addShape(pres.ShapeType.rect, { x:0.2, y:1.0, w:9.6, h:0.9, fill:{color:NAVY} });
  s.addText([
    {text:"VITALS:  ", options:{bold:true, color:GOLD}},
    {text:"HR 125 bpm  |  RR 45 cpm  |  Temp 36.5°C  |  SpO₂ 98% (RA)  |  Weight 3.5 kg", options:{color:WHITE}},
  ], { x:0.4, y:1.05, w:9.2, h:0.8, fontSize:14, fontFace:"Calibri", valign:"middle" });

  // Abnormal findings (left)
  s.addShape(pres.ShapeType.rect, { x:0.2, y:2.05, w:4.5, h:0.35, fill:{color:"C0392B"} });
  s.addText("⚠ ABNORMAL FINDINGS", { x:0.2, y:2.05, w:4.5, h:0.35, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
  const abnormal = [
    "Jaundice head-to-toe (Zone 5 — Kramer's scale)",
    "Icteric sclerae (conjugated hyperbilirubinemia)",
    "Pale/acholic gray stools (absent bile pigment)",
    "Dark-colored urine (bilirubinuria)",
    "Mild hepatomegaly (liver slightly enlarged)",
    "Persistent jaundice >2 weeks (pathological)",
  ];
  s.addText(abnormal.map((t,i)=>({ text:t, options:{ bullet:{indent:10, color:"C0392B"}, breakLine:i<abnormal.length-1, color:"C0392B", bold:false }})),
    { x:0.2, y:2.45, w:4.5, h:2.9, fontSize:12.5, color:DGRAY, fontFace:"Calibri", valign:"top" });

  // Normal findings (right)
  s.addShape(pres.ShapeType.rect, { x:5.0, y:2.05, w:4.7, h:0.35, fill:{color:GREEN} });
  s.addText("✓ NORMAL / REASSURING FINDINGS", { x:5.0, y:2.05, w:4.7, h:0.35, fontSize:11.5, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
  const normal = [
    "No cyanosis",
    "No fever",
    "No alar flaring / respiratory distress",
    "No heart murmur",
    "No splenomegaly",
    "Abdomen soft and non-tender",
    "Good muscle tone, no spasticity",
    "SpO₂ 98% (room air)",
    "Normal APGAR at birth",
    "Good feeding pattern",
  ];
  s.addText(normal.map((t,i)=>({ text:t, options:{ bullet:{indent:10, color:GREEN}, breakLine:i<normal.length-1, color:GREEN }})),
    { x:5.0, y:2.45, w:4.7, h:2.9, fontSize:12.5, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 4 – NORMAL NEONATAL JAUNDICE PHYSIOLOGY (What Is Normal?)
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "📚 Normal Neonatal Jaundice — What Is Physiologic? (Nelson)");

  const items = [
    { text: "DEFINITION (Nelson):", options: { bold:true, color:NAVY, breakLine:true } },
    { text: "Physiologic jaundice = unconjugated hyperbilirubinemia in the first week of life; self-limiting.", options: { breakLine:true } },
    { text: " ", options: { breakLine:true } },
    { text: "WHY IT OCCURS:", options: { bold:true, color:NAVY, breakLine:true } },
    { text: "Fetal Hb (HbF) replaced by adult Hb → ↑ RBC breakdown → ↑ bilirubin load", options: { breakLine:true } },
    { text: "Neonatal liver has ↓ UDP-glucuronosyltransferase → ↓ conjugation capacity", options: { breakLine:true } },
    { text: "↑ Enterohepatic circulation in neonates", options: { breakLine:true } },
    { text: " ", options: { breakLine:true } },
    { text: "WHEN IT APPEARS & RESOLVES:", options: { bold:true, color:NAVY, breakLine:true } },
    { text: "Term infant:  Onset Day 2-3  |  Peak Day 3-5  |  Resolves by Day 10-14", options: { breakLine:true } },
    { text: "Preterm:  Onset Day 3-4  |  Peak Day 5-7  |  May persist to 3 weeks", options: { breakLine:true } },
    { text: " ", options: { breakLine:true } },
    { text: "KRAMER'S ZONES (Head-to-Toe Progression):", options: { bold:true, color:NAVY, breakLine:true } },
    { text: "Zone 1: Face/head (~5 mg/dL)  →  Zone 3: Lower abdomen (~12 mg/dL)  →  Zone 5: Palms & soles (>15 mg/dL)", options: { breakLine:true } },
    { text: " ", options: { breakLine:true } },
    { text: "PHYSIOLOGIC LIMITS (Nelson):", options: { bold:true, color:NAVY, breakLine:true } },
    { text: "Bilirubin rises <5 mg/dL/day; total bili <12.9 mg/dL in term; predominantly unconjugated; resolves by 2 weeks", options: {breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:9.4, h:4.55, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 5 – PHYSIOLOGIC vs PATHOLOGIC (What Is Abnormal?)
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "⚠ Physiologic vs Pathologic Jaundice — How to Tell Apart");

  const physio = [
    "Onset: Day 2-3 of life",
    "Resolves: By 14 days (term)",
    "Type: Unconjugated (indirect)",
    "Stools: Normal yellow/brown",
    "Urine: Normal colour",
    "Liver: Normal size",
    "No dark urine",
    "Baby well, feeding well",
    "Bilirubin < 12–13 mg/dL",
  ];
  const patho = [
    "Onset: Day 1 OR persists >2 weeks",
    "Does NOT resolve — progresses",
    "Type: Conjugated (direct) bilirubin",
    "Stools: Pale / acholic / clay-coloured",
    "Urine: Dark (bilirubinuria)",
    "Liver: Enlarged (hepatomegaly)",
    "Icteric sclerae",
    "Conjugated bilirubin > 1 mg/dL or >20% of total",
    "→ ALWAYS INVESTIGATE",
  ];
  addTwoCol(s, physio, patho, "✅ PHYSIOLOGIC (NORMAL)", "🚨 PATHOLOGIC (MIKEY's CASE)", GREEN, "C0392B");

  s.addShape(pres.ShapeType.rect, { x:0.2, y:5.05, w:9.6, h:0.45, fill:{color:GOLD} });
  s.addText("KEY NELSON RULE: Any jaundice persisting beyond 14 days in a term neonate = Pathological until proven otherwise. Conjugated fraction > 1 mg/dL or > 20% = Cholestasis.", 
    { x:0.3, y:5.08, w:9.4, h:0.4, fontSize:12, bold:true, color:NAVY, fontFace:"Calibri", valign:"middle" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 6 – WHAT IS CHOLESTASIS / PRIMARY IMPRESSION
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🔍 Primary Impression: Neonatal Cholestatic Jaundice");

  s.addShape(pres.ShapeType.rect, { x:0.2, y:1.0, w:9.6, h:0.45, fill:{color:TEAL} });
  s.addText("CHOLESTASIS = impaired bile formation or flow → bilirubin (conjugated) spills into blood + urine; bile absent from gut",
    { x:0.3, y:1.02, w:9.4, h:0.42, fontSize:13, bold:true, color:WHITE, fontFace:"Calibri", valign:"middle" });

  const why = [
    { text:"Clinical Clue", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"1. Jaundice persisting at 4 weeks → WAY beyond 14-day physiologic limit (Nelson)", options:{breakLine:true} },
    { text:"2. Acholic/pale gray stools → No bilirubin reaching gut → OBSTRUCTED bile duct", options:{breakLine:true} },
    { text:"3. Dark urine → Conjugated bilirubin excreted in urine (bilirubin = water-soluble when conjugated)", options:{breakLine:true} },
    { text:"4. Hepatomegaly → Bile accumulation + hepatic inflammation / fibrosis beginning", options:{breakLine:true} },
    { text:"5. Progressive jaundice head → toe (Zone 5) → Rising conjugated bilirubin load", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"NEONATAL CHOLESTASIS (Nelson/Robbins):", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Incidence: ~1 in 2,500 live births. Causes: (1) Biliary atresia (most important) (2) Neonatal hepatitis (3) Metabolic disease (4) Congenital infection (TORCH)", options:{breakLine:false} },
  ];
  s.addText(why, { x:0.3, y:1.55, w:9.4, h:4.0, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 7 – BILIARY ATRESIA: DEFINITION & EPIDEMIOLOGY
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "📖 Biliary Atresia — Definition & Epidemiology");

  const items = [
    { text:"DEFINITION:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Complete or partial obstruction of the EXTRAHEPATIC biliary tree occurring within the first 3 months of life (Robbins; Nelson).", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"EPIDEMIOLOGY:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Incidence: 1 in 10,000–15,000 live births (USA/Europe)", options:{breakLine:true} },
    { text:"~1/3 of all cases of neonatal cholestatic jaundice", options:{breakLine:true} },
    { text:"#1 cause of death from liver disease in early childhood", options:{breakLine:true} },
    { text:"50–60% of children referred for liver transplantation", options:{breakLine:true} },
    { text:"Slight female predominance", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"TYPES:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"① FETAL FORM (~20%): Biliary tree malformed in utero; associated anomalies — polysplenia, situs inversus, malrotation, cardiac defects", options:{breakLine:true} },
    { text:"② PERINATAL FORM (~80%): Normal biliary tree at birth → progressive inflammatory destruction POST-natally. THIS is Mikey's likely type.", options:{breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:9.4, h:4.55, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 8 – PATHOGENESIS (WHY/HOW)
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🔬 Pathogenesis — Why & How Biliary Atresia Develops");

  const items = [
    { text:"TRIGGERS (Sleisenger/Fordtran):", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"• Perinatal viral infections: CMV (most linked), Reovirus-3, Rotavirus-C, EBV", options:{breakLine:true} },
    { text:"• Toxic agents (plant isoflavonoids in animal models)", options:{breakLine:true} },
    { text:"• Autoimmune/dysregulated immune response to biliary epithelium", options:{breakLine:true} },
    { text:"• Genetic susceptibility genes: GPC1 (Glypican-1 — regulates Hedgehog signaling), XPNPEP1, ADD3", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"THE CASCADE:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Trigger (virus/toxin) → Inflammation of biliary epithelium (cholangiocytes)", options:{breakLine:true} },
    { text:"→ T-cell / IFN-γ mediated immune attack → Progressive fibro-obliteration of bile ducts", options:{breakLine:true} },
    { text:"→ Bile cannot flow → Accumulates in liver → Hepatocyte damage + Giant-cell transformation", options:{breakLine:true} },
    { text:"→ Portal fibrosis → CIRRHOSIS (as early as 3–6 months if untreated)", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"MORPHOLOGY (Robbins):", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Inflammation + fibrosing stricture of hepatic/common bile ducts; Bile duct proliferation; Portal edema; Ductular reaction; Neutrophil infiltrates → Biliary cirrhosis", options:{breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:5.5, h:4.55, fontSize:12.5, color:DGRAY, fontFace:"Calibri", valign:"top" });

  if (img.histBA) {
    s.addImage({ data:img.histBA, x:6.0, y:1.0, w:3.8, h:2.6 });
    s.addText("Histology: Biliary atresia — bile duct proliferation, portal fibrosis, cholestasis", { x:6.0, y:3.65, w:3.8, h:0.55, fontSize:9.5, italic:true, color:DGRAY, fontFace:"Calibri" });
  }
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 9 – CLINICAL FEATURES (WHAT TO FIND)
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🩻 Clinical Features of Biliary Atresia (Nelson/Sleisenger)");

  const items = [
    { text:"ONSET:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Born at term, normal pregnancy, normal birth weight. Jaundice appears AFTER physiologic period.", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"CLASSICAL TRIAD:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"① Progressive jaundice (persisting >2 weeks in term infant)", options:{breakLine:true} },
    { text:"② Acholic stools — pale/clay/gray (bile absent from gut)", options:{breakLine:true} },
    { text:"③ Dark urine (conjugated bilirubin = water-soluble → urinary excretion)", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"EXAMINATION:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Hepatomegaly: Firm liver 2–6 cm below right costal margin (Sleisenger)", options:{breakLine:true} },
    { text:"Splenomegaly: NOT early — develops with portal hypertension", options:{breakLine:true} },
    { text:"Icteric sclerae, jaundice head-to-toe", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"LABS:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Total bili 6–12 mg/dL; ≥50% conjugated | ↑ AST, ALT, ALP, GGT (GGT markedly elevated) | ↑ PT/INR (Vit K malabsorption)", options:{breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:5.5, h:4.55, fontSize:12.5, color:DGRAY, fontFace:"Calibri", valign:"top" });

  if (img.acholicStool) {
    s.addImage({ data:img.acholicStool, x:6.0, y:1.0, w:3.8, h:2.6 });
    s.addText("Acholic (pale/clay) stool — hallmark sign of biliary atresia (absent bile pigment = stercobilin absent)", { x:6.0, y:3.65, w:3.8, h:0.6, fontSize:9.5, italic:true, color:DGRAY, fontFace:"Calibri" });
  }
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 10 – STOOL COLOUR CARD
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🎨 Stool Colour Card — Screening Tool for Biliary Atresia");

  s.addText([
    {text:"WHY STOOL COLOUR MATTERS:\n", options:{bold:true, color:NAVY}},
    {text:"Normal stool colour = BROWN/YELLOW (stercobilin from bilirubin metabolism in the gut).\n", options:{breakLine:true}},
    {text:"In biliary atresia → bile CANNOT enter the gut → NO stercobilin → ACHOLIC (pale/white/gray) stools.\n\n", options:{breakLine:true}},
    {text:"Taiwan Study (Sleisenger):", options:{bold:true, color:NAVY, breakLine:true}},
    {text:"A stool colour card given to parents at birth significantly decreased late referrals for cholestasis evaluation.\n\n", options:{breakLine:true}},
    {text:"Colours 1–3 on card = acholic/pathological → URGENT referral needed.\n", options:{bold:true, color:"C0392B", breakLine:true}},
    {text:"Colours 4–7 = normal pigmented stools.", options:{}},
  ], { x:0.3, y:1.0, w:5.5, h:4.5, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });

  if (img.stoolCard) {
    s.addImage({ data:img.stoolCard, x:6.0, y:1.0, w:3.8, h:4.0 });
    s.addText("Stool colour card (Taiwan screening tool). Colors 1-3 = acholic = investigate cholestasis.", { x:6.0, y:5.05, w:3.8, h:0.45, fontSize:9.5, italic:true, color:DGRAY, fontFace:"Calibri" });
  }
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 11 – DIFFERENTIAL DIAGNOSIS
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🗂 Differential Diagnosis of Neonatal Cholestasis");

  // Table rows: DDx | Features | Rule In/Out
  const tableRows = [
    [
      { text:"DIAGNOSIS", options:{bold:true, fill:{color:NAVY}, color:WHITE, align:"center"} },
      { text:"KEY FEATURES", options:{bold:true, fill:{color:NAVY}, color:WHITE, align:"center"} },
      { text:"IN MIKEY", options:{bold:true, fill:{color:NAVY}, color:WHITE, align:"center"} },
    ],
    [
      { text:"Biliary Atresia ★ MOST LIKELY", options:{bold:true, color:NAVY} },
      { text:"Persistent jaundice >2wks, acholic stools, dark urine, hepatomegaly, NO other anomalies", options:{} },
      { text:"✅ RULE IN — all features match; no features against", options:{bold:true, color:GREEN} },
    ],
    [
      { text:"Neonatal Hepatitis", options:{color:DGRAY} },
      { text:"Prolonged jaundice, hepatomegaly, elevated LFTs; stool NOT persistently acholic; HIDA may show some excretion", options:{} },
      { text:"⚠ Partial match — persistently acholic stools argue AGAINST; cannot fully exclude without HIDA", options:{color:ORANGE} },
    ],
    [
      { text:"Metabolic Liver Disease (Galactosemia, Tyrosinemia, etc.)", options:{color:DGRAY} },
      { text:"Jaundice + vomiting + poor feeding + hypoglycemia + systemic illness", options:{} },
      { text:"❌ RULE OUT — no vomiting, no hypoglycemia, normal feeding; awaiting newborn screen", options:{color:"C0392B"} },
    ],
    [
      { text:"TORCH / Congenital Infection (CMV, Rubella, etc.)", options:{color:DGRAY} },
      { text:"Hepatomegaly + splenomegaly, microcephaly, rash, thrombocytopenia, fever, neurologic signs", options:{} },
      { text:"❌ RULE OUT — no maternal illness, no anomalies, no rash/fever/splenomegaly/neuro signs", options:{color:"C0392B"} },
    ],
    [
      { text:"Choledochal Cyst", options:{color:DGRAY} },
      { text:"Jaundice + RUQ mass + cholestasis; visible cyst on US", options:{} },
      { text:"⚠ Needs US to exclude", options:{color:ORANGE} },
    ],
  ];

  s.addTable(tableRows, {
    x:0.2, y:1.0, w:9.6, h:4.5,
    colW:[2.5, 4.0, 3.1],
    border:{pt:1, color:"CCCCCC"},
    fontSize:11,
    fontFace:"Calibri",
    color:DGRAY,
  });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 12 – INVESTIGATIONS PART 1 (Labs)
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🧪 Investigations — Part 1: Laboratory Tests");

  const items = [
    { text:"1. SERUM BILIRUBIN (Total + Direct)", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Confirm neonatal cholestasis: Direct/conjugated bilirubin >1 mg/dL or >20% of total is PATHOLOGICAL", options:{breakLine:true} },
    { text:"Expected in BA: Total bili 6–12 mg/dL; >50% conjugated (Sleisenger)", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"2. LIVER FUNCTION TESTS: AST, ALT, ALP, GGT", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"BA: GGT markedly elevated (hallmark), AST/ALT moderately elevated, ALP elevated", options:{breakLine:true} },
    { text:"GGT elevation distinguishes BA from PFIC (Progressive Familial Intrahepatic Cholestasis) — low GGT in PFIC", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"3. COAGULATION PROFILE: PT / INR", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Prolonged PT → Fat-soluble vitamin K malabsorption due to cholestasis → Bleeding risk", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"4. CBC — exclude hemolytic anemia (unconjugated jaundice cause)", options:{breakLine:true} },
    { text:"5. Blood culture, TORCH serology, metabolic panel (galactose, amino acids) — to exclude DDx", options:{breakLine:true} },
    { text:"6. Thyroid function (hypothyroidism = cause of prolonged jaundice)", options:{breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:9.4, h:4.55, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 13 – INVESTIGATIONS PART 2 (Imaging)
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🖼 Investigations — Part 2: Imaging & Confirmatory Tests");

  const items = [
    { text:"1. ABDOMINAL ULTRASOUND (First-line)", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Findings in BA: Small/absent gallbladder | Triangular cord sign (fibrous echogenic band >4 mm anterior to portal vein) | Hepatomegaly | No intrahepatic duct dilation", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"2. HEPATOBILIARY SCINTIGRAPHY — HIDA SCAN (⁹⁹ᵐTc-IDA)", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Normal hepatic UPTAKE but ABSENT excretion into intestine = biliary obstruction → BA", options:{breakLine:true} },
    { text:"Pre-treat with phenobarbitone (5 days) to enhance bile excretion (excludes false positives)", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"3. LIVER BIOPSY (Confirmatory — percutaneous)", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Bile duct proliferation | Portal fibrosis | Bile plugs in ducts | Ductular reaction — supports BA", options:{breakLine:true} },
    { text:"Differentiates BA from neonatal hepatitis (giant cell transformation) in 90% of cases", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"4. INTRAOPERATIVE CHOLANGIOGRAPHY (Gold Standard / Definitive)", options:{bold:true, color:"C0392B", breakLine:true} },
    { text:"Absent/non-patent extrahepatic bile ducts = CONFIRMS BILIARY ATRESIA", options:{bold:true, color:"C0392B", breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:5.5, h:4.55, fontSize:12.5, color:DGRAY, fontFace:"Calibri", valign:"top" });

  if (img.triangularCord) {
    s.addImage({ data:img.triangularCord, x:5.9, y:0.95, w:3.9, h:2.9 });
    s.addText("Triangular cord sign on US — fibrous echogenic band >4 mm anterior to portal vein = hallmark of BA", { x:5.9, y:3.9, w:3.9, h:0.6, fontSize:9, italic:true, color:DGRAY, fontFace:"Calibri" });
  }
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 14 – IMAGING: IOC AND US PANEL
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, WHITE);
  addTitleBar(s, "🔬 Diagnostic Imaging in Biliary Atresia");

  if (img.ioc) {
    s.addImage({ data:img.ioc, x:0.2, y:1.0, w:5.5, h:3.5 });
    s.addText("Intraoperative Cholangiogram: (A) Biliary Atresia — absent bile duct filling. (B) Normal — patent ducts visible draining into duodenum.", 
      { x:0.2, y:4.55, w:5.5, h:0.65, fontSize:10, italic:true, color:DGRAY, fontFace:"Calibri" });
  }
  if (img.usPanel) {
    s.addImage({ data:img.usPanel, x:5.9, y:1.0, w:3.9, h:3.5 });
    s.addText("US Panel: GB dysmorphology (absent/micro GB), triangular cord sign, hilar lymphadenopathy — key US markers for BA.",
      { x:5.9, y:4.55, w:3.9, h:0.65, fontSize:10, italic:true, color:DGRAY, fontFace:"Calibri" });
  }
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 15 – MANAGEMENT: INITIAL & MEDICAL
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "💊 Management — Step 1: Initial & Medical");

  const items = [
    { text:"IMMEDIATE STEPS (Nelson/Sleisenger):", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"① Admit to hospital → refer to Pediatric Gastroenterologist + Pediatric Surgeon URGENTLY", options:{breakLine:true} },
    { text:"② Monitor: Vitals, weight, hydration, feeding, stool colour, urine colour", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"NUTRITIONAL SUPPORT:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"High-calorie formula with MCT (Medium-Chain Triglycerides) → MCTs absorbed without bile salts", options:{breakLine:true} },
    { text:"Fat-soluble vitamins: A, D, E, K supplementation (malabsorbed due to cholestasis)", options:{breakLine:true} },
    { text:"Vitamin K IV/IM → Prevent/treat coagulopathy (↑ PT due to Vit K deficiency)", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"MEDICATIONS:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Ursodeoxycholic acid (UDCA) → Post-operative bile flow enhancement", options:{breakLine:true} },
    { text:"Prophylactic antibiotics (post-Kasai) → Prevent cholangitis", options:{breakLine:true} },
    { text:"Corticosteroids (some centres) → Reduce post-operative inflammation / improve bile flow", options:{breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:9.4, h:4.55, fontSize:13, color:DGRAY, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 16 – MANAGEMENT: KASAI PROCEDURE
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "⚕ Definitive Treatment — Kasai Hepatoportoenterostomy");

  const items = [
    { text:"KASAI PROCEDURE (Hepatoportoenterostomy):", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"Developed by Morio Kasai (Japan, 1950s). First-line definitive surgery for BA.", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"HOW IT WORKS:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"1. Atretic extrahepatic bile ducts are excised down to the porta hepatis (liver hilum)", options:{breakLine:true} },
    { text:"2. A Roux-en-Y loop of jejunum is anastomosed directly to the liver hilum", options:{breakLine:true} },
    { text:"3. Bile drains from tiny residual ductules at porta hepatis → directly into bowel", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"TIMING IS CRITICAL:", options:{bold:true, color:"C0392B", breakLine:true} },
    { text:"Best performed BEFORE 60 days of age → Best outcomes (Nelson/Sleisenger)", options:{bold:true, color:"C0392B", breakLine:true} },
    { text:"After 60 days → ↑ fibrosis → ↓ success rate. After 90 days → very poor prognosis.", options:{breakLine:true} },
    { text:" ", options:{breakLine:true} },
    { text:"SUCCESS RATE:", options:{bold:true, color:NAVY, breakLine:true} },
    { text:"~80% bile flow restoration if done <60 days | ~20–30% if done >90 days", options:{breakLine:true} },
    { text:"~30% of patients remain jaundice-free long term without transplant", options:{breakLine:false} },
  ];
  s.addText(items, { x:0.3, y:0.95, w:5.5, h:4.55, fontSize:12.5, color:DGRAY, fontFace:"Calibri", valign:"top" });

  if (img.kasai1) {
    s.addImage({ data:img.kasai1, x:5.9, y:0.95, w:3.9, h:3.0 });
    s.addText("Kasai portoenterostomy intraop: arrows show portal vein bifurcation, fibrous biliary cone at hilum, and duodenum.", { x:5.9, y:4.0, w:3.9, h:0.65, fontSize:9, italic:true, color:DGRAY, fontFace:"Calibri" });
  }
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 17 – LIVER TRANSPLANTATION
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "🏥 Liver Transplantation — When Kasai Fails");

  const left = [
    "Failed Kasai (persistent jaundice after surgery)",
    "Progressive liver failure",
    "Portal hypertension not controlled",
    "Recurrent cholangitis",
    "Cirrhosis / end-stage liver disease",
    "Poor growth / failure to thrive despite medical management",
  ];
  const right = [
    "BA = #1 indication for pediatric liver transplant (50–60% of cases)",
    "Excellent long-term survival with transplant",
    "Living-related donor transplant (parent/relative) is common",
    "Post-transplant: lifelong immunosuppression required",
    "Monitor for rejection, infection, growth, development",
    "Untreated BA → death within 2 years of age",
  ];
  addTwoCol(s, left, right, "INDICATIONS FOR TRANSPLANT", "OUTCOMES & FACTS", "C0392B", TEAL);

  s.addShape(pres.ShapeType.rect, { x:0.2, y:5.0, w:9.6, h:0.5, fill:{color:NAVY} });
  s.addText("Kasai + Transplant = Complementary strategy. Kasai buys TIME for the child to grow before definitive transplant.",
    { x:0.3, y:5.03, w:9.4, h:0.45, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", valign:"middle" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 18 – PROGNOSIS
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "📊 Prognosis of Biliary Atresia");

  const good = [
    "Early diagnosis (before 6–8 weeks)",
    "Kasai done BEFORE 60 days of age",
    "Good bile drainage post-surgery",
    "Rapidly falling bilirubin levels after Kasai",
    "Normal-coloured stools return post-op",
    "No cholangitis episodes",
    "Adequate nutrition & growth",
    "Access to liver transplant if needed",
  ];
  const poor = [
    "Delayed diagnosis (as in Mikey — consulted at 4 weeks, stool change at 3 weeks)",
    "Kasai done AFTER 90 days → very poor outcome",
    "Persistent jaundice post-surgery",
    "Recurrent cholangitis",
    "Portal hypertension + varices",
    "Advanced fibrosis/cirrhosis at time of surgery",
    "Liver failure",
    "Without treatment: DEATH within 2 years",
  ];
  addTwoCol(s, good, poor, "✅ GOOD PROGNOSIS FACTORS", "❌ POOR PROGNOSIS FACTORS", GREEN, "C0392B");

  s.addShape(pres.ShapeType.rect, { x:0.2, y:5.05, w:9.6, h:0.45, fill:{color:GOLD} });
  s.addText("Sleisenger: ~30% achieve normal bilirubin long-term after Kasai. ~70–80% eventually require transplant. Liver transplant = excellent quality of life.",
    { x:0.3, y:5.07, w:9.4, h:0.42, fontSize:11.5, bold:true, color:NAVY, fontFace:"Calibri", valign:"middle" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 19 – KEY POINTS (TAKE-HOME)
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, NAVY);
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.12, h:"100%", fill:{color:GOLD} });
  s.addShape(pres.ShapeType.rect, { x:0, y:0.85, w:"100%", h:0.06, fill:{color:TEAL} });
  s.addText("KEY TAKEAWAYS", { x:0.3, y:0.15, w:9.4, h:0.65, fontSize:30, bold:true, color:WHITE, fontFace:"Calibri", charSpacing:3 });

  const points = [
    { text:"1. ", options:{bold:true, color:GOLD} }, { text:"Jaundice >14 days in a TERM neonate = PATHOLOGICAL until proven otherwise (Nelson)", options:{color:WHITE, breakLine:true} },
    { text:"2. ", options:{bold:true, color:GOLD} }, { text:"Conjugated bili >1 mg/dL or >20% of total = Cholestasis = INVESTIGATE NOW", options:{color:WHITE, breakLine:true} },
    { text:"3. ", options:{bold:true, color:GOLD} }, { text:"Acholic stools + dark urine + hepatomegaly = BILIARY ATRESIA until proven otherwise", options:{color:WHITE, breakLine:true} },
    { text:"4. ", options:{bold:true, color:GOLD} }, { text:"BA = fibro-inflammatory obliteration of extrahepatic bile ducts; perinatal form (80%) is post-natal onset", options:{color:WHITE, breakLine:true} },
    { text:"5. ", options:{bold:true, color:GOLD} }, { text:"Workup: US (triangular cord sign) → HIDA scan → Liver biopsy → Intraoperative cholangiography (gold standard)", options:{color:WHITE, breakLine:true} },
    { text:"6. ", options:{bold:true, color:GOLD} }, { text:"Kasai portoenterostomy BEFORE 60 days = best chance. Bile flow restored → prevents cirrhosis", options:{color:WHITE, breakLine:true} },
    { text:"7. ", options:{bold:true, color:GOLD} }, { text:"Untreated BA = cirrhosis by 3–6 months, death by 2 years. EARLY ACTION SAVES LIVES.", options:{color:WHITE, breakLine:true} },
    { text:"8. ", options:{bold:true, color:GOLD} }, { text:"Mikey's RED FLAGS that should have triggered EARLIER referral: acholic stools day 21 + progressive jaundice", options:{color:WHITE, breakLine:false} },
  ];
  s.addText(points, { x:0.4, y:0.97, w:9.3, h:4.5, fontSize:13, fontFace:"Calibri", valign:"top" });
}

// ════════════════════════════════════════════════════════════════════
// SLIDE 20 – COMPLICATIONS TIMELINE
// ════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  addFullBg(s, LGRAY);
  addTitleBar(s, "⏱ Complications Timeline — What Happens If Untreated");

  const rows = [
    [
      {text:"TIMELINE", options:{bold:true, fill:{color:NAVY}, color:WHITE, align:"center"}},
      {text:"COMPLICATION", options:{bold:true, fill:{color:NAVY}, color:WHITE, align:"center"}},
      {text:"MECHANISM", options:{bold:true, fill:{color:NAVY}, color:WHITE, align:"center"}},
    ],
    [
      {text:"0–2 weeks", options:{color:DGRAY}},
      {text:"Physiologic jaundice (NORMAL)", options:{color:GREEN}},
      {text:"↑ Bili from HbF breakdown + ↓ liver conjugation", options:{color:DGRAY}},
    ],
    [
      {text:"2–4 weeks", options:{color:ORANGE}},
      {text:"Persistent jaundice → INVESTIGATE", options:{bold:true, color:ORANGE}},
      {text:"Pathological cause — bile flow obstruction", options:{color:DGRAY}},
    ],
    [
      {text:"3–6 months (untreated)", options:{color:"C0392B"}},
      {text:"Biliary CIRRHOSIS", options:{bold:true, color:"C0392B"}},
      {text:"Bile stasis → hepatocyte injury → fibrosis → cirrhosis", options:{color:DGRAY}},
    ],
    [
      {text:"6–12 months", options:{color:"C0392B"}},
      {text:"Portal hypertension", options:{bold:true, color:"C0392B"}},
      {text:"Cirrhosis → ↑ portal pressure → varices, splenomegaly, ascites", options:{color:DGRAY}},
    ],
    [
      {text:"12–18 months", options:{color:"C0392B"}},
      {text:"Cholangitis, growth failure, coagulopathy", options:{bold:true, color:"C0392B"}},
      {text:"Infection of bile ducts; fat-soluble vitamin deficiency; synthetic failure", options:{color:DGRAY}},
    ],
    [
      {text:"~2 years (untreated)", options:{color:"900000"}},
      {text:"DEATH (liver failure)", options:{bold:true, color:"900000"}},
      {text:"End-stage liver disease without surgical intervention", options:{color:DGRAY}},
    ],
  ];

  s.addTable(rows, {
    x:0.2, y:1.0, w:9.6, h:4.5,
    colW:[2.2, 3.5, 3.9],
    border:{pt:1, color:"CCCCCC"},
    fontSize:12,
    fontFace:"Calibri",
    color:DGRAY,
  });
}

// ════════════════════════════════════════════════════════════════════
// WRITE FILE
// ════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName:"/home/daytona/workspace/biliary-atresia-pptx/Biliary_Atresia_Case_Nelson.pptx" })
  .then(() => console.log("✅ PPTX written successfully!"))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

Answer

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.