Why GFR dec in neohritic syndrome and what is azotemia

Reading File
Now let me search the medical library for both topics in parallel.
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
I now have comprehensive information from multiple authoritative textbooks. Here is the full answer:

Why GFR Decreases in Nephritic Syndrome

The core mechanism is glomerular inflammation. Here is how it plays out step by step:

1. Inflammatory cell infiltration and glomerular hypercellularity

In nephritic syndrome, immune-mediated injury (e.g., immune complex deposition in post-streptococcal GN, ANCA-mediated injury, etc.) triggers an inflammatory cascade. Neutrophils and monocytes infiltrate the glomerulus, and endothelial and mesangial cells proliferate. This dramatically increases the cellularity of the glomerular tufts.

2. Damage to the glomerular capillary wall

The inflamed, hypercellular glomerulus physically narrows and compresses the capillary lumens. Capillary wall necrosis can also occur. This reduces the surface area available for filtration and impairs blood flow through the glomerular tuft.

3. Reduced glomerular capillary perfusion pressure

The glomerular inflammation reduces intraglomerular hydrostatic pressure, which is the main driving force for ultrafiltration. Less pressure = less filtration.

4. Net result: Decreased GFR

The combination of:
  • Reduced filtration surface area (capillary compression)
  • Damaged filtration barrier
  • Reduced intraglomerular blood flow
...leads to a fall in GFR, clinically presenting as oliguria (reduced urine output) and azotemia.
"Glomerular diseases that present with the nephritic syndrome are usually associated with significant inflammation in the glomeruli, which damages capillary walls, leading to leakage of red cells (hematuria), and decreased GFR, which results in oliguria and azotemia."
  • Robbins & Kumar Basic Pathology, p. 2297
The consequences of reduced GFR are also fluid and sodium retention, which activates the renin-angiotensin-aldosterone system (RAAS), causing hypertension - another classic feature of nephritic syndrome.

What is Azotemia?

Azotemia (from Latin azo = nitrogen, emia = in the blood) is a biochemical abnormality defined as:
Elevation of blood urea nitrogen (BUN) and serum creatinine levels, due largely to a decreased GFR.
  • Robbins, Cotran & Kumar - Pathologic Basis of Disease, p. 2688
It reflects the kidney's failure to excrete nitrogenous waste products of protein metabolism (primarily urea and creatinine).

Types of Azotemia

TypeCause
PrerenalHypoperfusion of kidneys (hypotension, shock, dehydration, heart failure) - no parenchymal damage
Renal (intrinsic)Direct glomerular, tubular, interstitial, or vascular damage
PostrenalObstruction of urine outflow distal to the kidney; corrects when obstruction is relieved

Azotemia vs. Uremia - Key Distinction

TermDefinition
AzotemiaPurely a lab finding - elevated BUN and creatinine
UremiaAzotemia that is severe enough to cause clinical symptoms
When azotemia progresses to uremia, patients develop:
  • GI involvement: uremic gastroenteritis, nausea, vomiting
  • Neurological: peripheral neuropathy, encephalopathy
  • Cardiac: uremic fibrinous pericarditis

In Nephritic Syndrome Specifically

In nephritic syndrome, azotemia is a direct consequence of the reduced GFR caused by glomerular inflammation. The kidney can no longer filter BUN and creatinine adequately, so they accumulate in the blood. This is why azotemia is listed as one of the cardinal features of nephritic syndrome alongside hematuria, proteinuria (subnephrotic range), oliguria, and hypertension.

So why azotemia and proteinuria occurs

Based on the previous context, let me give you a quick answer first, then pull more detail from the textbooks.
Quick answer: Azotemia occurs because reduced GFR means nitrogenous wastes (BUN, creatinine) can't be filtered out. Proteinuria occurs because glomerular inflammation physically damages the filtration barrier, making it "leaky" to proteins that normally wouldn't pass through.
Searching sources...
Finding Sources
Finding Sources
Reading File
Reading File
I now have excellent material from the textbooks. Here is the full explanation:

Why Azotemia and Proteinuria Occur in Nephritic Syndrome

Both arise from the same root cause - glomerular inflammation damaging the filtration barrier - but through two different mechanisms.

1. Azotemia - Why it Occurs

Normal state:

The kidney continuously filters nitrogenous waste products - primarily urea (BUN) and creatinine - out of the blood via the glomerulus. These are small molecules that pass freely through the filtration barrier and are excreted in urine.

In nephritic syndrome:

  • Glomerular inflammation causes endothelial and mesangial cell proliferation + neutrophil infiltration, massively increasing cellularity inside the glomerular tuft
  • This compresses and occludes the glomerular capillary lumens
  • GFR falls - less blood is filtered per minute
  • Urea and creatinine accumulate in the blood because the kidney cannot filter them fast enough
  • Result: elevated BUN and serum creatinine = Azotemia
"Azotemia is a biochemical abnormality that refers to an elevation of blood urea nitrogen (BUN) and creatinine levels, related largely to a decreased GFR."
  • Robbins, Cotran & Kumar - Pathologic Basis of Disease
In short: Low GFR → less filtration of waste → waste builds up in blood → azotemia.

2. Proteinuria - Why it Occurs

To understand this, you need to understand the normal glomerular filtration barrier and how it keeps proteins OUT of urine.

The normal filtration barrier has 3 layers:

LayerRole in keeping proteins out
Fenestrated endothelial cells (covered by glycocalyx)Glycocalyx is negatively charged - electrically repels albumin (also negatively charged), preventing it from even reaching the GBM
Glomerular Basement Membrane (GBM)Contains heparan sulfate proteoglycans (negative charge) + collagen type IV mesh - acts as a size and charge barrier
Podocyte foot processes + slit diaphragm (nephrin protein)Final size-selective barrier; slit diaphragm is only 20-30 nm wide - too narrow for albumin (radius ~3.6 nm) to pass in significant amounts
"The normal glomerulus is highly permeable to water and small solutes... and is impermeable to proteins of the size of albumin (~3.6-nm radius; 70 kDa) or larger."
  • Robbins, Cotran & Kumar - Pathologic Basis of Disease

In nephritic syndrome:

Glomerular inflammation directly damages all three layers:
  1. Endothelial injury - disrupts the glycocalyx, removing the electrostatic repulsion of albumin. Albumin can now reach the GBM in higher concentrations.
  2. GBM disruption - inflammatory mediators and neutrophil enzymes (proteases, reactive oxygen species) degrade the GBM collagen and heparan sulfate, losing both size and charge selectivity.
  3. Podocyte/slit diaphragm injury - foot process effacement and nephrin loss opens up "large pores" in the slit diaphragm, allowing proteins to spill through.
