Changes in urine test in different types of diseases
Which disease category's urine test changes would you like covered in detail?
| Syndrome | Key Urine Findings |
|---|---|
| Nephrotic syndrome | Heavy proteinuria (≥3.5 g/day in adults), fatty/waxy casts, lipiduria (oval fat bodies with "Maltese cross" appearance), but no significant hematuria |
| Nephritic syndrome | Hematuria with dysmorphic RBCs and red cell casts (pathognomonic for glomerular bleeding), subnephrotic-range proteinuria, mild pyuria |
Generate a quick reference PDF guide for urine test abnormalities
mkdir -p /tmp/workspace/urine-test-guide && ls -la /tmp/workspace/
~/urine-test-guide/generate_pdf.py
# -*- coding: utf-8 -*-
"""
Generate a quick reference PDF guide: Urine Test Abnormalities in Different Diseases
"""
from reportlab.lib import colors
from reportlab.lib.pagesizes import LETTER
from reportlab.lib.units import inch
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, HRFlowable
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
styles = getSampleStyleSheet()
title_style = ParagraphStyle(
"TitleStyle", parent=styles["Title"], fontSize=20, textColor=colors.HexColor("#1a3c6e"),
spaceAfter=4, alignment=TA_CENTER
)
subtitle_style = ParagraphStyle(
"SubtitleStyle", parent=styles["Normal"], fontSize=10, textColor=colors.HexColor("#555555"),
alignment=TA_CENTER, spaceAfter=14
)
section_style = ParagraphStyle(
"SectionStyle", parent=styles["Heading2"], fontSize=13, textColor=colors.white,
backColor=colors.HexColor("#1a3c6e"), spaceBefore=14, spaceAfter=6,
leftIndent=6, borderPadding=(4, 4, 4, 4)
)
body_style = ParagraphStyle(
"BodyStyle", parent=styles["Normal"], fontSize=8.8, leading=11.5
)
cell_style = ParagraphStyle(
"CellStyle", parent=styles["Normal"], fontSize=8.3, leading=10.5
)
note_style = ParagraphStyle(
"NoteStyle", parent=styles["Normal"], fontSize=8, leading=10.5,
textColor=colors.HexColor("#444444"), spaceBefore=4, spaceAfter=10, italic=True
)
footer_style = ParagraphStyle(
"FooterStyle", parent=styles["Normal"], fontSize=7.5, textColor=colors.HexColor("#888888")
)
def P(text):
return Paragraph(text, cell_style)
def make_table(data, col_widths):
wrapped = [[Paragraph(f"<b>{c}</b>", cell_style) for c in data[0]]]
for row in data[1:]:
wrapped.append([P(c) for c in row])
t = Table(wrapped, colWidths=col_widths, repeatRows=1)
t.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#2e5a9c")),
("TEXTCOLOR", (0, 0), (-1, 0), colors.white),
("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#bbbbbb")),
("ROWBACKGROUNDS", (0, 1), (-1, -1), [colors.white, colors.HexColor("#f2f6fb")]),
("VALIGN", (0, 0), (-1, -1), "TOP"),
("TOPPADDING", (0, 0), (-1, -1), 4),
("BOTTOMPADDING", (0, 0), (-1, -1), 4),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
]))
return t
doc = SimpleDocTemplate(
"/tmp/workspace/urine-test-guide/Urine_Test_Abnormalities_Quick_Reference.pdf",
pagesize=LETTER,
topMargin=0.55 * inch, bottomMargin=0.55 * inch,
leftMargin=0.55 * inch, rightMargin=0.55 * inch,
)
elements = []
# ---- Title Page Header ----
elements.append(Paragraph("Urine Test Abnormalities", title_style))
elements.append(Paragraph("A Quick Reference Guide by Disease Category", subtitle_style))
elements.append(HRFlowable(width="100%", thickness=1.2, color=colors.HexColor("#1a3c6e")))
elements.append(Spacer(1, 10))
# ---- 1. Glomerular Diseases ----
elements.append(Paragraph("1. Glomerular Diseases", section_style))
data = [
["Syndrome", "Proteinuria", "Hematuria / Sediment", "Other Findings"],
["Nephrotic syndrome", "Heavy, ≥3.5 g/day (adult)", "Absent / minimal; lipiduria (oval fat bodies, \"Maltese cross\")",
"Hypoalbuminemia, hyperlipidemia, edema; fatty/waxy casts"],
["Nephritic syndrome", "Mild-moderate (subnephrotic)", "Dysmorphic RBCs + <b>red cell casts</b> (hallmark of glomerular bleeding)",
"Mild edema, hypertension; pyuria may be present"],
["Rapidly progressive GN", "Variable, often significant", "Marked hematuria with red cell casts",
"Rapid decline in renal function"],
]
elements.append(make_table(data, [1.3*inch, 1.35*inch, 2.35*inch, 1.9*inch]))
elements.append(Paragraph(
"Key point: red cell casts / dysmorphic RBCs = glomerular ('nephritic') hematuria; "
"heavy proteinuria with fatty casts and no hematuria = nephrotic pattern.", note_style))
# ---- 2. Diabetes Mellitus ----
elements.append(Paragraph("2. Diabetes Mellitus", section_style))
data = [
["Finding", "Significance"],
["Glycosuria", "Appears once blood glucose exceeds renal threshold (~180 mg/dL); screening/monitoring marker"],
["Ketonuria", "Marks diabetic ketoacidosis (DKA); progresses from hyperglycemia (no ketones) → ketosis → full DKA (glucose + ketones)"],
["Microalbuminuria (30-300 mg/day)", "Earliest clinical marker of diabetic nephropathy, may precede histologic/structural change"],
["Macroalbuminuria / overt proteinuria (>300 mg/day)", "Overt diabetic nephropathy; predicts progression to ESRD"],
]
elements.append(make_table(data, [2.3*inch, 4.6*inch]))
# ---- 3. UTI / Pyelonephritis ----
elements.append(Paragraph("3. Urinary Tract Infection / Pyelonephritis", section_style))
data = [
["Test", "Meaning"],
["Leukocyte esterase", "Enzyme from broken-down neutrophils; indirect marker of <b>pyuria</b>. Can be falsely negative if WBCs are sparse."],
["Nitrite", "Positive when nitrate-reducing (mostly gram-negative) bacteria are present. Best combined with leukocyte esterase."],
["Pyuria (WBCs on microscopy)", "Supports infection/inflammation; must correlate with symptoms to avoid overcalling asymptomatic bacteriuria"],
["WBC casts", "Suggest renal parenchymal involvement (pyelonephritis or interstitial nephritis) rather than lower tract infection"],
["Bacteriuria", "Presence of bacteria; significant if ≥10^5 CFU/mL on culture, correlated with symptoms"],
]
elements.append(make_table(data, [2.0*inch, 4.9*inch]))
# ---- 4. Hepatobiliary Disease ----
elements.append(Paragraph("4. Hepatobiliary Disease (Jaundice)", section_style))
data = [
["Jaundice Type", "Urine Bilirubin", "Urine Urobilinogen"],
["Hemolytic (prehepatic)", "Negative (unconjugated bilirubin not filtered)", "Increased (↑ bilirubin turnover reaching gut)"],
["Hepatocellular", "Positive (variable)", "Variable / may be present"],
["Obstructive (post-hepatic)", "Positive", "Absent / decreased (bile can't reach the gut)"],
]
elements.append(make_table(data, [2.0*inch, 2.8*inch, 2.1*inch]))
elements.append(Paragraph(
"Key point: bilirubin + urobilinogen absent = obstructive picture; bilirubin negative + urobilinogen high = hemolytic picture.",
note_style))
elements.append(PageBreak())
# ---- 5. Multiple Myeloma ----
elements.append(Paragraph("5. Multiple Myeloma / Plasma Cell Dyscrasias", section_style))
data = [
["Finding", "Significance"],
["Bence Jones proteinuria", "Free immunoglobulin light chains; present in 50-80% of myeloma cases; also in amyloidosis, lymphoma"],
["Standard dipstick", "Often <b>misses</b> Bence Jones protein (detects albumin preferentially) → needs specific light-chain assay / urine protein electrophoresis"],
["Light-chain cast nephropathy", "\"Myeloma kidney\" - light-chain casts obstruct renal tubules, causing acute kidney injury"],
]
elements.append(make_table(data, [2.3*inch, 4.6*inch]))
# ---- 6. Rhabdomyolysis / Hemolysis ----
elements.append(Paragraph("6. Rhabdomyolysis / Hemolysis", section_style))
data = [
["Finding", "Significance"],
["Myoglobinuria", "Tea-colored urine when plasma myoglobin >100-300 mg/L; dipstick heme-positive but <b>no RBCs</b> on microscopy; confirmed with elevated CK"],
["Hemoglobinuria", "From intravascular hemolysis; same dipstick-positive/no-RBC pattern as myoglobinuria"],
["Urine pH", "Often acidic in rhabdomyolysis"],
]
elements.append(make_table(data, [2.0*inch, 4.9*inch]))
elements.append(Paragraph(
"Key point: dipstick 'blood' positive + no RBCs on microscopy points to myoglobin or hemoglobin, not true hematuria.",
note_style))
# ---- 7. Acute Kidney Injury / Tubular Disease ----
elements.append(Paragraph("7. Acute Kidney Injury / Tubulointerstitial Disease", section_style))
data = [
["Finding", "Significance"],
["Granular ('muddy brown') casts", "Classic for acute tubular necrosis (ATN)"],
["Waxy casts", "Chronic kidney disease / advanced renal failure (stasis in dilated tubules)"],
["Isosthenuria (fixed SG ~1.010)", "Loss of tubular concentrating ability, seen in tubulointerstitial disease"],
["Eosinophiluria", "Suggests acute interstitial nephritis (e.g., drug-induced)"],
]
elements.append(make_table(data, [2.3*inch, 4.6*inch]))
# ---- 8. Inherited / Metabolic Disorders ----
elements.append(Paragraph("8. Inherited Metabolic Disorders (Color/Odor Clues)", section_style))
data = [
["Condition", "Urine Clue"],
["Alkaptonuria", "Urine darkens (black) on standing due to homogentisic acid oxidation"],
["Porphyria", "Port-wine / reddish-brown colored urine"],
["Phenylketonuria (PKU)", "Musty / mousy odor"],
["Maple syrup urine disease", "Sweet, maple-syrup odor"],
["Cystinuria", "Hexagonal cystine crystals on microscopy; recurrent stones"],
]
elements.append(make_table(data, [2.3*inch, 4.6*inch]))
elements.append(Spacer(1, 14))
elements.append(HRFlowable(width="100%", thickness=0.8, color=colors.HexColor("#bbbbbb")))
elements.append(Spacer(1, 6))
elements.append(Paragraph(
"Sources: Henry's Clinical Diagnosis and Management by Laboratory Methods; Brenner and Rector's The Kidney; "
"Robbins & Cotran Pathologic Basis of Disease; Comprehensive Clinical Nephrology, 7th Ed.; "
"Campbell-Walsh Wein Urology; Rosen's Emergency Medicine; Tintinalli's Emergency Medicine; "
"Tietz Textbook of Laboratory Medicine; Creasy & Resnik's Maternal-Fetal Medicine.",
footer_style
))
elements.append(Paragraph(
"This guide summarizes core pathophysiology for educational reference and is not a substitute for clinical judgment "
"or current institutional lab protocols.", footer_style
))
doc.build(elements)
print("PDF generated successfully.")
cd /tmp/workspace/urine-test-guide && python3 generate_pdf.py
ls -la /tmp/workspace/urine-test-guide/
Urine Test Abnormalities Quick Reference
PDF Document · PDF