Nephrotic syndrome as per nelson

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
I now have a thorough picture of the pediatric nephrotic syndrome content. I should note transparently that Nelson's Textbook of Pediatrics itself is not in the library, but the Harriet Lane Handbook explicitly references and draws from Nelson (21st ed.), making it the best available proxy. Let me now compile a comprehensive response.

Note: Nelson's Textbook of Pediatrics is not directly available in this library, but the Harriet Lane Handbook (23rd ed., Johns Hopkins Hospital) - which explicitly cites and is based on Nelson 21st ed. - contains a comprehensive pediatric nephrotic syndrome chapter. The content below reflects Nelson's framework as presented through Harriet Lane.

Nephrotic Syndrome (Pediatric - Nelson Framework)

Definition / Diagnostic Criteria

Nephrotic syndrome is defined by the tetrad:
  1. Heavy proteinuria - urine protein/creatinine ratio >2-3 mg/mg, or >40 mg/m²/hr
  2. Hypoalbuminemia - serum albumin <2.5 g/dL
  3. Edema - generalized (anasarca)
  4. Hyperlipidemia / lipiduria

Epidemiology

  • Idiopathic nephrotic syndrome is the most common form in children, representing ~90% of cases in ages 1-10 years
  • Minimal Change Disease (MCD) accounts for 85% of idiopathic cases in children
  • Peak age: 2-6 years; more common in boys
  • Nephrotic syndrome may be primary (kidney disease) or secondary (systemic disease, drugs)

Clinical Manifestations

  • Generalized edema from hypoalbuminemia and reduced oncotic pressure
  • Periorbital puffiness - typically the first sign; often misdiagnosed as allergic reaction or seasonal allergies
  • Pretibial edema, ascites, pleural effusion, scrotal/labial edema
  • Decreased urine output, frothy urine

Etiologies

Primary Causes (90%)

PathologyNotes
Minimal Change Nephrotic Syndrome (MCNS)85% of idiopathic childhood cases
Focal Segmental Glomerulosclerosis (FSGS)More common in older children and adolescents
Membranous nephropathyRare in children; consider secondary causes
IgA nephropathyUsually presents with hematuria
Genetic disorders of the slit diaphragmNPHS1 (nephrin), NPHS2 (podocin) mutations