"Glomerular diseases are characterized by breaks in the glomerular capillary wall, thereby leading to hematuria with proteinuria because of loss of the selective barrier to particles based on size and charge."
  • Goldman-Cecil Medicine

Why is proteinuria SUBNEPHROTIC (not massive) in nephritic syndrome?

This is a key distinction from nephrotic syndrome:
  • In nephritic syndrome, the barrier disruption is partial and patchy - caused by inflammation
  • In nephrotic syndrome (e.g., minimal change disease), there is diffuse, severe podocyte injury causing massive protein leak (>3.5 g/day)
  • In nephritic syndrome, proteinuria is typically <3.5 g/day (subnephrotic range) because the primary injury is to the mesangium and endothelium, with less severe podocyte damage

Summary Table

FeatureMechanismResult
AzotemiaGlomerular inflammation → ↓GFR → urea & creatinine not filteredElevated BUN + creatinine in blood
ProteinuriaCapillary wall damage → loss of size & charge selectivity of filtration barrierProtein leaks into urine (subnephrotic range)
HematuriaSame capillary wall damage → RBCs squeeze throughRBCs and RBC casts in urine
Hypertension↓GFR → Na & water retention → RAAS activationRaised BP
Oliguria↓GFR → less filtrate formedReduced urine output
All five cardinal features of nephritic syndrome trace back to a single event: inflammatory destruction of the glomerular capillary wall.
attachment
attachment

I cant get 3rd immunoflorrnce of IgA nephropathy

Your image shows a table from First Aid covering glomerulonephritis types, but IgA nephropathy's row is cut off at the top. Let me pull the full details from the textbooks.
Searching sources...
Finding Sources
Loading Image
Reading File
Reading File
Got everything you need. Here is the full immunofluorescence picture of IgA nephropathy:

IgA Nephropathy - Immunofluorescence (IF) Pattern

The IF pattern is the defining diagnostic feature of IgA nephropathy (Berger disease).

What you see on IF:

Dominant/codominant mesangial IgA deposits - bright green granular fluorescence confined to the mesangial regions of the glomerulus (not along the GBM like in PSGN or Goodpasture).
Here is the actual IF image from Goldman-Cecil Medicine:
IgA nephropathy IF - mesangial IgA deposits
The right panel (green fluorescence) shows IgA lighting up the mesangium in a granular/mesangial pattern.

Full IF Composition:

ImmunoreactantPresence
IgADominant / codominant (MUST be present for diagnosis)
C3Often present (alternative pathway activation)
ProperdinOften present (confirms alternative pathway)
IgG or IgMSmaller amounts, may be present
C1q / C4 (classical pathway)Usually ABSENT
"The characteristic immunofluorescence picture is of mesangial deposition of IgA, often with C3 and the alternative pathway protein properdin and smaller amounts of IgG or IgM. Early components of the classical complement pathway are usually absent."
  • Robbins & Kumar Basic Pathology, p. 2405

The 3 Key IF Points to Remember (what your note probably cut off):

  1. Pattern: Mesangial/paramesangial (granular) - NOT linear, NOT subepithelial
  2. Dominant immunoglobulin: IgA (this is what makes the diagnosis - "dominant or codominant IgA")
  3. Complement pathway: Alternative pathway (C3 + properdin present; C1q ABSENT - no classical pathway activation)

Why Alternative Pathway?

IgA normally activates complement via the lectin or alternative pathway, NOT the classical pathway (which requires IgG/IgM + C1q). This is why C1q and C4 are absent in IgA nephropathy - a useful exam point to distinguish it from lupus nephritis (which shows C1q strongly) or PSGN (which shows granular IgG + C3).

Comparing the 3 Granular IF Patterns (exam favourite):

DiseaseIF PatternLocation of deposits
IgA nephropathyIgA dominant + C3 (alternative pathway)Mesangium
PSGNIgG + C3 (granular "starry sky")Subepithelial + mesangial
Lupus nephritis"Full house" (IgG, IgA, IgM, C3, C1q)Mesangial + subendothelial + subepithelial

I cant get anything

Let me clarify what you need help with!
Asking for Preferences

What exactly are you struggling to understand about IgA nephropathy?

Got it. Let me break this down as simply as possible with the actual image.

IgA Nephropathy - IF Pattern, Explained Simply

First, understand what IF actually IS

Immunofluorescence (IF) is a lab technique where you take the kidney biopsy, apply fluorescent antibodies that glow green when they bind to specific proteins (IgA, IgG, C3, etc.), then look under UV light.
Whatever glows green = that protein is deposited there.

What glows in IgA nephropathy?

Look at this image again:
IgA nephropathy IF
  • Left panel = Light microscopy (H&E stain) - shows mesangial cell proliferation
  • Right panel = Immunofluorescence - the bright green spots = IgA deposits
Notice the green is clumped/patchy in the CENTER of the glomerular tuft - that is the mesangium.

The 3 things to know about where it lights up:

Normal glomerulus cross-section:

        Capillary wall (GBM)
       /
[Bowman's space] -- [Capillary loops] -- [Mesangium in the middle]
                                              ↑
                              THIS is where IgA deposits sit
Mesangium = the "scaffolding" tissue between the capillary loops, right in the center of the glomerulus.
So on IF, you see:
  • Green fluorescence in the CENTER of the glomerular tuft
  • NOT along the outer capillary walls (that would be GBM/subepithelial pattern like in PSGN or membranous)
  • NOT a linear line (that is Goodpasture's)
  • Patchy/granular clusters in the mesangial zones

Visual comparison - WHERE the glow sits:

DiseaseWhere it glows on IFPattern
IgA nephropathyMesangium (center of tuft)Granular, central
PSGNCapillary walls + mesangium"Starry sky" all over
GoodpastureAlong entire GBMSmooth linear line
Membranous GNOuter capillary wall (subepithelial)Granular, peripheral

Simple memory trick:

IgA = "I go to the mesAngium"
The IgA complexes are too big to cross the GBM, so they get trapped in the mesangium where they are filtered out. They pile up there, activate complement (alternative pathway - so C3 lights up too, but NO C1q), and cause inflammation.

What exactly lights up on the stain panel:

StainResult
Anti-IgABright green (dominant)
Anti-C3Often positive
Anti-IgGFaint / minor
Anti-C1qNEGATIVE (important!)
The fact that C1q is absent tells you the classical complement pathway is NOT activated - IgA uses the alternative/lectin pathway instead. This is a key exam point.

Does this make it clearer? Or would you like me to draw out the structure of the glomerulus and show exactly where each type of deposit sits?

Test me using nephrotic and nephritic syndrome from FA according to uworld and nbme

Let me pull the high-yield testable content from the textbooks first, then build USMLE-style questions.
Searching sources...
Finding Sources
Searching the Web

USMLE UWorld NBME high yield nephrotic nephritic syndrome tested concepts

Finding Sources
Finding Sources
Finding Sources
I have enough high-yield material. Here are 10 USMLE-style questions - answer them one by one or all at once, then I'll give you full explanations.

🧪 USMLE-Style Test: Nephrotic & Nephritic Syndrome

(UWorld/NBME style - one best answer)


Q1. A 4-year-old boy is brought in with periorbital puffiness every morning for 2 weeks. His mother says it goes away by afternoon. Urine dipstick shows 4+ protein, no blood. Serum albumin is 1.8 g/dL. Kidney biopsy is performed - light microscopy shows normal-appearing glomeruli. What will electron microscopy show?
  • A) Subepithelial "spike and dome" deposits
  • B) Subendothelial deposits with "tram-track" appearance
  • C) Effacement of podocyte foot processes
  • D) Mesangial IgA deposits
  • E) Linear IgG along GBM

