15 year female with 8mm renal stone

Reading File
Finding Sources
Searching PubMed

pediatric urolithiasis management kidney stones children

Finding Sources
Reading Article

PMID: 41263325

Finding Sources
Searching the Web

8mm renal stone pediatric 15 year old management treatment guidelines 2025

Finding Sources
Reading File
Reading File
Reading File
Reading File
I now have comprehensive information from Campbell-Walsh Urology and recent AUA 2026 guidelines. Here is the full clinical answer:

15-Year-Old Female with 8mm Renal Stone

Overview

Pediatric nephrolithiasis is rising in incidence, particularly in adolescent females (the sex difference seen in adults narrows in the teenage years). An 8mm renal stone in a 15-year-old is a clinically significant finding requiring structured evaluation and likely intervention.

Why 8mm Is Important

  • Stones >6mm have very low rates of spontaneous passage (typically <10-20%).
  • An 8mm stone in the kidney (non-obstructing caliceal stone) behaves differently from an 8mm stone in the ureter.
  • Stone location (upper/lower pole calyx vs. renal pelvis vs. ureter) changes both the likelihood of passage and the choice of intervention.

Step 1: Immediate Assessment

History:
  • Flank/abdominal pain (colicky), hematuria, dysuria, nausea/vomiting
  • Prior stone episodes, family history (cystinuria, hypercalciuria, oxalosis)
  • Diet: excessive meat, sodium, oxalate-rich foods; low fluid intake
  • Medications: topiramate, acetazolamide, furosemide, vitamins C/D
Examination:
  • Costovertebral angle tenderness
  • Signs of infection (fever, rigors) - requires urgent urological referral
  • Assess hydration status
Red flags requiring urgent/admission:
  • Fever with obstruction (urosepsis)
  • Intractable pain/vomiting
  • Solitary kidney or bilateral obstruction
  • Renal insufficiency

Step 2: Workup

Imaging (first-line):
  • Renal ultrasound - preferred in children to avoid radiation; can detect hydronephrosis
  • Non-contrast CT KUB - gold standard for stone size/location; reserve for when US is inconclusive or surgery is planned (low-dose protocol in pediatrics)
  • X-ray (KUB) - limited use; misses radiolucent stones (uric acid, cystine)
Labs (acute):
  • Urinalysis + urine culture (rule out infection)
  • Serum BMP: creatinine, BUN, electrolytes, calcium, phosphate, uric acid
  • Serum PTH if hypercalcemia found (though primary hyperparathyroidism is rare in children)
Metabolic evaluation (24-hour urine - after acute episode resolves):
  • Calcium, oxalate, citrate, uric acid, sodium, creatinine, cystine
  • Idiopathic hypercalciuria is the most common cause in children (~30-50% of cases)
  • Also: hypocitraturia, hyperoxaluria, hyperuricosuria, cystinuria
Stone analysis: Send any passed stone or surgically retrieved fragment for composition analysis.
When to suspect a rare inherited metabolic/genetic cause (Campbell-Walsh Urology):
FindingCondition to Consider
Growth failure / ricketsdRTA, Dent disease, hereditary hypophosphatemic rickets
Ocular abnormalitiesFamilial hypomagnesemia with hypercalciuria
Family history of renal disease or nephrocalcinosisCystinuria, primary hyperoxaluria, Dent disease
Elevated creatinineDent disease, cystinuria, primary hyperoxaluria
Hypokalemia + acidosisDistal renal tubular acidosis (dRTA)
Abnormal urinary crystalsCystinuria
Nephrocalcinosis on imagingPrimary hyperoxaluria, dRTA, Dent disease

Step 3: Management

A. Renal Stone (Non-obstructing, Asymptomatic)

Per AUA/EAU guidelines (updated 2026 via AUA Guideline Part III):
"In pediatric patients with asymptomatic and non-obstructing renal stones, clinicians may utilize active surveillance with periodic ultrasonography." (Expert opinion)
However, an 8mm stone is unlikely to pass spontaneously and active surveillance needs clear follow-up plans.

B. Renal Stone (Symptomatic or Obstructing) - Intervention Indicated