Secondary Causes (10%)

  • Infections: HIV, hepatitis B, hepatitis C
  • Systemic: SLE (lupus nephritis), HSP, vasculitis
  • Metabolic: Diabetes mellitus
  • Drugs: NSAIDs, penicillamine, lithium, gold
  • Malignancy: Leukemia, lymphoma (Hodgkin's - associated with MCD)
  • Congenital: Congenital nephrotic syndrome of Finnish type (NPHS1 mutation)

Factors Suggesting a Diagnosis OTHER Than Idiopathic MCNS (Box 19.3)

These features warrant biopsy and further workup:
  • Age <1 year or >10 years
  • Family history of kidney disease
  • Extrarenal disease (arthritis, rash, anemia)
  • Chronic systemic disease
  • Symptoms of intravascular volume expansion - hypertension, pulmonary edema
  • Renal failure (elevated creatinine)
  • Active urine sediment (RBC casts - nephritic picture)

Initial Investigations (First Presentation)

  • Urinalysis and microscopy - microhematuria present in ~30% (not prognostic in isolation)
  • Urine protein/creatinine (P/Cr) ratio - quantifies proteinuria
  • Serum albumin, total protein, cholesterol, creatinine
  • Complement (C3, C4) - low in secondary causes (e.g., SLE, MPGN)
  • ANA, anti-dsDNA - screen for lupus
  • ESR, CRP
  • Infectious workup as indicated: TB, HIV, hepatitis B/C
  • Renal and bladder ultrasonography
  • Lipid panel

Management of Idiopathic Nephrotic Syndrome in Children

Empirical corticosteroid treatment without kidney biopsy is recommended for children without atypical features.
Hospitalization is recommended for overwhelming edema or suspected infection.

First Episode (Induction)

Prednisone (use ideal body weight in obese patients):
  • 60 mg/m²/day (or 2 mg/kg/day, max 60 mg/day) - once daily or divided - for 6 weeks
  • Followed by 40 mg/m² (or 1.5 mg/kg) on alternate days for 6 weeks
~95% of MCD and ~20% of FSGS achieve remission within 4-8 weeks.

Relapse Treatment

  • Prednisone 60 mg/m²/day (or 2 mg/kg/day, max 60 mg) until urine protein is negative for 3 consecutive days
  • Then 40 mg/m² (or 1.5 mg/kg) on alternate days for 4 weeks

Response Patterns and Their Definitions

PatternDefinition
Steroid-responsiveComplete remission within 4-8 weeks of steroids
Frequently relapsing≥2 relapses within 6 months of initial response, OR ≥4 relapses in any 12-month period
Steroid-dependent2 consecutive relapses during steroid tapering OR within 14 days of stopping steroids
Steroid-resistantNo remission or only partial remission after 8 weeks of corticosteroids

Second-Line Treatments

For frequently relapsing, steroid-dependent, or steroid-resistant nephrotic syndrome:
  • Cyclophosphamide
  • Mycophenolate mofetil (MMF)
  • Calcineurin inhibitors (tacrolimus, cyclosporine)
  • Levamisole
  • Rituximab (anti-CD20 monoclonal antibody)
Calcineurin inhibitors or MMF are often first-line second agents for confirmed steroid resistance.

Indications for Renal Biopsy

  • Age <12 months or >12 years
  • Macroscopic hematuria
  • Systemic or syndromic findings
  • Persistent creatinine elevation for >1-2 weeks
  • Low complement levels
  • Persistent proteinuria after 4-8 weeks of adequate steroid treatment

Complications

Acute Complications

  • AKI - from volume depletion or intrinsic disease
  • Thromboembolic disease - loss of antithrombin III, protein C/S; DVT, renal vein thrombosis, pulmonary embolism
  • Infections - loss of immunoglobulins and complement in urine; risk of spontaneous bacterial peritonitis (Streptococcus pneumoniae), cellulitis, sepsis. Vaccinations important (see immunization chapter).
  • Hypovolemia

Chronic Steroid Side Effects

  • Cushingoid features (moon face, buffalo hump, weight gain, striae)
  • Cataracts
  • Accelerated atherosclerosis
  • Osteoporosis
  • Gastric ulcer
  • Mood swings, insomnia
  • Insulin resistance / hyperglycemia
  • Immunosuppression

Pathophysiology (Brief)

  • Podocyte injury → disruption of the glomerular filtration barrier (especially the slit diaphragm) → loss of size/charge selectivity → massive proteinuria
  • Proteinuria → hypoalbuminemia → decreased plasma oncotic pressure → fluid shifts to interstitium → edema + hypovolemia → secondary aldosteronism → sodium and water retention
  • Liver compensatory lipoprotein synthesis → hyperlipidemia; lipiduria from lipid-laden tubular cells (oval fat bodies, maltese cross under polarized light)

Source: The Harriet Lane Handbook, 23rd ed. (The Johns Hopkins Hospital), Chapter 19 - Nephrology, Section E: Nephrotic Syndrome (citing Nelson Textbook of Pediatrics, 21st ed., Kliegman et al., Elsevier 2020) - p. 702-704.

Generate a management flowchart PDF for pediatric nephrotic syndrome

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/neph…

Writing File

~/nephrotic-flowchart/generate_flowchart.py


from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas
from reportlab.lib.utils import simpleSplit
import math

# ── page setup ──────────────────────────────────────────────────────────────
PAGE_W, PAGE_H = A4          # 210 × 297 mm  (595 × 842 pt)
MARGIN = 18 * mm

OUT = "/home/daytona/workspace/nephrotic-flowchart/Pediatric_Nephrotic_Syndrome_Management.pdf"
c = canvas.Canvas(OUT, pagesize=A4)

# ── colour palette ───────────────────────────────────────────────────────────
CLR_HEADER   = colors.HexColor("#1A3C5E")   # dark navy – header bar
CLR_START    = colors.HexColor("#1A3C5E")   # dark navy – start/end ovals
CLR_DECISION = colors.HexColor("#2E7D9C")   # teal – diamond
CLR_ACTION   = colors.HexColor("#1565C0")   # blue – action boxes
CLR_WARN     = colors.HexColor("#B71C1C")   # red – biopsy / urgent
CLR_GREEN    = colors.HexColor("#1B5E20")   # dark green – remission
CLR_ORANGE   = colors.HexColor("#E65100")   # orange – relapse / 2nd line
CLR_PURPLE   = colors.HexColor("#4A148C")   # purple – complications
CLR_LIGHT    = colors.HexColor("#E3F2FD")   # very light blue – box fill
CLR_LGREEN   = colors.HexColor("#E8F5E9")
CLR_LORANGE  = colors.HexColor("#FFF3E0")
CLR_LRED     = colors.HexColor("#FFEBEE")
CLR_LPURPLE  = colors.HexColor("#F3E5F5")
CLR_LTEAL    = colors.HexColor("#E0F4FA")
CLR_WHITE    = colors.white
CLR_BLACK    = colors.HexColor("#212121")
CLR_GREY     = colors.HexColor("#757575")
CLR_LGREY    = colors.HexColor("#F5F5F5")
CLR_LINE     = colors.HexColor("#90A4AE")

# ── helper: wrapped text in a box ────────────────────────────────────────────
def draw_box(c, x, y, w, h,
             lines,                   # list of (text, fontname, fontsize, colour)
             fill_colour=CLR_LIGHT,
             border_colour=CLR_ACTION,
             border_width=1.2,
             radius=4):
    c.setFillColor(fill_colour)
    c.setStrokeColor(border_colour)
    c.setLineWidth(border_width)
    c.roundRect(x, y, w, h, radius, fill=1, stroke=1)
    # render text lines centred vertically
    total_h = sum(sz + 1 for _, _, sz, _ in lines)
    ty = y + h/2 + total_h/2
    for txt, fn, fs, fc in lines:
        ty -= (fs + 1)
        c.setFont(fn, fs)
        c.setFillColor(fc)
        c.drawCentredString(x + w/2, ty, txt)

def draw_oval(c, cx, cy, rx, ry, text, fontname, fontsize,
              fill_colour=CLR_START, text_colour=CLR_WHITE, border_width=1.5):
    c.setFillColor(fill_colour)
    c.setStrokeColor(fill_colour)
    c.setLineWidth(border_width)
    c.ellipse(cx - rx, cy - ry, cx + rx, cy + ry, fill=1, stroke=1)
    c.setFont(fontname, fontsize)
    c.setFillColor(text_colour)
    c.drawCentredString(cx, cy - fontsize/3, text)

def draw_diamond(c, cx, cy, hw, hh,
                 lines,  # list of (text, fontname, fontsize, colour)
                 fill_colour=CLR_LTEAL,
                 border_colour=CLR_DECISION,
                 border_width=1.4):
    path = c.beginPath()
    path.moveTo(cx,      cy + hh)
    path.lineTo(cx + hw, cy)
    path.lineTo(cx,      cy - hh)
    path.lineTo(cx - hw, cy)
    path.close()
    c.setFillColor(fill_colour)
    c.setStrokeColor(border_colour)
    c.setLineWidth(border_width)
    c.drawPath(path, fill=1, stroke=1)
    total_h = sum(sz + 1 for _, _, sz, _ in lines)
    ty = cy + total_h/2 - 1
    for txt, fn, fs, fc in lines:
        ty -= (fs + 1)
        c.setFont(fn, fs)
        c.setFillColor(fc)
        c.drawCentredString(cx, ty, txt)

def arrow(c, x1, y1, x2, y2, label="", label_side="right",
          colour=CLR_LINE, width=1.2):
    c.setStrokeColor(colour)
    c.setLineWidth(width)
    c.line(x1, y1, x2, y2)
    # arrowhead
    angle = math.atan2(y2 - y1, x2 - x1)
    aw = 5
    for da in (0.4, -0.4):
        ex = x2 - aw * math.cos(angle - da)
        ey = y2 - aw * math.sin(angle - da)
        c.line(x2, y2, ex, ey)
    # label
    if label:
        mx, my = (x1+x2)/2, (y1+y2)/2
        c.setFont("Helvetica-Bold", 7)
        c.setFillColor(colour)
        if label_side == "right":
            c.drawString(mx + 3, my, label)
        else:
            c.drawRightString(mx - 3, my, label)

def section_bar(c, y, label):
    c.setFillColor(CLR_HEADER)
    c.rect(MARGIN, y, PAGE_W - 2*MARGIN, 10, fill=1, stroke=0)
    c.setFont("Helvetica-Bold", 7)
    c.setFillColor(CLR_WHITE)
    c.drawString(MARGIN + 4, y + 2.5, label)

# ════════════════════════════════════════════════════════════════════════════
#  PAGE 1  –  Diagnosis & Initial Work-up
# ════════════════════════════════════════════════════════════════════════════
BW = 158 * mm   # standard box width
BX = (PAGE_W - BW) / 2  # centred x

# ── header ───────────────────────────────────────────────────────────────────
c.setFillColor(CLR_HEADER)
c.rect(0, PAGE_H - 28*mm, PAGE_W, 28*mm, fill=1, stroke=0)
c.setFont("Helvetica-Bold", 15)
c.setFillColor(CLR_WHITE)
c.drawCentredString(PAGE_W/2, PAGE_H - 14*mm, "Pediatric Nephrotic Syndrome")
c.setFont("Helvetica", 9)
c.drawCentredString(PAGE_W/2, PAGE_H - 22*mm,
    "Management Flowchart  |  Based on Nelson Textbook of Pediatrics / Harriet Lane Handbook")

# ── START oval ───────────────────────────────────────────────────────────────
START_Y = PAGE_H - 42*mm
draw_oval(c, PAGE_W/2, START_Y, 52*mm, 7*mm,
          "Child presents with oedema / suspected nephrotic syndrome",
          "Helvetica-Bold", 7.5, fill_colour=CLR_START)

arrow(c, PAGE_W/2, START_Y - 7*mm, PAGE_W/2, START_Y - 18*mm)

# ── Diagnostic criteria box ───────────────────────────────────────────────────
DC_Y = START_Y - 18*mm - 22*mm
draw_box(c, BX, DC_Y, BW, 22*mm,
    [
        ("DIAGNOSTIC CRITERIA (all 4 required)", "Helvetica-Bold", 8, CLR_ACTION),
        ("Proteinuria  urine P/Cr >2–3 mg/mg  or  >40 mg/m²/hr", "Helvetica", 7.5, CLR_BLACK),
        ("Hypoalbuminaemia  serum albumin <2.5 g/dL", "Helvetica", 7.5, CLR_BLACK),
        ("Generalised oedema (anasarca)", "Helvetica", 7.5, CLR_BLACK),
        ("Hyperlipidaemia / lipiduria", "Helvetica", 7.5, CLR_BLACK),
    ],
    fill_colour=CLR_LIGHT, border_colour=CLR_ACTION, border_width=1.5)

arrow(c, PAGE_W/2, DC_Y, PAGE_W/2, DC_Y - 12*mm)

# ── Initial investigations ────────────────────────────────────────────────────
INV_Y = DC_Y - 12*mm - 30*mm
draw_box(c, BX, INV_Y, BW, 30*mm,
    [
        ("INITIAL INVESTIGATIONS", "Helvetica-Bold", 8, CLR_ACTION),
        ("UA + microscopy  |  Urine P/Cr ratio", "Helvetica", 7.5, CLR_BLACK),
        ("Serum: albumin, total protein, cholesterol, creatinine, electrolytes", "Helvetica", 7.5, CLR_BLACK),
        ("Complement C3/C4  |  ANA, anti-dsDNA  |  ESR, CRP", "Helvetica", 7.5, CLR_BLACK),
        ("Hep B, Hep C, HIV (if high-risk)  |  TB screen as indicated", "Helvetica", 7.5, CLR_BLACK),
        ("Lipid panel  |  Renal + bladder USS  |  Refer nephrologist", "Helvetica", 7.5, CLR_BLACK),
    ],
    fill_colour=CLR_LIGHT, border_colour=CLR_ACTION)

arrow(c, PAGE_W/2, INV_Y, PAGE_W/2, INV_Y - 12*mm)

# ── Atypical features diamond ─────────────────────────────────────────────────
DIA1_Y = INV_Y - 12*mm - 14*mm
draw_diamond(c, PAGE_W/2, DIA1_Y, 70*mm, 14*mm,
    [
        ("Atypical features present?", "Helvetica-Bold", 8, CLR_DECISION),
    ],
    fill_colour=CLR_LTEAL, border_colour=CLR_DECISION)

# YES → biopsy box (right)
BIOP_X = PAGE_W/2 + 70*mm + 4*mm
BIOP_Y = DIA1_Y - 10*mm
draw_box(c, BIOP_X, BIOP_Y, 55*mm, 28*mm,
    [
        ("RENAL BIOPSY INDICATED", "Helvetica-Bold", 7.5, CLR_WARN),
        ("Age <1 yr or >12 yr", "Helvetica", 6.5, CLR_BLACK),
        ("Macroscopic haematuria", "Helvetica", 6.5, CLR_BLACK),
        ("Systemic / syndromic findings", "Helvetica", 6.5, CLR_BLACK),
        ("Low C3/C4", "Helvetica", 6.5, CLR_BLACK),
        ("Persistent creatinine >1–2 wk", "Helvetica", 6.5, CLR_BLACK),
        ("No remission after 4–8 wk steroids", "Helvetica", 6.5, CLR_BLACK),
    ],
    fill_colour=CLR_LRED, border_colour=CLR_WARN, border_width=1.8)
arrow(c, PAGE_W/2 + 70*mm, DIA1_Y, BIOP_X, BIOP_Y + 14*mm, label="YES")

# NO → steroid treatment
arrow(c, PAGE_W/2, DIA1_Y - 14*mm, PAGE_W/2, DIA1_Y - 26*mm, label="NO", label_side="left")

# ── Steroid induction ─────────────────────────────────────────────────────────
STER_Y = DIA1_Y - 26*mm - 28*mm
draw_box(c, BX, STER_Y, BW, 28*mm,
    [
        ("EMPIRICAL STEROID TREATMENT  (no biopsy needed)", "Helvetica-Bold", 8, CLR_GREEN),
        ("INDUCTION  (First episode)", "Helvetica-BoldOblique", 7.5, CLR_GREEN),
        ("Prednisone 60 mg/m²/day  or  2 mg/kg/day  (max 60 mg/day)", "Helvetica", 7.5, CLR_BLACK),
        ("Once daily  x  6 weeks", "Helvetica", 7.5, CLR_BLACK),
        ("THEN  Prednisone 40 mg/m²  or  1.5 mg/kg  on alternate days  x  6 weeks", "Helvetica", 7.5, CLR_BLACK),
        ("Monitor: daily urine dipstick protein  |  BP  |  weight", "Helvetica-Oblique", 7, CLR_GREY),
    ],
    fill_colour=CLR_LGREEN, border_colour=CLR_GREEN, border_width=1.5)

# ── footer page 1 ─────────────────────────────────────────────────────────────
c.setFont("Helvetica-Oblique", 6.5)
c.setFillColor(CLR_GREY)
c.drawString(MARGIN, 8*mm,
    "Source: Harriet Lane Handbook 23e (citing Nelson Textbook of Pediatrics 21e, Kliegman et al., Elsevier 2020)  |  Page 1 of 3")
c.drawRightString(PAGE_W - MARGIN, 8*mm, "For educational use only – not a substitute for clinical judgement")

c.showPage()

# ════════════════════════════════════════════════════════════════════════════
#  PAGE 2  –  Response Assessment & Relapse Management
# ════════════════════════════════════════════════════════════════════════════
c.setFillColor(CLR_HEADER)
c.rect(0, PAGE_H - 20*mm, PAGE_W, 20*mm, fill=1, stroke=0)
c.setFont("Helvetica-Bold", 12)
c.setFillColor(CLR_WHITE)
c.drawCentredString(PAGE_W/2, PAGE_H - 12*mm,
    "Pediatric Nephrotic Syndrome  –  Response Assessment & Relapse Management")

# ── Response assessment diamond ───────────────────────────────────────────────
RESP_Y = PAGE_H - 38*mm
draw_diamond(c, PAGE_W/2, RESP_Y, 72*mm, 14*mm,
    [("Response to steroids at 4–8 weeks?", "Helvetica-Bold", 8, CLR_DECISION)],
    fill_colour=CLR_LTEAL, border_colour=CLR_DECISION)

# ── REMISSION (left) ──────────────────────────────────────────────────────────
REM_X = MARGIN
REM_Y = RESP_Y - 24*mm
draw_box(c, REM_X, REM_Y, 70*mm, 20*mm,
    [
        ("REMISSION  (steroid-responsive)", "Helvetica-Bold", 7.5, CLR_GREEN),
        ("Urine protein = trace/nil  x  3 consecutive days", "Helvetica", 7, CLR_BLACK),
        ("~95% of MCD  |  ~20% of FSGS", "Helvetica", 7, CLR_BLACK),
        ("Continue alternate-day taper  |  Wean off", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LGREEN, border_colour=CLR_GREEN)
arrow(c, PAGE_W/2 - 72*mm, RESP_Y, REM_X + 35*mm, REM_Y + 10*mm,
      label="YES / REMISSION", label_side="left", colour=CLR_GREEN)

# ── STEROID RESISTANT (right) ─────────────────────────────────────────────────
SR_X = PAGE_W/2 + 76*mm - 65*mm + 52*mm
SR_Y = RESP_Y - 24*mm
draw_box(c, SR_X, SR_Y, 68*mm, 20*mm,
    [
        ("STEROID-RESISTANT", "Helvetica-Bold", 7.5, CLR_WARN),
        ("No remission after 8 weeks of steroids", "Helvetica", 7, CLR_BLACK),
        ("Kidney biopsy", "Helvetica-Bold", 7, CLR_WARN),
        ("Add: CNI (tacrolimus/cyclosporine) or MMF", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LRED, border_colour=CLR_WARN)
arrow(c, PAGE_W/2 + 72*mm, RESP_Y, SR_X, SR_Y + 10*mm,
      label="NO", colour=CLR_WARN)

# ── Relapse section bar ───────────────────────────────────────────────────────
section_bar(c, REM_Y - 16*mm, "  RELAPSE MANAGEMENT")

# ── Relapse definition boxes (3 side by side) ─────────────────────────────────
BOX3W = 55*mm
BOX3Y = REM_Y - 16*mm - 32*mm
GAP3  = 3.5*mm

# Frequently relapsing
draw_box(c, MARGIN, BOX3Y, BOX3W, 30*mm,
    [
        ("FREQUENTLY RELAPSING", "Helvetica-Bold", 7, CLR_ORANGE),
        ("≥2 relapses within 6 months of", "Helvetica", 6.5, CLR_BLACK),
        ("initial response,  OR", "Helvetica", 6.5, CLR_BLACK),
        ("≥4 relapses in any 12-month period", "Helvetica", 6.5, CLR_BLACK),
        ("Relapse Rx: Prednisolone 60 mg/m²/day", "Helvetica", 6.5, CLR_BLACK),
        ("until protein –ve x3 days, then", "Helvetica", 6.5, CLR_BLACK),
        ("40 mg/m² alternate days x 4 weeks", "Helvetica", 6.5, CLR_BLACK),
    ],
    fill_colour=CLR_LORANGE, border_colour=CLR_ORANGE)

# Steroid dependent
draw_box(c, MARGIN + BOX3W + GAP3, BOX3Y, BOX3W, 30*mm,
    [
        ("STEROID-DEPENDENT", "Helvetica-Bold", 7, CLR_ORANGE),
        ("2 consecutive relapses during", "Helvetica", 6.5, CLR_BLACK),
        ("steroid taper,  OR", "Helvetica", 6.5, CLR_BLACK),
        ("within 14 days of stopping steroids", "Helvetica", 6.5, CLR_BLACK),
        ("Consider low-dose maintenance", "Helvetica", 6.5, CLR_BLACK),
        ("Steroid-sparing agents (see below)", "Helvetica", 6.5, CLR_BLACK),
    ],
    fill_colour=CLR_LORANGE, border_colour=CLR_ORANGE)

# Single relapse
draw_box(c, MARGIN + 2*(BOX3W + GAP3), BOX3Y, BOX3W, 30*mm,
    [
        ("INFREQUENT RELAPSE", "Helvetica-Bold", 7, CLR_GREEN),
        ("< 2 relapses in 6 months", "Helvetica", 6.5, CLR_BLACK),
        ("Treat same as first episode", "Helvetica", 6.5, CLR_BLACK),
        ("Prednisolone until protein –ve x3,", "Helvetica", 6.5, CLR_BLACK),
        ("then alternate-day taper x 4 wk", "Helvetica", 6.5, CLR_BLACK),
    ],
    fill_colour=CLR_LGREEN, border_colour=CLR_GREEN)

# ── Second-line agents section ────────────────────────────────────────────────
section_bar(c, BOX3Y - 16*mm,
    "  SECOND-LINE / STEROID-SPARING AGENTS  (frequently relapsing, steroid-dependent, steroid-resistant)")

SL_Y = BOX3Y - 16*mm - 38*mm
SLW  = 73*mm
draw_box(c, MARGIN, SL_Y, SLW, 36*mm,
    [
        ("ALKYLATING AGENT", "Helvetica-Bold", 7.5, CLR_PURPLE),
        ("Cyclophosphamide", "Helvetica-Bold", 7.5, CLR_BLACK),
        ("2–3 mg/kg/day  x  8–12 weeks", "Helvetica", 7, CLR_BLACK),
        ("Monitor CBC, haemorrhagic cystitis", "Helvetica", 7, CLR_GREY),
        ("Levamisole (immunomodulator)", "Helvetica-BoldOblique", 7, CLR_BLACK),
        ("2.5 mg/kg on alternate days", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LPURPLE, border_colour=CLR_PURPLE)

draw_box(c, MARGIN + SLW + 4*mm, SL_Y, SLW, 36*mm,
    [
        ("CALCINEURIN INHIBITORS (CNI)", "Helvetica-Bold", 7.5, CLR_PURPLE),
        ("Tacrolimus  0.1–0.2 mg/kg/day  (target trough 5–10)", "Helvetica", 7, CLR_BLACK),
        ("Cyclosporine  3–5 mg/kg/day  (target trough 80–120)", "Helvetica", 7, CLR_BLACK),
        ("Monitor renal function, BP, drug levels", "Helvetica", 7, CLR_GREY),
        ("Mycophenolate mofetil (MMF)", "Helvetica-BoldOblique", 7, CLR_BLACK),
        ("600–1200 mg/m²/day  divided BD", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LPURPLE, border_colour=CLR_PURPLE)

draw_box(c, MARGIN + 2*(SLW + 4*mm), SL_Y, 42*mm, 36*mm,
    [
        ("RITUXIMAB", "Helvetica-Bold", 7.5, CLR_PURPLE),
        ("Anti-CD20 monoclonal Ab", "Helvetica", 7, CLR_BLACK),
        ("375 mg/m²  IV  x  1–4 doses", "Helvetica", 7, CLR_BLACK),
        ("Reserved for refractory cases", "Helvetica", 7, CLR_BLACK),
        ("Specialist centre only", "Helvetica-Oblique", 7, CLR_GREY),
    ],
    fill_colour=CLR_LPURPLE, border_colour=CLR_PURPLE)

# ── footer p2 ─────────────────────────────────────────────────────────────────
c.setFont("Helvetica-Oblique", 6.5)
c.setFillColor(CLR_GREY)
c.drawString(MARGIN, 8*mm,
    "Source: Harriet Lane Handbook 23e (citing Nelson Textbook of Pediatrics 21e, Kliegman et al., Elsevier 2020)  |  Page 2 of 3")
c.drawRightString(PAGE_W - MARGIN, 8*mm, "For educational use only – not a substitute for clinical judgement")

c.showPage()

# ════════════════════════════════════════════════════════════════════════════
#  PAGE 3  –  Complications & Special Situations
# ════════════════════════════════════════════════════════════════════════════
c.setFillColor(CLR_HEADER)
c.rect(0, PAGE_H - 20*mm, PAGE_W, 20*mm, fill=1, stroke=0)
c.setFont("Helvetica-Bold", 12)
c.setFillColor(CLR_WHITE)
c.drawCentredString(PAGE_W/2, PAGE_H - 12*mm,
    "Pediatric Nephrotic Syndrome  –  Complications, Monitoring & Special Situations")

# ── COMPLICATIONS section ─────────────────────────────────────────────────────
section_bar(c, PAGE_H - 30*mm, "  ACUTE COMPLICATIONS  (life-threatening)")

CMP1Y = PAGE_H - 30*mm - 36*mm
CMP1W = 53*mm
GAP1  = 3*mm

# AKI
draw_box(c, MARGIN, CMP1Y, CMP1W, 34*mm,
    [
        ("ACUTE KIDNEY INJURY", "Helvetica-Bold", 7.5, CLR_WARN),
        ("Hypovolaemia-induced (most common)", "Helvetica", 7, CLR_BLACK),
        ("Or intrinsic disease (FSGS, RPGN)", "Helvetica", 7, CLR_BLACK),
        ("Rx: IV albumin 0.5–1 g/kg over 2–4 hr", "Helvetica", 7, CLR_BLACK),
        ("followed by frusemide 1–2 mg/kg", "Helvetica", 7, CLR_BLACK),
        ("Monitor UO, creatinine, electrolytes", "Helvetica-Oblique", 6.5, CLR_GREY),
    ],
    fill_colour=CLR_LRED, border_colour=CLR_WARN)

# Thrombosis
draw_box(c, MARGIN + CMP1W + GAP1, CMP1Y, CMP1W, 34*mm,
    [
        ("THROMBOEMBOLISM", "Helvetica-Bold", 7.5, CLR_WARN),
        ("Loss of AT-III, Prot C/S in urine", "Helvetica", 7, CLR_BLACK),
        ("Risk: DVT, RVT, PE, cerebral sinus", "Helvetica", 7, CLR_BLACK),
        ("Prevention: avoid dehydration,", "Helvetica", 7, CLR_BLACK),
        ("avoid prolonged immobility", "Helvetica", 7, CLR_BLACK),
        ("Rx: LMWH / anticoagulation", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LRED, border_colour=CLR_WARN)

# Infection
draw_box(c, MARGIN + 2*(CMP1W + GAP1), CMP1Y, CMP1W, 34*mm,
    [
        ("SERIOUS INFECTION", "Helvetica-Bold", 7.5, CLR_WARN),
        ("Loss of Ig & complement in urine", "Helvetica", 7, CLR_BLACK),
        ("Spontaneous bacterial peritonitis", "Helvetica", 7, CLR_BLACK),
        ("(Strep. pneumoniae most common)", "Helvetica-Oblique", 6.5, CLR_GREY),
        ("Cellulitis, sepsis, varicella", "Helvetica", 7, CLR_BLACK),
        ("Vaccinate: pneumo, varicella, flu", "Helvetica-Bold", 7, CLR_BLACK),
        ("Rx: IV antibiotics, hold diuretics", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LRED, border_colour=CLR_WARN)

# ── STEROID SIDE EFFECTS section ──────────────────────────────────────────────
section_bar(c, CMP1Y - 16*mm, "  CHRONIC STEROID SIDE EFFECTS")

SIDE_Y = CMP1Y - 16*mm - 24*mm
draw_box(c, MARGIN, SIDE_Y, 3*CMP1W + 2*GAP1, 22*mm,
    [
        ("Cushingoid features  |  Cataracts  |  Accelerated atherosclerosis  |  Osteoporosis / growth retardation",
         "Helvetica", 7.5, CLR_BLACK),
        ("Gastric ulcer  |  Mood swings / insomnia  |  Insulin resistance / hyperglycaemia  |  Immunosuppression",
         "Helvetica", 7.5, CLR_BLACK),
        ("Monitoring: annual ophthalmology, DEXA bone density, glucose, BP, growth chart, ophthalmic exam",
         "Helvetica-Oblique", 7, CLR_GREY),
    ],
    fill_colour=CLR_LORANGE, border_colour=CLR_ORANGE)

# ── SPECIAL SITUATIONS section ────────────────────────────────────────────────
section_bar(c, SIDE_Y - 16*mm, "  SPECIAL SITUATIONS")

SP_Y = SIDE_Y - 16*mm - 54*mm
SPW  = 74*mm

draw_box(c, MARGIN, SP_Y, SPW, 52*mm,
    [
        ("CONGENITAL NEPHROTIC SYNDROME", "Helvetica-Bold", 7.5, CLR_PURPLE),
        ("Onset <3 months of age", "Helvetica", 7, CLR_BLACK),
        ("Finnish type: NPHS1 (nephrin) mutation", "Helvetica", 7, CLR_BLACK),
        ("Diffuse mesangial sclerosis: WT1, LAMB2", "Helvetica", 7, CLR_BLACK),
        ("Steroid-resistant by definition", "Helvetica-Bold", 7, CLR_WARN),
        ("Supportive: albumin infusions, nutrition,", "Helvetica", 7, CLR_BLACK),
        ("unilateral/bilateral nephrectomy + dialysis", "Helvetica", 7, CLR_BLACK),
        ("→ Renal transplant (definitive)", "Helvetica-Bold", 7, CLR_BLACK),
        ("Genetic testing essential", "Helvetica-Oblique", 7, CLR_GREY),
    ],
    fill_colour=CLR_LPURPLE, border_colour=CLR_PURPLE)

draw_box(c, MARGIN + SPW + 4*mm, SP_Y, SPW, 52*mm,
    [
        ("SECONDARY NEPHROTIC SYNDROME", "Helvetica-Bold", 7.5, CLR_DECISION),
        ("SLE nephritis: high-dose steroids + MMF", "Helvetica", 7, CLR_BLACK),
        ("or cyclophosphamide (class III/IV)", "Helvetica", 7, CLR_BLACK),
        ("HSP nephritis: steroids ± ACEi", "Helvetica", 7, CLR_BLACK),
        ("Hepatitis B: antiviral therapy", "Helvetica", 7, CLR_BLACK),
        ("HIV: HAART + ACEi (HIVAN)", "Helvetica", 7, CLR_BLACK),
        ("Malignancy (Hodgkin's lymphoma):", "Helvetica", 7, CLR_BLACK),
        ("treat underlying malignancy", "Helvetica", 7, CLR_BLACK),
        ("Drug-induced: stop offending drug", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LTEAL, border_colour=CLR_DECISION)

draw_box(c, MARGIN + 2*(SPW + 4*mm), SP_Y, 33*mm, 52*mm,
    [
        ("HOSPITALISE IF:", "Helvetica-Bold", 7.5, CLR_WARN),
        ("Overwhelming oedema", "Helvetica", 7, CLR_BLACK),
        ("Suspected infection", "Helvetica", 7, CLR_BLACK),
        ("Severe hypoalbuminaemia", "Helvetica", 7, CLR_BLACK),
        ("AKI / oliguria", "Helvetica", 7, CLR_BLACK),
        ("Respiratory compromise", "Helvetica", 7, CLR_BLACK),
        ("(pleural effusion)", "Helvetica-Oblique", 6.5, CLR_GREY),
        ("Thrombosis suspected", "Helvetica", 7, CLR_BLACK),
        ("First presentation in", "Helvetica", 7, CLR_BLACK),
        ("infant < 1 year", "Helvetica", 7, CLR_BLACK),
    ],
    fill_colour=CLR_LRED, border_colour=CLR_WARN)

# ── HOME MONITORING box ───────────────────────────────────────────────────────
section_bar(c, SP_Y - 16*mm, "  HOME MONITORING & FOLLOW-UP")
HM_Y = SP_Y - 16*mm - 22*mm
draw_box(c, MARGIN, HM_Y, PAGE_W - 2*MARGIN, 20*mm,
    [
        ("Daily first-morning urine dipstick protein  |  Record weight  |  Monitor BP",
         "Helvetica", 7.5, CLR_BLACK),
        ("Urine protein trace/nil x3 consecutive mornings = remission  |  2+ x3 mornings = relapse (contact team)",
         "Helvetica", 7.5, CLR_BLACK),
        ("Regular serum albumin, creatinine, cholesterol, drug levels (if on CNI)",
         "Helvetica-Oblique", 7, CLR_GREY),
    ],
    fill_colour=CLR_LIGHT, border_colour=CLR_ACTION)

# ── footer p3 ─────────────────────────────────────────────────────────────────
c.setFont("Helvetica-Oblique", 6.5)
c.setFillColor(CLR_GREY)
c.drawString(MARGIN, 8*mm,
    "Source: Harriet Lane Handbook 23e (citing Nelson Textbook of Pediatrics 21e, Kliegman et al., Elsevier 2020)  |  Page 3 of 3")
c.drawRightString(PAGE_W - MARGIN, 8*mm, "For educational use only – not a substitute for clinical judgement")

c.save()
print(f"PDF saved: {OUT}")
Running Command

cd /home/daytona/workspace/nephrotic-flowchart && python generate_flowchart.py 2…

Running Command

ls -lh /home/daytona/workspace/nephrotic-flowchart/

The PDF was generated successfully. Here's your download link:

Pediatric Nephrotic Syndrome Management

PDF Document · PDF


The 3-page A4 flowchart PDF covers:
Page 1 - Diagnosis & Initial Work-up
  • Diagnostic criteria (all 4 features)
  • Initial investigations checklist
  • Decision diamond: atypical features present?
  • Biopsy indications (red box, right branch)
  • Empirical steroid induction regimen (left branch)
Page 2 - Response Assessment & Relapse Management
  • Remission vs. steroid-resistant diamond
  • Three relapse pattern boxes: frequently relapsing, steroid-dependent, infrequent relapse (with definitions)
  • Second-line agents: cyclophosphamide/levamisole, CNIs/MMF, rituximab
Page 3 - Complications & Special Situations
  • Acute complications: AKI, thromboembolism, serious infection (with management)
  • Chronic steroid side effects and monitoring
  • Special situations: congenital NS, secondary NS, hospitalisation criteria
  • Home monitoring protocol
Source: Harriet Lane Handbook 23e (citing Nelson Textbook of Pediatrics 21e, Kliegman et al., Elsevier 2020)
This is a shared conversation. Sign in to Orris to start your own chat.