Q2. A 35-year-old HIV-positive man presents with massive proteinuria (5.2 g/day), no hematuria, and edema. Biopsy shows focal and segmental scarring of glomeruli with collapse of the glomerular tuft. Which cell is primarily injured in this disease?
  • A) Mesangial cell
  • B) Endothelial cell
  • C) Parietal epithelial cell
  • D) Podocyte
  • E) Tubular epithelial cell

Q3. A 52-year-old man with a 10-year history of hepatitis B presents with 4g/day proteinuria and leg edema. Kidney biopsy shows thickened GBM. Electron microscopy shows subepithelial deposits. Immunofluorescence shows granular IgG and C3 along the GBM. What is the most likely diagnosis?
  • A) Minimal change disease
  • B) Membranous nephropathy
  • C) FSGS
  • D) Post-streptococcal GN
  • E) Membranoproliferative GN

Q4. A 7-year-old boy presents with tea-colored urine, periorbital edema, and hypertension 2 weeks after a sore throat. Urine shows RBC casts and 2+ protein. Serum complement (C3) is low. ASO titer is elevated. What is the expected immunofluorescence finding?
  • A) Linear IgG along GBM
  • B) Granular IgG and C3 in mesangium and capillary walls ("starry sky")
  • C) Mesangial IgA deposits
  • D) No deposits (pauci-immune)
  • E) Subepithelial IgG deposits only

Q5. A 28-year-old man presents with recurrent episodes of gross hematuria coinciding with upper respiratory infections. Between episodes he has microscopic hematuria. Complement levels are normal. Biopsy shows mesangial hypercellularity. IF shows mesangial IgA deposits. Which complement pathway is activated?
  • A) Classical pathway (C1q → C4 → C2 → C3)
  • B) Alternative pathway (C3 → properdin → C3b)
  • C) Both classical and alternative equally
  • D) Mannose-binding lectin pathway only
  • E) No complement activation

Q6. A 65-year-old woman with rheumatoid arthritis on long-term gold therapy presents with 4.5 g/day proteinuria and edema. Biopsy shows GBM thickening with subepithelial deposits. This pattern is MOST associated with which antibody target in its primary/idiopathic form?
  • A) Anti-dsDNA
  • B) Anti-GBM (type IV collagen)
  • C) Anti-PLA2R (phospholipase A2 receptor)
  • D) Anti-ANCA (MPO)
  • E) Anti-streptolysin O

Q7. A 10-year-old child with nephrotic syndrome is started on prednisone. Within 4 weeks, proteinuria completely resolves. What does this excellent steroid response tell you about the underlying diagnosis?
  • A) Membranous nephropathy (responds to steroids)
  • B) FSGS (steroid-sensitive variant)
  • C) Minimal change disease (80-90% steroid responsive)
  • D) IgA nephropathy (steroid responsive)
  • E) Post-streptococcal GN (spontaneous resolution)

Q8. A patient has the following findings: hematuria with RBC casts, oliguria, hypertension, azotemia, and subnephrotic proteinuria (<3.5 g/day). Which syndrome does this represent and what is the primary pathophysiologic mechanism?
  • A) Nephrotic syndrome - podocyte injury
  • B) Nephritic syndrome - glomerular inflammation → decreased GFR
  • C) Nephrotic syndrome - loss of charge selectivity
  • D) Nephritic syndrome - thromboembolism
  • E) AKI - tubular necrosis

Q9. A 40-year-old man presents with hemoptysis and hematuria. Kidney biopsy shows crescents on light microscopy. Immunofluorescence shows smooth linear IgG along the GBM. Serum anti-GBM antibodies are positive. What additional finding would you expect on lung biopsy?
  • A) Granulomatous inflammation with necrosis
  • B) Linear IgG along alveolar basement membrane
  • C) Eosinophilic infiltrate
  • D) Caseous necrosis
  • E) Pauci-immune (no deposits)

Q10. A 6-year-old child with nephrotic syndrome has a sudden onset of left flank pain radiating to the groin and gross hematuria. Urinalysis shows no RBC casts. Ultrasound shows a filling defect in the left renal vein. Which underlying mechanism explains this complication?
  • A) Increased IgG loss → susceptibility to encapsulated organisms
  • B) Loss of antithrombin III in urine → hypercoagulable state → renal vein thrombosis
  • C) Hypoalbuminemia → decreased oncotic pressure → edema
  • D) Loss of thyroxine-binding globulin → hypothyroidism
  • E) Increased LDL due to hepatic lipoprotein overproduction

How to respond:

Just type your answers like: 1C, 2D, 3B... and I'll grade you and explain every single one in detail.

C D B B A B C B B B

📊 Your Score: 7/10 — Good! Let's fix the 3 you missed.


✅ Full Breakdown


Q1 — Your answer: C ✅ CORRECT

Answer: C - Effacement of podocyte foot processes
Minimal change disease - light microscopy looks completely normal. The only abnormality is on EM: diffuse effacement (flattening) of podocyte foot processes. This is the hallmark. IF is also negative (no deposits). Most common nephrotic in children. Responds dramatically to steroids.
Key: Normal LM + Normal IF + Abnormal EM (foot process effacement) = MCD

Q2 — Your answer: D ✅ CORRECT