Per AUA 2016/2026 pediatric recommendations (Campbell-Walsh Urology, p. 1100):
Stone BurdenRecommended Intervention
Total renal stone burden ≤20 mm (includes 8mm)SWL or URS as first-line
Total renal stone burden >20 mmPCNL or SWL (with stent/nephrostomy)
Open/laparoscopic/robotic surgeryNot routinely recommended unless anatomic abnormality
For this patient (8mm = ≤20mm burden): SWL (shock wave lithotripsy) or ureteroscopy (URS) are both acceptable first-line options.
  • SWL - preferred in many centers for pediatric patients; non-invasive; stone-free rates ~80-83%; if used for large stones, place ureteral stent first
  • URS - stone clearance 85-88%; increasingly favored with miniaturization of instruments; requires general anesthesia
  • PCNL (mini-PCNL) - reserved for stones >20mm; stone-free rates 70-97%

C. If Stone is in the Ureter (8mm distal ureteral stone)

  • Spontaneous passage is unlikely (>6mm has very low passage rates)
  • MET with tamsulosin (off-label, 0.4mg daily) can be offered for distal ureteral stones ≤10mm; maximum 4-6 weeks
    • NNT: tamsulosin increased stone passage to 87% vs. 63% controls (p=0.025) in one pediatric RCT; mean time to passage 7.7 vs. 18 days
    • Advise parents/patient about off-label status and side effects (nasal congestion, orthostatic hypotension)
  • URS or SWL if MET fails or patient cannot tolerate observation

Step 4: Supportive Care

  • IV/oral hydration - maintain high urine output (>2L/day)
  • Analgesia - NSAIDs (ketorolac IV or ibuprofen) are first-line for ureteric colic; opioids as rescue
  • Anti-emetics if needed

Step 5: Long-term Prevention (After Stone Composition Known)

Stone TypePreventive Measure
Calcium oxalate (most common)Increase fluid intake; reduce sodium/oxalate diet; thiazide for hypercalciuria; potassium citrate for hypocitraturia
Uric acidUrinary alkalinization (potassium citrate); allopurinol
CystineHigh fluid intake; alkalinization; D-penicillamine or tiopronin for severe cases
Struvite (infection)Eradicate infection (Proteus, Klebsiella); surgical stone removal; acetohydroxamic acid (rarely used in children)
Dietary counseling: increase fluid intake (target urine output >2L/day), restrict sodium (reduces calciuria), moderate animal protein, do not restrict dietary calcium (paradoxically increases oxalate absorption and stone risk).

Referrals

  • Pediatric Urology - for surgical planning (SWL/URS)
  • Pediatric Nephrology - for metabolic workup, 24-hour urine, and long-term prevention
  • Dietitian - dietary modification counseling

Key Points for This Case

  1. 8mm renal stone in a 15-year-old female - intervention likely needed (unlikely to pass spontaneously)
  2. Rule out obstructive uropathy and infection urgently
  3. SWL or URS are the first-line surgical options (total burden ≤20mm)
  4. Full metabolic workup mandatory - idiopathic hypercalciuria is the leading etiology in children
  5. Screen for rare genetic/inherited causes given young age
  6. Long-term prevention is essential - stone recurrence risk is ~50% within 5 years in children without treatment

Post operative notes after renal stne

Asking for Preferences
Here is the discharge summary for the 15-year-old female who underwent PCNL for an 8mm renal stone.

DISCHARGE SUMMARY


FACILITY: [Hospital Name] DEPARTMENT: Pediatric Urology

PATIENT DETAILS

