Pls provide a ppt on hydronephrosis
mkdir -p /home/daytona/workspace/hydronephrosis-ppt && ls /home/daytona/workspace/hydronephrosis-ppt
~/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); });
cd /home/daytona/workspace/hydronephrosis-ppt && node create_ppt.js
~/hydronephrosis-ppt/create_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/hydronephrosis-ppt/create_ppt.js'
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
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
"color: inv.color + "44"" in ~/hydronephrosis-ppt
~/hydronephrosis-ppt/create_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/hydronephrosis-ppt/create_ppt.js'
cd /home/daytona/workspace/hydronephrosis-ppt && node create_ppt.js 2>&1
Hydronephrosis
Presentation Β· PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Definition & Key Facts |
| 3 | Etiology - Congenital / Acquired intrinsic / Acquired extrinsic (3-column layout) |
| 4 | Pathogenesis - 6-step flow (obstruction β fibrosis) |
| 5 | Morphology & Ultrasound Grading (mild / moderate / severe / pyonephrosis) |
| 6 | Clinical Features - Unilateral vs. Bilateral comparison |
| 7 | Investigations - Urinalysis, Ultrasound, IVP, CT/MRU |
| 8 | Management - Conservative / Endoscopic / Surgical |
| 9 | Complications - 6 key complications in card layout |
| 10 | Special Populations - Antenatal, Pregnancy, Renal Transplant |
| 11 | Key Takeaways summary |
Give a note on cetirizine and levocetirizine
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)
| Parameter | Cetirizine | Levocetirizine |
|---|---|---|
| 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-life | 6.5-10 hours | 6.5-10 hours |
| Duration of action | 12-24 hours (once daily) | 12-24 hours (once daily) |
| Metabolism | Minimal hepatic (CYP not significantly involved) | Minimal hepatic metabolism |
| Excretion | Largely unchanged in urine (~60%) | Largely unchanged in urine (~85%) |
| Indication | Notes |
|---|---|
| Allergic rhinitis (seasonal and perennial) | Reduce rhinorrhea, sneezing, nasal itching; do NOT help nasal congestion |
| Chronic spontaneous urticaria | Very effective; levocetirizine 5 mg = desloratadine 5 mg in suppressing histamine skin effects |
| Acute urticaria | Cetirizine 5-10 mg/day; levocetirizine 2.5-5 mg/day (Goldman-Cecil Medicine) |
| Allergic conjunctivitis | Oral form useful; topical antihistamines preferred for ocular-only disease |
| Atopic dermatitis / pruritus | Adjunctive relief of itch |
| Angioedema (histamine-mediated) | Useful in mild cases |
| Anaphylaxis | Adjunctive only - epinephrine remains drug of choice; cetirizine 10 mg IV/oral for H1 blockade (Washington Manual) |
| Age Group | Dose |
|---|---|
| 6-23 months | 2.5 mg once daily (max 2.5 mg Q12h for 12-23 months) |
| 2-5 years | 2.5 mg once daily; may increase to 5 mg/24h |
| β₯6 years and adults | 5-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 impairment | Not recommended |
| Age Group | Dose |
|---|---|
| Adults and children β₯12 years | 5 mg once daily (in the evening) |
| Children 6-11 years | 2.5 mg once daily in the evening |
| Children 6 months - 5 years | 1.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 / hemodialysis | Contraindicated |
| Effect | Cetirizine | Levocetirizine |
|---|---|---|
| Sedation/drowsiness | More than other 2nd-gen agents (~10-15%) | Less than cetirizine at equipotent doses |
| Headache | Most common with 2nd-gen class | Most common adverse effect |
| Dry mouth | Mild | Mild |
| Pharyngitis, GI upset | Yes | Yes |
| Fatigue, dizziness | Mild | Mild |
| Paradoxical hyperactivity | In young children (rare) | Rare |
| Cardiac arrhythmias | Not implicated - no cardiotoxicity like terfenadine/astemizole | Not implicated |
| Population | Recommendation |
|---|---|
| Pregnancy | Category B (cetirizine); second-generation antihistamines preferred over first-generation (less sedation in mother and infant) |
| Lactation | Use with caution; monitor infant for sedation; second-generation preferred |
| Elderly | Preferred over first-gen (less anticholinergic risk, less fall risk from sedation) |
| Renal impairment | Dose reduction required - primarily excreted renally unchanged |
| Hepatic impairment | Dose adjustment generally not needed (minimal hepatic metabolism) |
| Children <6 months | Not recommended for cetirizine; levocetirizine not established |
| Feature | Cetirizine | Levocetirizine |
|---|---|---|
| Type | Racemic mixture (R + S) | Pure R-enantiomer |
| Trade name | Zyrtec | Xyzal |
| Standard adult dose | 10 mg OD | 5 mg OD |
| Potency | Standard | ~2x more potent per mg |
| Sedation | Somewhat higher among 2nd-gen | Less sedating than cetirizine |
| Mast cell stabilization | Yes | Yes (equal) |
| Anti-inflammatory action | Yes | Yes (equal) |
| Renal excretion | ~60% unchanged | ~85% unchanged |
| Renal impairment caution | Yes - reduce dose | Yes - stricter (contraindicated in ESRD) |
| Cost | Generic widely available | Slightly more expensive |
| Clinical advantage | Widely studied, proven efficacy | Equivalent efficacy at half dose with potentially less sedation |