Answer: D - Podocyte
FSGS = podocyte disease. HIV causes a specific variant called HIV-associated nephropathy (HIVAN) - classic "collapsing FSGS" with collapse of the glomerular tuft. The podocyte is the primary target. Also associated with heroin use, sickle cell disease, and morbid obesity.
Key FSGS associations to memorize:
  • HIV → collapsing FSGS
  • Heroin, sickle cell, obesity → secondary FSGS
  • Idiopathic → most common in Black adults

Q3 — Your answer: B ✅ CORRECT

Answer: B - Membranous nephropathy
Classic triad: subepithelial deposits + thickened GBM + granular IgG/C3 on IF. Secondary causes include Hep B, Hep C, SLE, malignancy, drugs (gold, penicillamine, NSAIDs). In the idiopathic form, the target antigen is anti-PLA2R (phospholipase A2 receptor on podocytes).
EM buzzword: "spike and dome" appearance - spikes of GBM material projecting between subepithelial deposits.

Q4 — Your answer: B ✅ CORRECT

Answer: B - Granular IgG and C3 ("starry sky")
Post-streptococcal GN (PSGN) = immune complex disease. Streptococcal antigens + antibodies form complexes that deposit in the subepithelial space and mesangium, giving a "starry sky" or "lumpy bumpy" granular IF pattern. C3 is LOW (consumed). Presents 2-3 weeks after throat infection (or 6 weeks after skin infection).
LM: hypercellular glomeruli with neutrophils EM: subepithelial "humps" (pathognomonic)

Q5 — Your answer: A ❌ WRONG

Correct answer: B - Alternative pathway
You chose A (classical pathway).
Here is why it's B:
  • IgA does NOT activate the classical complement pathway
  • Classical pathway requires IgG or IgM + C1q
  • IgA activates the alternative pathway (and sometimes lectin pathway)
  • This is why on IF: C3 and properdin are present, but C1q and C4 are ABSENT
  • Serum complement levels are normal in IgA nephropathy (unlike PSGN where C3 is low)
Exam tip: Normal C3 + mesangial IgA + recurrent hematuria with URTI = IgA nephropathy. Low C3 = think PSGN, lupus, MPGN.

Q6 — Your answer: B ❌ WRONG

Correct answer: C - Anti-PLA2R
You chose B (anti-GBM).
The question asks about the antibody target in the primary/idiopathic form of membranous nephropathy. Anti-GBM (type IV collagen) is Goodpasture syndrome - completely different disease.
  • Primary membranous nephropathy = anti-PLA2R (phospholipase A2 receptor) antibodies in ~70% of cases
  • Secondary causes (Hep B, gold therapy, SLE) have the same histology but different antibody targets
  • Anti-GBM → linear IF, crescents, pulmonary hemorrhage (Goodpasture) - not membranous pattern
The question stem gave you secondary membranous (gold therapy) but asked specifically about the idiopathic form's antibody = anti-PLA2R.

Q7 — Your answer: C ✅ CORRECT

Answer: C - Minimal change disease
MCD responds to steroids in 80-90% of children - this is actually how MCD was historically identified before routine biopsy. Complete resolution of proteinuria within 4-8 weeks of prednisone = almost diagnostic of MCD.
  • FSGS = steroid resistant in most cases
  • Membranous = poor steroid response
  • MCD = excellent steroid response

Q8 — Your answer: B ✅ CORRECT

Answer: B - Nephritic syndrome - glomerular inflammation → decreased GFR
You correctly identified the complete picture:
  • RBC casts + hematuria = glomerular inflammation (nephritic)
  • Oliguria + azotemia = decreased GFR
  • Subnephrotic proteinuria (<3.5 g/day) = partial barrier disruption
  • Hypertension = Na/water retention + RAAS activation
The single most important distinguishing feature of nephritic vs nephrotic: RBC casts = nephritic. Massive proteinuria >3.5g + no hematuria = nephrotic.

Q9 — Your answer: B ✅ CORRECT

Answer: B - Linear IgG along alveolar basement membrane
Goodpasture syndrome = anti-GBM antibodies that cross-react with type IV collagen in BOTH the glomerular AND alveolar basement membranes. So:
  • Kidney: linear IgG on IF → crescentic GN → hematuria
  • Lung: linear IgG on alveolar BM → alveolar hemorrhage → hemoptysis
This is Type II HSR (cytotoxic). The antibody is anti-GBM (anti-α3 chain of type IV collagen). Distinguish from Granulomatosis with polyangiitis (Wegener): also hemoptysis + hematuria, but pauci-immune IF (no deposits) + c-ANCA/PR3-ANCA positive.

Q10 — Your answer: B ✅ CORRECT

Answer: B - Loss of antithrombin III → hypercoagulable state → renal vein thrombosis
This is a classic nephrotic syndrome complication question. The kidney leaks antithrombin III (a small protein) in the urine along with all the albumin. Without ATIII, thrombin is unchecked → hypercoagulable state → renal vein thrombosis (most classic), DVT, PE.
Full list of proteins lost in nephrotic syndrome to know:
  • Albumin → edema, hypoalbuminemia
  • Antithrombin III → thrombosis (renal vein, DVT, PE)
  • IgG → infections (encapsulated bacteria - pneumococcus)
  • Thyroxine-binding globulin → hypothyroidism (low T4 but normal TSH)
  • Transferrin → microcytic anemia
  • Complement (factor B/D) → infections

📈 Summary

QTopicYouAnswerResult
1MCD - EM findingCC
2FSGS - cell injuredDD
3Membranous nephropathyBB
4PSGN - IF patternBB
5IgA - complement pathwayAB
6Membranous - antibody targetBC
7MCD - steroid responseCC
8Nephritic vs nephroticBB
9Goodpasture - lung findingBB
10Nephrotic complicationBB

🎯 Focus Areas for Review:

  1. IgA nephropathy - alternative complement pathway (no C1q, normal serum C3)
  2. Anti-PLA2R - the antibody of primary/idiopathic membranous nephropathy
Want another round with harder questions, or want me to focus specifically on those two weak points?

Create a PDF quick reference card comparing all glomerular diseases

Reading File
Good - I have all the data from our previous session. Now building the PDF using ReportLab.
Running Command

mkdir -p /home/daytona/workspace/glomerular-ref && ls /home/daytona/workspace/

Writing File

~/glomerular-ref/build_pdf.py

from reportlab.lib.pagesizes import A4, landscape
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
    SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer,
    HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus import PageBreak

OUTPUT = "/home/daytona/workspace/glomerular-ref/Glomerular_Diseases_Quick_Reference.pdf"