Name:[Patient Name]
Age / Sex:15 years / Female
MRN:[######]
Date of Admission:[DD/MM/YYYY]
Date of Discharge:[DD/MM/YYYY]
Length of Stay:[X] days
Admitting Consultant:[Pediatric Urologist Name]
Primary Team:Pediatric Urology

DIAGNOSIS

Primary Diagnosis: Right/Left renal calculus, [upper/lower pole], 8mm
Procedure Performed: Percutaneous Nephrolithotomy (PCNL) - Mini/Standard
ICD-10 Code: N20.0 - Calculus of kidney

PRESENTING COMPLAINT

The patient presented with a [X]-day history of right/left flank pain, associated with hematuria and nausea. Imaging confirmed an 8mm calculus in the [location] of the right/left kidney with [mild/no] hydronephrosis.

RELEVANT HISTORY

  • Past medical history: No known chronic illness / [specify if relevant]
  • Family history: [Positive/Negative] for urolithiasis
  • Allergies: NKDA / [specify]
  • Medications pre-admission: None / [specify]
  • Previous stone episodes: First episode / Prior history

PRE-OPERATIVE INVESTIGATIONS

InvestigationResult
Urinalysis[Hematuria, no infection / UTI present - treated]
Urine culture[Negative / Organism - treated with antibiotics]
Serum creatinine[X] µmol/L (normal)
Serum calcium[X] mmol/L
Serum uric acid[X] mmol/L
eGFR[X] mL/min/1.73m²
FBC[Hb X g/dL, WBC X, Platelets X]
Coagulation (PT/APTT)Within normal limits
Non-contrast CT KUB8mm calculus, [location], HU [X], no significant hydronephrosis / [degree] hydronephrosis
Renal USS[Findings]

PROCEDURE DETAILS

Date of Surgery: [DD/MM/YYYY] Anaesthesia: General anaesthesia Position: Prone / Modified supine (flank-free) Surgeon: [Name] Assistant: [Name] Anaesthetist: [Name]
Operative findings:
  • Access: [Fluoroscopic / Ultrasound-guided] percutaneous access to [calyx] under general anaesthesia
  • Tract size: [Mini-PCNL (14-18Fr) / Standard PCNL (24-30Fr)]
  • Stone: Single calculus, 8mm, [location - lower/upper pole], [appearance: white/yellow/hard]
  • Lithotripsy: [Pneumatic / Holmium laser / Ultrasonic] lithotripsy performed with good stone fragmentation
  • Stone clearance: Complete / Residual fragments <2mm
  • Nephrostomy tube placed: Yes [X Fr] / No (tubeless PCNL)
  • Ureteral stent (DJ stent) placed: Yes [X Fr, X cm] / No
  • Blood loss: Estimated [X] mL
  • Complications intra-operative: None / [specify]
  • Stone sent for: Composition analysis

POST-OPERATIVE COURSE

Day 0 (Day of surgery): Patient recovered from anaesthesia without immediate complications. Hemodynamically stable. IV fluids maintained. Urinary catheter in situ draining clear/blood-stained urine.
Day 1:
  • Vitals stable; afebrile
  • Nephrostomy tube draining [X] mL of serous/blood-stained fluid
  • Urine output adequate
  • Analgesia: IV paracetamol + ketorolac; transitioned to oral analgesia on Day 1
  • Tolerating oral fluids and diet
  • Hb post-op: [X] g/dL - no significant drop
Day 2:
  • Nephrostomy tube clamped for [X] hours; patient comfortable with no flank pain or fever
  • Check imaging: [X-ray KUB / USS] - no residual significant fragments / minor residual fragments <2mm
  • Nephrostomy tube removed
  • Mobilizing independently
Day 3 (Discharge):
  • Vitals: Temp [X]°C, HR [X] bpm, BP [X/X] mmHg, SpO2 [X]%
  • Wound: Nephrostomy site clean, dry, small gauze dressing applied
  • No fever, no signs of infection
  • Urinalysis: Mild hematuria (expected post-PCNL) / Clear
  • Pain well controlled on oral analgesics
  • Tolerating full diet and fluids
  • Fit for discharge

MEDICATIONS ON DISCHARGE

MedicationDoseFrequencyDuration
Ibuprofen (with food)400mgTDS5 days (for pain)
Paracetamol500-1000mgQDS PRN5 days
Tamsulosin 0.4mg (if DJ stent in situ)0.4mgOD nocteUntil stent removal
[Antibiotics - if urine culture positive][As per sensitivity][As directed][Course]
Potassium citrate (if hypocitraturia confirmed)[10-20 mEq]BDOngoing (nephrology review)
Increased fluid intake (target urine output >2L/day)--Lifelong

DISCHARGE INSTRUCTIONS

Activity:
  • Rest at home for 1-2 weeks; avoid strenuous activity or contact sports for 4 weeks
  • May return to school after 1-2 weeks if comfortable
  • No heavy lifting or vigorous exercise until review
Diet and Fluids:
  • Drink 2-3 litres of water per day (most important preventive measure)
  • Reduce salt and animal protein intake
  • Avoid excess oxalate-rich foods (spinach, nuts, chocolate) pending stone composition result
  • Do NOT restrict dietary calcium
Wound care:
  • Nephrostomy site: keep clean and dry; remove dressing after 48 hours
  • No bathing/swimming until site healed (~5-7 days)
  • Watch for signs of infection (redness, discharge, fever)
DJ Stent (if placed):
  • Patient/parent counselled regarding stent symptoms: urinary frequency, urgency, mild dysuria, and blood-tinged urine - all expected
  • Stent removal scheduled: [Date] - cystoscopy under LA/sedation
  • Do NOT miss stent removal appointment
When to seek urgent medical attention:
  • Fever >38°C
  • Severe flank or abdominal pain
  • Inability to pass urine
  • Frank, heavy bleeding per urethra
  • Signs of wound infection (pus, spreading redness)

FOLLOW-UP PLAN

AppointmentTimeframePurpose
Pediatric Urology2 weeks post-dischargeWound check, review stone analysis result, DJ stent removal scheduling
Repeat imaging (USS KUB)4-6 weeksConfirm stone clearance, check for residual fragments
Pediatric Nephrology6-8 weeks24-hour urine metabolic workup (calcium, oxalate, citrate, uric acid, cystine, sodium, creatinine)
DietitianWithin 1 monthDietary counselling for stone prevention
Stone composition result2-3 weeksTo guide long-term preventive therapy

STONE RECURRENCE PREVENTION NOTE

Recurrence risk in pediatric patients is approximately 50% within 5 years without metabolic workup and treatment. A full metabolic evaluation is mandatory at the nephrology follow-up. Common causes to exclude:
  • Idiopathic hypercalciuria (~30-50% of cases)
  • Hypocitraturia
  • Hyperoxaluria (primary or enteric)
  • Hyperuricosuria
  • Cystinuria
  • Distal renal tubular acidosis

CONDITION AT DISCHARGE

Stable / Good

DISCHARGE AUTHORISED BY

Dr. [Name] Pediatric Urology Registrar / Consultant Date: [DD/MM/YYYY] Signature: _______________
Countersigned by: Dr. [Name] Consultant Pediatric Urologist Date: [DD/MM/YYYY]

Note: This is a template. All bracketed fields [like this] must be filled in with actual patient data before use. This document should not be used as a clinical document without completion and countersignature by a licensed clinician.

Generate Word document version of this discharge summary

Reading File
Running Command

mkdir -p /home/daytona/workspace/renal-stone-discharge && ls /home/daytona/works…

Writing File

~/renal-stone-discharge/generate.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, VerticalAlign,
  ShadingType, Header, Footer, PageNumber, NumberFormat, UnderlineType,
  PageBreak
} = require('docx');
const fs = require('fs');

