Pls provide a ppt on hydronephrosis

Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Running Command

mkdir -p /home/daytona/workspace/hydronephrosis-ppt && ls /home/daytona/workspace/hydronephrosis-ppt

Writing File

~/hydronephrosis-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Hydronephrosis";
pres.author = "Medical Education";

// Color palette: deep navy dominant, teal accent, soft white text
const C = {
  navy: "0D2B55",
  navyMid: "1A3F6F",
  teal: "0FA3B1",
  tealLight: "5BC8D4",
  orange: "F4845F",
  white: "FFFFFF",
  lightGray: "E8EEF4",
  darkText: "1C2B3A",
  mutedText: "4A6380",
  yellow: "F9C74F",
};

// ─── HELPER: section label strip ───────────────────────────────────────────
function addSectionLabel(slide, label) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 0.38,
    fill: { color: C.teal },
    line: { color: C.teal },
  });
  slide.addText(label.toUpperCase(), {
    x: 0.3, y: 0, w: 9.4, h: 0.38,
    fontSize: 9, bold: true, color: C.navy,
    charSpacing: 3, valign: "middle", margin: 0,
  });
}

// ─── HELPER: slide title ───────────────────────────────────────────────────
function addSlideTitle(slide, title, x, y, w, h, color) {
  slide.addText(title, {
    x, y, w, h,
    fontSize: 22, bold: true, color: color || C.white,
    valign: "middle", margin: 0,
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 1 β€” Title slide
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();

  // Full dark background
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });

  // Decorative teal bar left
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });

  // Kidney icon (circle as placeholder)
  s.addShape(pres.ShapeType.ellipse, { x: 7.2, y: 0.6, w: 2.4, h: 3.2, fill: { color: C.navyMid }, line: { color: C.teal, pt: 3 } });
  s.addText("🫘", { x: 7.2, y: 0.6, w: 2.4, h: 3.2, fontSize: 72, align: "center", valign: "middle" });

  // Title
  s.addText("Hydronephrosis", {
    x: 0.5, y: 1.1, w: 6.5, h: 1.2,
    fontSize: 40, bold: true, color: C.white, margin: 0,
  });

  // Subtitle underline accent
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 2.35, w: 3.5, h: 0.07, fill: { color: C.teal }, line: { color: C.teal } });

  s.addText("Pathology Β· Etiology Β· Diagnosis Β· Management", {
    x: 0.5, y: 2.5, w: 6.5, h: 0.6,
    fontSize: 14, color: C.tealLight, italic: true, margin: 0,
  });

  s.addText("Sources: Robbins Basic Pathology Β· Campbell-Walsh Urology Β· Comprehensive Clinical Nephrology", {
    x: 0.5, y: 5.0, w: 9, h: 0.45,
    fontSize: 8, color: C.mutedText, margin: 0,
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 2 β€” Definition & Overview
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightGray }, line: { color: C.lightGray } });
  addSectionLabel(s, "Definition");

  // Left navy panel
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0.38, w: 3.5, h: 5.245, fill: { color: C.navy }, line: { color: C.navy } });
  s.addText("What is\nHydronephrosis?", { x: 0.2, y: 0.7, w: 3.1, h: 1.6, fontSize: 22, bold: true, color: C.white, valign: "middle", margin: 0 });
  s.addText("🫘", { x: 0.6, y: 2.5, w: 2.3, h: 2.7, fontSize: 80, align: "center", valign: "middle" });

  // Right content
  s.addText("Core Definition", { x: 3.8, y: 0.55, w: 5.9, h: 0.5, fontSize: 16, bold: true, color: C.navy, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 3.8, y: 1.05, w: 5.9, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });

  const defText = "Dilation of the renal pelvis and calyces with accompanying atrophy of the renal parenchyma, caused by obstruction to urine outflow.";
  s.addShape(pres.ShapeType.rect, { x: 3.7, y: 1.15, w: 6.05, h: 1.0, fill: { color: C.navyMid }, line: { color: C.navyMid }, rounding: true });
  s.addText(defText, { x: 3.85, y: 1.2, w: 5.7, h: 0.9, fontSize: 12, color: C.white, valign: "middle", margin: 0 });

  s.addText("Key Facts", { x: 3.8, y: 2.25, w: 5.9, h: 0.4, fontSize: 14, bold: true, color: C.navy, margin: 0 });
  const facts = [
    "Obstruction can occur at any level β€” urethra to renal pelvis",
    "May be sudden (acute) or insidious (chronic)",
    "Bilateral only when obstruction is below the level of both ureters",
    "Initial functional defect: impaired tubular concentrating ability",
    "Long-standing obstruction β†’ irreversible parenchymal loss",
  ];
  const fArr = facts.map((f, i) => ({ text: f, options: { bullet: { code: "2022" }, color: i === 0 ? C.teal : C.darkText, bold: i === 0, breakLine: true, fontSize: 11 } }));
  s.addText(fArr, { x: 3.8, y: 2.65, w: 5.9, h: 2.7, valign: "top", margin: 4 });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 3 β€” Etiology / Causes
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white }, line: { color: C.white } });
  addSectionLabel(s, "Etiology");

  s.addText("Causes of Hydronephrosis", { x: 0.3, y: 0.5, w: 9.4, h: 0.6, fontSize: 22, bold: true, color: C.navy, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.1, w: 9.4, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });

  // Three columns
  const cols = [
    {
      title: "Congenital", icon: "🧬", color: C.navy,
      items: ["Urethral atresia", "Ureteral valve formations", "Aberrant renal artery compressing ureter", "Abnormal kidney position (torsion/kinking)", "PUJ stenosis (idiopathic β€” most common)"],
    },
    {
      title: "Acquired\n(Intrinsic)", icon: "πŸͺ¨", color: C.teal,
      items: ["Calculi (stones)", "Sloughed renal papillae", "Ureterocele", "Tumour of renal pelvis / ureter", "Schistosomiasis"],
    },
    {
      title: "Acquired\n(Extrinsic)", icon: "πŸ₯", color: C.orange,
      items: ["BPH / Prostate carcinoma", "Bladder tumour", "Retroperitoneal lymphoma", "Cervical / uterine carcinoma", "Retroperitoneal fibrosis", "Pregnancy (mild)", "Neurogenic (spinal cord damage)"],
    },
  ];

  cols.forEach((col, i) => {
    const x = 0.25 + i * 3.22;
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.0, h: 4.2, fill: { color: col.color }, line: { color: col.color }, rounding: true });
    s.addText(col.icon, { x, y: 1.25, w: 3.0, h: 0.6, fontSize: 22, align: "center", valign: "middle" });
    s.addText(col.title, { x, y: 1.85, w: 3.0, h: 0.55, fontSize: 13, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
    s.addShape(pres.ShapeType.rect, { x: x + 0.2, y: 2.4, w: 2.6, h: 0.04, fill: { color: "FFFFFF55" }, line: { color: "FFFFFF33" } });
    const items = col.items.map((t) => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, fontSize: 10, color: C.white } }));
    s.addText(items, { x: x + 0.1, y: 2.48, w: 2.8, h: 2.85, valign: "top", margin: 3 });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 4 β€” Pathogenesis
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  addSectionLabel(s, "Pathogenesis");

  s.addText("Pathogenesis", { x: 0.4, y: 0.5, w: 9, h: 0.6, fontSize: 24, bold: true, color: C.white, margin: 0 });

  // Flow steps
  const steps = [
    { n: "1", label: "Obstruction", detail: "Blockage anywhere from urethra to renal pelvis", color: C.teal },
    { n: "2", label: "Continued Filtration", detail: "Glomerular filtration persists β†’ filtrate accumulates", color: C.tealLight },
    { n: "3", label: "Pelvicalyceal Dilation", detail: "Rising intrapelvic pressure transmitted to collecting ducts", color: C.yellow },
    { n: "4", label: "Vascular Compromise", detail: "Arterial insufficiency + venous stasis in renal parenchyma", color: C.orange },
    { n: "5", label: "Tubular Dysfunction", detail: "Papillae most affected β†’ impaired concentrating ability first", color: "F4845F" },
    { n: "6", label: "Parenchymal Atrophy", detail: "GFR falls β†’ interstitial fibrosis β†’ irreversible loss if prolonged", color: "E05A35" },
  ];

  steps.forEach((st, i) => {
    const x = 0.3 + (i % 3) * 3.15;
    const y = 1.3 + Math.floor(i / 3) * 2.0;
    s.addShape(pres.ShapeType.rect, { x, y, w: 2.9, h: 1.7, fill: { color: C.navyMid }, line: { color: st.color, pt: 2 }, rounding: true });
    s.addShape(pres.ShapeType.ellipse, { x: x + 0.1, y: y + 0.1, w: 0.5, h: 0.5, fill: { color: st.color }, line: { color: st.color } });
    s.addText(st.n, { x: x + 0.1, y: y + 0.1, w: 0.5, h: 0.5, fontSize: 13, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
    s.addText(st.label, { x: x + 0.7, y: y + 0.1, w: 2.1, h: 0.5, fontSize: 12, bold: true, color: st.color, valign: "middle", margin: 0 });
    s.addText(st.detail, { x: x + 0.1, y: y + 0.68, w: 2.7, h: 0.9, fontSize: 10, color: C.lightGray, valign: "top", margin: 2 });
    // Arrow between cols (not after last in row)
    if (i % 3 < 2 && i < steps.length - 1) {
      s.addShape(pres.ShapeType.rect, { x: x + 2.9, y: y + 0.72, w: 0.25, h: 0.08, fill: { color: C.teal }, line: { color: C.teal } });
    }
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 5 β€” Morphology & Grading
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightGray }, line: { color: C.lightGray } });
  addSectionLabel(s, "Morphology & Grading");

  s.addText("Morphology & Grading", { x: 0.3, y: 0.5, w: 9.4, h: 0.55, fontSize: 22, bold: true, color: C.navy, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.05, w: 9.4, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });

  // Left: morphology text
  s.addText("Gross & Microscopic Findings", { x: 0.3, y: 1.18, w: 4.5, h: 0.4, fontSize: 13, bold: true, color: C.navy, margin: 0 });
  const morphItems = [
    "Kidney massively enlarged (up to 20 cm) with subtotal/intermittent obstruction",
    "Renal parenchyma compressed and atrophied; papillae obliterated; pyramids flattened",
    "Complete obstruction β†’ renal function ceases while dilation is still mild",
    "Microscopically: tubular dilation β†’ atrophy β†’ glomerular loss β†’ interstitial fibrosis",
    "Superimposed pyelonephritis is common",
    "Bilateral: both ureters may be dilated (hydroureter)",
  ];
  const morphArr = morphItems.map((t) => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, fontSize: 10, color: C.darkText } }));
  s.addText(morphArr, { x: 0.3, y: 1.6, w: 4.5, h: 3.8, valign: "top", margin: 4 });

  // Right: grading table
  s.addText("Ultrasound Grading", { x: 5.1, y: 1.18, w: 4.6, h: 0.4, fontSize: 13, bold: true, color: C.navy, margin: 0 });

  const grades = [
    { g: "Mild", desc: "Pelvis + calyces dilated; parenchymal architecture retained", color: C.teal },
    { g: "Moderate", desc: "Medullary pyramids flatten; increasing pelvicalyceal dilation", color: C.yellow },
    { g: "Severe", desc: "Ballooned pelvis + calyces; cortex thin; corticomedullary differentiation lost", color: C.orange },
    { g: "Pyonephrosis", desc: "Internal echoes on US β†’ pus in collecting system (fever + flank pain context)", color: "C0392B" },
  ];

  grades.forEach((gr, i) => {
    const y = 1.65 + i * 0.97;
    s.addShape(pres.ShapeType.rect, { x: 5.0, y, w: 4.7, h: 0.85, fill: { color: gr.color }, line: { color: gr.color }, rounding: true });
    s.addText(gr.g, { x: 5.05, y, w: 1.2, h: 0.85, fontSize: 12, bold: true, color: C.white, valign: "middle", align: "center", margin: 0 });
    s.addShape(pres.ShapeType.rect, { x: 6.25, y: y + 0.1, w: 0.05, h: 0.65, fill: { color: "FFFFFF55" }, line: { color: "FFFFFF33" } });
    s.addText(gr.desc, { x: 6.35, y, w: 3.25, h: 0.85, fontSize: 10, color: C.white, valign: "middle", margin: 3 });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 6 β€” Clinical Features
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white }, line: { color: C.white } });
  addSectionLabel(s, "Clinical Features");

  s.addText("Clinical Features", { x: 0.3, y: 0.5, w: 9.4, h: 0.55, fontSize: 22, bold: true, color: C.navy, margin: 0 });

  // Two panels
  const panels = [
    {
      title: "Unilateral", color: C.navy,
      items: [
        "May remain silent for long periods",
        "Dull ache / sense of weight in the loin",
        "Severe colicky pain if rapid onset",
        "Pain may radiate to epigastrium (mimicking peptic ulcer)",
        "Dietl's crisis: pain β†’ large void β†’ swelling reduces",
        "Large, cystic, ballottable renal mass on examination",
        "Discovered incidentally on routine exam or imaging",
      ],
    },
    {
      title: "Bilateral", color: C.teal,
      items: [
        "Anuria and acute renal failure if complete obstruction",
        "Bladder distension symptoms if obstruction is distal",
        "Paradoxical polyuria with incomplete obstruction (tubular defect)",
        "Symptoms mainly from the underlying cause",
        "Rising serum creatinine in transplant setting",
        "Urgency / frequency / overflow incontinence",
      ],
    },
  ];

  panels.forEach((p, i) => {
    const x = 0.25 + i * 4.9;
    s.addShape(pres.ShapeType.rect, { x, y: 1.15, w: 4.65, h: 4.25, fill: { color: p.color }, line: { color: p.color }, rounding: true });
    s.addText(p.title, { x, y: 1.15, w: 4.65, h: 0.6, fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
    s.addShape(pres.ShapeType.rect, { x: x + 0.2, y: 1.74, w: 4.25, h: 0.05, fill: { color: "FFFFFF55" }, line: { color: "FFFFFF33" } });
    const items = p.items.map((t) => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, fontSize: 11, color: C.white } }));
    s.addText(items, { x: x + 0.15, y: 1.82, w: 4.35, h: 3.5, valign: "top", margin: 4 });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 7 β€” Investigations
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  addSectionLabel(s, "Investigations");

  s.addText("Investigations & Imaging", { x: 0.4, y: 0.5, w: 9, h: 0.55, fontSize: 22, bold: true, color: C.white, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.05, w: 9, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });

  const invs = [
    {
      icon: "πŸ”¬", title: "Urinalysis / Labs",
      pts: ["Urine: haematuria, pyuria (UTI)", "Serum: creatinine ↑ (bilateral obstruction)", "Culture if infection suspected"],
      color: C.teal, x: 0.2, y: 1.2,
    },
    {
      icon: "🩻", title: "Ultrasound (POCUS)",
      pts: ["First-line imaging β€” no radiation", "Anechoic branching pattern in collecting system", "Grades mild/moderate/severe", "Color Doppler to exclude vascular mimics"],
      color: C.tealLight, x: 5.1, y: 1.2,
    },
    {
      icon: "πŸ’‰", title: "IVU / IVP",
      pts: ["Confirms obstruction and level", "Delayed films (6 h) for poor-functioning kidneys", "Retrograde urography if pelvis/calyces not seen"],
      color: C.yellow, x: 0.2, y: 3.1,
    },
    {
      icon: "🧲", title: "CT / MR Urography",
      pts: ["CT: gold standard β€” stone, mass, fibrosis", "MRU: superior anatomy, no radiation, gadolinium-based", "Differential renal function + drainage assessment", "Furosemide (1 mg/kg) for functional MRU protocols"],
      color: C.orange, x: 5.1, y: 3.1,
    },
  ];

  invs.forEach((inv) => {
    s.addShape(pres.ShapeType.rect, { x: inv.x, y: inv.y, w: 4.7, h: 2.35, fill: { color: C.navyMid }, line: { color: inv.color, pt: 2 }, rounding: true });
    s.addText(inv.icon + "  " + inv.title, { x: inv.x + 0.15, y: inv.y + 0.1, w: 4.3, h: 0.5, fontSize: 13, bold: true, color: inv.color, margin: 0 });
    s.addShape(pres.ShapeType.rect, { x: inv.x + 0.15, y: inv.y + 0.6, w: 4.3, h: 0.04, fill: { color: inv.color + "44" }, line: { color: inv.color + "44" } });
    const pts = inv.pts.map((t) => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, fontSize: 10, color: C.white } }));
    s.addText(pts, { x: inv.x + 0.15, y: inv.y + 0.68, w: 4.4, h: 1.6, valign: "top", margin: 3 });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 8 β€” Management
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightGray }, line: { color: C.lightGray } });
  addSectionLabel(s, "Management");

  s.addText("Management", { x: 0.3, y: 0.5, w: 9.4, h: 0.55, fontSize: 22, bold: true, color: C.navy, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.05, w: 9.4, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });

  // Top row: Principles
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 9.4, h: 0.75, fill: { color: C.navy }, line: { color: C.navy }, rounding: true });
  s.addText("🎯  Core Principle: Relieve obstruction + preserve renal function. Removal of obstruction usually permits full return of function within weeks; long-standing obstruction β†’ irreversible changes.", {
    x: 0.5, y: 1.22, w: 9.1, h: 0.72, fontSize: 11, color: C.white, valign: "middle", margin: 4,
  });

  const mgmt = [
    {
      title: "Conservative", color: C.teal,
      items: ["Mild antenatal hydronephrosis β€” observation", "Bladder catheterization for bladder dysfunction", "Antibiotics for associated UTI / pyelonephritis", "Anticholinergics + CIC for neurogenic bladder"],
    },
    {
      title: "Endoscopic / Minimally Invasive", color: C.yellow,
      items: ["Ureteral stenting (retrograde or antegrade)", "DJ stent for ureteric obstruction", "Percutaneous nephrostomy (PCN) β€” if stent fails", "URS + lithotripsy / ESWL for calculi"],
    },
    {
      title: "Surgical", color: C.orange,
      items: ["Pyeloplasty (dismembered) β€” gold standard for PUJO", "Laparoscopic / robot-assisted pyeloplasty", "Ureteroneocystostomy for distal ureteral obstruction", "Nephrectomy β€” non-functioning or infected kidney"],
    },
  ];

  mgmt.forEach((m, i) => {
    const x = 0.25 + i * 3.22;
    s.addShape(pres.ShapeType.rect, { x, y: 2.05, w: 3.02, h: 3.35, fill: { color: m.color }, line: { color: m.color }, rounding: true });
    s.addText(m.title, { x, y: 2.05, w: 3.02, h: 0.55, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
    s.addShape(pres.ShapeType.rect, { x: x + 0.15, y: 2.6, w: 2.7, h: 0.04, fill: { color: "00000033" }, line: { color: "00000022" } });
    const pts = m.items.map((t) => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, fontSize: 10, color: C.navy } }));
    s.addText(pts, { x: x + 0.1, y: 2.67, w: 2.82, h: 2.7, valign: "top", margin: 4 });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 9 β€” Complications
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white }, line: { color: C.white } });
  addSectionLabel(s, "Complications");

  s.addText("Complications", { x: 0.3, y: 0.5, w: 9.4, h: 0.55, fontSize: 22, bold: true, color: C.navy, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.05, w: 9.4, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });

  const comps = [
    { icon: "🦠", title: "Pyelonephritis", desc: "Ascending infection common; may progress to pyonephrosis or perinephric abscess", color: C.orange },
    { icon: "πŸ’€", title: "Renal Failure", desc: "Bilateral obstruction β†’ acute renal failure; chronic β†’ CKD with irreversible fibrosis", color: "C0392B" },
    { icon: "🩸", title: "Hypertension", desc: "Renal ischaemia activates renin-angiotensin system", color: C.navyMid },
    { icon: "πŸ”©", title: "Calculi", desc: "Urinary stasis promotes stone formation; stones may worsen obstruction", color: C.teal },
    { icon: "πŸ“‰", title: "Tubular Dysfunction", desc: "Salt-wasting, renal tubular acidosis, concentrating defect (nephrogenic DI)", color: C.tealLight },
    { icon: "πŸ“¦", title: "Rupture / Urinoma", desc: "Sudden relief of high-pressure hydronephrosis can cause forniceal rupture and urinoma", color: C.yellow },
  ];

  comps.forEach((c, i) => {
    const x = 0.25 + (i % 3) * 3.16;
    const y = 1.2 + Math.floor(i / 3) * 2.1;
    s.addShape(pres.ShapeType.rect, { x, y, w: 2.95, h: 1.9, fill: { color: C.lightGray }, line: { color: c.color, pt: 2 }, rounding: true });
    s.addText(c.icon, { x, y, w: 2.95, h: 0.6, fontSize: 24, align: "center", valign: "middle" });
    s.addShape(pres.ShapeType.rect, { x: x + 0.1, y: y + 0.6, w: 2.75, h: 0.04, fill: { color: c.color }, line: { color: c.color } });
    s.addText(c.title, { x, y: y + 0.65, w: 2.95, h: 0.38, fontSize: 12, bold: true, color: c.color, align: "center", valign: "middle", margin: 0 });
    s.addText(c.desc, { x: x + 0.1, y: y + 1.03, w: 2.75, h: 0.82, fontSize: 9.5, color: C.darkText, valign: "top", margin: 3 });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 10 β€” Special Populations
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  addSectionLabel(s, "Special Populations");

  s.addText("Special Populations", { x: 0.4, y: 0.5, w: 9, h: 0.55, fontSize: 22, bold: true, color: C.white, margin: 0 });

  const pops = [
    {
      title: "Antenatal / Neonatal", color: C.teal,
      items: [
        "Most common anomaly detected on prenatal ultrasound",
        "Majority (80%) resolve spontaneously β€” observation",
        "~20% require pyeloplasty (worsening function/drainage)",
        "Isotope renography (MAG3) for differential function assessment",
        "Postnatal US at 48 h confirms prenatal findings",
      ],
    },
    {
      title: "Pregnancy", color: C.yellow,
      items: [
        "Physiological hydronephrosis common from 2nd trimester",
        "Right side predominantly affected (uterine dextrorotation)",
        "Progesterone β†’ smooth muscle relaxation of ureter",
        "Usually mild, resolves postpartum",
        "Symptomatic cases: ureteral stent or nephrostomy (avoid radiation)",
      ],
    },
    {
      title: "Renal Transplant", color: C.orange,
      items: [
        "Ureteral obstruction in up to 8% of transplants",
        "Heralded by rising creatinine",
        "Obstruction usually distal ureter / reimplantation site",
        "First step: Foley catheter (exclude bladder dysfunction)",
        "Low threshold for stenting; if stent fails β†’ PCN + antegrade stent",
      ],
    },
  ];

  pops.forEach((p, i) => {
    const x = 0.25 + i * 3.22;
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.0, h: 4.2, fill: { color: C.navyMid }, line: { color: p.color, pt: 2 }, rounding: true });
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.0, h: 0.55, fill: { color: p.color }, line: { color: p.color } });
    s.addText(p.title, { x, y: 1.2, w: 3.0, h: 0.55, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
    const pts = p.items.map((t) => ({ text: t, options: { bullet: { code: "25B8" }, breakLine: true, fontSize: 10, color: C.lightGray } }));
    s.addText(pts, { x: x + 0.1, y: 1.78, w: 2.8, h: 3.55, valign: "top", margin: 4 });
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// SLIDE 11 β€” Summary / Key Points
// ═══════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
  // Teal accent bar bottom
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.2, w: 10, h: 0.425, fill: { color: C.teal }, line: { color: C.teal } });
  // Left deco bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });

  s.addText("Key Takeaways", { x: 0.4, y: 0.3, w: 9, h: 0.6, fontSize: 26, bold: true, color: C.white, margin: 0 });
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 0.9, w: 4, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });

  const keys = [
    { n: "01", text: "Hydronephrosis = pelvis + calyx dilation with parenchymal atrophy due to urinary outflow obstruction", color: C.teal },
    { n: "02", text: "Bilateral β†’ below ureters; Unilateral β†’ at or above one ureter; congenital PUJ stenosis is the most common cause", color: C.tealLight },
    { n: "03", text: "Pathogenesis: obstruction β†’ raised intrapelvic pressure β†’ tubular dysfunction first, glomerular later β†’ fibrosis", color: C.yellow },
    { n: "04", text: "US is first-line imaging; CT/MRU for anatomy; MAG3 diuretic renogram for differential function", color: C.orange },
    { n: "05", text: "Treat the underlying cause; pyeloplasty for PUJO; stenting / PCN for acute relief; early treatment prevents irreversible loss", color: C.tealLight },
    { n: "06", text: "Complications: pyelonephritis, renal failure, hypertension, stones, tubular dysfunction, urinoma", color: "F4845F" },
  ];

  keys.forEach((k, i) => {
    const x = i < 3 ? 0.35 : 5.1;
    const y = 1.1 + (i % 3) * 1.45;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 1.32, fill: { color: C.navyMid }, line: { color: k.color, pt: 1.5 }, rounding: true });
    s.addShape(pres.ShapeType.ellipse, { x: x + 0.1, y: y + 0.1, w: 0.55, h: 0.55, fill: { color: k.color }, line: { color: k.color } });
    s.addText(k.n, { x: x + 0.1, y: y + 0.1, w: 0.55, h: 0.55, fontSize: 12, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
    s.addText(k.text, { x: x + 0.75, y, w: 3.7, h: 1.32, fontSize: 10.5, color: C.white, valign: "middle", margin: 4 });
  });

  s.addText("Sources: Robbins Basic Pathology 10e Β· Campbell-Walsh Urology Β· Comprehensive Clinical Nephrology 7e Β· S Das Manual on Clinical Surgery", {
    x: 0.3, y: 5.2, w: 9.4, h: 0.38, fontSize: 8, color: C.navy, valign: "middle", margin: 0,
  });
}