# ── Colour palette ──────────────────────────────────────────────
C_HEADER_BG   = colors.HexColor("#1a3a5c")   # dark navy
C_NEPHROTIC   = colors.HexColor("#1565C0")   # blue
C_NEPHRITIC   = colors.HexColor("#B71C1C")   # red
C_BOTH        = colors.HexColor("#4A148C")   # purple
C_ROW_ALT     = colors.HexColor("#F0F4FF")   # very light blue
C_ROW_ALT2    = colors.HexColor("#FFF3F3")   # very light red
C_ROW_WHITE   = colors.white
C_ACCENT      = colors.HexColor("#FF6F00")   # amber for key facts
C_LIGHT_NAVY  = colors.HexColor("#E8EFF8")
C_GREEN_LIGHT = colors.HexColor("#E8F5E9")
C_SUBHEADER   = colors.HexColor("#37474F")   # dark grey

styles = getSampleStyleSheet()

def style(name="Normal", size=8, color=colors.black, bold=False,
          align=TA_LEFT, leading=10):
    return ParagraphStyle(
        name, parent=styles["Normal"],
        fontSize=size, textColor=color,
        fontName="Helvetica-Bold" if bold else "Helvetica",
        alignment=align, leading=leading, spaceAfter=0
    )

TITLE_S   = style("Title",   size=18, color=colors.white, bold=True,  align=TA_CENTER, leading=22)
SUB_S     = style("Sub",     size=10, color=colors.HexColor("#CFD8DC"), align=TA_CENTER, leading=13)
H2_S      = style("H2",      size=11, color=C_HEADER_BG, bold=True, leading=14)
CELL_S    = style("Cell",    size=7.5, leading=10)
CELL_B    = style("CellB",   size=7.5, bold=True, leading=10)
CELL_SM   = style("CellSM",  size=7,  leading=9.5)
NEP_S     = style("Nep",     size=8,  color=C_NEPHROTIC, bold=True, align=TA_CENTER, leading=10)
NIT_S     = style("Nit",     size=8,  color=C_NEPHRITIC, bold=True, align=TA_CENTER, leading=10)
BOTH_S    = style("Both",    size=8,  color=C_BOTH, bold=True, align=TA_CENTER, leading=10)
KEY_S     = style("Key",     size=7,  color=C_ACCENT, bold=True, leading=9)
FOOT_S    = style("Foot",    size=6.5,color=C_SUBHEADER, leading=9)

def P(txt, s=None):
    if s is None: s = CELL_S
    return Paragraph(txt, s)

def bold(txt):
    return f"<b>{txt}</b>"

def col(txt, c):
    hex_c = c.hexval() if hasattr(c, 'hexval') else c
    return f'<font color="{hex_c}">{txt}</font>'

# ── Disease data ─────────────────────────────────────────────────
# Columns: Disease | Syndrome | Age/Pop | LM | IF | EM | Clinical | Key Fact
NEPHROTIC_COLOR = "#1565C0"
NEPHRITIC_COLOR = "#B71C1C"
BOTH_COLOR      = "#4A148C"