// ── helpers ──────────────────────────────────────────────────────────────────
const BLUE  = "1F4E79";  // dark navy
const LBLUE = "D6E4F0";  // light blue shading
const GREY  = "F2F2F2";  // light grey shading
const WHITE = "FFFFFF";

function heading1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 280, after: 100 },
    children: [
      new TextRun({
        text,
        bold: true,
        size: 28,
        color: WHITE,
        font: "Calibri",
      })
    ],
    shading: { type: ShadingType.SOLID, color: BLUE, fill: BLUE },
    indent: { left: 120, right: 120 },
  });
}

function heading2(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 200, after: 60 },
    children: [
      new TextRun({
        text,
        bold: true,
        size: 24,
        color: BLUE,
        font: "Calibri",
      })
    ],
    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: BLUE } },
  });
}

function para(text, opts = {}) {
  return new Paragraph({
    spacing: { after: 80 },
    children: [
      new TextRun({
        text,
        size: 20,
        font: "Calibri",
        bold: opts.bold || false,
        italics: opts.italic || false,
        color: opts.color || "000000",
      })
    ],
    indent: opts.indent ? { left: 200 } : {},
    alignment: opts.center ? AlignmentType.CENTER : AlignmentType.LEFT,
  });
}

function bullet(text) {
  return new Paragraph({
    bullet: { level: 0 },
    spacing: { after: 60 },
    children: [new TextRun({ text, size: 20, font: "Calibri" })],
  });
}