// ═══════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ═══════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/hydronephrosis-ppt/Hydronephrosis.pptx" })
  .then(() => console.log("βœ… Saved: Hydronephrosis.pptx"))
  .catch((e) => { console.error("❌", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/hydronephrosis-ppt && node create_ppt.js

Editing File

~/hydronephrosis-ppt/create_ppt.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/hydronephrosis-ppt/create_ppt.js'
Running Command

cd /home/daytona/workspace/hydronephrosis-ppt && sed -i \ 's/"FFFFFF55"/"4A6380"/g; s/"FFFFFF33"/"4A6380"/g; s/"0FA3B144"/"0FA3B1"/g; s/"5BC8D444"/"5BC8D4"/g; s/"F9C74F44"/"F9C74F"/g; s/"F4845F44"/"F4845F"/g; s/"00000033"/"1A3F6F"/g; s/"00000022"/"1A3F6F"/g' create_ppt.js && node create_ppt.js

Running Command

cd /home/daytona/workspace/hydronephrosis-ppt && python3 -c " content = open('create_ppt.js').read() replacements = [ ('\"FFFFFF55\"', '\"4A6380\"'), ('\"FFFFFF33\"', '\"4A6380\"'), ('\"0FA3B144\"', '\"0FA3B1\"'), ('\"5BC8D444\"', '\"5BC8D4\"'), ('\"F9C74F44\"', '\"F9C74F\"'), ('\"F4845F44\"', '\"F4845F\"'), ('\"00000033\"', '\"1A3F6F\"'), ('\"00000022\"', '\"1A3F6F\"'), ] for old, new in replacements: content = content.replace(old, new) open('create_ppt.js', 'w').write(content) print('done') " && node create_ppt.js

Searching Content

"color: inv.color + "44"" in ~/hydronephrosis-ppt

Editing File

~/hydronephrosis-ppt/create_ppt.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/hydronephrosis-ppt/create_ppt.js'
Running Command

cd /home/daytona/workspace/hydronephrosis-ppt && node create_ppt.js 2>&1

Your presentation is ready! πŸ‘‡

Hydronephrosis

Presentation Β· PPTX


Here's what's covered across the 11 slides (deep navy + teal + orange color scheme):
SlideContent
1Title slide
2Definition & Key Facts
3Etiology - Congenital / Acquired intrinsic / Acquired extrinsic (3-column layout)
4Pathogenesis - 6-step flow (obstruction β†’ fibrosis)
5Morphology & Ultrasound Grading (mild / moderate / severe / pyonephrosis)
6Clinical Features - Unilateral vs. Bilateral comparison
7Investigations - Urinalysis, Ultrasound, IVP, CT/MRU
8Management - Conservative / Endoscopic / Surgical
9Complications - 6 key complications in card layout
10Special Populations - Antenatal, Pregnancy, Renal Transplant
11Key Takeaways summary
Sources: Robbins Basic Pathology 10e, Campbell-Walsh Urology, Comprehensive Clinical Nephrology 7e, and S Das Manual on Clinical Surgery.

Give a note on cetirizine and levocetirizine

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
I now have comprehensive information from multiple authoritative textbooks. Let me compile a thorough, well-structured note.

Cetirizine and Levocetirizine

1. Classification & Chemical Background

Both drugs belong to the second-generation H1 antihistamine class and are piperazine derivatives.
  • Cetirizine (Zyrtec) is a racemic mixture of two enantiomers - the R-enantiomer and the S-enantiomer.
  • Levocetirizine (Xyzal) is the R-enantiomer (active enantiomer) of cetirizine - a pure single enantiomer developed to retain efficacy at half the dose with less sedation.
The relationship between them is the same as that between omeprazole and esomeprazole (i.e., racemic vs. active enantiomer).

2. Mechanism of Action

Both drugs act as competitive antagonists / inverse agonists at peripheral H1 receptors. They work by:
  • Blocking H1 receptors on smooth muscle, immune cells, vascular endothelium, and sensory nerves, thereby reducing or preventing histamine effects - vasodilation, increased vascular permeability, smooth muscle contraction, and pruritus.
  • Additional mast cell-stabilizing and anti-inflammatory properties - they suppress the release of mediators from mast cells and basophils beyond simple H1 blockade. This anti-inflammatory action may contribute to efficacy in chronic urticaria.
  • Both have negligible CNS penetration compared to first-generation agents (e.g., chlorpheniramine, diphenhydramine) because they are zwitterions at physiologic pH and are substrates of P-glycoprotein efflux transporters at the blood-brain barrier.
Cetirizine has a somewhat higher incidence of drowsiness than most other second-generation H1 antagonists - intermediate between first- and second-generation in terms of sedation. Levocetirizine at half the dose produces less sedation while maintaining equivalent efficacy. (Goodman & Gilman's, p. 883)

3. Pharmacokinetics

ParameterCetirizineLevocetirizine
Bioavailability~70% (oral)~100% (oral)
Tmax~1 hour~1 hour
Peak plasma conc.~1 hour post-dose~1 hour post-dose
Protein binding~93%~91-92%
Elimination half-life6.5-10 hours6.5-10 hours
Duration of action12-24 hours (once daily)12-24 hours (once daily)
MetabolismMinimal hepatic (CYP not significantly involved)Minimal hepatic metabolism
ExcretionLargely unchanged in urine (~60%)Largely unchanged in urine (~85%)
Key points:
  • Unlike loratadine and desloratadine, neither drug is significantly metabolized by CYP3A4, minimizing drug interactions.
  • Both are excreted primarily renally unchanged - dose reduction is required in renal impairment (CrCl-based adjustment).
  • No dose adjustment required for hepatic disease in most cases (since hepatic metabolism is minimal).
  • Regular use prolongs suppression of the wheal-and-flare response: 6 days of daily cetirizine results in 7 days of wheal-and-flare suppression. (Fitzpatrick's Dermatology)

4. Indications (Clinical Uses)

Both drugs are indicated for:
IndicationNotes
Allergic rhinitis (seasonal and perennial)Reduce rhinorrhea, sneezing, nasal itching; do NOT help nasal congestion
Chronic spontaneous urticariaVery effective; levocetirizine 5 mg = desloratadine 5 mg in suppressing histamine skin effects
Acute urticariaCetirizine 5-10 mg/day; levocetirizine 2.5-5 mg/day (Goldman-Cecil Medicine)
Allergic conjunctivitisOral form useful; topical antihistamines preferred for ocular-only disease
Atopic dermatitis / pruritusAdjunctive relief of itch
Angioedema (histamine-mediated)Useful in mild cases
AnaphylaxisAdjunctive only - epinephrine remains drug of choice; cetirizine 10 mg IV/oral for H1 blockade (Washington Manual)
Not indicated in bronchial asthma - histamine is only one of several mediators in asthma; corticosteroids and bronchodilators are preferred.

5. Dosage

Cetirizine (Zyrtec)

Age GroupDose
6-23 months2.5 mg once daily (max 2.5 mg Q12h for 12-23 months)
2-5 years2.5 mg once daily; may increase to 5 mg/24h
β‰₯6 years and adults5-10 mg once daily
Hepatic impairment (β‰₯12 yr)5 mg once daily
Hepatic impairment (6-11 yr)≀2.5 mg once daily
<6 years with hepatic impairmentNot recommended
Source: Harriet Lane Handbook, 23rd ed.

Levocetirizine (Xyzal)

Age GroupDose
Adults and children β‰₯12 years5 mg once daily (in the evening)
Children 6-11 years2.5 mg once daily in the evening
Children 6 months - 5 years1.25 mg once daily
Renal impairment (CrCl 50-80 mL/min)2.5 mg once daily
Renal impairment (CrCl 30-50 mL/min)2.5 mg every other day
Renal impairment (CrCl 10-30 mL/min)2.5 mg twice weekly
End-stage renal disease / hemodialysisContraindicated
Note: Levocetirizine is effective at half the dose of cetirizine (5 mg levocetirizine = 10 mg cetirizine) due to its single active enantiomer formulation.

6. Adverse Effects

EffectCetirizineLevocetirizine
Sedation/drowsinessMore than other 2nd-gen agents (~10-15%)Less than cetirizine at equipotent doses
HeadacheMost common with 2nd-gen classMost common adverse effect
Dry mouthMildMild
Pharyngitis, GI upsetYesYes
Fatigue, dizzinessMildMild
Paradoxical hyperactivityIn young children (rare)Rare
Cardiac arrhythmiasNot implicated - no cardiotoxicity like terfenadine/astemizoleNot implicated
Important: Neither cetirizine nor levocetirizine causes QT prolongation or torsade de pointes - unlike the withdrawn first-generation piperidines (terfenadine, astemizole). (Harriet Lane; Goodman & Gilman's)

7. Drug Interactions

  • Minimal CYP-based interactions (unlike erythromycin + terfenadine which caused fatal arrhythmias) - cetirizine/levocetirizine are NOT significantly metabolized by CYP3A4 or CYP2D6.
  • Additive CNS depression with alcohol, benzodiazepines, opioids - cetirizine more so than levocetirizine.
  • MAO inhibitors may potentiate anticholinergic/sedative effects (mainly relevant to first-gen agents but precaution extends to cetirizine).
  • No clinically significant interaction with ketoconazole or erythromycin (unlike older agents). (Harriet Lane, Goodman & Gilman's)

8. Use in Special Populations

PopulationRecommendation
PregnancyCategory B (cetirizine); second-generation antihistamines preferred over first-generation (less sedation in mother and infant)
LactationUse with caution; monitor infant for sedation; second-generation preferred
ElderlyPreferred over first-gen (less anticholinergic risk, less fall risk from sedation)
Renal impairmentDose reduction required - primarily excreted renally unchanged
Hepatic impairmentDose adjustment generally not needed (minimal hepatic metabolism)
Children <6 monthsNot recommended for cetirizine; levocetirizine not established

9. Cetirizine vs. Levocetirizine - Key Comparison

FeatureCetirizineLevocetirizine
TypeRacemic mixture (R + S)Pure R-enantiomer
Trade nameZyrtecXyzal
Standard adult dose10 mg OD5 mg OD
PotencyStandard~2x more potent per mg
SedationSomewhat higher among 2nd-genLess sedating than cetirizine
Mast cell stabilizationYesYes (equal)
Anti-inflammatory actionYesYes (equal)
Renal excretion~60% unchanged~85% unchanged
Renal impairment cautionYes - reduce doseYes - stricter (contraindicated in ESRD)
CostGeneric widely availableSlightly more expensive
Clinical advantageWidely studied, proven efficacyEquivalent efficacy at half dose with potentially less sedation
In a comparative study, levocetirizine 5 mg was more potent than desloratadine 5 mg in suppressing histamine-induced cutaneous reactions. A single-dose study showed cetirizine was more potent than fexofenadine > loratadine in suppressing intradermal histamine wheal-and-flare over 24 hours. (Fitzpatrick's Dermatology)

10. Contraindications

  • Known hypersensitivity to cetirizine, levocetirizine, or hydroxyzine (structurally related)
  • End-stage renal disease or patients on hemodialysis (levocetirizine specifically contraindicated)
  • Children <6 years with renal or hepatic impairment (use caution / avoid)

Sources: Goodman & Gilman's Pharmacological Basis of Therapeutics, 14e | Lippincott Illustrated Reviews: Pharmacology | Fitzpatrick's Dermatology, 9e | Harriet Lane Handbook, 23e | Katzung's Basic & Clinical Pharmacology, 16e | Goldman-Cecil Medicine
This is a shared conversation. Sign in to Orris to start your own chat.