diseases = [
    # ── NEPHROTIC ─────────────────────────────────────────────
    {
        "name": "Minimal Change\nDisease (MCD)",
        "syndrome": ("NEPHROTIC", C_NEPHROTIC),
        "pop": "Children\n(#1 cause)\nAdults: Hodgkin\nlymphoma, NSAIDs",
        "lm": "NORMAL\n(no changes visible)",
        "IF": "NEGATIVE\n(no deposits)",
        "em": "Diffuse effacement\nof podocyte\nfoot processes",
        "clinical": "Massive proteinuria\n>3.5g/day\nEdema\nHypoalbuminemia\nNormal complement",
        "key": "★ Responds to\nsteroids (80-90%)\n★ No hematuria",
        "row_color": C_ROW_ALT,
    },
    {
        "name": "Focal Segmental\nGlomerulosclerosis\n(FSGS)",
        "syndrome": ("NEPHROTIC", C_NEPHROTIC),
        "pop": "Adults\n(#1 primary\nnephrotic in\nBlack adults)\nHIV, heroin,\nobesity, sickle cell",
        "lm": "FOCAL (some\nglomeruli) &\nSEGMENTAL\n(part of tuft)\nsclerosis/hyalinosis",
        "IF": "IgM + C3\n(nonspecific,\nin sclerotic areas)",
        "em": "Effacement of\nfoot processes\n(focal/segmental)",
        "clinical": "Nephrotic syndrome\nHypertension\nSteroid-RESISTANT\nProgresses to ESRD",
        "key": "★ HIV → Collapsing\nvariant (worst)\n★ Most common\nnephrotic in adults",
        "row_color": C_ROW_WHITE,
    },
    {
        "name": "Membranous\nNephropathy",
        "syndrome": ("NEPHROTIC", C_NEPHROTIC),
        "pop": "Adults 30-50y\n(#1 primary\nnephrotic in\nwhite adults)\nHep B/C, SLE,\nmalignancy, gold",
        "lm": "Thickened GBM\n'Spike & dome'\non silver stain\n(GBM spikes between\nsubepithelial deposits)",
        "IF": "Granular IgG + C3\nalong GBM\n(peripheral/\nsubepithelial)",
        "em": "Subepithelial\nelectron-dense\ndeposits",
        "clinical": "Nephrotic syndrome\nRenal vein thrombosis\n(highest risk of all\nnephrotic diseases)",
        "key": "★ Anti-PLA2R Ab\n(idiopathic form)\n★ 'Spike & dome'\non EM/silver stain",
        "row_color": C_ROW_ALT,
    },
    {
        "name": "Membrano-\nproliferative GN\n(MPGN)",
        "syndrome": ("NEPHROTIC\nor NEPHRITIC", C_BOTH),
        "pop": "Young adults\nHep C (Type I)\nC3 glomerulopathy\n(Type II)",
        "lm": "'Tram-track'\n(double contour\nof GBM)\nMesangial\nproliferation",
        "IF": "Type I: IgG+C3\n(subendothelial)\nType II: C3 only\n(intramembranous)",
        "em": "Type I: Subendothelial\ndeposits\nType II: Dense\ndeposits (ribbon-like\nin GBM)",
        "clinical": "Nephrotic OR\nnephritic features\nLow C3 (both types)\nLow C4 (Type I only)",
        "key": "★ 'Tram-track' = MPGN\n★ Type II = C3\nNephritic Factor\n(stabilizes C3\nconvertase)",
        "row_color": C_ROW_WHITE,
    },
    # ── NEPHRITIC ─────────────────────────────────────────────
    {
        "name": "Post-Streptococcal\nGN (PSGN)",
        "syndrome": ("NEPHRITIC", C_NEPHRITIC),
        "pop": "Children 2-14y\n2-3 wks after\nthroat infection\n(6 wks after skin)",
        "lm": "Diffuse hypercellular\nglomeruli\nNeutrophil\ninfiltration\n'Lumpy bumpy'",
        "IF": "Granular IgG + C3\n'Starry sky'\nsubepithelial +\nmesangial",
        "em": "Subepithelial\n'HUMPS'\n(pathognomonic)",
        "clinical": "Hematuria (tea-colored)\nRBC casts\nOliguria, azotemia\nHTN\nLOW C3, LOW C4\nElevated ASO titer",
        "key": "★ Subepithelial\n'humps' on EM\n★ Self-limiting\nin children\n★ Low C3",
        "row_color": C_ROW_ALT2,
    },
    {
        "name": "IgA Nephropathy\n(Berger Disease)",
        "syndrome": ("NEPHRITIC", C_NEPHRITIC),
        "pop": "Young adults\n(#1 GN worldwide)\nAsian > others\nRecurrent after\nURTI",
        "lm": "Mesangial\nproliferation and\nmatrix increase\n(focal or diffuse)",
        "IF": "Mesangial IgA\n(dominant)\n± C3, IgG, IgM\nNO C1q\n(alternative pathway)",
        "em": "Mesangial electron-\ndense deposits",
        "clinical": "Gross hematuria\ncoinciding with URTI\n(synpharyngitic)\nNORMAL complement\nSubnephrotic proteinuria",
        "key": "★ Normal C3\n(unlike PSGN)\n★ NO C1q on IF\n★ Alternative\ncomplement pathway",
        "row_color": C_ROW_WHITE,
    },
    {
        "name": "Goodpasture\nSyndrome",
        "syndrome": ("NEPHRITIC\n(RPGN)", C_NEPHRITIC),
        "pop": "Young men\n20-30y (HLA-DR2)\nOlder men 60-70y\nSmoking triggers\npulmonary disease",
        "lm": "Crescentic GN\n(crescents in\nBowman's space)\nFibrinoid necrosis",
        "IF": "LINEAR IgG\nalong GBM\n(smooth, ribbon-like)\n± C3",
        "em": "No immune deposits\n(antibody-mediated,\nnot immune complex)",
        "clinical": "Hemoptysis +\nHematuria\nRapid GFR decline\nAnti-GBM antibodies\n(anti-α3 collagen IV)",
        "key": "★ LINEAR IF\n(only disease)\n★ Anti-GBM Ab\n★ Pulmonary\nhemorrhage\n★ Type II HSR",
        "row_color": C_ROW_ALT2,
    },
    {
        "name": "Pauci-Immune\nRPGN (ANCA-GN)",
        "syndrome": ("NEPHRITIC\n(RPGN)", C_NEPHRITIC),
        "pop": "Adults 50-70y\nGPA (Wegener's)\nMPA\nEosinophilic GPA\n(Churg-Strauss)",
        "lm": "Crescentic GN\nFibrinoid necrosis\nNo immune deposits",
        "IF": "NEGATIVE / PAUCI-\nIMMUNE\n(no/scanty deposits)\nKey distinguishing\nfeature",
        "em": "No electron-dense\nimmune deposits",
        "clinical": "Rapid GFR decline\n± hemoptysis (GPA/MPA)\nGPA: c-ANCA/PR3-ANCA\nsinusitis, lung nodules\nMPA: p-ANCA/MPO-ANCA",
        "key": "★ NEGATIVE IF\n(pauci-immune)\n★ GPA: c-ANCA\n(PR3)\n★ MPA: p-ANCA\n(MPO)",
        "row_color": C_ROW_WHITE,
    },
    {
        "name": "Lupus Nephritis\n(Diffuse, Class IV)",
        "syndrome": ("NEPHRITIC or\nNEPHROTIC", C_BOTH),
        "pop": "Women 20-40y\nSLE\n(most common\ncause of death\nin SLE)",
        "lm": "'Wire-loop'\nlesions\n(subendothelial\ndeposits)\nDiffuse proliferative",
        "IF": "'FULL HOUSE'\nIgG + IgA + IgM\n+ C3 + C1q\n(all positive = SLE)",
        "em": "Subendothelial +\nmesangial +\nsubepithelial deposits\n('fingerprint' pattern)",
        "clinical": "Any nephritic/\nnephrotic features\nLow C3 AND C4\nAnti-dsDNA, ANA +\nLow platelets, rash",
        "key": "★ 'Full house' IF\n★ 'Wire-loop' LM\n★ LOW C3 + C4\n(classical pathway)\n★ Anti-dsDNA",
        "row_color": C_ROW_ALT,
    },
    {
        "name": "Alport Syndrome",
        "syndrome": ("NEPHRITIC", C_NEPHRITIC),
        "pop": "Males (X-linked)\nMutation in\nCOL4A5 gene\n(α5 chain type\nIV collagen)",
        "lm": "Variable; may be\nnormal early\nFocal GN later",
        "IF": "Negative\n(no immune deposits)\nAnti-GBM staining\nABSENT",
        "em": "GBM thinning AND\nthickening with\nsplitting/lamellation\n('basket-weave'\nappearance)",
        "clinical": "Hematuria (from\nchildhood)\nSensorineural\nhearing loss\nOcular defects\n(lens dislocation)",
        "key": "★ 'Basket-weave'\nGBM on EM\n★ Triad: hematuria\n+ deafness\n+ eye defects",
        "row_color": C_ROW_ALT2,
    },
]