function noteItalic(text) {
  return new Paragraph({
    spacing: { after: 60 },
    children: [new TextRun({ text, size: 18, italics: true, color: "555555", font: "Calibri" })],
  });
}

function spacer() {
  return new Paragraph({ spacing: { after: 60 }, children: [new TextRun("")] });
}

// ── tables ────────────────────────────────────────────────────────────────────
function labelValueTable(rows) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: rows.map(([label, value]) =>
      new TableRow({
        children: [
          new TableCell({
            width: { size: 35, type: WidthType.PERCENTAGE },
            shading: { type: ShadingType.SOLID, fill: LBLUE },
            margins: { top: 80, bottom: 80, left: 120, right: 120 },
            children: [new Paragraph({ children: [new TextRun({ text: label, bold: true, size: 20, font: "Calibri" })] })],
          }),
          new TableCell({
            width: { size: 65, type: WidthType.PERCENTAGE },
            margins: { top: 80, bottom: 80, left: 120, right: 120 },
            children: [new Paragraph({ children: [new TextRun({ text: value, size: 20, font: "Calibri" })] })],
          }),
        ],
      })
    ),
  });
}

function columnTable(headers, rows, colWidths) {
  const headerRow = new TableRow({
    tableHeader: true,
    children: headers.map((h, i) =>
      new TableCell({
        width: { size: colWidths[i], type: WidthType.PERCENTAGE },
        shading: { type: ShadingType.SOLID, fill: BLUE },
        margins: { top: 80, bottom: 80, left: 120, right: 120 },
        verticalAlign: VerticalAlign.CENTER,
        children: [new Paragraph({ children: [new TextRun({ text: h, bold: true, size: 20, color: WHITE, font: "Calibri" })] })],
      })
    ),
  });
  const dataRows = rows.map((row, ri) =>
    new TableRow({
      children: row.map((cell, i) =>
        new TableCell({
          width: { size: colWidths[i], type: WidthType.PERCENTAGE },
          shading: { type: ShadingType.SOLID, fill: ri % 2 === 0 ? WHITE : GREY },
          margins: { top: 60, bottom: 60, left: 120, right: 120 },
          children: [new Paragraph({ children: [new TextRun({ text: cell, size: 20, font: "Calibri" })] })],
        })
      ),
    })
  );
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [headerRow, ...dataRows],
  });
}

// ── DOCUMENT ──────────────────────────────────────────────────────────────────
const children = [

  // ── TITLE ──
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 120 },
    children: [new TextRun({ text: "DISCHARGE SUMMARY", bold: true, size: 40, color: BLUE, font: "Calibri" })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 60 },
    children: [new TextRun({ text: "Pediatric Urology Department", size: 22, color: "444444", font: "Calibri", italics: true })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 200 },
    children: [new TextRun({ text: "[Hospital Name]  |  [Address]  |  [Phone]", size: 18, color: "888888", font: "Calibri" })],
  }),

  // ── PATIENT DETAILS ──
  heading1("PATIENT DETAILS"),
  spacer(),
  labelValueTable([
    ["Name:", "[Patient Name]"],
    ["Age / Sex:", "15 Years / Female"],
    ["MRN:", "[######]"],
    ["Date of Admission:", "[DD/MM/YYYY]"],
    ["Date of Discharge:", "[DD/MM/YYYY]"],
    ["Length of Stay:", "[X] days"],
    ["Admitting Consultant:", "[Pediatric Urologist Name]"],
    ["Primary Team:", "Pediatric Urology"],
  ]),

  spacer(),

  // ── DIAGNOSIS ──
  heading1("DIAGNOSIS"),
  spacer(),
  labelValueTable([
    ["Primary Diagnosis:", "Right/Left renal calculus, [upper/lower pole], 8mm"],
    ["Procedure Performed:", "Percutaneous Nephrolithotomy (PCNL) — Mini/Standard"],
    ["ICD-10 Code:", "N20.0 — Calculus of kidney"],
  ]),

  spacer(),

  // ── PRESENTING COMPLAINT ──
  heading1("PRESENTING COMPLAINT"),
  spacer(),
  para("The patient presented with a [X]-day history of right/left flank pain, associated with hematuria and nausea. Imaging confirmed an 8mm calculus in the [location] of the right/left kidney with [mild/no] hydronephrosis."),

  spacer(),

  // ── RELEVANT HISTORY ──
  heading1("RELEVANT HISTORY"),
  spacer(),
  columnTable(
    ["Parameter", "Details"],
    [
      ["Past Medical History", "No known chronic illness / [specify if relevant]"],
      ["Family History", "[Positive/Negative] for urolithiasis"],
      ["Allergies", "NKDA / [specify]"],
      ["Medications Pre-Admission", "None / [specify]"],
      ["Previous Stone Episodes", "First episode / Prior history"],
    ],
    [30, 70]
  ),

  spacer(),

  // ── PRE-OP INVESTIGATIONS ──
  heading1("PRE-OPERATIVE INVESTIGATIONS"),
  spacer(),
  columnTable(
    ["Investigation", "Result"],
    [
      ["Urinalysis", "[Hematuria, no infection / UTI present - treated]"],
      ["Urine Culture", "[Negative / Organism - treated with antibiotics]"],
      ["Serum Creatinine", "[X] µmol/L (normal)"],
      ["Serum Calcium", "[X] mmol/L"],
      ["Serum Uric Acid", "[X] mmol/L"],
      ["eGFR", "[X] mL/min/1.73m²"],
      ["FBC", "Hb [X] g/dL, WBC [X], Platelets [X]"],
      ["Coagulation (PT/APTT)", "Within normal limits"],
      ["Non-contrast CT KUB", "8mm calculus, [location], HU [X], [degree] hydronephrosis"],
      ["Renal Ultrasound", "[Findings]"],
    ],
    [40, 60]
  ),

  spacer(),

  // ── PROCEDURE DETAILS ──
  heading1("PROCEDURE DETAILS"),
  spacer(),
  columnTable(
    ["Field", "Details"],
    [
      ["Date of Surgery", "[DD/MM/YYYY]"],
      ["Anaesthesia", "General anaesthesia"],
      ["Position", "Prone / Modified supine (flank-free)"],
      ["Surgeon", "[Name]"],
      ["Assistant", "[Name]"],
      ["Anaesthetist", "[Name]"],
    ],
    [30, 70]
  ),
  spacer(),
  heading2("Operative Findings"),
  bullet("Access: [Fluoroscopic / Ultrasound-guided] percutaneous access to [calyx]"),
  bullet("Tract size: Mini-PCNL (14-18Fr) / Standard PCNL (24-30Fr)"),
  bullet("Stone: Single calculus, 8mm, [upper/lower pole], [appearance: white/yellow/hard]"),
  bullet("Lithotripsy: [Pneumatic / Holmium laser / Ultrasonic] — good fragmentation achieved"),
  bullet("Stone clearance: Complete / Residual fragments <2mm"),
  bullet("Nephrostomy tube placed: Yes [X Fr] / No (tubeless PCNL)"),
  bullet("Ureteral (DJ) stent placed: Yes [X Fr, X cm] / No"),
  bullet("Estimated blood loss: [X] mL"),
  bullet("Intra-operative complications: None / [specify]"),
  bullet("Stone sent for: Composition analysis"),

  spacer(),

  // ── POST-OP COURSE ──
  heading1("POST-OPERATIVE COURSE"),
  spacer(),
  columnTable(
    ["Day", "Clinical Notes"],
    [
      ["Day 0\n(Day of Surgery)", "Recovered from anaesthesia without immediate complications. Haemodynamically stable. IV fluids maintained. Urinary catheter in situ draining clear/blood-stained urine."],
      ["Day 1", "Vitals stable; afebrile. Nephrostomy tube draining [X] mL serous/blood-stained fluid. Adequate urine output. IV paracetamol + ketorolac; transitioned to oral analgesia. Tolerating oral fluids and diet. Post-op Hb [X] g/dL — no significant drop."],
      ["Day 2", "Nephrostomy tube clamped for [X] hours; patient comfortable. Check imaging (X-ray KUB/USS): no residual significant fragments / minor residual <2mm. Nephrostomy tube removed. Mobilising independently."],
      ["Day 3\n(Discharge)", "Vitals: Temp [X]°C, HR [X] bpm, BP [X/X] mmHg, SpO2 [X]%. Nephrostomy site clean and dry. No fever; no signs of infection. Urinalysis: mild haematuria (expected) / clear. Pain well controlled on oral analgesia. Tolerating full diet and fluids. Fit for discharge."],
    ],
    [18, 82]
  ),

  spacer(),

  // ── MEDICATIONS ON DISCHARGE ──
  heading1("MEDICATIONS ON DISCHARGE"),
  spacer(),
  columnTable(
    ["Medication", "Dose", "Frequency", "Duration"],
    [
      ["Ibuprofen (with food)", "400mg", "TDS", "5 days"],
      ["Paracetamol", "500–1000mg", "QDS PRN", "5 days"],
      ["Tamsulosin 0.4mg\n(if DJ stent in situ)", "0.4mg", "OD nocte", "Until stent removal"],
      ["Antibiotics (if culture +ve)", "As per sensitivity", "As directed", "[Course]"],
      ["Potassium citrate\n(if hypocitraturia confirmed)", "10–20 mEq", "BD", "Ongoing — nephrology review"],
      ["Increased fluid intake", "Target urine output >2L/day", "—", "Lifelong"],
    ],
    [28, 22, 22, 28]
  ),

  spacer(),

  // ── DISCHARGE INSTRUCTIONS ──
  heading1("DISCHARGE INSTRUCTIONS"),
  spacer(),
  heading2("Activity"),
  bullet("Rest at home for 1–2 weeks; avoid strenuous activity or contact sports for 4 weeks"),
  bullet("May return to school after 1–2 weeks if comfortable"),
  bullet("No heavy lifting or vigorous exercise until review"),

  spacer(),
  heading2("Diet and Fluids"),
  bullet("Drink 2–3 litres of water per day (most important preventive measure)"),
  bullet("Reduce salt and animal protein intake"),
  bullet("Avoid excess oxalate-rich foods (spinach, nuts, chocolate) pending stone composition result"),
  bullet("Do NOT restrict dietary calcium"),

  spacer(),
  heading2("Wound Care"),
  bullet("Nephrostomy site: keep clean and dry; remove dressing after 48 hours"),
  bullet("No bathing/swimming until site healed (~5–7 days)"),
  bullet("Watch for signs of infection: redness, discharge, swelling, or fever"),

  spacer(),
  heading2("DJ Stent (if placed)"),
  bullet("Patient and parent counselled: urinary frequency, urgency, mild dysuria, and blood-tinged urine are expected"),
  bullet("Stent removal scheduled: [Date] — cystoscopy under LA/sedation"),
  bullet("Do NOT miss the stent removal appointment — retained stents cause serious complications"),

  spacer(),
  heading2("When to Seek Urgent Medical Attention"),
  bullet("Fever >38°C"),
  bullet("Severe flank or abdominal pain"),
  bullet("Inability to pass urine"),
  bullet("Frank, heavy bleeding per urethra"),
  bullet("Signs of wound infection (pus, spreading redness)"),

  spacer(),

  // ── FOLLOW-UP PLAN ──
  heading1("FOLLOW-UP PLAN"),
  spacer(),
  columnTable(
    ["Appointment", "Timeframe", "Purpose"],
    [
      ["Pediatric Urology", "2 weeks", "Wound check, stone analysis result review, DJ stent removal scheduling"],
      ["Repeat Imaging (USS KUB)", "4–6 weeks", "Confirm stone clearance, check for residual fragments"],
      ["Pediatric Nephrology", "6–8 weeks", "24-hour urine metabolic workup (calcium, oxalate, citrate, uric acid, cystine)"],
      ["Dietitian", "Within 1 month", "Dietary counselling for stone prevention"],
      ["Stone Composition Result", "2–3 weeks", "To guide long-term preventive therapy"],
    ],
    [28, 22, 50]
  ),

  spacer(),

  // ── RECURRENCE PREVENTION ──
  heading1("STONE RECURRENCE PREVENTION"),
  spacer(),
  para("Recurrence risk in pediatric patients is approximately 50% within 5 years without metabolic workup and preventive treatment. A full metabolic evaluation is mandatory at the nephrology follow-up.", { bold: false }),
  spacer(),
  heading2("Common Causes to Exclude"),
  columnTable(
    ["Stone Type / Metabolic Cause", "Preventive Measure"],
    [
      ["Idiopathic hypercalciuria (30–50% of cases)", "Increased fluids, reduced sodium, thiazide diuretics"],
      ["Hypocitraturia", "Potassium citrate supplementation"],
      ["Hyperoxaluria (primary or enteric)", "Restrict oxalate diet; pyridoxine (primary)"],
      ["Hyperuricosuria", "Urinary alkalinisation; allopurinol"],
      ["Cystinuria", "High fluid intake; alkalinisation; D-penicillamine for severe cases"],
      ["Distal renal tubular acidosis (dRTA)", "Potassium citrate supplementation"],
    ],
    [48, 52]
  ),

  spacer(),

  // ── CONDITION AT DISCHARGE ──
  heading1("CONDITION AT DISCHARGE"),
  spacer(),
  para("Stable / Good", { bold: true }),

  spacer(),

  // ── SIGNATURES ──
  heading1("AUTHORISATION & SIGNATURES"),
  spacer(),
  columnTable(
    ["Role", "Name", "Date", "Signature"],
    [
      ["Discharging Registrar", "[Dr. Name]", "[DD/MM/YYYY]", "________________"],
      ["Countersigning Consultant", "[Dr. Name]", "[DD/MM/YYYY]", "________________"],
    ],
    [25, 25, 25, 25]
  ),

  spacer(),
  spacer(),
  noteItalic("IMPORTANT: This is a template. All fields shown in [brackets] must be completed with actual patient data before clinical use. This document is not valid as a clinical record until signed by a licensed clinician."),
];