def build_disease_table(doc_width):
    col_widths = [2.8*cm, 1.8*cm, 2.4*cm, 2.8*cm, 2.8*cm, 2.8*cm, 3.0*cm, 2.4*cm]

    header = [
        P(bold("Disease"), CELL_B),
        P(bold("Syndrome"), CELL_B),
        P(bold("Population /\nAssociations"), CELL_B),
        P(bold("Light Microscopy\n(LM)"), CELL_B),
        P(bold("Immunofluorescence\n(IF)"), CELL_B),
        P(bold("Electron\nMicroscopy (EM)"), CELL_B),
        P(bold("Clinical Features"), CELL_B),
        P(bold("★ Key USMLE\nFacts"), CELL_B),
    ]

    rows = [header]
    for i, d in enumerate(diseases):
        syn_text, syn_color = d["syndrome"]
        syn_style = ParagraphStyle(
            f"syn{i}", parent=styles["Normal"],
            fontSize=7.5, textColor=syn_color,
            fontName="Helvetica-Bold", alignment=TA_CENTER, leading=10
        )
        key_style = ParagraphStyle(
            f"key{i}", parent=styles["Normal"],
            fontSize=7, textColor=C_ACCENT,
            fontName="Helvetica-Bold", alignment=TA_LEFT, leading=9.5
        )
        row = [
            P(bold(d["name"].replace("\n","<br/>")), CELL_B),
            Paragraph(syn_text.replace("\n","<br/>"), syn_style),
            P(d["pop"].replace("\n","<br/>"), CELL_SM),
            P(d["lm"].replace("\n","<br/>"), CELL_SM),
            P(d["IF"].replace("\n","<br/>"), CELL_SM),
            P(d["em"].replace("\n","<br/>"), CELL_SM),
            P(d["clinical"].replace("\n","<br/>"), CELL_SM),
            Paragraph(d["key"].replace("\n","<br/>"), key_style),
        ]
        rows.append(row)

    tbl = Table(rows, colWidths=col_widths, repeatRows=1)

    ts = TableStyle([
        # Header row
        ("BACKGROUND",    (0,0), (-1,0), C_HEADER_BG),
        ("TEXTCOLOR",     (0,0), (-1,0), colors.white),
        ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
        ("FONTSIZE",      (0,0), (-1,0), 8),
        ("ROWBACKGROUND", (0,0), (-1,0), C_HEADER_BG),
        # Borders
        ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#B0BEC5")),
        ("BOX",           (0,0), (-1,-1), 1,   C_HEADER_BG),
        # Vertical alignment
        ("VALIGN",        (0,0), (-1,-1), "TOP"),
        # Row padding
        ("TOPPADDING",    (0,0), (-1,-1), 4),
        ("BOTTOMPADDING", (0,0), (-1,-1), 4),
        ("LEFTPADDING",   (0,0), (-1,-1), 4),
        ("RIGHTPADDING",  (0,0), (-1,-1), 4),
        # Alternate row colors
        ("ROWBACKGROUND", (0,1), (-1,1),  colors.HexColor("#EBF5FB")),
        ("ROWBACKGROUND", (0,2), (-1,2),  colors.white),
        ("ROWBACKGROUND", (0,3), (-1,3),  colors.HexColor("#EBF5FB")),
        ("ROWBACKGROUND", (0,4), (-1,4),  colors.white),
        ("ROWBACKGROUND", (0,5), (-1,5),  colors.HexColor("#FDEDEC")),
        ("ROWBACKGROUND", (0,6), (-1,6),  colors.white),
        ("ROWBACKGROUND", (0,7), (-1,7),  colors.HexColor("#FDEDEC")),
        ("ROWBACKGROUND", (0,8), (-1,8),  colors.white),
        ("ROWBACKGROUND", (0,9), (-1,9),  colors.HexColor("#EDE7F6")),
        ("ROWBACKGROUND", (0,10),(-1,10), colors.HexColor("#FDEDEC")),
        # Syndrome column alignment center
        ("ALIGN",         (1,0), (1,-1), "CENTER"),
    ])
    tbl.setStyle(ts)
    return tbl


# ── Complement / IF quick-reference mini-table ───────────────────
def build_complement_table():
    headers = ["Disease", "C3", "C4", "C1q on IF", "IF Pattern", "Complement Pathway"]
    data = [
        ["MCD",              "Normal", "Normal", "–",    "Negative",          "None"],
        ["FSGS",             "Normal", "Normal", "–",    "IgM+C3 (focal)",    "None (nonspecific)"],
        ["Membranous",       "Normal", "Normal", "–",    "Granular IgG+C3",   "Alternative"],
        ["PSGN",             "LOW ↓",  "LOW ↓",  "–",    "Granular IgG+C3",   "Classical"],
        ["IgA Nephropathy",  "Normal", "Normal", "–",    "Mesangial IgA",     "Alternative/Lectin"],
        ["MPGN Type I",      "LOW ↓",  "LOW ↓",  "±",    "IgG+C3",            "Classical"],
        ["MPGN Type II",     "LOW ↓",  "Normal", "–",    "C3 only",           "Alternative"],
        ["Goodpasture",      "Normal", "Normal", "–",    "LINEAR IgG",        "None (anti-GBM Ab)"],
        ["Pauci-immune RPGN","Normal", "Normal", "–",    "NEGATIVE",          "None (ANCA)"],
        ["Lupus (Class IV)", "LOW ↓",  "LOW ↓",  "+++",  "Full house",        "Classical (C1q++)"],
    ]
    col_w = [3.5*cm, 1.5*cm, 1.5*cm, 1.8*cm, 3.5*cm, 4.5*cm]
    rows = [[P(bold(h), CELL_B) for h in headers]]
    for i, row in enumerate(data):
        styled = []
        for j, cell in enumerate(row):
            if "LOW" in cell or "↓" in cell:
                s = ParagraphStyle(f"r{i}{j}", parent=styles["Normal"],
                                   fontSize=7.5, textColor=C_NEPHRITIC,
                                   fontName="Helvetica-Bold", leading=10)
            elif cell in ("Normal",):
                s = ParagraphStyle(f"r{i}{j}", parent=styles["Normal"],
                                   fontSize=7.5, textColor=colors.HexColor("#2E7D32"),
                                   fontName="Helvetica-Bold", leading=10)
            elif "Full house" in cell or "LINEAR" in cell or "NEGATIVE" in cell:
                s = ParagraphStyle(f"r{i}{j}", parent=styles["Normal"],
                                   fontSize=7.5, textColor=C_BOTH,
                                   fontName="Helvetica-Bold", leading=10)
            else:
                s = CELL_SM
            styled.append(Paragraph(cell.replace("\n","<br/>"), s))
        rows.append(styled)

    tbl = Table(rows, colWidths=col_w, repeatRows=1)
    ts = TableStyle([
        ("BACKGROUND",  (0,0), (-1,0), C_HEADER_BG),
        ("TEXTCOLOR",   (0,0), (-1,0), colors.white),
        ("GRID",        (0,0), (-1,-1), 0.4, colors.HexColor("#B0BEC5")),
        ("BOX",         (0,0), (-1,-1), 1, C_HEADER_BG),
        ("VALIGN",      (0,0), (-1,-1), "MIDDLE"),
        ("TOPPADDING",  (0,0), (-1,-1), 3),
        ("BOTTOMPADDING",(0,0),(-1,-1), 3),
        ("LEFTPADDING", (0,0), (-1,-1), 4),
        ("RIGHTPADDING",(0,0), (-1,-1), 4),
        ("ROWBACKGROUND",(0,1),(-1,4),  colors.HexColor("#EBF5FB")),
        ("ROWBACKGROUND",(0,5),(-1,5),  colors.white),
        ("ROWBACKGROUND",(0,6),(-1,7),  colors.HexColor("#FDEDEC")),
        ("ROWBACKGROUND",(0,8),(-1,9),  colors.HexColor("#EDE7F6")),
        ("ROWBACKGROUND",(0,10),(-1,10),colors.HexColor("#FDEDEC")),
    ])
    tbl.setStyle(ts)
    return tbl