// ── BUILD DOCUMENT ──────────────────────────────────────────────────────────
const doc = new Document({
  creator: "Orris AI",
  title: "PCNL Discharge Summary — Pediatric Urology",
  description: "Post-operative discharge summary for 15F with 8mm renal stone (PCNL)",
  styles: {
    default: {
      document: {
        run: { font: "Calibri", size: 20 },
      },
    },
  },
  sections: [
    {
      properties: {
        page: {
          margin: { top: 720, bottom: 720, left: 900, right: 900 },
        },
      },
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              alignment: AlignmentType.RIGHT,
              children: [
                new TextRun({ text: "DISCHARGE SUMMARY — PCNL | Pediatric Urology", size: 16, color: "888888", font: "Calibri" }),
              ],
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              alignment: AlignmentType.CENTER,
              children: [
                new TextRun({ text: "Page ", size: 16, color: "888888", font: "Calibri" }),
                new TextRun({ children: [PageNumber.CURRENT], size: 16, color: "888888", font: "Calibri" }),
                new TextRun({ text: " of ", size: 16, color: "888888", font: "Calibri" }),
                new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 16, color: "888888", font: "Calibri" }),
                new TextRun({ text: "   |   CONFIDENTIAL — For authorised clinical use only", size: 16, color: "888888", font: "Calibri" }),
              ],
            }),
          ],
        }),
      },
      children,
    },
  ],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("/home/daytona/workspace/renal-stone-discharge/PCNL_Discharge_Summary.docx", buffer);
  console.log("SUCCESS: file written");
}).catch(err => {
  console.error("ERROR:", err.message);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/renal-stone-discharge && node generate.js

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/worksp…

Running Command

cd /home/daytona/workspace/renal-stone-discharge && python3 -c " import zipfile,…

Your Word document is ready. Click the link below to download:

PCNL Discharge Summary

Word Document · DOCX

What's included in the document:
  • Professional header/footer with page numbers and confidentiality notice
  • Color-coded section headings (navy blue banners)
  • Formatted tables with alternating row shading for all sections:
    • Patient Details
    • Diagnosis
    • Relevant History
    • Pre-operative Investigations
    • Procedure Details + Operative Findings
    • Post-operative Course (Day 0-3)
    • Medications on Discharge
    • Discharge Instructions (Activity, Diet, Wound Care, DJ Stent, Red Flags)
    • Follow-up Plan
    • Stone Recurrence Prevention
    • Authorisation & Signatures
  • A template disclaimer note at the bottom
All [bracketed fields] need to be filled in with the actual patient data before clinical use.
This is a shared conversation. Sign in to Orris to start your own chat.