# ── Header banner ─────────────────────────────────────────────────
def header_banner(canvas, doc):
    canvas.saveState()
    w, h = landscape(A4)
    banner_h = 2.4*cm
    canvas.setFillColor(C_HEADER_BG)
    canvas.rect(0, h - banner_h, w, banner_h, fill=1, stroke=0)
    canvas.setFont("Helvetica-Bold", 20)
    canvas.setFillColor(colors.white)
    canvas.drawCentredString(w/2, h - 1.55*cm, "GLOMERULAR DISEASES — QUICK REFERENCE CARD")
    canvas.setFont("Helvetica", 9)
    canvas.setFillColor(colors.HexColor("#90CAF9"))
    canvas.drawCentredString(w/2, h - 2.1*cm,
        "Nephrotic Syndrome  |  Nephritic Syndrome  |  Light Microscopy  |  Immunofluorescence  |  Electron Microscopy  |  Key USMLE Facts")
    # Footer
    canvas.setFont("Helvetica", 7)
    canvas.setFillColor(C_SUBHEADER)
    canvas.drawString(1*cm, 0.5*cm, "Sources: Robbins Pathology | Goldman-Cecil Medicine | Comprehensive Clinical Nephrology | NKF Primer")
    canvas.drawRightString(w - 1*cm, 0.5*cm, f"Page {doc.page}")
    # Legend bar
    legend_y = 0.9*cm
    canvas.setFont("Helvetica-Bold", 7.5)
    canvas.setFillColor(C_NEPHROTIC)
    canvas.drawString(1*cm, legend_y, "■ NEPHROTIC")
    canvas.setFillColor(C_NEPHRITIC)
    canvas.drawString(4.5*cm, legend_y, "■ NEPHRITIC")
    canvas.setFillColor(C_BOTH)
    canvas.drawString(8*cm, legend_y, "■ BOTH / RPGN")
    canvas.setFillColor(C_ACCENT)
    canvas.drawString(13*cm, legend_y, "★ = High-yield USMLE/NBME fact")
    canvas.restoreState()


# ── Build document ────────────────────────────────────────────────
def build():
    doc = SimpleDocTemplate(
        OUTPUT,
        pagesize=landscape(A4),
        leftMargin=1*cm, rightMargin=1*cm,
        topMargin=2.9*cm, bottomMargin=1.5*cm,
    )
    w = landscape(A4)[0] - 2*cm
    story = []

    # Main disease table
    story.append(build_disease_table(w))
    story.append(Spacer(1, 0.5*cm))

    # Section divider
    story.append(HRFlowable(width="100%", thickness=1, color=C_HEADER_BG))
    story.append(Spacer(1, 0.15*cm))
    story.append(P(bold("COMPLEMENT LEVELS & IMMUNOFLUORESCENCE QUICK REFERENCE"), H2_S))
    story.append(Spacer(1, 0.2*cm))
    story.append(build_complement_table())
    story.append(Spacer(1, 0.3*cm))

    # Memory boxes
    tips = [
        ("LOW C3 + LOW C4 → Classical pathway → PSGN, Lupus, MPGN type I", C_NEPHRITIC),
        ("LOW C3 + NORMAL C4 → Alternative pathway → MPGN type II, C3 glomerulopathy", colors.HexColor("#E65100")),
        ("NORMAL complement → MCD, FSGS, Membranous, IgA nephropathy", colors.HexColor("#2E7D32")),
        ("LINEAR IF = Goodpasture (anti-GBM)  |  NEGATIVE IF = Pauci-immune (ANCA)  |  FULL HOUSE IF = Lupus", C_BOTH),
    ]

    tip_data = [[
        Paragraph(f'<font color="{c.hexval() if hasattr(c,"hexval") else "#333"}">{bold("▶")} {t}</font>',
                  ParagraphStyle(f"tip{i}", parent=styles["Normal"], fontSize=8,
                                 textColor=colors.black, leading=11,
                                 fontName="Helvetica", leftIndent=4))
        for i, (t, c) in enumerate(tips)
    ]]
    # Stack them vertically
    for i, (tip_text, tip_color) in enumerate(tips):
        hex_c = tip_color.hexval() if hasattr(tip_color, "hexval") else "#333333"
        s = ParagraphStyle(f"tipS{i}", parent=styles["Normal"],
                           fontSize=8, leading=11,
                           leftIndent=6, spaceAfter=2)
        story.append(Paragraph(
            f'<font color="{hex_c}"><b>▶</b></font>  {tip_text}', s))

    doc.build(story, onFirstPage=header_banner, onLaterPages=header_banner)
    print(f"PDF saved: {OUTPUT}")

build()
Running Command

cd /home/daytona/workspace/glomerular-ref && python build_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/glomerular-ref/Glomerular_Diseases_Quick_Reference.pdf

Your PDF is ready! Download it here:

Glomerular Diseases Quick Reference

PDF Document · PDF


What's inside the PDF (A4 Landscape):

Main Table - 10 diseases, 8 columns each:

ColumnContent
DiseaseName + color-coded by syndrome
SyndromeNEPHROTIC (blue) / NEPHRITIC (red) / BOTH (purple)
PopulationAge group + classic associations
Light MicroscopyKey LM findings
ImmunofluorescencePattern + deposits + location
Electron MicroscopyEM findings
Clinical FeaturesPresentation + labs
★ Key USMLE FactsHighlighted in amber

Diseases covered:

  • Nephrotic: MCD, FSGS, Membranous Nephropathy, MPGN
  • Nephritic: PSGN, IgA Nephropathy, Goodpasture, Pauci-immune RPGN (ANCA)
  • Both: Lupus Nephritis (Class IV), Alport Syndrome

Complement Quick Reference table:

Shows C3, C4, C1q status + IF pattern + complement pathway for every disease - the most commonly tested comparison on NBME/UWorld.

Memory aids at bottom:

  • LOW C3 + LOW C4 = Classical pathway (PSGN, Lupus, MPGN I)
  • LOW C3 + Normal C4 = Alternative pathway (MPGN II)
  • Normal complement = MCD, FSGS, Membranous, IgA
  • LINEAR IF = Goodpasture | NEGATIVE IF = Pauci-immune | FULL HOUSE = Lupus
This is a shared conversation. Sign in to Orris to start your own chat.