Infertility

Tomorrow is my biochemistry practical exam and I dont know nothing infertility( including cause how they causes , difference between primary and secondary infertility) and also pregnancy test . .Please provide me answer in easy language and i will remember every points .

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have all the information needed for a thorough, easy-to-remember exam answer. Let me compile it.

🧬 Infertility & Pregnancy Test - Complete Biochemistry Exam Notes

Sources: Tietz Textbook of Laboratory Medicine 7th Ed., Textbook of Family Medicine 9e, P.C. Dikshit Forensic Medicine & Toxicology, Berek & Novak's Gynecology

PART 1: WHAT IS INFERTILITY?

Simple Definition: Infertility = inability to conceive after 1 year of unprotected regular intercourse.
  • About 93% of healthy couples conceive within 1 year naturally
  • A specific cause is found in about 80% of couples
  • Causes are divided equally: 1/3 female factor only, 1/3 male factor only, 1/3 both combined

PART 2: PRIMARY vs SECONDARY INFERTILITY

This is one of the most commonly asked distinctions - easy to remember!
FeaturePrimary InfertilitySecondary Infertility
DefinitionCouple has NEVER conceived beforeCouple has conceived before but currently cannot
Key pointNo previous pregnancy at allAt least one previous pregnancy (even if miscarriage)
ExampleNewly married couple, never pregnantPreviously had a child, now unable to conceive again
Common causesCongenital issues, PCOS, azoospermiaTubal damage, adhesions from previous infections/surgery
Memory trick: "Primary = no prior pregnancy. Secondary = some success, now stuck."
Both types generally share the same causes - the distinction is clinical history, not pathology.

PART 3: CAUSES OF INFERTILITY

A. MALE CAUSES (about 1/3 of cases)

1. Endocrine/Hormonal Problems

  • Hypothalamic dysfunction - e.g., Kallmann syndrome (no GnRH)
  • Pituitary failure - due to tumor, radiation, or surgery
  • Hyperprolactinemia - high prolactin suppresses LH/FSH (due to drug or tumor)
  • Androgen insensitivity syndrome (AIS)
  • Thyroid disorders, Adrenal hyperplasia
  • Testicular failure - low testosterone

2. Anatomical Problems

  • Varicocele - dilated veins in scrotum, raises testicular temperature, damages sperm
  • Obstructed or absent vas deferens - sperm can't come out
  • Congenital absence of vas deferens (seen in cystic fibrosis)
  • Retrograde ejaculation - semen goes backward into bladder

3. Sperm Problems (Abnormal Spermatogenesis)

  • Azoospermia - zero sperm in ejaculate
  • Oligospermia - very low sperm count
  • Chromosomal abnormalities - e.g., Klinefelter syndrome (47,XXY)
  • Mumps orchitis - viral damage to testes
  • Cryptorchidism - undescended testes (warmer temperature kills sperm production)
  • Chemical/radiation exposure
  • Y-chromosome microdeletions - deletions in AZF1/AZF2 regions on Y chromosome directly cause azoospermia or oligospermia

4. Abnormal Sperm Motility

  • Kartagener syndrome - absent cilia (immotile sperm)
  • Antisperm antibodies - immune system attacks own sperm

5. Psychosocial

  • Impotence, decreased libido

B. FEMALE CAUSES (about 1/3 of cases)

1. Ovarian / Hormonal Factors

  • PCOS (Polycystic Ovarian Syndrome) - most common cause; high androgens, no ovulation
  • Hyperprolactinemia - high prolactin blocks ovulation (tumor, drugs)
  • Hypothalamic insufficiency (Kallmann syndrome) - no GnRH
  • Pituitary insufficiency - from tumor, Sheehan's necrosis, stress, anorexia, excess exercise
  • Primary Ovarian Insufficiency (POI) - premature menopause due to autoimmune disease, chemotherapy, radiation
  • Thyroid disorders, Liver disease, Obesity - affect hormone levels
  • Luteal phase deficiency - insufficient progesterone after ovulation

2. Tubal Factors (VERY COMMON)

  • Blocked/scarred tubes - most commonly from PID (Pelvic Inflammatory Disease) - chlamydia/gonorrhea infections
  • Salpingitis isthmica nodosa - nodular narrowing of tube
  • Infectious salpingitis - tube infection/inflammation

3. Cervical Factors

  • Cervical stenosis - narrow cervix, sperm cannot enter
  • Abnormal mucus viscosity - too thick, sperm can't swim through
  • Inflammation/infection

4. Uterine Factors

  • Fibroids (Leiomyomata) - block implantation
  • Adhesions (Asherman's syndrome) - scar tissue inside uterus
  • Endometritis - uterine infection
  • Congenital malformation - e.g., bicornuate uterus

5. Endometriosis

  • Endometrial tissue outside the uterus - affects ~33% of infertile women (vs 4% in fertile women)
  • Blocks tubes, disrupts ovulation, causes inflammation

6. Psychosocial / Immunologic

  • Antisperm antibodies in female
  • Decreased libido, anorgasmia

PART 4: BIOCHEMICAL/LAB EVALUATION OF INFERTILITY

Male - Semen Analysis (Most Important Lab Test!)

ParameterNormal Value
Ejaculate volume>1.5 mL
Sperm density>15 million/mL
Total sperm count>39 million/ejaculate
Motility>32% progressive; >40% total
Morphology>4% normal forms
pH7.2 - 8.0
LiquefactionWithin 40 minutes
Fructose>1200 Β΅g/mL
Semen must be analyzed within 1 hour of collection.

Female - Hormone Tests

  • FSH, LH - check pituitary function, ovarian reserve
  • Prolactin (PRL) - rule out hyperprolactinemia
  • TSH - thyroid function
  • Testosterone - check for androgen excess/PCOS
  • Progesterone (day 21) - confirm ovulation occurred

PART 5: PREGNANCY TEST

What is measured?

hCG = Human Chorionic Gonadotropin
  • Produced by the placenta after implantation
  • Specifically, we measure the beta (Ξ²) subunit of hCG (to avoid cross-reaction with LH, which shares the alpha subunit)

When can pregnancy be detected?

  • Serum hCG detectable: ~1 week after conception
  • Urine test (home test): nearly 100% sensitive at 11 days after missed period
  • 90% of pregnancies detectable on the day of the missed period

Types of Pregnancy Tests

A. Biological Tests (OLD, historical - now rarely used)

TestAnimal UsedObservation if Positive
Aschheim-Zondek testImmature female mice (5 mice, 6-8g, 3-4 weeks old)Hemorrhagic follicles or corpus luteum in ovaries on Day 5
Friedman testAdult female rabbitHemorrhagic follicle/Graafian follicle after 24 hrs
Hogben test (Xenopus)Mature female African toadOvulation occurs within 12-18 hrs
Galli-Mainini testMale frog (Rana tigrina)Sperms appear in cloacal urine within 2-3 hrs (most rapid, 94-96% accurate)
Rapid Rat testImmature female ratCongested ovaries within 4-24 hrs
Why do these tests work? - hCG from pregnant urine mimics LH/FSH and triggers gonadal activity in the test animal.
False positives in biological tests: hydatidiform mole, choriocarcinoma, ectopic pregnancy, pituitary tumors (because these all secrete hCG-like hormones).

B. Immunological Tests (CURRENT STANDARD)

Principle: hCG has antigenic properties. Anti-hCG antibodies are used to detect it.
Agglutination Inhibition Test (Classic immunological test):
  1. Patient's urine + Anti-hCG serum β†’ incubate 1 hour
  2. Then add RBC/latex particles coated with hCG β†’ incubate 2 hours
  3. Centrifuge and observe
  • If pregnant: hCG in urine neutralizes Anti-hCG β†’ no antibody left to agglutinate the hCG-coated particles β†’ NO agglutination = POSITIVE
  • If not pregnant: Anti-hCG is free β†’ agglutinates hCG-coated particles β†’ AGGLUTINATION = NEGATIVE
Memory trick: "No clumping = pregnant (because hCG used up all the antibody)"

C. Modern Immunochromatographic Strip Test (Home/POC test)

Principle: Lateral flow immunoassay
  • Urine flows through nitrocellulose strip
  • Anti-hCG antibody (labeled with dye/latex) binds to hCG in urine
  • Complex moves to capture zone β†’ colored line appears = POSITIVE
  • Detection threshold: usually 25 IU/L
  • First-morning urine is preferred (more concentrated hCG)

D. Quantitative Serum hCG

  • Detects as low as 1-2 IU/L
  • In early pregnancy (weeks 4-8): hCG doubles every 48-72 hours
  • If hCG fails to double in 48-72 hours β†’ suggests ectopic pregnancy or abnormal pregnancy
  • After normal delivery: returns to normal in ~2 weeks
  • After abortion: returns to normal in 3-8 weeks

PART 6: FALSE POSITIVES & FALSE NEGATIVES IN PREGNANCY TESTS

False Positives (test says pregnant but not pregnant):

  • Hydatidiform mole (molar pregnancy - placental abnormality)
  • Choriocarcinoma (cancer secreting hCG)
  • Ectopic pregnancy
  • Pituitary tumors (LH cross-reacts with some hCG antibodies)
  • Heterophile antibodies in blood (perimenopausal women)
  • Hook effect - extremely HIGH hCG overwhelms the assay

False Negatives (test says not pregnant but IS pregnant):

  • Testing too early (not enough hCG yet)
  • Dilute urine (drink less water before test, use morning sample)
  • Very early ectopic pregnancy
  • hCG beta core fragment excess in urine (after 5th week)

QUICK SUMMARY TABLE FOR EXAM

TopicKey Point
Infertility definitionNo conception after 1 year unprotected sex
Primary infertilityNever conceived before
Secondary infertilityConceived before, now can't
Male causesAzoospermia, varicocele, hormonal, chromosomal
Female causesPCOS, tubal blockage, endometriosis, uterine problems
Most common male testSemen analysis (within 1 hour)
Hormone measured in pregnancy testΞ²-hCG
Best time for urine testFirst morning urine
hCG doubles every48-72 hours in early pregnancy
Galli-Mainini testMale frog, sperm in cloacal urine = positive
Agglutination test resultNO agglutination = POSITIVE for pregnancy
Most common cause female infertilityPCOS (hormonal) + Tubal blockage (PID)

Good luck on your exam tomorrow! Focus especially on: the definition difference between primary/secondary infertility, causes organized by system, and the pregnancy test principle (hCG doubles, agglutination inhibition = no clumping means positive).

Tomorrow is my biochemistry practical exam and I dont know nothing infertility( including cause how they causes( include smoking cause also) , difference between primary and secondary infertility) and also congenital anomaly test (like quadrapole test and other also). .Please provide me answer in easy language and i will remember every points .

Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
I now have comprehensive material. Let me compile everything into a complete, exam-ready answer.

πŸŽ“ BIOCHEMISTRY PRACTICAL EXAM - COMPLETE NOTES

Infertility + Congenital Anomaly Tests

Sources: Tietz Textbook of Laboratory Medicine 7th Ed., The Developing Human (Moore's Embryology), Textbook of Family Medicine 9e, Harrison's Internal Medicine 22E

SECTION 1: INFERTILITY

What is Infertility?

Infertility = Inability to conceive after 1 year of regular unprotected intercourse
  • ~93% of healthy couples should conceive within 1 year
  • A specific cause is found in 80% of couples
  • Causes: 1/3 male only, 1/3 female only, 1/3 both combined

Primary vs Secondary Infertility

FeaturePRIMARY InfertilitySECONDARY Infertility
DefinitionNever conceived beforePreviously conceived, now cannot
Previous pregnancy?NOYES (even miscarriage counts)
ExampleNewly married couple, never pregnantHad a baby before, now trying again and failing
Common causesCongenital defects, PCOS, azoospermiaTubal scarring, uterine adhesions (Asherman's)
Are causes different?Not really - they share the same causes
🧠 Memory trick: "Primary = no Prior pregnancy. Secondary = had Success before."

CAUSES OF INFERTILITY

πŸ‘¨ MALE CAUSES

1. Endocrine / Hormonal

CauseHow it causes infertility
Hypothalamic dysfunction (Kallmann syndrome)No GnRH β†’ no FSH/LH β†’ no sperm production
Pituitary failure (tumor, radiation, surgery)No FSH/LH β†’ testes don't work
Hyperprolactinemia (high prolactin - from tumor/drugs)Prolactin suppresses LH/FSH β†’ low testosterone β†’ poor sperm
Thyroid disordersHypo/hyperthyroid affects sperm production
Adrenal hyperplasiaExcess androgens suppress the HPG axis
Testicular failureNo testosterone, no sperm

2. Anatomical

CauseHow it causes infertility
VaricoceleDilated scrotal veins β†’ increased temperature around testes β†’ kills sperm production
Absent/Obstructed vas deferensSperm produced but can't exit (seen in cystic fibrosis)
Retrograde ejaculationSemen goes backward into bladder instead of forward
CryptorchidismUndescended testis stays in abdomen (too warm) β†’ damages spermatogenesis

3. Sperm Problems

CauseMeaning
AzoospermiaZero sperm in ejaculate
OligospermiaVery low sperm count (<15 million/mL)
AsthenospermiaPoor sperm motility
TeratospermiaAbnormal sperm morphology
Chromosomal (Klinefelter - 47XXY)Extra X chromosome β†’ small testes, no sperm
Y-chromosome microdeletions (AZF regions)Genes for sperm production deleted β†’ azoospermia/oligospermia
Mumps orchitisViral inflammation destroys testicular tissue

4. Motility Problems

  • Kartagener syndrome - absent cilia β†’ immotile sperm (can't swim)
  • Antisperm antibodies - immune attack on own sperm

🚬 HOW SMOKING CAUSES INFERTILITY (Important!)

Smoking causes infertility in BOTH males and females:
In Males:
  • Cigarette smoke contains toxic chemicals β†’ oxidative stress β†’ damages sperm DNA
  • Reduces sperm count (oligospermia)
  • Reduces sperm motility
  • Causes abnormal sperm morphology (teratospermia)
  • Disrupts testosterone production
In Females:
  • Accelerates ovarian aging β†’ reduces ovarian reserve (fewer eggs)
  • Damages the fallopian tubes β†’ increases ectopic pregnancy risk
  • Disrupts estrogen levels β†’ irregular ovulation
  • Reduces endometrial receptivity β†’ harder for embryo to implant
  • Increases miscarriage rate
Overall: History of smoking is one of the assessed factors in predicting success of infertility treatment (Harrison's 22E)

πŸ‘© FEMALE CAUSES

1. Ovarian / Hormonal

CauseHow it causes infertility
PCOS (Polycystic Ovarian Syndrome)High androgens, no ovulation (anovulation) - most common cause
HyperprolactinemiaHigh prolactin blocks ovulation
Hypothalamic dysfunction (Kallmann, anorexia, exercise, stress)No GnRH β†’ no FSH/LH β†’ no ovulation
Primary Ovarian InsufficiencyPremature menopause (from chemo, radiation, autoimmune)
Luteal phase deficiencyNot enough progesterone after ovulation β†’ embryo can't implant
Thyroid disorder / Obesity / Liver diseaseDisrupts hormone balance

2. Tubal Factors (very common!)

CauseHow it causes infertility
PID (Pelvic Inflammatory Disease)Chlamydia/gonorrhea infection β†’ scars and blocks tubes
EndometriosisTissue grows outside uterus β†’ blocks tubes, disrupts ovulation
Salpingitis isthmica nodosaNodular narrowing of tubes
🧠 Note: Endometriosis affects 33% of infertile women vs only 4% of fertile women

3. Uterine Factors

CauseProblem
Fibroids (Leiomyomata)Block implantation
Asherman's Syndrome (adhesions/scar tissue)From previous D&C or infection - embryo can't attach
Congenital malformation (bicornuate/septate uterus)Abnormal shape
EndometritisUterine infection prevents implantation

4. Cervical Factors

  • Stenosis (narrow cervix), abnormal thick mucus β†’ sperm can't enter
  • Antisperm antibodies in cervical mucus

NORMAL SEMEN PARAMETERS (for biochemistry exam)

ParameterNormal Value
Volume>1.5 mL
Sperm density>15 million/mL
Total count>39 million per ejaculate
Motility>32% progressive; >40% total
Morphology>4% normal forms
pH7.2 - 8.0
LiquefactionWithin 40 minutes
Fructose>1200 Β΅g/mL
Semen must be analyzed within 1 hour of collection


SECTION 2: CONGENITAL ANOMALY TESTS

What Are Congenital Anomalies?

Birth defects present from birth - chromosomal (Down syndrome, Edwards syndrome) or structural (neural tube defects).
The goal of prenatal screening is to identify high-risk pregnancies without harming the fetus.

THE MAIN MARKER: AFP (Alpha-Fetoprotein)

  • Produced by the fetal liver and yolk sac
  • The first biochemical screening marker discovered (1984)
  • Measured in maternal serum or amniotic fluid
AFP LevelMeaning
HIGH AFPNeural tube defects (spina bifida, anencephaly), abdominal wall defects
LOW AFPDown syndrome (Trisomy 21), Edwards syndrome (Trisomy 18)

THE SCREENING TESTS - EASY SUMMARY

πŸ”¬ SECOND TRIMESTER TESTS (15-20 weeks)

1. DOUBLE TEST (2 markers)

  • AFP + hCG (or AFP + free Ξ²-hCG)
  • Detects: Down syndrome, Neural tube defects

2. TRIPLE TEST (3 markers) - "The Triple Screen"

  • AFP + hCG + uE3 (Unconjugated Estriol)
  • All three combined with maternal age
  • Detects: Down syndrome (~65-70% detection)
MarkerIn Down SyndromeIn Neural Tube Defects
AFP↓ LOW (25% lower)↑↑ HIGH
hCG↑↑ HIGH (2x higher)Normal
uE3 (unconjugated estriol)↓ LOW (25% lower)Normal

3. QUADRUPLE TEST (4 markers) - THE MOST IMPORTANT ⭐

  • AFP + hCG + uE3 + Inhibin A
  • All four + maternal age
  • Detection rate: ~80% for Down syndrome at 5% false-positive rate
  • This is the standard second-trimester screening test in most countries
MarkerIn Down Syndrome
AFP↓ LOW
hCG↑↑ HIGH
uE3↓ LOW
Inhibin A↑↑ HIGH (2x higher) - this is what the quad test adds
🧠 Memory trick for Quad test in Down syndrome: "AFP and uE3 go DOWN, hCG and Inhibin go UP" (just like the syndrome - things are mixed up!)

πŸ”¬ FIRST TRIMESTER TESTS (11-13 weeks)

4. FIRST TRIMESTER COMBINED SCREENING

  • PAPP-A + free Ξ²-hCG + Nuchal Translucency (NT ultrasound)
  • PAPP-A = Pregnancy-Associated Plasma Protein A
MarkerIn Down Syndrome
PAPP-A↓ LOW
free Ξ²-hCG↑ HIGH
NT (nuchal fold thickness on ultrasound)↑↑ THICK (>3mm is abnormal)
  • Detection: ~85-90% for Down syndrome

INTEGRATED TEST (Best Overall Screening)

Combines FIRST + SECOND trimester markers:
INTEGRATED TEST =
  • 1st trimester: NT + PAPP-A
  • 2nd trimester: AFP + hCG + uE3 + Inhibin A (quadruple test)
Total = 6 markers + maternal age
  • Detection rate: 85% with only 1% false positive rate (much better than quad alone!)

INVASIVE DIAGNOSTIC TESTS (When screening is positive)

These give a definitive diagnosis - not just risk estimation:

1. Amniocentesis

  • Done at 15-20 weeks
  • Needle into amniotic sac β†’ withdraw amniotic fluid containing fetal cells
  • Fetal cells cultured β†’ karyotyping done
  • Risk of miscarriage: 1 in 200 to 1 in 500 (0.1-0.3%)
  • Diagnoses: chromosomal abnormalities, neural tube defects (AFP in fluid)

2. Chorionic Villus Sampling (CVS)

  • Done at 10-12 weeks (earlier than amniocentesis)
  • Biopsy of placental tissue (chorionic villi)
  • Can do karyotyping, DNA analysis
  • Risk of miscarriage: slightly higher than amniocentesis

3. Cell-Free Fetal DNA (cffDNA) / NIPT

  • Blood test from mother (non-invasive!)
  • Fetal DNA from placental cell breakdown circulates in mother's blood
  • Detects chromosomal aneuploidies (Down, Edwards, Patau syndromes)
  • Has ~1 hour half-life (disappears quickly after delivery)
  • Much safer - no miscarriage risk

SUMMARY TABLE: ALL CONGENITAL ANOMALY TESTS

TestTrimesterMarkersDetectsDetection Rate
Double test2ndAFP + hCGDown, NTD~60%
Triple test2ndAFP + hCG + uE3Down, NTD, Edwards~65-70%
Quadruple test ⭐2ndAFP + hCG + uE3 + Inhibin ADown~80%
First trimester combined1stPAPP-A + Ξ²-hCG + NTDown, Edwards~85-90%
Integrated test1st + 2ndNT + PAPP-A + Quad test = 6 markersDown~85%, only 1% FP
Amniocentesis2ndFetal karyotypeAll chromosomalDiagnostic (100%)
CVS1stFetal karyotypeAll chromosomalDiagnostic (100%)
cffDNA / NIPT1st/2ndFree fetal DNAAneuploidies~99%

MARKER PATTERNS - QUICK CHEAT SHEET

ConditionAFPhCGuE3Inhibin APAPP-A
Down Syndrome (Trisomy 21)↓↑↑↓↑↑↓
Edwards Syndrome (Trisomy 18)↓↓↓↓↓↓
Neural Tube Defects (spina bifida)↑↑ HIGHNormalNormalNormalNormal
Normal pregnancyNormalNormalNormalNormalNormal
🧠 For Edwards (Trisomy 18): Everything goes DOWN - "Edwards = Everything Down" 🧠 For Down Syndrome: Only hCG and Inhibin go UP - everything else goes down 🧠 For Neural Tube Defects: ONLY AFP goes HIGH

WHEN IS EACH TEST DONE? (Timeline)

Week 10-13:  First trimester combined (PAPP-A + free Ξ²-hCG + NT scan)
Week 15-20:  Quadruple test / Triple test (optimal: 16-18 weeks)
Week 15-20:  Amniocentesis
Week 10-12:  CVS (earlier option)
Week 10+:    NIPT/cffDNA (can be done from 10 weeks onward)

IMPORTANT FACTS TO REMEMBER FOR EXAM

  1. AFP is produced by fetal liver and yolk sac - it's the baby's version of albumin
  2. uE3 (unconjugated estriol) is produced by the feto-placental unit (needs fetus + placenta together)
  3. Inhibin A is produced by the placenta
  4. PAPP-A is produced by the placenta - used only in 1st trimester
  5. All markers are expressed as MoM (Multiples of the Median) to normalize for gestational age
  6. Maternal age is always included in risk calculation (older mother = higher Down syndrome risk)
  7. Nuchal Translucency (NT) = fluid at back of baby's neck on ultrasound; thick = abnormal
  8. The only DEFINITIVE diagnosis is karyotyping (from amniocentesis or CVS) - all other tests are screening only (they give risk, not diagnosis)

BEST OF LUCK TOMORROW! 🌟

Quick final revision points:
  • Infertility = 1 year, no conception
  • Primary = never pregnant; Secondary = was pregnant before
  • Smoking β†’ oxidative stress β†’ damages sperm + eggs
  • Quad test = AFP↓ + hCG↑ + uE3↓ + Inhibin A↑ β†’ for Down syndrome
  • Triple test = AFP + hCG + uE3
  • Amniocentesis = 15-20 weeks, karyotype, 0.1-0.3% miscarriage risk
  • cffDNA = non-invasive, from maternal blood, safest

Generate a quick PDF summary of congenital anomaly tests with marker patterns

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"

Running Command

mkdir -p /home/daytona/workspace/congenital-anomaly-tests && echo "done"

Writing File

~/congenital-anomaly-tests/generate_pdf.py

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

OUTPUT = "/home/daytona/workspace/congenital-anomaly-tests/Congenital_Anomaly_Tests.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=1.8*cm,
    leftMargin=1.8*cm,
    topMargin=1.8*cm,
    bottomMargin=1.8*cm,
)

# ── colours ──────────────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a3a5c")
MED_BLUE    = colors.HexColor("#2563a8")
LIGHT_BLUE  = colors.HexColor("#dbeafe")
TEAL        = colors.HexColor("#0d9488")
LIGHT_TEAL  = colors.HexColor("#ccfbf1")
ORANGE      = colors.HexColor("#ea580c")
LIGHT_ORANGE= colors.HexColor("#ffedd5")
GREEN       = colors.HexColor("#16a34a")
LIGHT_GREEN = colors.HexColor("#dcfce7")
RED         = colors.HexColor("#dc2626")
LIGHT_RED   = colors.HexColor("#fee2e2")
PURPLE      = colors.HexColor("#7c3aed")
LIGHT_PURPLE= colors.HexColor("#ede9fe")
YELLOW      = colors.HexColor("#ca8a04")
LIGHT_YELLOW= colors.HexColor("#fef9c3")
WHITE       = colors.white
LIGHT_GREY  = colors.HexColor("#f1f5f9")
MID_GREY    = colors.HexColor("#94a3b8")
DARK_GREY   = colors.HexColor("#334155")

# ── styles ────────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

title_style = ParagraphStyle(
    "Title", parent=styles["Title"],
    fontSize=20, textColor=WHITE, alignment=TA_CENTER,
    fontName="Helvetica-Bold", spaceAfter=4,
)
subtitle_style = ParagraphStyle(
    "Subtitle", parent=styles["Normal"],
    fontSize=10, textColor=colors.HexColor("#bfdbfe"), alignment=TA_CENTER,
    fontName="Helvetica", spaceAfter=0,
)
section_style = ParagraphStyle(
    "Section", parent=styles["Normal"],
    fontSize=12, textColor=WHITE, fontName="Helvetica-Bold",
    spaceAfter=0, spaceBefore=0,
)
body_style = ParagraphStyle(
    "Body", parent=styles["Normal"],
    fontSize=8.5, textColor=DARK_GREY, fontName="Helvetica",
    leading=13, spaceAfter=3,
)
bold_body = ParagraphStyle(
    "BoldBody", parent=body_style,
    fontName="Helvetica-Bold",
)
small_style = ParagraphStyle(
    "Small", parent=styles["Normal"],
    fontSize=7.5, textColor=DARK_GREY, fontName="Helvetica", leading=11,
)
note_style = ParagraphStyle(
    "Note", parent=styles["Normal"],
    fontSize=8, textColor=colors.HexColor("#1e3a5f"),
    fontName="Helvetica-Oblique", leading=12, leftIndent=6,
)
memory_style = ParagraphStyle(
    "Memory", parent=styles["Normal"],
    fontSize=8.5, textColor=colors.HexColor("#7c2d12"),
    fontName="Helvetica-Bold", leading=12, leftIndent=6,
)
header_cell = ParagraphStyle(
    "HeaderCell", parent=styles["Normal"],
    fontSize=8, textColor=WHITE, fontName="Helvetica-Bold",
    alignment=TA_CENTER, leading=10,
)
cell_style = ParagraphStyle(
    "Cell", parent=styles["Normal"],
    fontSize=8, textColor=DARK_GREY, fontName="Helvetica",
    alignment=TA_CENTER, leading=10,
)
cell_left = ParagraphStyle(
    "CellLeft", parent=styles["Normal"],
    fontSize=8, textColor=DARK_GREY, fontName="Helvetica",
    alignment=TA_LEFT, leading=10,
)
cell_bold = ParagraphStyle(
    "CellBold", parent=styles["Normal"],
    fontSize=8, textColor=DARK_GREY, fontName="Helvetica-Bold",
    alignment=TA_LEFT, leading=10,
)

def section_header(text, color=DARK_BLUE):
    """Coloured banner heading."""
    tbl = Table([[Paragraph(text, section_style)]], colWidths=["100%"])
    tbl.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), color),
        ("TOPPADDING",  (0,0), (-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING", (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return tbl

def spacer(h=0.25):
    return Spacer(1, h*cm)

# ── build story ───────────────────────────────────────────────────────────────
story = []

# ════════════════════ TITLE BANNER ════════════════════
title_data = [[
    Paragraph("Congenital Anomaly Tests", title_style),
    Paragraph("Biochemistry Practical Exam - Quick Reference", subtitle_style),
]]
title_tbl = Table(title_data, colWidths=["100%"])
title_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
    ("TOPPADDING",  (0,0), (-1,-1), 14),
    ("BOTTOMPADDING",(0,0),(-1,-1), 10),
    ("LEFTPADDING", (0,0), (-1,-1), 12),
    ("SPAN", (0,0), (-1,-1)),
    ("ROUNDEDCORNERS", [6]),
]))
# Use two rows instead
title_tbl2 = Table([
    [Paragraph("Congenital Anomaly Tests", title_style)],
    [Paragraph("Biochemistry Practical Exam  |  Quick Reference Summary", subtitle_style)],
], colWidths=["100%"])
title_tbl2.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
    ("TOPPADDING",  (0,0), (0,0), 14),
    ("BOTTOMPADDING",(0,1),(-1,-1), 12),
    ("LEFTPADDING", (0,0), (-1,-1), 12),
    ("RIGHTPADDING",(0,0), (-1,-1), 12),
]))
story.append(title_tbl2)
story.append(spacer(0.4))

# ════════════════════ SECTION 1: KEY MARKER ════════════════════
story.append(section_header("1  KEY MARKER: AFP (Alpha-Fetoprotein)", DARK_BLUE))
story.append(spacer(0.2))

afp_info = Table([
    [Paragraph("Produced by", header_cell), Paragraph("Fetal LIVER and YOLK SAC  (baby's version of albumin)", cell_left)],
    [Paragraph("Measured in", header_cell), Paragraph("Maternal serum  OR  Amniotic fluid", cell_left)],
    [Paragraph("HIGH AFP means", header_cell), Paragraph("Neural Tube Defects (spina bifida, anencephaly), abdominal wall defects", cell_left)],
    [Paragraph("LOW AFP means", header_cell), Paragraph("Down syndrome (Trisomy 21), Edwards syndrome (Trisomy 18)", cell_left)],
], colWidths=[3.2*cm, 13.5*cm])
afp_info.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (0,-1), LIGHT_BLUE),
    ("BACKGROUND", (1,0), (1,-1), WHITE),
    ("ROWBACKGROUNDS", (0,0), (-1,-1), [LIGHT_BLUE, LIGHT_GREY, LIGHT_BLUE, LIGHT_GREY]),
    ("FONTNAME", (0,0), (0,-1), "Helvetica-Bold"),
    ("TEXTCOLOR",(0,0), (0,-1), DARK_BLUE),
    ("FONTSIZE", (0,0), (-1,-1), 8.5),
    ("TOPPADDING",(0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",(0,0),(-1,-1), 7),
    ("GRID",(0,0),(-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[LIGHT_BLUE, WHITE, LIGHT_BLUE, WHITE]),
]))
story.append(afp_info)
story.append(spacer(0.35))

# ════════════════════ SECTION 2: SCREENING TESTS ════════════════════
story.append(section_header("2  PRENATAL SCREENING TESTS OVERVIEW", MED_BLUE))
story.append(spacer(0.2))

tests_header = [
    Paragraph("Test", header_cell),
    Paragraph("Trimester / Week", header_cell),
    Paragraph("Markers Used", header_cell),
    Paragraph("Detection\nRate", header_cell),
    Paragraph("FP Rate", header_cell),
]
tests_rows = [
    [Paragraph("Double Test", cell_bold),      Paragraph("2nd  (15-20 wk)", cell_style), Paragraph("AFP + hCG", cell_left),                              Paragraph("~60%", cell_style), Paragraph("5%", cell_style)],
    [Paragraph("Triple Test", cell_bold),       Paragraph("2nd  (15-20 wk)", cell_style), Paragraph("AFP + hCG + uE3", cell_left),                        Paragraph("~65-70%", cell_style), Paragraph("5%", cell_style)],
    [Paragraph("QUADRUPLE TEST β˜…", cell_bold),  Paragraph("2nd  (15-20 wk)", cell_style), Paragraph("AFP + hCG + uE3 + Inhibin A", cell_left),            Paragraph("~80%", cell_style), Paragraph("5%", cell_style)],
    [Paragraph("1st Trimester Combined", cell_bold), Paragraph("1st  (11-13 wk)", cell_style), Paragraph("PAPP-A + free Ξ²-hCG + NT (ultrasound)", cell_left), Paragraph("~85-90%", cell_style), Paragraph("5%", cell_style)],
    [Paragraph("Integrated Test β˜…β˜…", cell_bold), Paragraph("1st + 2nd", cell_style),      Paragraph("NT + PAPP-A + AFP + hCG + uE3 + Inhibin A", cell_left), Paragraph("~85%", cell_style), Paragraph("1%", cell_style)],
    [Paragraph("Serum Integrated", cell_bold),  Paragraph("1st + 2nd", cell_style),       Paragraph("PAPP-A + AFP + hCG + uE3 + Inhibin A (no NT)", cell_left), Paragraph("~85%", cell_style), Paragraph("3%", cell_style)],
    [Paragraph("Sequential", cell_bold),        Paragraph("1st + 2nd", cell_style),       Paragraph("Same as integrated + early result for very high risk", cell_left), Paragraph("91-93%", cell_style), Paragraph("4-5%", cell_style)],
    [Paragraph("NIPT / cffDNA", cell_bold),     Paragraph("1st  (10+ wk)", cell_style),   Paragraph("Free fetal DNA from maternal blood", cell_left),     Paragraph("~99%", cell_style), Paragraph("<1%", cell_style)],
]

col_w = [3.2*cm, 2.6*cm, 6.8*cm, 1.8*cm, 1.5*cm]
tests_tbl = Table([tests_header] + tests_rows, colWidths=col_w, repeatRows=1)
tests_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), DARK_BLUE),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
    ("BACKGROUND", (0,3), (-1,3), LIGHT_TEAL),   # quad row highlight
    ("BACKGROUND", (0,5), (-1,5), LIGHT_YELLOW),  # integrated highlight
    ("GRID",(0,0),(-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("TOPPADDING",(0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
    ("LEFTPADDING",(0,0),(-1,-1), 5),
    ("RIGHTPADDING",(0,0),(-1,-1), 4),
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]))
story.append(tests_tbl)
story.append(spacer(0.15))
story.append(Paragraph("β˜… Standard second-trimester test   β˜…β˜… Best overall: lowest false-positive rate (1%)", note_style))
story.append(spacer(0.35))

# ════════════════════ SECTION 3: MARKER PATTERNS ════════════════════
story.append(section_header("3  MARKER PATTERNS IN DIFFERENT CONDITIONS", TEAL))
story.append(spacer(0.2))

UP   = Paragraph("↑↑ HIGH", ParagraphStyle("up",  parent=cell_style, textColor=RED,   fontName="Helvetica-Bold"))
DOWN = Paragraph("↓ LOW",   ParagraphStyle("dn",  parent=cell_style, textColor=MED_BLUE, fontName="Helvetica-Bold"))
NORM = Paragraph("β†’ Normal",ParagraphStyle("nm",  parent=cell_style, textColor=GREEN,  fontName="Helvetica-Bold"))
UP1  = Paragraph("↑ HIGH",  ParagraphStyle("up1", parent=cell_style, textColor=RED,   fontName="Helvetica-Bold"))

def up():  return Paragraph("↑↑ HIGH", ParagraphStyle("up",  parent=cell_style, textColor=RED,   fontName="Helvetica-Bold"))
def up1(): return Paragraph("↑ HIGH",  ParagraphStyle("up1", parent=cell_style, textColor=colors.HexColor("#f97316"), fontName="Helvetica-Bold"))
def dn():  return Paragraph("↓ LOW",   ParagraphStyle("dn",  parent=cell_style, textColor=MED_BLUE, fontName="Helvetica-Bold"))
def nm():  return Paragraph("β†’ Normal",ParagraphStyle("nm",  parent=cell_style, textColor=GREEN,  fontName="Helvetica"))
def na():  return Paragraph("β€”",       ParagraphStyle("na",  parent=cell_style, textColor=MID_GREY))

marker_header = [
    Paragraph("Condition", header_cell),
    Paragraph("AFP", header_cell),
    Paragraph("hCG", header_cell),
    Paragraph("uE3", header_cell),
    Paragraph("Inhibin A", header_cell),
    Paragraph("PAPP-A\n(1st trim)", header_cell),
    Paragraph("NT\n(ultrasound)", header_cell),
]
marker_rows = [
    [Paragraph("Down Syndrome\n(Trisomy 21)", cell_bold), dn(), up(), dn(), up(), dn(), up1()],
    [Paragraph("Edwards Syndrome\n(Trisomy 18)", cell_bold), dn(), dn(), Paragraph("↓↓ VERY LOW", ParagraphStyle("vl", parent=cell_style, textColor=colors.HexColor("#1e40af"), fontName="Helvetica-Bold")), dn(), dn(), up1()],
    [Paragraph("Patau Syndrome\n(Trisomy 13)", cell_bold), dn(), dn(), dn(), na(), dn(), up1()],
    [Paragraph("Neural Tube Defects\n(Spina bifida / Anencephaly)", cell_bold), up(), nm(), nm(), nm(), nm(), na()],
    [Paragraph("Normal Pregnancy", cell_bold), nm(), nm(), nm(), nm(), nm(), nm()],
]

marker_col_w = [3.6*cm, 1.7*cm, 1.7*cm, 1.7*cm, 1.9*cm, 1.9*cm, 1.9*cm]
marker_tbl = Table([marker_header] + marker_rows, colWidths=marker_col_w, repeatRows=1)
marker_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), TEAL),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY, WHITE, LIGHT_GREY, WHITE]),
    ("BACKGROUND", (0,5), (-1,5), LIGHT_GREEN),  # Normal row
    ("GRID",(0,0),(-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("TOPPADDING",(0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",(0,0),(-1,-1), 5),
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]))
story.append(marker_tbl)
story.append(spacer(0.2))

# Memory boxes
mem_data = [
    [Paragraph("🧠 DOWN SYNDROME", ParagraphStyle("mk", parent=styles["Normal"], fontSize=8, fontName="Helvetica-Bold", textColor=DARK_BLUE)),
     Paragraph("AFP ↓  hCG ↑↑  uE3 ↓  Inhibin A ↑↑\n\"AFP and uE3 go DOWN, hCG and Inhibin go UP\"", ParagraphStyle("mv", parent=styles["Normal"], fontSize=8, fontName="Helvetica", textColor=DARK_GREY, leading=11))],
    [Paragraph("🧠 EDWARDS (T18)", ParagraphStyle("mk", parent=styles["Normal"], fontSize=8, fontName="Helvetica-Bold", textColor=MED_BLUE)),
     Paragraph("AFP ↓  hCG ↓  uE3 ↓↓  Inhibin A ↓  PAPP-A ↓\n\"Edwards = Everything Down\"", ParagraphStyle("mv", parent=styles["Normal"], fontSize=8, fontName="Helvetica", textColor=DARK_GREY, leading=11))],
    [Paragraph("🧠 NEURAL TUBE", ParagraphStyle("mk", parent=styles["Normal"], fontSize=8, fontName="Helvetica-Bold", textColor=TEAL)),
     Paragraph("ONLY AFP ↑↑ is raised  (everything else normal)\n\"Only AFP flies high in NTDs\"", ParagraphStyle("mv", parent=styles["Normal"], fontSize=8, fontName="Helvetica", textColor=DARK_GREY, leading=11))],
]
mem_tbl = Table(mem_data, colWidths=[3.6*cm, 13.1*cm])
mem_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), LIGHT_YELLOW),
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[LIGHT_YELLOW, colors.HexColor("#e0f2fe"), LIGHT_TEAL]),
    ("GRID",(0,0),(-1,-1), 0.4, colors.HexColor("#e2e8f0")),
    ("TOPPADDING",(0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",(0,0),(-1,-1), 7),
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]))
story.append(mem_tbl)
story.append(spacer(0.35))

# ════════════════════ SECTION 4: INVASIVE TESTS ════════════════════
story.append(section_header("4  INVASIVE DIAGNOSTIC TESTS  (Definitive - give Karyotype)", ORANGE))
story.append(spacer(0.2))

inv_header = [
    Paragraph("Test", header_cell),
    Paragraph("When Done", header_cell),
    Paragraph("Procedure", header_cell),
    Paragraph("Miscarriage Risk", header_cell),
    Paragraph("What it Diagnoses", header_cell),
]
inv_rows = [
    [Paragraph("Amniocentesis", cell_bold),
     Paragraph("15-20 weeks\n(2nd trimester)", cell_style),
     Paragraph("Needle into amniotic sac β†’ withdraw fluid β†’ fetal cells cultured β†’ karyotype", cell_left),
     Paragraph("1 in 200-500\n(0.1-0.3%)", cell_style),
     Paragraph("All chromosomal defects, NTDs (AFP in fluid)", cell_left)],
    [Paragraph("Chorionic Villus\nSampling (CVS)", cell_bold),
     Paragraph("10-12 weeks\n(1st trimester)", cell_style),
     Paragraph("Biopsy of placental (chorionic) villi β†’ karyotype, DNA analysis", cell_left),
     Paragraph("Slightly higher\nthan amnio", cell_style),
     Paragraph("All chromosomal defects, single-gene disorders", cell_left)],
    [Paragraph("cffDNA / NIPT\n(Non-invasive)", cell_bold),
     Paragraph("From 10 weeks", cell_style),
     Paragraph("Maternal blood β†’ free fetal DNA from placental breakdown analyzed", cell_left),
     Paragraph("NONE\n(non-invasive)", cell_style),
     Paragraph("Chromosomal aneuploidies (Trisomy 21/18/13), sex-linked diseases", cell_left)],
]

inv_col_w = [2.8*cm, 2.2*cm, 6.2*cm, 2.2*cm, 4.3*cm]
inv_tbl = Table([inv_header] + inv_rows, colWidths=inv_col_w, repeatRows=1)
inv_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), ORANGE),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_ORANGE, LIGHT_GREEN]),
    ("GRID",(0,0),(-1,-1), 0.4, colors.HexColor("#fed7aa")),
    ("TOPPADDING",(0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",(0,0),(-1,-1), 5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(inv_tbl)
story.append(spacer(0.2))
story.append(Paragraph(
    "IMPORTANT: Screening tests (triple/quadruple/integrated) only give RISK - not a definitive diagnosis. "
    "Amniocentesis or CVS is needed for a definitive chromosomal diagnosis.",
    ParagraphStyle("imp", parent=styles["Normal"], fontSize=8, fontName="Helvetica-Bold",
                   textColor=RED, leading=11, leftIndent=4)
))
story.append(spacer(0.35))

# ════════════════════ SECTION 5: TIMING TIMELINE ════════════════════
story.append(section_header("5  WHEN IS EACH TEST PERFORMED?  (Timeline)", PURPLE))
story.append(spacer(0.2))

time_header = [
    Paragraph("Gestational Age", header_cell),
    Paragraph("Test", header_cell),
    Paragraph("Key Markers", header_cell),
]
time_rows = [
    [Paragraph("10-12 weeks", cell_style), Paragraph("CVS (invasive)", cell_bold), Paragraph("Karyotype / DNA", cell_left)],
    [Paragraph("10+ weeks", cell_style),   Paragraph("NIPT / cffDNA", cell_bold),  Paragraph("Free fetal DNA in maternal blood", cell_left)],
    [Paragraph("10-13 weeks", cell_style), Paragraph("1st Trimester Combined Screen", cell_bold), Paragraph("PAPP-A + free Ξ²-hCG + Nuchal Translucency (NT)", cell_left)],
    [Paragraph("15-20 weeks\n(optimal: 16-18 wk)", cell_style), Paragraph("Quadruple Test  β˜…", cell_bold), Paragraph("AFP + hCG + uE3 + Inhibin A", cell_left)],
    [Paragraph("15-20 weeks", cell_style), Paragraph("Amniocentesis (invasive)", cell_bold), Paragraph("Amniotic fluid β†’ fetal karyotype", cell_left)],
    [Paragraph("1st + 2nd trim", cell_style), Paragraph("Integrated Test  β˜…β˜…", cell_bold), Paragraph("NT + PAPP-A (1st) + AFP + hCG + uE3 + Inhibin A (2nd)", cell_left)],
]
time_col_w = [3.2*cm, 4.0*cm, 10.5*cm]
time_tbl = Table([time_header] + time_rows, colWidths=time_col_w, repeatRows=1)
time_tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), PURPLE),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_GREY]),
    ("BACKGROUND", (0,4), (-1,4), LIGHT_TEAL),  # quad
    ("BACKGROUND", (0,6), (-1,6), LIGHT_YELLOW), # integrated
    ("GRID",(0,0),(-1,-1), 0.4, colors.HexColor("#c4b5fd")),
    ("TOPPADDING",(0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
    ("LEFTPADDING",(0,0),(-1,-1), 6),
    ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
]))
story.append(time_tbl)
story.append(spacer(0.35))

# ════════════════════ SECTION 6: QUICK REVISION BOX ════════════════════
story.append(section_header("6  LAST-MINUTE EXAM POINTS", colors.HexColor("#b91c1c")))
story.append(spacer(0.2))

bullet_points = [
    ("AFP source:", "Fetal liver + yolk sac. It is the fetal equivalent of albumin."),
    ("uE3 source:", "Feto-PLACENTAL unit (needs both fetus AND placenta to make it)."),
    ("Inhibin A source:", "Placenta. 2x higher in Down syndrome."),
    ("PAPP-A source:", "Placenta. Used ONLY in 1st trimester. LOW in Down syndrome."),
    ("MoM:", "All markers are reported as Multiples of the Median, normalized for gestational age."),
    ("Maternal age:", "Always included in every risk calculation. Older mother = higher Down syndrome risk."),
    ("NT (Nuchal Translucency):", "Fluid at back of baby's neck on ultrasound. >3mm = abnormal."),
    ("Quad test detects:", "~80% of Down syndrome at 5% false-positive rate."),
    ("Integrated test detects:", "~85% of Down syndrome with ONLY 1% false-positive rate - best balance."),
    ("Gold standard diagnosis:", "Karyotyping from amniocentesis or CVS - ONLY WAY to definitively diagnose."),
    ("Amniotic fluid AFP:", "Elevated in open neural tube defects; can confirm when serum AFP is raised."),
    ("cffDNA:", "From placental cell breakdown (apoptosis). Half-life ~1 hour - disappears fast after delivery."),
]

bullet_data = []
for k, v in bullet_points:
    bullet_data.append([
        Paragraph(k, ParagraphStyle("bk", parent=styles["Normal"], fontSize=8, fontName="Helvetica-Bold", textColor=DARK_BLUE, leading=11)),
        Paragraph(v, ParagraphStyle("bv", parent=styles["Normal"], fontSize=8, fontName="Helvetica", textColor=DARK_GREY, leading=11)),
    ])

bullet_tbl = Table(bullet_data, colWidths=[4.0*cm, 13.7*cm])
bullet_tbl.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[LIGHT_GREY, WHITE]),
    ("GRID",(0,0),(-1,-1), 0.3, colors.HexColor("#e2e8f0")),
    ("TOPPADDING",(0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
    ("LEFTPADDING",(0,0),(-1,-1), 6),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(bullet_tbl)
story.append(spacer(0.3))

# footer
footer_tbl = Table([[
    Paragraph(
        "Sources: Tietz Textbook of Laboratory Medicine 7th Ed. | The Developing Human (Moore's Embryology) | Textbook of Family Medicine 9e  |  Orris Medical AI",
        ParagraphStyle("ft", parent=styles["Normal"], fontSize=7, textColor=MID_GREY,
                       fontName="Helvetica-Oblique", alignment=TA_CENTER)
    )
]], colWidths=["100%"])
footer_tbl.setStyle(TableStyle([
    ("TOPPADDING",(0,0),(-1,-1), 5),
    ("LINEABOVE",(0,0),(-1,0), 0.5, MID_GREY),
]))
story.append(footer_tbl)

# ── build ─────────────────────────────────────────────────────────────────────
doc.build(story)
print("PDF created:", OUTPUT)
Running Command

cd /home/daytona/workspace/congenital-anomaly-tests && python generate_pdf.py

Running Command

ls -lh /home/daytona/workspace/congenital-anomaly-tests/Congenital_Anomaly_Tests.pdf

Your PDF is ready! Here's what's inside:

Congenital Anomaly Tests

PDF Document Β· PDF


What's in the PDF (6 colour-coded sections):

SectionContent
1 - AFPWhat it is, where it's made, high vs low meaning
2 - Screening Tests OverviewAll tests (Double/Triple/Quad/Integrated/NIPT) with detection rates and false-positive rates
3 - Marker PatternsColour table: ↑↑ / ↓ / Normal for every condition + memory tricks
4 - Invasive TestsAmniocentesis, CVS, cffDNA - when, how, miscarriage risk
5 - TimelineWhich test is done at which gestational week
6 - Last-Minute Exam Points12 bullet facts to memorise tonight
Print it out, stick it on your wall, and you're set for tomorrow! Good luck! 🌟

Tomorrow is my biochemistry practical exam and I dont know nothing about lysozomal storage disorder . Please provide me answer in easy language and i will remember every points .

Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
I now have everything needed for a comprehensive, exam-ready answer. Let me compile it all.

🧬 LYSOSOMAL STORAGE DISORDERS (LSD)

Complete Biochemistry Exam Notes - Easy Language

Sources: Robbins & Kumar Basic Pathology, Ganong's Medical Physiology, Histology Text & Atlas (Mescher)

PART 1: WHAT IS A LYSOSOMAL STORAGE DISORDER?

First - What does a Lysosome do?

Think of a lysosome as the "dustbin" or "recycling factory" of the cell.
  • It contains hydrolytic (digestive) enzymes that break down complex molecules
  • These molecules include: sphingolipids, glycoproteins, mucopolysaccharides (glycosaminoglycans), glycogen
  • After breakdown, the small soluble end products are recycled back to the cell
The enzymes work best at ACIDIC pH (inside the lysosome) - this is a safety feature. If a lysosome bursts, the enzymes don't work well at the neutral pH of the cytoplasm, so they can't damage the cell.

What happens in LSD?

One enzyme is missing β†’ its substrate cannot be broken down β†’ substrate piles up inside lysosomes β†’ lysosomes swell β†’ cell stops working β†’ organ fails
Normal:    Complex substrate β†’ Enzyme A β†’ Enzyme B β†’ Enzyme C β†’ Small soluble products βœ“
In LSD:    Complex substrate β†’ Enzyme A β†’ [ENZYME B MISSING] β†’ SUBSTRATE PILES UP βœ—
Two extra problems happen because of this:
  1. Autophagy fails - the cell can't clean up its own dead organelles
  2. Defective mitochondria pile up β†’ generate free radicals β†’ cause apoptosis (cell death)

PART 2: GENERAL FEATURES OF ALL LSDs

These features are common to almost all lysosomal storage diseases:
FeatureExplanation
Autosomal recessiveBoth parents must carry the defective gene
Affects infants and young childrenChildren appear normal at birth, then deteriorate
HepatosplenomegalyLiver and spleen enlarge (full of storage cells)
CNS involvementBrain neurons damaged β†’ mental retardation, regression
Progressive courseGets worse over time
Combined incidence ~1 in 2500 live birthsRare individually, but significant together

PART 3: CLASSIFICATION OF LSDs

LSDs are grouped by what type of molecule accumulates:
CategoryWhat accumulatesExamples
SphingolipidosesSphingolipidsGaucher, Tay-Sachs, Niemann-Pick, Krabbe, Fabry
Mucopolysaccharidoses (MPS)Glycosaminoglycans (GAGs)Hurler (MPS I), Hunter (MPS II)
GlycogenosisGlycogenPompe disease
MucolipidosesMucopolysaccharide + glycolipidI-cell disease
OthersCholesterol, triglyceridesWolman disease

PART 4: INDIVIDUAL DISEASES - DETAILED


πŸ”΄ 1. TAY-SACHS DISEASE (GM2 Gangliosidosis)

Memory hook: "TAY = Tiny Ashkenazi Youth destroyed"
FeatureDetails
Enzyme missingHexosaminidase A (alpha subunit)
What accumulatesGM2 ganglioside (in neurons)
InheritanceAutosomal recessive
Affected populationAshkenazi Jews (1 in 30 are carriers!)
Onset3-6 months of age (motor weakness first)
Clinical features:
  • Motor weakness starting 3-6 months
  • Progressive mental retardation and blindness
  • "Cherry-red spot" on the macula of the retina (CLASSIC EXAM SIGN!)
    • Why? Ganglion cells around the macula swell and turn pale β†’ only the central macula (which has fewer ganglion cells) keeps its normal red colour β†’ looks like a cherry
  • Neurons show "onion-skin" whorled membranous configurations under electron microscopy
  • Death within 2-3 years
Diagnosis: Measure hexosaminidase A in serum or leukocytes
Treatment: None curative - supportive only

🟠 2. NIEMANN-PICK DISEASE

Memory hook: "Niemann = No sphingomyelinase = Neurons Perish"

Type A (Severe - infantile)

FeatureDetails
Enzyme missingSphingomyelinase
What accumulatesSphingomyelin
InheritanceAutosomal recessive
Affected populationAshkenazi Jews (like Tay-Sachs)
Features:
  • Massive hepatosplenomegaly
  • Foam cells (macrophages stuffed with sphingomyelin) in liver, spleen, bone marrow
  • Electron microscopy: "Zebra bodies" (concentric lamellar myelin figures) in neurons
  • Severe CNS deterioration β†’ death within first 3 years
  • Cherry-red spot on retina (similar to Tay-Sachs)

Type B (Mild - visceral only)

  • Some residual sphingomyelinase activity
  • Organomegaly but NO neurologic involvement
  • Compatible with longer survival

Type C (Distinct - cholesterol transport defect!)

  • NOT an enzyme deficiency - it's a cholesterol TRANSPORT defect
  • Genes affected: NPC1 and NPC2 (cholesterol transporters)
  • Cholesterol + GM1/GM2 gangliosides accumulate
  • Features: ataxia, vertical gaze palsy, dystonia, psychomotor regression
  • Linked to Alzheimer disease risk
Diagnosis: Sphingomyelinase activity in leukocytes (for Type A/B)

🟑 3. GAUCHER DISEASE (Most Common LSD!)

Memory hook: "GAUCHEr = Glucocerebrosidase Absent Unequivocally - Causes Hepatosplenomegaly Enormously"
FeatureDetails
Enzyme missingGlucocerebrosidase (beta-glucocerebrosidase)
What accumulatesGlucocerebroside (glucosylceramide)
InheritanceAutosomal recessive
Where it accumulatesMononuclear phagocyte cells (macrophages) in liver, spleen, bone marrow
Pathological hallmark: "GAUCHER CELLS"
  • Enlarged macrophages (up to 100 Β΅m!) stuffed with glucocerebroside
  • Cytoplasm looks like "crumpled/wrinkled tissue paper" - classic exam answer!
3 Types:
TypeCNS involvement?Clinical features
Type 1 (most common)NoneHepatosplenomegaly, bone disease, anemia, thrombocytopenia
Type 2 (acute neuronopathic)SevereOnset <2 years, rapid neurologic decline, death by age 2
Type 3 (chronic neuronopathic)MildSlower neurologic decline, hepatosplenomegaly
Special connections:
  • Gaucher carrier state is a major genetic risk factor for Parkinson disease
  • Virtually all Gaucher disease patients eventually develop Parkinson disease
Treatment: Enzyme Replacement Therapy (ERT) - imiglucerase (Cerezyme) - most successful ERT for any LSD

🟒 4. FABRY DISEASE

Memory hook: "FABRY = Ξ±-GAlactosidase Deficiency β†’ acRostic pain + angliokeratomas + kYdney failure"
FeatureDetails
Enzyme missingΞ±-galactosidase A
What accumulatesCeramide trihexoside (globotriaosylceramide)
InheritanceX-LINKED recessive (only LSD that is X-linked!)
Affected populationMales primarily
Clinical features:
  • Angiokeratomas (dark red skin lesions on buttocks, genitalia)
  • Acroparesthesias - burning pain in hands and feet
  • Corneal opacities (clouding of cornea)
  • Renal failure (major cause of death)
  • Cardiomyopathy (heart disease)

πŸ”΅ 5. POMPE DISEASE (Glycogen Storage Disease Type II)

Memory hook: "POMPE = acid maltase missing β†’ PUMP of the heart fails"
FeatureDetails
Enzyme missingAcid alpha-1,4-glucosidase (acid maltase)
What accumulatesGlycogen (in lysosomes!)
InheritanceAutosomal recessive
Important point: This is a GLYCOGEN storage disease that is also a lysosomal storage disease because the enzyme is a LYSOSOMAL enzyme!
Clinical features (infantile type):
  • Massive cardiomegaly (heart full of glycogen β†’ heart failure)
  • Muscle hypotonia (floppy baby)
  • Hepatomegaly
  • Death from cardiorespiratory failure before age 2
Adult type: Only skeletal muscle involvement β†’ chronic myopathy

🟣 6. HURLER SYNDROME (MPS Type I)

Memory hook: "HURLER = Horrible face + ugly bones + no brain"
FeatureDetails
Enzyme missingΞ±-L-iduronidase
What accumulatesDermatan sulfate + Heparan sulfate (glycosaminoglycans)
InheritanceAutosomal recessive
MPS TypeMPS I
Clinical features ("gargoyle face"):
  • Coarse facial features (thick lips, flat nose, wide-spaced eyes)
  • Short stature, skeletal deformities
  • Corneal clouding
  • Mental retardation
  • Cardiac defects, hearing loss
  • Hepatosplenomegaly
  • Stiff joints

βšͺ 7. HUNTER SYNDROME (MPS Type II)

Memory hook: "HUNTER = X-linked (boys go HUNTING)"
FeatureDetails
Enzyme missingIduronate sulfatase (iduronosulfate sulfatase)
What accumulatesDermatan sulfate + Heparan sulfate
InheritanceX-LINKED recessive (like Fabry!)
MPS TypeMPS II
Similar to Hurler but:
  • Milder than Hurler
  • NO corneal clouding (key difference from Hurler!)
  • Affects only males

⚫ 8. KRABBE DISEASE

FeatureDetails
Enzyme missingGalactosylceramidase
What accumulatesGalactocerebroside
Key cell"Globoid cells" - giant multinucleated macrophages in white matter
FeaturesRapidly progressive, severe neurological deterioration, early death

πŸ”΄ 9. METACHROMATIC LEUKODYSTROPHY

FeatureDetails
Enzyme missingArylsulfatase A
What accumulatesSulfatide (cerebroside sulfate)
Key featureDemyelination of white matter (leukodystrophy)
MetachromaticStored material stains orange-brown with toluidine blue (instead of the expected blue)

PART 5: QUICK COMPARISON TABLE

DiseaseEnzyme MissingAccumulatesKey Feature
Tay-SachsHexosaminidase AGM2 gangliosideCherry-red macula, Ashkenazi Jews
Niemann-Pick A/BSphingomyelinaseSphingomyelinFoam cells, zebra bodies
Niemann-Pick CNPC1/NPC2 (transporter)CholesterolVertical gaze palsy
GaucherGlucocerebrosidaseGlucocerebrosideWrinkled tissue paper cells
FabryΞ±-Galactosidase ACeramide trihexosideX-linked, kidney failure
PompeAcid maltaseGlycogenCardiomegaly, floppy baby
Hurler (MPS I)Ξ±-L-IduronidaseDermatan + Heparan sulfateCoarse features, corneal clouding
Hunter (MPS II)Iduronate sulfataseDermatan + Heparan sulfateX-linked, NO corneal clouding
KrabbeGalactosylceramidaseGalactocerebrosideGloboid cells
MLDArylsulfatase ASulfatideMetachromatic staining

PART 6: TREATMENT APPROACHES

TreatmentDiseases it works for
Enzyme Replacement Therapy (ERT)Gaucher (most successful!), Fabry, Pompe, Hurler, Hunter
Bone marrow / Stem cell transplantSome MPS, Krabbe (if caught early)
Pharmacologic Chaperone therapyFabry, some Gaucher (synthetic chaperones help misfold enzyme fold correctly)
Gene therapyUnder research
Substrate Reduction TherapyGaucher, Niemann-Pick C (reduce substrate production)

PART 7: DIAGNOSIS OF LSDs

MethodHow
Enzyme assayMeasure specific enzyme activity in leukocytes/fibroblasts
Urine metabolitesSpot test for GAGs in urine (MPS), oligosaccharides
Molecular/DNA testingIdentify specific gene mutations
Newborn screeningTandem mass spectrometry (MS/MS) - can detect enzyme levels at birth
Biopsy + histologyCharacteristic storage cells (Gaucher cells, foam cells, globoid cells)

PART 8: LIGHTNING FAST MEMORY TRICKS 🧠

  1. Tay-Sachs = Two copies wrong β†’ Tiny baby, Cherry-Red spot, Ashkenazi Jews
  2. Gaucher = Gluco + wrinkled Gaucher cells = most Generous response to ERT
  3. Niemann-Pick = No sphingomyelinase β†’ Neurons Perish + Foam cells
  4. Fabry = Female carriers (X-linked) β†’ males Fail (kidneys, heart)
  5. Pompe = Pump fails β†’ cardiomegaly (acid Maltase missing)
  6. Hurler = Horrible face (gargoyle), Hepato-splenomegaly, Hard corneas (clouding)
  7. Hunter = Hunting with X (X-linked), No corneal clouding - Hunters need clear eyes!

PART 9: WHAT DISTINGUISHES LSDs FROM EACH OTHER (Exam favourite!)

QuestionAnswer
Only X-linked LSD (common ones)Fabry and Hunter syndrome
Cherry-red spotTay-Sachs, Niemann-Pick A
"Wrinkled tissue paper" cellsGaucher disease
"Foam cells / Zebra bodies"Niemann-Pick A
"Globoid cells"Krabbe disease
Metachromatic stainingMetachromatic Leukodystrophy
Cardiomegaly in infantPompe disease
Gargoyle face + corneal cloudingHurler syndrome
Ashkenazi Jews (2 diseases)Tay-Sachs + Niemann-Pick A/B
Connected to Parkinson diseaseGaucher disease
Connected to Alzheimer diseaseNiemann-Pick C
Most common LSD in childrenGaucher disease
Lipid transport defect (not enzyme)Niemann-Pick C

You've got this for tomorrow! 🌟
Key formula to remember: ONE enzyme missing β†’ ONE substrate piles up β†’ Lysosomes swell β†’ Cell dies β†’ Organ fails
All LSDs are autosomal recessive EXCEPT Fabry and Hunter which are X-linked recessive.

Create a downloadable PDF cheat sheet of lysosomal storage disorders

Running Command

mkdir -p /home/daytona/workspace/lsd-cheatsheet && echo "done"

Writing File

~/lsd-cheatsheet/generate_lsd_pdf.py

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

OUTPUT = "/home/daytona/workspace/lsd-cheatsheet/Lysosomal_Storage_Disorders_Cheatsheet.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=1.5*cm,
    leftMargin=1.5*cm,
    topMargin=1.5*cm,
    bottomMargin=1.5*cm,
)

# ── colour palette ────────────────────────────────────────────────────────────
NAVY        = colors.HexColor("#0f172a")
DARK_BLUE   = colors.HexColor("#1e3a5f")
MED_BLUE    = colors.HexColor("#1d4ed8")
LIGHT_BLUE  = colors.HexColor("#dbeafe")
ICE_BLUE    = colors.HexColor("#eff6ff")
TEAL        = colors.HexColor("#0f766e")
LIGHT_TEAL  = colors.HexColor("#ccfbf1")
EMERALD     = colors.HexColor("#065f46")
LIGHT_GREEN = colors.HexColor("#d1fae5")
PURPLE      = colors.HexColor("#6d28d9")
LIGHT_PURPLE= colors.HexColor("#ede9fe")
WINE        = colors.HexColor("#9d174d")
LIGHT_PINK  = colors.HexColor("#fce7f3")
ORANGE      = colors.HexColor("#c2410c")
LIGHT_ORANGE= colors.HexColor("#ffedd5")
GOLD        = colors.HexColor("#92400e")
LIGHT_YELLOW= colors.HexColor("#fef3c7")
RED         = colors.HexColor("#b91c1c")
LIGHT_RED   = colors.HexColor("#fee2e2")
SLATE       = colors.HexColor("#334155")
MID_GREY    = colors.HexColor("#94a3b8")
LIGHT_GREY  = colors.HexColor("#f1f5f9")
WHITE       = colors.white

# disease colours
D_COLORS = {
    "tay":      (colors.HexColor("#ef4444"), colors.HexColor("#fef2f2")),
    "np":       (colors.HexColor("#f97316"), colors.HexColor("#fff7ed")),
    "gaucher":  (colors.HexColor("#8b5cf6"), colors.HexColor("#f5f3ff")),
    "fabry":    (colors.HexColor("#0ea5e9"), colors.HexColor("#f0f9ff")),
    "pompe":    (colors.HexColor("#10b981"), colors.HexColor("#ecfdf5")),
    "hurler":   (colors.HexColor("#f59e0b"), colors.HexColor("#fffbeb")),
    "hunter":   (colors.HexColor("#6366f1"), colors.HexColor("#eef2ff")),
    "krabbe":   (colors.HexColor("#64748b"), colors.HexColor("#f8fafc")),
    "mld":      (colors.HexColor("#ec4899"), colors.HexColor("#fdf2f8")),
}

# ── base styles ───────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

def ps(name, **kw):
    base = kw.pop("parent", styles["Normal"])
    return ParagraphStyle(name, parent=base, **kw)

title_s   = ps("t1", fontSize=22, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=2)
sub_s     = ps("sub", fontSize=9,  textColor=colors.HexColor("#bfdbfe"), fontName="Helvetica", alignment=TA_CENTER)
sec_s     = ps("sec", fontSize=11, textColor=WHITE, fontName="Helvetica-Bold", spaceAfter=0)
body_s    = ps("bd",  fontSize=8,  textColor=SLATE, fontName="Helvetica", leading=12)
bold_s    = ps("bld", fontSize=8,  textColor=SLATE, fontName="Helvetica-Bold", leading=12)
small_s   = ps("sm",  fontSize=7.5,textColor=SLATE, fontName="Helvetica", leading=11)
hcell_s   = ps("hc",  fontSize=8,  textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, leading=10)
cell_s    = ps("cc",  fontSize=7.5,textColor=SLATE, fontName="Helvetica", alignment=TA_CENTER, leading=10)
cell_l    = ps("cl",  fontSize=7.5,textColor=SLATE, fontName="Helvetica", alignment=TA_LEFT,   leading=10)
cell_b    = ps("cb",  fontSize=7.5,textColor=SLATE, fontName="Helvetica-Bold", alignment=TA_LEFT, leading=10)
note_s    = ps("nt",  fontSize=7.5,textColor=DARK_BLUE, fontName="Helvetica-Oblique", leading=11)
mem_key_s = ps("mk",  fontSize=8,  textColor=GOLD, fontName="Helvetica-Bold", leading=12)
mem_val_s = ps("mv",  fontSize=8,  textColor=colors.HexColor("#78350f"), fontName="Helvetica", leading=12)

def spacer(h=0.25): return Spacer(1, h*cm)

def section_banner(text, color=DARK_BLUE):
    t = Table([[Paragraph(text, sec_s)]], colWidths=["100%"])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), color),
        ("TOPPADDING",  (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING", (0,0),(-1,-1), 9),
    ]))
    return t

def disease_card(title, color_pair, rows, col_widths):
    """Compact 2-col card: label | value, with coloured left border."""
    hdr_color, bg_color = color_pair
    card_rows = []
    for label, val in rows:
        card_rows.append([
            Paragraph(label, ps("lbl_"+title[:3], fontSize=7.5, fontName="Helvetica-Bold", textColor=hdr_color, leading=10)),
            Paragraph(val,   ps("val_"+title[:3], fontSize=7.5, fontName="Helvetica",      textColor=SLATE,     leading=10)),
        ])
    t = Table(card_rows, colWidths=col_widths)
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,-1), bg_color),
        ("BACKGROUND",    (0,0),(0,-1),  colors.HexColor("%s" % hdr_color.hexval().replace("0x","#")).clone(alpha=0.12) if hasattr(hdr_color,"clone") else LIGHT_GREY),
        ("TOPPADDING",    (0,0),(-1,-1), 3),
        ("BOTTOMPADDING", (0,0),(-1,-1), 3),
        ("LEFTPADDING",   (0,0),(-1,-1), 5),
        ("RIGHTPADDING",  (0,0),(-1,-1), 4),
        ("LINEAFTER",     (0,0),(0,-1),  1.5, hdr_color),
        ("LINEBEFORE",    (0,0),(0,-1),  3,   hdr_color),
        ("GRID",          (0,0),(-1,-1), 0.3, colors.HexColor("#e2e8f0")),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
        ("ROWBACKGROUNDS",(0,0),(-1,-1), [bg_color, colors.HexColor("#ffffff")]),
    ]))
    # wrap in title banner
    title_row = Table([[Paragraph(title, ps("dtitle", fontSize=9, fontName="Helvetica-Bold", textColor=WHITE))]], colWidths=["100%"])
    title_row.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), hdr_color),
        ("TOPPADDING",(0,0),(-1,-1),3),("BOTTOMPADDING",(0,0),(-1,-1),3),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    outer = Table([[title_row],[t]], colWidths=["100%"])
    outer.setStyle(TableStyle([
        ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
        ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
        ("BOX",(0,0),(-1,-1), 1, hdr_color),
    ]))
    return outer

# ════════════════════════════════════════════════════════════════════════════
story = []

# ── PAGE 1 TITLE BANNER ──────────────────────────────────────────────────────
hdr = Table([
    [Paragraph("Lysosomal Storage Disorders", title_s)],
    [Paragraph("Biochemistry Exam Cheat Sheet  |  Complete Reference  |  Robbins & Kumar / Ganong's", sub_s)],
], colWidths=["100%"])
hdr.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,-1), NAVY),
    ("TOPPADDING",(0,0),(0,0),14),("BOTTOMPADDING",(0,1),(-1,-1),12),
    ("LEFTPADDING",(0,0),(-1,-1),10),("RIGHTPADDING",(0,0),(-1,-1),10),
]))
story.append(hdr)
story.append(spacer(0.3))

# ── CONCEPT BOX ─────────────────────────────────────────────────────────────
concept_data = [
    [Paragraph("CORE CONCEPT", ps("cc_h", fontSize=9, fontName="Helvetica-Bold", textColor=DARK_BLUE)),
     Paragraph(
         "Lysosome = cell's recycling factory. It uses hydrolytic enzymes to break down complex molecules. "
         "In LSD: ONE enzyme is missing β†’ its substrate piles up inside lysosomes β†’ lysosomes swell β†’ cell/organ fails.",
         ps("cc_b", fontSize=8, fontName="Helvetica", textColor=SLATE, leading=12))],
    [Paragraph("FLOW", ps("cf_h", fontSize=9, fontName="Helvetica-Bold", textColor=DARK_BLUE)),
     Paragraph(
         "Complex molecule  β†’  Enzyme A  β†’  [ENZYME B MISSING βœ—]  β†’  Substrate accumulates in lysosomes  "
         "β†’  Lysosome swells  β†’  Autophagy fails  β†’  Toxic free radicals  β†’  Cell death",
         ps("cf_b", fontSize=8, fontName="Helvetica-Oblique", textColor=MED_BLUE, leading=12))],
]
concept_t = Table(concept_data, colWidths=[2.8*cm, 14.7*cm])
concept_t.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[LIGHT_BLUE, ICE_BLUE]),
    ("GRID",(0,0),(-1,-1),0.4,colors.HexColor("#bfdbfe")),
    ("TOPPADDING",(0,0),(-1,-1),6),("BOTTOMPADDING",(0,0),(-1,-1),6),
    ("LEFTPADDING",(0,0),(-1,-1),7),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
    ("LINEBEFORE",(0,0),(0,-1),4,MED_BLUE),
]))
story.append(concept_t)
story.append(spacer(0.25))

# ── COMMON FEATURES ──────────────────────────────────────────────────────────
story.append(section_banner("COMMON FEATURES OF ALL LSDs", DARK_BLUE))
story.append(spacer(0.1))
cf_data = [
    [Paragraph("Feature", hcell_s), Paragraph("Detail", hcell_s)],
    [Paragraph("Inheritance", cell_b), Paragraph("Autosomal recessive (EXCEPT Fabry & Hunter = X-linked recessive)", cell_l)],
    [Paragraph("Age of onset", cell_b), Paragraph("Infants / young children β€” appear normal at birth, then deteriorate", cell_l)],
    [Paragraph("Hepatosplenomegaly", cell_b), Paragraph("Liver & spleen enlarge due to storage in macrophages", cell_l)],
    [Paragraph("CNS involvement", cell_b), Paragraph("Brain neurons damaged β†’ mental retardation, regression, seizures", cell_l)],
    [Paragraph("Progressive course", cell_b), Paragraph("Gets worse over time; most are fatal in childhood", cell_l)],
    [Paragraph("Incidence (combined)", cell_b), Paragraph("~1 in 2,500 live births  |  Life expectancy across group: ~15 years", cell_l)],
    [Paragraph("Pathology extra", cell_b), Paragraph("Impaired autophagy β†’ defective mitochondria accumulate β†’ free radicals β†’ apoptosis", cell_l)],
]
cf_t = Table(cf_data, colWidths=[3.2*cm, 14.3*cm], repeatRows=1)
cf_t.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0), DARK_BLUE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, LIGHT_GREY]),
    ("GRID",(0,0),(-1,-1),0.4,colors.HexColor("#cbd5e1")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),6),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(cf_t)
story.append(spacer(0.25))

# ── MASTER TABLE ─────────────────────────────────────────────────────────────
story.append(section_banner("MASTER REFERENCE TABLE β€” ALL MAJOR DISEASES", NAVY))
story.append(spacer(0.1))

mt_header = [
    Paragraph("Disease", hcell_s),
    Paragraph("Enzyme Missing", hcell_s),
    Paragraph("Accumulates", hcell_s),
    Paragraph("Inheritance", hcell_s),
    Paragraph("Key Clinical Signs", hcell_s),
    Paragraph("Hallmark Finding", hcell_s),
]
mt_data = [
    [Paragraph("Tay-Sachs", ps("ts_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#b91c1c"))),
     Paragraph("Hexosaminidase A\n(Ξ±-subunit)", cell_l),
     Paragraph("GM2 ganglioside", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Motor weakness 3-6 mo, blindness, MR, seizures, death <3 yrs", cell_l),
     Paragraph("Cherry-red macula; onion-skin whorls (EM)", cell_l)],

    [Paragraph("Niemann-Pick\nType A", ps("npa_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#c2410c"))),
     Paragraph("Sphingomyelinase", cell_l),
     Paragraph("Sphingomyelin", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Massive hepatospleno-megaly, severe CNS decline, death <3 yrs", cell_l),
     Paragraph("Foam cells; Zebra bodies (EM); Cherry-red spot", cell_l)],

    [Paragraph("Niemann-Pick\nType B", ps("npb_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#c2410c"))),
     Paragraph("Sphingomyelinase\n(residual activity)", cell_l),
     Paragraph("Sphingomyelin", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Organomegaly ONLY; NO neurologic involvement", cell_l),
     Paragraph("Foam cells (no zebra bodies in CNS)", cell_l)],

    [Paragraph("Niemann-Pick\nType C", ps("npc_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#ea580c"))),
     Paragraph("NPC1/NPC2\n(cholesterol transporter β€” NOT an enzyme!)", cell_l),
     Paragraph("Cholesterol +\nGM1/GM2", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Ataxia, vertical gaze palsy, dystonia, psychomotor regression", cell_l),
     Paragraph("Lipid TRANSPORT defect; linked to Alzheimer risk", cell_l)],

    [Paragraph("Gaucher", ps("gc_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#7c3aed"))),
     Paragraph("Glucocerebrosidase", cell_l),
     Paragraph("Glucocerebroside", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Type 1: Hepatospleno-megaly, bone pain, anemia\nType 2: Neurologic + fatal <2 yrs\nType 3: Chronic neuro", cell_l),
     Paragraph('"Wrinkled tissue paper" Gaucher cells\n(macrophages up to 100 Β΅m)', cell_l)],

    [Paragraph("Fabry", ps("fb_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#0369a1"))),
     Paragraph("Ξ±-Galactosidase A", cell_l),
     Paragraph("Ceramide trihexoside\n(globotriaosylceramide)", cell_l),
     Paragraph("X-LINKED\nrecessive", ps("xlr", fontSize=7.5, fontName="Helvetica-Bold", textColor=RED, alignment=TA_CENTER, leading=10)),
     Paragraph("Angiokeratomas, burning pain in hands/feet, corneal opacity, renal failure, cardiomyopathy", cell_l),
     Paragraph("X-linked; affects males; kidney failure = main cause of death", cell_l)],

    [Paragraph("Pompe", ps("pm_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#065f46"))),
     Paragraph("Acid maltase\n(Ξ±-1,4-glucosidase)\n= LYSOSOMAL enzyme!", cell_l),
     Paragraph("Glycogen\n(in lysosomes)", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Infantile: massive cardiomegaly, floppy baby, cardiorespiratory failure <2 yrs\nAdult: chronic myopathy", cell_l),
     Paragraph("Glycogen STORAGE disease that is ALSO a lysosomal disease", cell_l)],

    [Paragraph("Hurler\n(MPS I)", ps("hl_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#92400e"))),
     Paragraph("Ξ±-L-Iduronidase", cell_l),
     Paragraph("Dermatan sulfate +\nHeparan sulfate", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Gargoyle face, coarse features, corneal CLOUDING, short stature, skeletal deformity, MR, hepatosplenomegaly", cell_l),
     Paragraph("Coarse facial features + corneal clouding (key!)", cell_l)],

    [Paragraph("Hunter\n(MPS II)", ps("hn_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#4338ca"))),
     Paragraph("Iduronate sulfatase", cell_l),
     Paragraph("Dermatan sulfate +\nHeparan sulfate", cell_l),
     Paragraph("X-LINKED\nrecessive", ps("xlr2", fontSize=7.5, fontName="Helvetica-Bold", textColor=RED, alignment=TA_CENTER, leading=10)),
     Paragraph("Milder than Hurler; NO corneal clouding; affects only males", cell_l),
     Paragraph("X-linked MPS; NO corneal clouding = key difference from Hurler", cell_l)],

    [Paragraph("Krabbe", ps("kb_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#475569"))),
     Paragraph("Galactosylceramidase", cell_l),
     Paragraph("Galactocerebroside\n(gal-ceramide)", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Rapid neurological deterioration, spasticity, blindness, early death", cell_l),
     Paragraph("GLOBOID cells (giant multinucleated macrophages) in white matter", cell_l)],

    [Paragraph("Metachromatic\nLeukodystrophy", ps("ml_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#be185d"))),
     Paragraph("Arylsulfatase A", cell_l),
     Paragraph("Sulfatide\n(cerebroside sulfate)", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("White matter demyelination, progressive neurologic decline", cell_l),
     Paragraph("METACHROMATIC staining: stored material stains orange-brown with toluidine blue", cell_l)],

    [Paragraph("I-Cell Disease\n(Mucolipidosis II)", ps("ic_", fontSize=8, fontName="Helvetica-Bold", textColor=colors.HexColor("#0f766e"))),
     Paragraph("GlcNAc-phospho-transferase\n(targeting enzyme)", cell_l),
     Paragraph("Lysosomal hydrolases\nsecreted extracellularly\n(not inside lysosomes)", cell_l),
     Paragraph("AR", cell_s),
     Paragraph("Severe Hurler-like features, coarse facies, skeletal abnormalities, MR", cell_l),
     Paragraph("Enzymes MISDIRECTED (lack mannose-6-phosphate tag); inclusion bodies in cells", cell_l)],
]

mt_col_w = [2.0*cm, 2.8*cm, 2.5*cm, 1.5*cm, 5.0*cm, 3.7*cm]
mt_t = Table([mt_header] + mt_data, colWidths=mt_col_w, repeatRows=1)
mt_t.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0), NAVY),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, LIGHT_GREY]),
    # highlight X-linked rows
    ("BACKGROUND",(0,6),(-1,6), colors.HexColor("#eff6ff")),  # Fabry
    ("BACKGROUND",(0,9),(-1,9), colors.HexColor("#eef2ff")),  # Hunter
    ("GRID",(0,0),(-1,-1),0.35,colors.HexColor("#cbd5e1")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),("RIGHTPADDING",(0,0),(-1,-1),4),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(mt_t)
story.append(spacer(0.15))
story.append(Paragraph(
    "β˜… X-LINKED rows highlighted in blue: Fabry disease and Hunter syndrome (MPS II) β€” only males significantly affected",
    ps("footer_note", fontSize=7.5, fontName="Helvetica-Oblique", textColor=MED_BLUE, leading=10)
))
story.append(spacer(0.3))

# ════════════════════════════ PAGE 2 ═══════════════════════════════════════
story.append(PageBreak())

# ── SPHINGOLIPID PATHWAY SUMMARY ─────────────────────────────────────────────
story.append(section_banner("SPHINGOLIPID PATHWAY β€” HOW DISEASES FIT TOGETHER", TEAL))
story.append(spacer(0.1))
pathway_note = (
    "Sphingolipids are broken down step-by-step by lysosomal enzymes. Each LSD blocks ONE step:\n\n"
    "Ganglioside GM1  β†’  [GM1-Ξ²-galactosidase]  β†’  GM2 ganglioside  β†’  [Hexosaminidase A - TAY-SACHS] "
    "β†’  Ceramide  β†’  [Glucocerebrosidase - GAUCHER] β†’ Sphingomyelin  β†’  [Sphingomyelinase - NIEMANN-PICK]  β†’  Ceramide  "
    "β†’  [Galactosylceramidase - KRABBE]  β†’  [Ξ±-Galactosidase A - FABRY]  β†’  Fatty acids + sugars"
)
story.append(Paragraph(pathway_note, ps("path", fontSize=8, fontName="Helvetica", textColor=SLATE, leading=13, leftIndent=5)))
story.append(spacer(0.25))

# ── HALLMARK FINDINGS ─────────────────────────────────────────────────────────
story.append(section_banner("HALLMARK PATHOLOGICAL FINDINGS (Most Tested!)", WINE))
story.append(spacer(0.1))

hf_header = [Paragraph(t, hcell_s) for t in ["Finding", "Disease", "Description"]]
hf_data = [
    [Paragraph("Cherry-red spot (macula)", cell_b),
     Paragraph("Tay-Sachs, Niemann-Pick A", cell_l),
     Paragraph("Pallor of retina from swollen ganglion cells; central macula stays red (has fewer ganglion cells)", cell_l)],
    [Paragraph('"Wrinkled tissue paper" cells', cell_b),
     Paragraph("Gaucher disease", cell_l),
     Paragraph("Gaucher cells = macrophages up to 100 Β΅m stuffed with glucocerebroside; cytoplasm looks crumpled", cell_l)],
    [Paragraph("Foam cells", cell_b),
     Paragraph("Niemann-Pick A & B", cell_l),
     Paragraph("Macrophages vacuolated/foamy with sphingomyelin droplets in liver, spleen, lung", cell_l)],
    [Paragraph("Zebra bodies (EM)", cell_b),
     Paragraph("Niemann-Pick A", cell_l),
     Paragraph("Concentric lamellar myelin figures in neurons under electron microscopy", cell_l)],
    [Paragraph("Onion-skin whorls (EM)", cell_b),
     Paragraph("Tay-Sachs", cell_l),
     Paragraph("Whorled membranous configurations in neurons under electron microscopy", cell_l)],
    [Paragraph("Globoid cells", cell_b),
     Paragraph("Krabbe disease", cell_l),
     Paragraph("Giant multinucleated macrophages in white matter of brain", cell_l)],
    [Paragraph("Metachromatic staining", cell_b),
     Paragraph("MLD (Metachromatic Leukodystrophy)", cell_l),
     Paragraph("Sulfatide stains orange-brown with toluidine blue (instead of expected blue/purple)", cell_l)],
    [Paragraph("Gargoyle / coarse face", cell_b),
     Paragraph("Hurler syndrome (MPS I)", cell_l),
     Paragraph("Thick lips, flat nose, wide-spaced eyes, corneal clouding, stiff joints", cell_l)],
    [Paragraph("Angiokeratomas", cell_b),
     Paragraph("Fabry disease", cell_l),
     Paragraph("Dark red skin lesions on buttocks/genitalia; burning pain in extremities", cell_l)],
    [Paragraph("Massive cardiomegaly", cell_b),
     Paragraph("Pompe disease", cell_l),
     Paragraph("Heart filled with glycogen β†’ heart failure; floppy baby (hypotonia)", cell_l)],
]
hf_t = Table([hf_header]+hf_data, colWidths=[3.5*cm, 3.5*cm, 10.5*cm], repeatRows=1)
hf_t.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0), WINE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, LIGHT_PINK]),
    ("GRID",(0,0),(-1,-1),0.35,colors.HexColor("#fbcfe8")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(hf_t)
story.append(spacer(0.25))

# ── DISTINGUISHING FEATURES TABLE ──────────────────────────────────────────
story.append(section_banner("KEY DISTINGUISHING FEATURES (Exam Favourites!)", EMERALD))
story.append(spacer(0.1))
df_data = [
    [Paragraph("Exam Question", hcell_s), Paragraph("Answer", hcell_s)],
    [Paragraph("X-linked LSDs (2 diseases)", cell_b), Paragraph("Fabry disease  &  Hunter syndrome (MPS II)  β€” only males significantly affected", cell_l)],
    [Paragraph("Ashkenazi Jewish ancestry", cell_b), Paragraph("Tay-Sachs (1 in 30 carriers!)  &  Niemann-Pick A/B", cell_l)],
    [Paragraph("Cherry-red spot on retina", cell_b), Paragraph("Tay-Sachs  and  Niemann-Pick A", cell_l)],
    [Paragraph("Hurler vs Hunter difference", cell_b), Paragraph("Hurler = corneal CLOUDING present  |  Hunter = NO corneal clouding (key!)", cell_l)],
    [Paragraph("Niemann-Pick C vs A/B", cell_b), Paragraph("C = cholesterol TRANSPORT defect (NPC1/NPC2) NOT enzyme deficiency β€” linked to Alzheimer risk", cell_l)],
    [Paragraph("LSD + Glycogen storage", cell_b), Paragraph("Pompe disease = glycogen storage disease that is ALSO a lysosomal disease (acid maltase is lysosomal)", cell_l)],
    [Paragraph("Gaucher + Parkinson link", cell_b), Paragraph("Gaucher carrier state = major genetic risk factor for Parkinson disease", cell_l)],
    [Paragraph("Most common LSD in children", cell_b), Paragraph("Gaucher disease", cell_l)],
    [Paragraph("Most successful ERT target", cell_b), Paragraph("Gaucher disease (imiglucerase / Cerezyme)", cell_l)],
    [Paragraph("MPS with same enzyme = same GAGs", cell_b), Paragraph("Hurler (MPS I) & Hunter (MPS II) both accumulate dermatan + heparan sulfate but different enzymes", cell_l)],
    [Paragraph("I-cell disease mechanism", cell_b), Paragraph("NOT enzyme deficiency β€” phosphorylating enzyme missing β†’ lysosomal enzymes lack mannose-6-phosphate tag β†’ secreted outside cell instead of going into lysosomes", cell_l)],
]
df_t = Table(df_data, colWidths=[4.5*cm, 13.0*cm], repeatRows=1)
df_t.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0), EMERALD),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, LIGHT_GREEN]),
    ("GRID",(0,0),(-1,-1),0.35,colors.HexColor("#bbf7d0")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(df_t)
story.append(spacer(0.25))

# ── MEMORY TRICKS + TREATMENT ─────────────────────────────────────────────────
left_col = []
right_col = []

left_col.append(section_banner("MEMORY TRICKS", GOLD))
left_col.append(spacer(0.1))
tricks = [
    ("Tay-Sachs",    "Tiny Ashkenazi Youth β†’ Cherry-Red spot; Hex A missing"),
    ("Niemann-Pick", "No Phospholipase β†’ Neurons Perish + Foam cells + Zebra"),
    ("Gaucher",      "Glucocerebrosidase Gone β†’ wrinkled tissue paper Gaucher cells"),
    ("Fabry",        "Fabulous X-linked β†’ Feet burn + angiokeratomas + kidney Fails"),
    ("Pompe",        "Pump fails = cardiomegaly; acid Maltase = lysosomal enzyme"),
    ("Hurler",       "Horrible face + corneal clouding + Hepatosplenomegaly"),
    ("Hunter",       "Hunters need clear eyes (NO corneal clouding); X-linked"),
    ("Krabbe",       "Krabbe = Globoid giant cells in brain white matter"),
    ("MLD",          "Meta = orange staining; Arylsulfatase A missing"),
]
trick_rows = []
for disease, trick in tricks:
    trick_rows.append([
        Paragraph(disease, ps("tr_d", fontSize=8, fontName="Helvetica-Bold", textColor=GOLD, leading=11)),
        Paragraph(trick, ps("tr_t", fontSize=7.5, fontName="Helvetica", textColor=colors.HexColor("#78350f"), leading=11)),
    ])
trick_t = Table(trick_rows, colWidths=[2.2*cm, 6.3*cm])
trick_t.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[LIGHT_YELLOW, WHITE]),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#fde68a")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("LINEBEFORE",(0,0),(0,-1),3,GOLD),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
left_col.append(trick_t)

right_col.append(section_banner("TREATMENT OPTIONS", PURPLE))
right_col.append(spacer(0.1))
rx_data = [
    [Paragraph("Treatment", hcell_s), Paragraph("Diseases / Notes", hcell_s)],
    [Paragraph("Enzyme\nReplacement\nTherapy (ERT)", cell_b),
     Paragraph("Gaucher (best - imiglucerase), Fabry, Pompe, Hurler, Hunter. Requires intravenous infusion of recombinant enzyme", cell_l)],
    [Paragraph("Bone Marrow /\nStem Cell\nTransplant", cell_b),
     Paragraph("MPS I (Hurler), Krabbe (if early). Provides donor cells that produce the correct enzyme", cell_l)],
    [Paragraph("Pharmacologic\nChaperone", cell_b),
     Paragraph("Fabry, some Gaucher. Synthetic chaperones help mutated enzyme fold correctly β†’ improve activity", cell_l)],
    [Paragraph("Substrate\nReduction\nTherapy (SRT)", cell_b),
     Paragraph("Gaucher, Niemann-Pick C. Reduces synthesis of the accumulating substrate", cell_l)],
    [Paragraph("Gene Therapy", cell_b),
     Paragraph("Under research for multiple LSDs β€” replace defective gene", cell_l)],
    [Paragraph("Supportive", cell_b),
     Paragraph("Most LSDs: manage symptoms (anticonvulsants, physiotherapy, nutrition support)", cell_l)],
]
rx_t = Table(rx_data, colWidths=[2.2*cm, 5.5*cm], repeatRows=1)
rx_t.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0), PURPLE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, LIGHT_PURPLE]),
    ("GRID",(0,0),(-1,-1),0.35,colors.HexColor("#c4b5fd")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
right_col.append(rx_t)
right_col.append(spacer(0.15))
right_col.append(section_banner("DIAGNOSIS METHODS", TEAL))
right_col.append(spacer(0.1))
diag_rows = [
    [Paragraph("Enzyme assay", cell_b), Paragraph("Measure specific enzyme in leukocytes / fibroblasts", cell_l)],
    [Paragraph("Urine metabolites", cell_b), Paragraph("GAGs in MPS, oligosaccharides in glycoprotein disorders", cell_l)],
    [Paragraph("Molecular / DNA", cell_b), Paragraph("Gene sequencing; carrier detection (e.g. Hex A in Tay-Sachs)", cell_l)],
    [Paragraph("Newborn screening", cell_b), Paragraph("Tandem mass spectrometry (MS/MS) β€” enzyme levels at birth", cell_l)],
    [Paragraph("Biopsy + histology", cell_b), Paragraph("Gaucher cells, foam cells, globoid cells on H&E staining", cell_l)],
]
diag_t = Table(diag_rows, colWidths=[2.5*cm, 5.2*cm])
diag_t.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[LIGHT_TEAL, WHITE]),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#99f6e4")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("LINEBEFORE",(0,0),(0,-1),3,TEAL),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
right_col.append(diag_t)

# two-column layout
two_col = Table(
    [[left_col, right_col]],
    colWidths=[8.8*cm, 8.7*cm],
)
two_col.setStyle(TableStyle([
    ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(0,-1),6),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(two_col)
story.append(spacer(0.2))

# ── FOOTER ───────────────────────────────────────────────────────────────────
footer = Table([[Paragraph(
    "Sources: Robbins & Kumar Basic Pathology  |  Ganong's Review of Medical Physiology 26e  |  "
    "Histology: Text & Atlas (Mescher)  |  Orris Medical AI  |  Good luck on your exam!",
    ps("ft", fontSize=7, fontName="Helvetica-Oblique", textColor=MID_GREY, alignment=TA_CENTER)
)]], colWidths=["100%"])
footer.setStyle(TableStyle([
    ("LINEABOVE",(0,0),(-1,0),0.5,MID_GREY),
    ("TOPPADDING",(0,0),(-1,-1),4),
]))
story.append(footer)

# ── BUILD ─────────────────────────────────────────────────────────────────────
doc.build(story)
print("PDF created:", OUTPUT)
Running Command

cd /home/daytona/workspace/lsd-cheatsheet && python generate_lsd_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/lsd-cheatsheet/Lysosomal_Storage_Disorders_Cheatsheet.pdf

Your cheat sheet is ready - 2 pages, fully colour-coded:

Lysosomal Storage Disorders Cheatsheet

PDF Document Β· PDF


What's inside (2 pages):

Page 1
  • Core concept box - lysosome function + what goes wrong in LSD
  • Common features table - inheritance, age, hepatosplenomegaly, CNS involvement
  • Master reference table - all 12 diseases: enzyme missing, substrate, inheritance, key signs, hallmark finding
Page 2
  • Sphingolipid pathway - how each disease fits the degradation steps
  • Hallmark pathological findings - cherry-red spot, wrinkled tissue paper, foam cells, zebra bodies, globoid cells, metachromatic staining, etc.
  • Key distinguishing features - the classic exam Q&A comparisons (Hurler vs Hunter, NPC vs A/B, etc.)
  • Memory tricks - one-liner hooks for each disease
  • Treatment options - ERT, bone marrow transplant, chaperone therapy, SRT
  • Diagnosis methods - enzyme assay, urine, DNA, newborn screening
Print both pages, pin them up, and you're covered! 🌟

Tomorrow is my biochemistry practical exam and I dont know nothing about hyperthyroidism , hypothyroidism ( Sub clinical hypothyroidism). Please provide me answer in easy language and i will remember every points .

Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have comprehensive material from Goldman-Cecil, Robbins, and other authoritative sources. Let me compile the full easy-language exam answer.

πŸ¦‹ THYROID DISORDERS: HYPOTHYROIDISM, HYPERTHYROIDISM & SUBCLINICAL HYPOTHYROIDISM

Complete Biochemistry Exam Notes - Easy Language

Sources: Goldman-Cecil Medicine, Robbins & Kumar Basic Pathology, Harrison's Internal Medicine 22E

PART 1: UNDERSTAND THE THYROID AXIS FIRST

Think of it like a thermostat system:
HYPOTHALAMUS β†’ releases TRH (Thyrotropin-Releasing Hormone)
        ↓
PITUITARY β†’ releases TSH (Thyroid-Stimulating Hormone)
        ↓
THYROID GLAND β†’ releases T3 (Triiodothyronine) and T4 (Thyroxine)
        ↓
T3/T4 feed BACK to suppress TRH and TSH (negative feedback)
🧠 Key rule:
  • TSH ↑ (HIGH) = thyroid is being pushed hard because it is NOT producing enough hormone = HYPOTHYROIDISM
  • TSH ↓ (LOW/suppressed) = pituitary senses too much hormone, backs off = HYPERTHYROIDISM

PART 2: HYPOTHYROIDISM

Definition

Hypothyroidism = not enough thyroid hormone (T3/T4) being produced
  • Prevalence of overt hypothyroidism: 0.3% of population
  • Subclinical hypothyroidism: >4% of population
  • 10x more common in females than males
  • Increases with age

Types of Hypothyroidism

TypeWhere the problem isTSHT3/T4
PrimaryThyroid gland itself fails↑ HIGH↓ LOW
Secondary (Central)Pituitary fails (can't make TSH)↓ LOW or Normal↓ LOW
Tertiary (Central)Hypothalamus fails (can't make TRH)↓ LOW or Normal↓ LOW
Most cases (~99%) are PRIMARY hypothyroidism.

Causes of Hypothyroidism

PRIMARY (Thyroid gland problem)

CauseExplanation
Hashimoto's ThyroiditisMost common cause in iodine-sufficient countries; autoimmune destruction of thyroid
Iodine deficiencyMost common cause WORLDWIDE; iodine needed to make T3/T4
Post-surgicalThyroid removed (for cancer, Graves disease, goiter)
Radioactive iodine (RAI) therapyUsed to treat Graves disease; destroys thyroid tissue
Radiation to neck/headFor head and neck cancers can destroy thyroid
DrugsAmiodarone, Lithium, anti-thyroid drugs (propylthiouracil, methimazole)
CongenitalThyroid agenesis (no thyroid), dyshormonogenesis (enzyme defect in T3/T4 synthesis)
Infiltrative diseaseAmyloidosis, hemochromatosis, Riedel's thyroiditis (fibrosis)

SECONDARY / TERTIARY (Pituitary or Hypothalamus problem)

  • Pituitary tumor (most common cause of secondary) - compresses TSH-producing cells
  • Hypothalamic disease - sarcoidosis, radiation, surgery to the brain

HASHIMOTO'S THYROIDITIS - The Most Important Cause

Mechanism (in simple steps):
  1. Immune system attacks the thyroid (self-tolerance breaks down)
  2. CD8+ cytotoxic T cells directly kill thyroid cells
  3. CD4+ T cells release IFN-Ξ³ β†’ macrophages recruited β†’ thyroid destruction
  4. Antibodies formed: Anti-TPO (Anti-thyroid peroxidase) and Anti-thyroglobulin
  5. Thyroid slowly destroyed β†’ T3/T4 ↓ β†’ TSH ↑ compensates β†’ eventually gland fails
Histology (what you see under microscope):
  • Lymphocytic infiltrate with germinal centres
  • HΓΌrthle cells (Oncocytes) - metaplastic follicular cells with lots of pink cytoplasm
  • Thyroid follicles are atrophic (shrunken)
  • Fibrosis (scarring) inside gland
Initial phase (hashitoxicosis): Destroyed cells release stored T4 β†’ temporary hyperthyroidism first!

SYMPTOMS of Hypothyroidism

Think "Everything SLOWS DOWN"
SystemSymptom
GeneralFatigue, lethargy, weight GAIN, cold intolerance
SkinDry cool skin, non-pitting oedema (myxoedema), brittle nails, hair loss (including outer 1/3 of eyebrows!)
HeartBradycardia (slow heart rate), diastolic hypertension, pericardial effusion (muffled heart sounds)
Nervous systemSlow thinking, depression, reduced mental acuity
Muscles/ReflexesDelayed deep tendon reflexes (ankle jerk) - most sensitive clinical sign!
GIConstipation (slow gut motility)
ReproductiveHeavy prolonged periods (menorrhagia) in women
EyesLoss of outer eyebrow hair
Labs↑ LDL cholesterol, macrocytic anaemia, ↑ CK, hyponatraemia
Severe/untreated = MYXOEDEMA COMA:
  • Profound hypothermia, hypotension, bradycardia, coma β†’ medical emergency!

LABORATORY DIAGNOSIS of Hypothyroidism

ConditionTSHFree T4Free T3
Overt Primary Hypothyroidism↑↑ HIGH (>4.5 mU/L)↓ LOW↓ LOW
Subclinical Hypothyroidism↑ Mildly elevated (4.5-20 mU/L)NormalNormal
Secondary Hypothyroidism↓ Low or Normal↓ LOW↓ LOW
TSH normal range: 0.4 - 4.5 mU/L TSH is ALWAYS the first test to order when you suspect thyroid disease

TREATMENT of Hypothyroidism

  • Levothyroxine (L-T4) - oral tablet daily on empty stomach
  • Dose adjusted to normalize TSH
  • Lifelong treatment in most cases
  • Monitor TSH every 6-12 months once stable


PART 3: SUBCLINICAL HYPOTHYROIDISM

Definition - VERY IMPORTANT FOR EXAM! ⭐

Subclinical Hypothyroidism = TSH is elevated (>4.5 mU/L) BUT free T4 is NORMAL (within range)
  • NO symptoms OR only very mild, nonspecific symptoms
  • Patient feels essentially normal
  • Discovered on routine blood tests

Why does this happen?

  • Early thyroid failure β†’ T4 is still being produced but pituitary senses a slight drop β†’ pituitary works harder β†’ TSH rises slightly
  • The raised TSH successfully "pushes" the failing thyroid to still produce normal T4 - for now
  • Think of it as the "compensation phase" before overt hypothyroidism

Key Numbers

  • TSH: 4.5 - 20 mU/L (mildly elevated)
  • Free T4: normal
  • Prevalence: >4% of the population

Natural History

  • ~5% of people per year progress from subclinical to overt hypothyroidism
  • Risk factors for progression: high TSH (>10), positive anti-TPO antibodies, female sex, older age
  • Some people stay subclinical permanently, some even normalise

Should we treat it?

  • Treat if: TSH > 10 mU/L, OR pregnant, OR symptomatic, OR anti-TPO antibodies positive
  • Watchful waiting if: TSH 4.5-10, no symptoms, no antibodies


PART 4: HYPERTHYROIDISM

Definition

Hyperthyroidism = too much thyroid hormone (T3/T4) circulating in the blood
  • Also called thyrotoxicosis (state of excess thyroid hormone - from any source)

Causes of Hyperthyroidism

CauseMechanism
Graves' DiseaseMost common cause; autoantibody stimulates TSH receptor
Toxic Multinodular Goitre (Plummer disease)Multiple nodules autonomously produce T3/T4
Toxic AdenomaSingle autonomously functioning nodule
Thyroiditis (subacute/painless)Inflammation releases stored T4 (temporary)
Excess iodine (Jod-Basedow effect)Too much iodine drives T4 synthesis
Drugs (amiodarone)Contains large amounts of iodine
TSH-secreting pituitary tumorRare; secondary hyperthyroidism
Factitious hyperthyroidismTaking too many thyroid tablets
Pregnancy (first trimester)hCG cross-reacts with TSH receptor

GRAVES' DISEASE - The Most Important Cause

Mechanism (very simple):
  1. Immune system makes IgG antibodies against TSH receptor (called TSI - Thyroid Stimulating Immunoglobulin / TRAb)
  2. These antibodies MIMIC TSH - they bind and STIMULATE the TSH receptor
  3. Thyroid makes T3/T4 continuously without any pituitary control
  4. T3/T4 rises β†’ TSH drops to ZERO (pituitary shuts off)
Who gets it: Women 20-40 years (women 7x more than men), 1.5-2% of US women
Three special features of Graves' ONLY (not seen in other causes of hyperthyroidism):
FeatureDescription
Exophthalmos (Proptosis)Eyes bulge forward - TSH receptors on orbital fat/fibroblasts stimulated β†’ glycosaminoglycan deposition β†’ orbital swelling pushes eyeball forward
Pretibial MyxedemaNon-pitting thickening of skin on the shins (lower legs) - glycosaminoglycan deposits
Thyroid AcropachyRare - clubbing of fingers + swelling of digits
Graves' Histology:
  • Diffusely enlarged thyroid (smooth, soft)
  • Tall crowded follicular cells forming small papillae (no fibrovascular core)
  • Pale colloid with scalloped edges ("moth-eaten" colloid)
  • Lymphoid infiltrates with germinal centres
  • Audible bruit over thyroid (from increased blood flow)

SYMPTOMS of Hyperthyroidism

Think "Everything SPEEDS UP"
SystemSymptom
GeneralWeight LOSS despite good appetite, heat intolerance, sweating
HeartTachycardia, palpitations, atrial fibrillation, systolic hypertension
Nervous systemAnxiety, emotional lability, tremor (fine tremor of hands), insomnia
MusclesProximal muscle weakness (difficulty climbing stairs)
GIDiarrhoea (fast gut motility)
SkinWarm moist skin, hair thinning
EyesLid lag, stare (all causes); exophthalmos only in Graves'
ReproductiveIrregular/light periods (oligomenorrhoea)
Elderly"Apathetic hyperthyroidism" - NO classic symptoms; just weight loss, AF, weakness
Severe/life-threatening = THYROID STORM:
  • Extreme tachycardia, fever, confusion, cardiac failure β†’ medical emergency!

LABORATORY DIAGNOSIS of Hyperthyroidism

ConditionTSHFree T4Free T3
Overt Hyperthyroidism↓↓ SUPPRESSED (near 0)↑↑ HIGH↑↑ HIGH
Subclinical Hyperthyroidism↓ Low/suppressedNormalNormal
Secondary Hyperthyroidism (TSH-secreting pituitary tumor)↑ HIGH↑↑ HIGH↑↑ HIGH
Graves' Disease↓↓↑↑↑↑ + TRAb positive
Extra tests for Graves':
  • TRAb / TSI (TSH receptor antibody) - confirmatory test for Graves'
  • Radioactive iodine uptake (RAIU):
    • Graves' / Toxic nodule: HIGH uptake (gland actively taking up iodine)
    • Thyroiditis: LOW uptake (gland inflamed, not synthesizing)
Graves' T3:T4 ratio: >20:1 (characteristic)

TREATMENT of Hyperthyroidism

TreatmentHow it works
Antithyroid drugs - Propylthiouracil (PTU), Methimazole/CarbimazoleBlock thyroid peroxidase β†’ stop T3/T4 synthesis. PTU also blocks T4β†’T3 conversion
Beta-blockers (propranolol)Control symptoms (tachycardia, tremor, anxiety) - do NOT affect thyroid
Radioactive Iodine (ΒΉΒ³ΒΉI)Destroys thyroid tissue permanently; often causes hypothyroidism later
Surgery (thyroidectomy)For large goitre, non-compliance, pregnancy

PART 5: SUBCLINICAL HYPERTHYROIDISM

Subclinical Hyperthyroidism = TSH suppressed (low) BUT T3 and T4 are NORMAL
  • No or minimal symptoms
  • Discovered on routine bloods
  • Risks if untreated: atrial fibrillation (especially elderly), osteoporosis (bone loss)
  • Treat if TSH is very low (<0.1), patient elderly, or has cardiac disease/osteoporosis risk

PART 6: MASTER COMPARISON TABLE

FeatureHYPOTHYROIDISMHYPERTHYROIDISM
TSH↑ HIGH↓ LOW/Suppressed
Free T4↓ LOW↑ HIGH
MetabolismSLOWS DOWNSPEEDS UP
Weight↑ GAIN↓ LOSS
Heart rate↓ Bradycardia↑ Tachycardia
Temperature toleranceCold intoleranceHeat intolerance
BowelConstipationDiarrhoea
ReflexesSLOW/delayed (ankle jerk!)Hyperreflexia
Mood/MentalSlow, depressed, poor memoryAnxious, irritable, tremor
SkinDry, cold, non-pitting oedemaWarm, moist, sweaty
PeriodsHeavy, irregular (menorrhagia)Light, irregular (oligomenorrhoea)
Cholesterol↑ LDL (HIGH)↓ (LOW)
Most common causeHashimoto's thyroiditisGraves' disease
AutoantibodyAnti-TPO, Anti-TgTRAb / TSI (anti-TSH receptor)
EmergencyMyxoedema comaThyroid storm
TreatmentLevothyroxine (T4 replacement)PTU/Methimazole, RAI, Surgery

PART 7: THE SUBCLINICAL COMPARISON

Subclinical HYPOTHYROIDISMSubclinical HYPERTHYROIDISM
TSH↑ Mildly elevated (4.5-20)↓ Suppressed (but T3/T4 normal)
Free T4NORMALNORMAL
Free T3NormalNormal
SymptomsNone or very mildNone or very mild
Risk if untreatedProgress to overt hypothyroidismAF, osteoporosis
Most common causeEarly Hashimoto'sEarly Graves', toxic nodule
Treat whenTSH >10, pregnant, +antibodiesTSH <0.1, elderly, cardiac risk

PART 8: LIGHTNING MEMORY TRICKS 🧠

  1. TSH is the BOSS test - start diagnosis here always!
  2. TSH HIGH = Hypo (gland failing, pituitary panicking)
  3. TSH LOW = Hyper (too much T4, pituitary shuts off)
  4. Subclinical = TSH abnormal but T4 NORMAL (compensation phase)
  5. Hashimoto = Hypo (destruction) | Graves = Hyper (stimulation)
  6. Graves' ONLY: Exophthalmos + pretibial myxedema + acropachy
  7. Myxoedema coma = severe hypothyroid emergency (cold + coma)
  8. Thyroid storm = severe hyperthyroid emergency (hot + racing heart)
  9. Most sensitive hypothyroid sign: Delayed ankle jerk reflex
  10. Hyperthyroid labs: Free T3 MORE elevated than T4 (T3:T4 > 20 in Graves')

PART 9: EXAM QUICK RECALL CHART

What's unique to Graves'?Exophthalmos, pretibial myxedema, thyroid bruit, TRAb positive
What's unique to Hashimoto's?Anti-TPO + anti-Tg antibodies, HΓΌrthle cells on biopsy, temporary hashitoxicosis
Most common cause of hypo worldwide?Iodine deficiency
Most common cause of hypo in developed countries?Hashimoto's thyroiditis
Most common cause of hyper?Graves' disease
Drug that causes BOTH hypo AND hyper?Amiodarone
Lab finding in hypo (non-thyroid)?↑ LDL cholesterol, ↑ CK, macrocytic anaemia, hyponatraemia
What test confirms Graves'?TRAb / TSI (TSH receptor antibody)
Radioactive iodine uptake in Graves'?↑↑ HIGH (diffuse uptake)
Radioactive iodine uptake in thyroiditis?↓↓ LOW (key difference!)

You're ready for tomorrow! 🌟
Three things to absolutely never forget:
  1. TSH is always the first and most important test
  2. Subclinical = TSH abnormal but T4 NORMAL (no or minimal symptoms)
  3. Graves' = stimulating antibody; Hashimoto's = destroying antibody

Tomorrow is my PSM practical exam and from this pdf they will ask spotters so please provide me the answer of spotter in pdf

Reading File
Running Command

python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/16685b50-e9a5-450c-82c9-60b900297cdc/MBBS 2nd Year PBQ, Spotters_9954d012-fff4-4b11-8e6a-f48fa7247d14.pdf' with pdfplumber.open(path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages[:6]): text = page.extract_text() print(f'--- PAGE {i+1} ---') print(text[:2000] if text else '[No text]') print() "

Running Command

python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/16685b50-e9a5-450c-82c9-60b900297cdc/MBBS 2nd Year PBQ, Spotters_9954d012-fff4-4b11-8e6a-f48fa7247d14.pdf' with pdfplumber.open(path) as pdf: # Find where spotters section begins for i, page in enumerate(pdf.pages): text = page.extract_text() or '' if 'spotter' in text.lower() or 'SPOTTER' in text or 'Spotter' in text: print(f'Found SPOTTERS on page {i+1}') print(text[:500]) print('---') "

Running Command

python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/16685b50-e9a5-450c-82c9-60b900297cdc/MBBS 2nd Year PBQ, Spotters_9954d012-fff4-4b11-8e6a-f48fa7247d14.pdf' with pdfplumber.open(path) as pdf: print(f'Total pages: {len(pdf.pages)}') # Extract pages 170-186 (spotter section and nearby) for i in range(169, min(186, len(pdf.pages))): page = pdf.pages[i] text = page.extract_text() or '' print(f'=== PAGE {i+1} ===') print(text) print() "

Running Command

python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/16685b50-e9a5-450c-82c9-60b900297cdc/MBBS 2nd Year PBQ, Spotters_9954d012-fff4-4b11-8e6a-f48fa7247d14.pdf' with pdfplumber.open(path) as pdf: # Search all pages for spotter-related content and image-based content for i, page in enumerate(pdf.pages): text = page.extract_text() or '' imgs = page.images if imgs or ('spotter' in text.lower()) or ('identify' in text.lower()) or ('name the' in text.lower()): print(f'=== PAGE {i+1} (images:{len(imgs)}) ===') print(text[:600] if text else '[image only page]') print() " 2>&1 | head -200

Running Command

python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/16685b50-e9a5-450c-82c9-60b900297cdc/MBBS 2nd Year PBQ, Spotters_9954d012-fff4-4b11-8e6a-f48fa7247d14.pdf' with pdfplumber.open(path) as pdf: # Extract all text from the whole PDF - focusing on answer pages all_text = [] for i, page in enumerate(pdf.pages): text = page.extract_text() or '' all_text.append((i+1, text)) # Print pages 50-175 in chunks for pg, txt in all_text[49:120]: if txt.strip(): print(f'=== PAGE {pg} ===') print(txt[:800]) print() " 2>&1 | head -400

Running Command

python3 -c " import pdfplumber path = '/home/daytona/workspace/attachments/16685b50-e9a5-450c-82c9-60b900297cdc/MBBS 2nd Year PBQ, Spotters_9954d012-fff4-4b11-8e6a-f48fa7247d14.pdf' with pdfplumber.open(path) as pdf: for i, page in enumerate(pdf.pages[100:170]): text = page.extract_text() or '' pg = i + 101 if text.strip(): print(f'=== PAGE {pg} ===') print(text[:700]) print() " 2>&1 | head -400

Now I have a complete picture of all the spotters. Let me compile comprehensive answers for every spotter in the PDF.

πŸ₯ PSM PRACTICAL EXAM - COMPLETE SPOTTER ANSWERS

MBBS 2nd Year - Dr. Narendra Kumar Yadav's Spotter Book


πŸ“¦ SECTION 1: ORS (Oral Rehydration Solution)

Q. Identify the given spot?
ORS - Oral Rehydration Solution (WHO/UNICEF Low Osmolarity ORS)
Q. What is its use in national health programme?
Management of dehydration in diarrhoea and dysentery cases. Given under the Control of Diarrhoeal Diseases (CDD) Programme.
Q. Write its TWO uses in public health:
  1. Treatment of dehydration caused by acute diarrhoea
  2. Prevention of dehydration in children with diarrhoea before hospital referral
Q. Composition of ORS (WHO Low-Osmolarity, 2003):
ComponentAmount per litre
Sodium chloride (NaCl)2.6 g
Glucose (anhydrous)13.5 g
Potassium chloride (KCl)1.5 g
Trisodium citrate (dihydrate)2.9 g
Total osmolarity245 mOsm/L
Sodium75 mEq/L
Glucose75 mmol/L
Potassium20 mEq/L
Chloride65 mEq/L
🧠 Memory: "Naka Glucose Potassium Citrate" (NaCl, Glucose, KCl, Citrate)
Home-made ORS: 1 litre water + 1 teaspoon salt + 8 teaspoons sugar

πŸ’‰ SECTION 2: VACCINES (NIS - National Immunisation Schedule Nepal)

Spotter: BCG Vaccine

Q. Identify the given vaccine: BCG (Bacille Calmette-GuΓ©rin)
FeatureDetail
TypeLive attenuated bacterial vaccine
StrainDanish-1331
DiluentNormal saline
ScheduleAt BIRTH (as early as possible)
Dose0.05 mL (neonates) / 0.1 mL (older children)
RouteIntradermal (ID)
SiteLeft deltoid (Nepal: Right deltoid)
ContraindicationsHIV/AIDS, immunodeficiency, active TB, high-dose steroids
Duration of protection20 years
Efficacy:
  • Pulmonary TB: 0% protection
  • Severe forms of TB (meningitis, miliary): 50%
  • Leprosy: 30%
Post-vaccination reactions (sequence):
  • 2-3 weeks: Papule forms
  • 6-8 weeks: Ulcer with crust
  • 6-12 weeks: Permanent small round scar
  • 8-14 weeks: Mantoux test becomes positive
Complication: Suppurative lymphadenitis

Spotter: Measles / MMR Vaccine

Q. Identify: MMR Vaccine (Measles, Mumps, Rubella)
FeatureDetail
TypeLive attenuated
StrainEdmonston Zagreb S
Schedule9 months + 15 months
RouteSubcutaneous (S/C)
SiteRight arm
DiluentDistilled water / Sterile water

Spotter: HPV Vaccine

Q. Which non-communicable disease does this vaccine prevent?
Cervical cancer (caused by Human Papillomavirus - HPV types 16 & 18)
Q. Target age group?
9-14 years girls (before sexual debut) - 2 doses

Spotter: 2 mL Disposable Syringe

Q. Identify: 2 mL Disposable Syringe
Two uses in public health:
  1. Immunization / vaccination
  2. Administration of antibiotics / injectable drugs

Spotter: Insulin Disposable Syringe

Q. Identify: Insulin Disposable Syringe
Two uses in public health:
  1. Insulin administration in diabetics
  2. Injection of other medications in small amounts

πŸ”¬ SECTION 3: DISEASE MODELS / CLINICAL SPOTTERS

Spotter: Measles (Rubeola)

Q. Identify the model: Measles (Rubeola)
FeatureDetail
Causative agentRNA Paramyxovirus
Incubation period10-14 days (range 7-18 days)
Mode of transmissionDroplet infection / airborne; direct contact
Most common age6 months - 5 years
Koplik's Spots (Pathognomonic sign):
Small bluish-white spots on a red base (like "table salt crystals") on the buccal mucosa opposite the 1st and 2nd molar teeth - appear 1-2 days BEFORE rash
Rash: Maculopapular rash starting at hairline β†’ face β†’ downward (cephalocaudal spread)
Complications:
  1. Otitis media (MOST COMMON complication)
  2. Diarrhoea
  3. Pneumonia (RTI)
  4. SSPE (Subacute Sclerosing Panencephalitis) - rare, late
Prevention:
  • Active immunization: MR/MMR vaccine
  • Passive immunization: Immunoglobulin (0.25 mL/kg)
  • Isolation
  • Oral Vitamin A
  • Health education

Spotter: Chickenpox (Varicella)

Q. Identify: Chickenpox
FeatureDetail
Causative agentVaricella-Zoster Virus (VZV) - DNA herpesvirus
Incubation period14-21 days (10-21 days)
Mode of transmissionDroplet, airborne, direct contact with vesicle fluid
Characteristic rashPleomorphic rash - different stages at same time (macules, papules, vesicles, pustules, crusts) on same body area
Key differentiating feature from other rashes:
Pleomorphic eruption - all stages of rash present simultaneously ("crops at different stages")
Chickenpox vs Smallpox:
FeatureChickenpoxSmallpox
DistributionCentripetal (trunk > face/limbs)Centrifugal (face/limbs > trunk)
StagesAll stages at same time (pleomorphic)All lesions at same stage
DepthSuperficialDeep
ScarringRareCommon (pitted scars)

Spotter: Rickets

Q. Identify: Rickets (Vitamin D deficiency in children)
Q. Vitamin deficiency: Vitamin D deficiency (leads to poor calcium absorption)
Clinical features:
  • Bow legs (genu varum) or knock knees (genu valgum)
  • Rachitic rosary (beading of ribs)
  • Harrison's sulcus
  • Craniotabes
  • Delayed dentition
Prevention:
  • Sunlight exposure (UV-B)
  • Vitamin D supplementation (400 IU/day for infants)
  • Fortified foods (milk, cereals)
  • Dietary sources: Fish liver oil, egg yolk, fortified milk

🍎 SECTION 4: NUTRITION SPOTTERS

Spotter: Vitamin A (Capsules/Syrup)

Q. Identify: Vitamin A supplement (capsule/syrup)
Functions of Vitamin A:
  • Vision (especially night vision - rhodopsin synthesis)
  • Immune function
  • Skin and mucous membrane integrity
  • Growth and development
Deficiency diseases:
  • Night blindness (Nyctalopia) - earliest sign
  • Bitot's spots
  • Keratomalacia (corneal ulceration β†’ blindness) - most severe
  • Xerophthalmia (dry eye)
  • Increased susceptibility to infections
Sources: Liver, egg, milk, butter, fish oil (preformed Vit A); Carrot, mango, papaya, green leafy vegetables (beta-carotene - provitamin A)
National Vitamin A Programme (Nepal, 1998):
Aim: Prevention of nutritional blindness due to Keratomalacia
Age groupDoseFrequency
6 months - 1 year1,00,000 IU (1 lakh IU)Every 6 months
1 year - 5 years2,00,000 IU (2 lakh IU) + AlbendazoleEvery 6 months
RouteOralBiannually (Kartik & Baisakh rounds)
Total 9 doses consumed = 17 lakh IU total

Spotter: Bitot's Spots

Q. Identify: Bitot's Spots
Q. Vitamin deficiency: Vitamin A deficiency
Description:
Small, foamy-looking, triangular/oval silvery-white patches on the conjunctiva (sclera), lateral to the cornea. Made of dried desquamated epithelial cells and Corynebacterium xerosis.
Staging of Xerophthalmia (WHO classification):
  • X1A: Conjunctival xerosis (dry conjunctiva)
  • X1B: Bitot's spots ← this spotter
  • X2: Corneal xerosis
  • X3A: Corneal ulcer <1/3 cornea
  • X3B: Corneal ulcer >1/3 cornea (Keratomalacia)
  • XS: Corneal scar
  • XN: Night blindness

Spotter: Shakir Tape (MUAC Tape)

Q. Identify: Shakir Tape / MUAC Tape (Mid-Upper Arm Circumference Tape)
Q. Uses:
  • Assessment of nutritional status (protein-energy malnutrition) in children 1-5 years
  • Screening for malnutrition in field/community settings
Q. Classification:
ColourMUAC measurementInterpretation
Red< 12.5 cmSevere Acute Malnutrition (SAM)
Yellow12.5 - 13.5 cmModerate Acute Malnutrition (MAM)
Green> 13.5 cmNormal/Well-nourished

Spotter: BMI (Body Mass Index)

Formula: BMI = Weight (kg) / HeightΒ² (mΒ²)
WHO Classification of BMI for Adults:
CategoryBMI (kg/mΒ²)
Underweight< 18.5
Normal18.5 - 24.9
Overweight25.0 - 29.9
Obese Class I30.0 - 34.9
Obese Class II35.0 - 39.9
Obese Class III (Morbid)β‰₯ 40
Asian cut-off (modified for Asians):
  • Overweight: β‰₯ 23 kg/mΒ²
  • Obese: β‰₯ 27.5 kg/mΒ²

Spotter: Growth Chart (Road-to-Health Chart)

Q. Identify: WHO Growth Chart / Road-to-Health Chart
Description:
Graphical representation of a child's weight vs age, used for growth monitoring
WHO Growth Chart has 2 reference curves:
  1. Upper Reference Curve (URC): 50th percentile for boys
  2. Lower Reference Curve (LRC): 3rd percentile for girls
"Road to Health": = the space BETWEEN the 2 curves = Zone of normality
Uses:
  1. Growth monitoring and nutritional status assessment
  2. Early identification of "high-risk" children
  3. Educational tool for mothers
  4. Planning and policy making for nutritional programmes
  5. Tool for action - guides type of intervention needed
  6. Monitoring effectiveness of programmes

Food Item Spotters: Nutritive Values

Food (per 100g)ProteinCarbohydrateFatEnergyKey fact
Rice6.5 g75 g0.5 g350 kcalLAA: Lysine; Polished rice β†’ Beriberi
Wheat12 g72 g1.5 g350 kcalLAA: Threonine & Lysine; Maida (refined) β†’ poor nutrition
Maize12 g65 g3.5 g345 kcalLAA: Tryptophan & Lysine; excess β†’ Pellagra
Pulses (Dal)22 g60 g2 g330 kcalLAA: Methionine & Cysteine; "Poor man's meat"
Soybean43 g20 g19 g430 kcalRichest protein among pulses
Egg13 gNil13 g170 kcalReference protein; NPU = 96; all 9 essential AAs
Milk3 g-4 g70 kcalCasein 85%; Rich in Ca; Poor in Fe; NPU = 75
Limiting Amino Acids (LAA) - Easy Memory:
  • Maize: Tryptophan + Lysine (Tl)
  • Wheat: Threonine + Lysine (Tl again!)
  • Pulses: Methionine + Cysteine (MC)
Pellagra (from excess maize):
  • Caused by: Niacin deficiency (excess leucine in maize blocks tryptophan β†’ niacin conversion; 60 mg tryptophan = 1 mg niacin)
  • Classic: 3 D's = Dermatitis + Diarrhoea + Dementia (+ 4th D = Death if untreated)

Energy & Protein Requirements

GroupEnergy (kcal/day)Protein (g/day)
Adult male (sedentary)232065
Adult male (moderate work)273065
Adult male (heavy work)349065
Adult female (sedentary)190055
Pregnancy (extra)+350+23
Lactation 0-6 months (extra)+600+19
Lactation 6-12 months (extra)+520+13
Infants 0-6 months92 kcal/kg/day1.16 g/kg/day
Infants 6-12 months80 kcal/kg/day1.69 g/kg/day

πŸ§ͺ SECTION 5: ANTISEPTICS / DISINFECTANTS

Betadine Solution

Q. What is the use of Betadine?
  • Antiseptic for wound cleaning
  • Pre-operative skin preparation
  • Treatment of skin infections
Composition: Povidone-iodine (10% solution = 1% available iodine)

Dettol Solution

Uses of Dettol:
  • Antiseptic for wound/skin cleaning
  • Disinfection of instruments
  • Household disinfectant
  • Pre/post-surgical hand washing
Composition: Chloroxylenol (4.8%) + pine oil + castor oil soap

Savlon

Uses and Composition:
  • Antiseptic wound cleaning
  • Skin disinfection before injections
Composition: Chlorhexidine gluconate (1.5%) + Cetrimide (15%) = mixture

πŸ“Š SECTION 6: STATISTICS SPOTTERS

Pie Chart

Q. Identify: Pie Chart / Circle Chart Q. What type of data? Discrete/categorical (nominal or ordinal) data; shows proportions/percentages of a whole

Bar Diagram

Q. Identify: Bar Diagram / Bar Chart Q. What type of data? Discrete/categorical data; bars separated by gaps; compares quantities across categories

Histogram

Q. Identify: Histogram Q. What type of data? Continuous data (bars touch each other - no gaps); shows frequency distribution
Key difference - Bar diagram vs Histogram:
Bar diagramHistogram
Bars separated by gapsBars touch (no gaps)
Discrete/categorical dataContinuous data
Categories on X axisClass intervals on X axis

πŸ”¬ SECTION 7: RESEARCH METHODOLOGY SPOTTERS

Spotter 1: Evidence Pyramid / Hierarchy of Evidence

Q. Name the diagram: Evidence Pyramid / Hierarchy of Evidence
Q. Highest level of evidence: Systematic Review / Meta-analysis (at the TOP)
Why most reliable: Combines results of multiple high-quality RCTs, minimises bias, gives strongest statistical power
Levels (top to bottom):
  1. Systematic reviews & Meta-analyses (HIGHEST)
  2. Randomised Controlled Trials (RCTs)
  3. Cohort studies
  4. Case-control studies
  5. Cross-sectional studies
  6. Case reports / Case series
  7. Expert opinion / Editorials (LOWEST)

Spotter 2: Declaration of Helsinki

Q. Name the international declaration for ethical principles in medical research:
Declaration of Helsinki (World Medical Association, 1964)
Key principles: Informed consent, research ethics committee approval, risk-benefit analysis, protection of vulnerable groups

Spotter 3: Informed Consent

Q. Identify the ethical principle requiring voluntary agreement:
Informed Consent (based on principle of Autonomy)
Elements: Disclosure, comprehension, voluntariness, competence, consent

Spotter 4: SMART Objectives

Q. What does SMART mean in Research?
LetterMeaning
SSpecific
MMeasurable
AAchievable / Attainable
RRelevant / Realistic
TTime-bound

Spotter 5: Community Diagnosis Project Research Design

Q. Classify the research design used in Community Diagnosis Project:
Cross-sectional / Descriptive study design
Justification:
  • Data collected at ONE point in time (single time point)
  • No follow-up or intervention
  • Measures prevalence of disease/health conditions
  • Describes health status of a community
  • Used to identify health problems and needs

🧴 SECTION 8: OTHER PROGRAMME ITEMS

Iodized Salt

Q. Identify: Iodized Salt
Recommended iodization levels:
  • At production level: 30 ppm (parts per million)
  • At consumer level: 15 ppm
Uses in public health:
  • Prevention of Iodine Deficiency Disorders (IDD): goitre, cretinism, mental retardation, hypothyroidism, deaf-mutism

Zinc Supplementation

Dose for diarrhoea management:
  • Infants < 6 months: 10 mg/day for 10-14 days
  • Children > 6 months: 20 mg/day for 10-14 days
Three important functions of Zinc:
  1. Immune function
  2. Growth and development
  3. Wound healing / enzyme cofactor

IFA (Iron Folic Acid) Tablet

Adult IFA tablet: 100 mg elemental iron + 500 mcg folic acid Paediatric IFA tablet: 20 mg elemental iron + 100 mcg folic acid Aim: Prevention and control of Iron Deficiency Anaemia (IDA)

Albendazole Tablet

Aim: Reduce and control childhood anaemia / parasitic infestation (deworming) Given with: Vitamin A in children 1-5 years (biannually)

⚑ QUICK RECALL CARD FOR EXAM MORNING

Spotter seenAnswer
Coloured tape (red/yellow/green)Shakir Tape - MUAC assessment
Pale triangular patch on eyeBitot's Spots - Vitamin A deficiency
Bluish-white mouth spotsKoplik's Spots - Measles
Bowed legs in childRickets - Vitamin D deficiency
Pleomorphic rash (all stages)Chickenpox
Foamy cells in liver histologyNiemann-Pick
ORS packetGlucose 75, Na 75, K 20, Cl 65 mEq/L
BCG syringe/vialLive attenuated, ID, left deltoid, birth
Growth chart with 2 curvesRoad-to-health chart; space between = normal
Pyramid with levelsEvidence hierarchy - systematic review at top
Bar chart (gaps between bars)Discrete/categorical data
Histogram (no gaps)Continuous data
SMART objectiveSpecific Measurable Achievable Relevant Time-bound
Helsinki declarationResearch ethics cornerstone
Informed consent principleAutonomy / Voluntariness

All the best for your PSM practical exam tomorrow! 🌟

Create a downloadable PDF with all spotter answers for quick revision

Running Command

mkdir -p /home/daytona/workspace/psm-spotters && echo "done"

Writing File

~/psm-spotters/generate_psm_pdf.py

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

OUTPUT = "/home/daytona/workspace/psm-spotters/PSM_Spotter_Answers.pdf"

doc = SimpleDocTemplate(
    OUTPUT, pagesize=A4,
    rightMargin=1.4*cm, leftMargin=1.4*cm,
    topMargin=1.4*cm, bottomMargin=1.4*cm,
)

# ── colours ───────────────────────────────────────────────────────────────────
NAVY      = colors.HexColor("#0f172a")
DARK_BLUE = colors.HexColor("#1e3a5f")
MED_BLUE  = colors.HexColor("#1d4ed8")
BLUE_BG   = colors.HexColor("#dbeafe")
ICE_BLUE  = colors.HexColor("#eff6ff")
TEAL      = colors.HexColor("#0f766e")
TEAL_BG   = colors.HexColor("#ccfbf1")
TEAL_ICE  = colors.HexColor("#f0fdfa")
GREEN     = colors.HexColor("#15803d")
GREEN_BG  = colors.HexColor("#dcfce7")
PURPLE    = colors.HexColor("#6d28d9")
PURPLE_BG = colors.HexColor("#ede9fe")
ORANGE    = colors.HexColor("#c2410c")
ORANGE_BG = colors.HexColor("#ffedd5")
WINE      = colors.HexColor("#9d174d")
PINK_BG   = colors.HexColor("#fce7f3")
GOLD      = colors.HexColor("#92400e")
YELLOW_BG = colors.HexColor("#fef3c7")
RED       = colors.HexColor("#b91c1c")
RED_BG    = colors.HexColor("#fee2e2")
SLATE     = colors.HexColor("#334155")
MID_GREY  = colors.HexColor("#94a3b8")
LIGHT_GREY= colors.HexColor("#f1f5f9")
WHITE     = colors.white

# ── styles ────────────────────────────────────────────────────────────────────
ss = getSampleStyleSheet()

def ps(name, **kw):
    return ParagraphStyle(name, parent=kw.pop("parent", ss["Normal"]), **kw)

title_s   = ps("T", fontSize=20, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=2)
sub_s     = ps("S", fontSize=9,  textColor=colors.HexColor("#bfdbfe"), fontName="Helvetica", alignment=TA_CENTER)
sec_s     = ps("SC", fontSize=11, textColor=WHITE, fontName="Helvetica-Bold")
subsec_s  = ps("SS", fontSize=10, textColor=WHITE, fontName="Helvetica-Bold")
q_s       = ps("Q",  fontSize=8.5, textColor=DARK_BLUE, fontName="Helvetica-Bold", leading=13, leftIndent=4)
a_s       = ps("A",  fontSize=8.5, textColor=SLATE,     fontName="Helvetica",      leading=13, leftIndent=4)
bold_a    = ps("BA", fontSize=8.5, textColor=SLATE,     fontName="Helvetica-Bold", leading=13, leftIndent=4)
mem_s     = ps("M",  fontSize=8,   textColor=colors.HexColor("#78350f"), fontName="Helvetica-Bold", leading=12, leftIndent=6)
note_s    = ps("N",  fontSize=7.5, textColor=DARK_BLUE, fontName="Helvetica-Oblique", leading=11)
hcell     = ps("HC", fontSize=8,   textColor=WHITE,     fontName="Helvetica-Bold", alignment=TA_CENTER, leading=10)
cell_c    = ps("CC", fontSize=7.5, textColor=SLATE,     fontName="Helvetica",      alignment=TA_CENTER, leading=10)
cell_l    = ps("CL", fontSize=7.5, textColor=SLATE,     fontName="Helvetica",      alignment=TA_LEFT,   leading=10)
cell_b    = ps("CB", fontSize=7.5, textColor=SLATE,     fontName="Helvetica-Bold", alignment=TA_LEFT,   leading=10)

def sp(h=0.18): return Spacer(1, h*cm)

def banner(text, color=DARK_BLUE, fs=11):
    p = ps("bn_"+text[:4], fontSize=fs, textColor=WHITE, fontName="Helvetica-Bold", leading=14)
    t = Table([[Paragraph(text, p)]], colWidths=["100%"])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),color),
        ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),9),("RIGHTPADDING",(0,0),(-1,-1),9),
    ]))
    return t

def subbanner(text, color=TEAL):
    p = ps("sb_"+text[:4], fontSize=9, textColor=WHITE, fontName="Helvetica-Bold", leading=12)
    t = Table([[Paragraph(text, p)]], colWidths=["100%"])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),color),
        ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
        ("LEFTPADDING",(0,0),(-1,-1),8),
    ]))
    return t

def qa_block(q, a, q_color=DARK_BLUE, bg=ICE_BLUE):
    qp = ps("qb_"+q[:3], fontSize=8.5, textColor=q_color, fontName="Helvetica-Bold", leading=13)
    ap = ps("ab_"+q[:3], fontSize=8.5, textColor=SLATE, fontName="Helvetica", leading=13)
    t = Table([[Paragraph("Q. "+q, qp)],[Paragraph("➀ "+a, ap)]], colWidths=["100%"])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),bg),
        ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),3),
        ("LEFTPADDING",(0,0),(-1,-1),8),("RIGHTPADDING",(0,0),(-1,-1),6),
        ("LINEBEFORE",(0,0),(0,-1),3,q_color),
    ]))
    return t

def memory_box(text, color=GOLD):
    p = ps("mem"+text[:3], fontSize=8.5, textColor=color, fontName="Helvetica-Bold", leading=12)
    t = Table([[Paragraph("🧠  "+text, p)]], colWidths=["100%"])
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),YELLOW_BG),
        ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
        ("LEFTPADDING",(0,0),(-1,-1),8),
        ("BOX",(0,0),(-1,-1),1,color),
    ]))
    return t

def simple_table(header_row, data_rows, col_widths, hdr_color=DARK_BLUE, row_colors=None):
    all_rows = [[Paragraph(c, hcell) for c in header_row]]
    for row in data_rows:
        all_rows.append([Paragraph(str(c), cell_l if i==0 else cell_c) for i, c in enumerate(row)])
    t = Table(all_rows, colWidths=col_widths, repeatRows=1)
    rc = row_colors or [WHITE, LIGHT_GREY]
    t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0),hdr_color),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),rc),
        ("GRID",(0,0),(-1,-1),0.35,colors.HexColor("#cbd5e1")),
        ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
        ("LEFTPADDING",(0,0),(-1,-1),5),("RIGHTPADDING",(0,0),(-1,-1),4),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
    ]))
    return t

# ═══════════════════════════════════════════════════════════════════════════
story = []

# ── TITLE ──────────────────────────────────────────────────────────────────
hdr = Table([
    [Paragraph("PSM Practical Exam – Spotter Answers", title_s)],
    [Paragraph("MBBS 2nd Year  |  Dr. Narendra Kumar Yadav  |  Complete Quick-Revision Guide", sub_s)],
], colWidths=["100%"])
hdr.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,-1),NAVY),
    ("TOPPADDING",(0,0),(0,0),14),("BOTTOMPADDING",(0,1),(-1,-1),12),
    ("LEFTPADDING",(0,0),(-1,-1),10),
]))
story.append(hdr)
story.append(sp(0.3))

# ═══════════════════ SECTION 1: ORS ════════════════════════════════════════
story.append(banner("1.  ORS – Oral Rehydration Solution", DARK_BLUE))
story.append(sp(0.15))
story.append(qa_block("Identify the given spot?","ORS – Oral Rehydration Solution (WHO Low-Osmolarity, 2003)",DARK_BLUE,ICE_BLUE))
story.append(sp(0.1))
story.append(qa_block("Use in national health programme?","Management of dehydration in acute diarrhoea & dysentery (CDD Programme)",DARK_BLUE,ICE_BLUE))
story.append(sp(0.1))
story.append(qa_block("Two public health uses?","1. Treatment of dehydration in diarrhoea  |  2. Prevention of dehydration before hospital referral",DARK_BLUE,ICE_BLUE))
story.append(sp(0.12))

ors_rows = [
    ["Sodium chloride (NaCl)","2.6 g/L","Sodium (Na⁺)","75 mEq/L"],
    ["Glucose (anhydrous)","13.5 g/L","Glucose","75 mmol/L"],
    ["Potassium chloride (KCl)","1.5 g/L","Potassium (K⁺)","20 mEq/L"],
    ["Trisodium citrate","2.9 g/L","Chloride (Cl⁻)","65 mEq/L"],
    ["Total osmolarity","245 mOsm/L","β€”","β€”"],
]
story.append(simple_table(["Ingredient","Amount","Electrolyte","Concentration"],ors_rows,
    [4.5*cm,3.0*cm,4.5*cm,3.5*cm], DARK_BLUE))
story.append(sp(0.1))
story.append(memory_box("Home ORS: 1 L water + 1 tsp salt + 8 tsp sugar  |  'NaKa Glucose' = NaCl, KCl, Glucose, Citrate"))
story.append(sp(0.3))

# ═══════════════════ SECTION 2: VACCINES ═══════════════════════════════════
story.append(banner("2.  VACCINES – National Immunisation Schedule (Nepal)", TEAL))
story.append(sp(0.15))

# BCG
story.append(subbanner("BCG Vaccine (Bacille Calmette-GuΓ©rin)", TEAL))
story.append(sp(0.1))
bcg_rows=[
    ["Type","Live attenuated bacterial vaccine","Strain","Danish-1331"],
    ["Diluent","Normal saline","Schedule","At BIRTH (as early as possible)"],
    ["Dose","0.05 mL (neonates) / 0.1 mL","Route","Intradermal (ID)"],
    ["Site","Left deltoid (Nepal: R. deltoid)","Duration","20 years protection"],
    ["Contraindications","HIV/AIDS, immunodeficiency, active TB","Complication","Suppurative lymphadenitis"],
]
t = Table(bcg_rows, colWidths=[2.8*cm,5.5*cm,2.8*cm,5.4*cm])
t.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[TEAL_BG, WHITE]),
    ("FONTNAME",(0,0),(0,-1),"Helvetica-Bold"),("FONTNAME",(2,0),(2,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",(0,0),(0,-1),TEAL),("TEXTCOLOR",(2,0),(2,-1),TEAL),
    ("FONTSIZE",(0,0),(-1,-1),7.5),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#99f6e4")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(t)
story.append(sp(0.1))
story.append(Paragraph("Efficacy: Pulmonary TB = 0%  |  Severe TB (meningitis/miliary) = 50%  |  Leprosy = 30%", note_s))
story.append(sp(0.08))
story.append(Paragraph("Post-vaccination: 2-3wk Papule β†’ 6-8wk Ulcer β†’ 6-12wk Permanent scar β†’ 8-14wk Mantoux +ve", note_s))
story.append(sp(0.2))

# MMR
story.append(subbanner("MMR Vaccine (Measles–Mumps–Rubella)", TEAL))
story.append(sp(0.1))
mmr_rows=[
    ["Type","Live attenuated","Strain","Edmonston Zagreb S"],
    ["Schedule","9 months + 15 months","Route","Subcutaneous (S/C)"],
    ["Site","Right arm","Diluent","Distilled / Sterile water"],
]
t2=Table(mmr_rows,colWidths=[2.8*cm,5.5*cm,2.8*cm,5.4*cm])
t2.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[TEAL_BG,WHITE]),
    ("FONTNAME",(0,0),(0,-1),"Helvetica-Bold"),("FONTNAME",(2,0),(2,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",(0,0),(0,-1),TEAL),("TEXTCOLOR",(2,0),(2,-1),TEAL),
    ("FONTSIZE",(0,0),(-1,-1),7.5),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#99f6e4")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(t2)
story.append(sp(0.2))

# HPV
story.append(subbanner("HPV Vaccine", TEAL))
story.append(sp(0.1))
story.append(qa_block("Which non-communicable disease does this prevent?","Cervical Cancer (caused by HPV types 16 & 18)",TEAL,TEAL_ICE))
story.append(sp(0.08))
story.append(qa_block("Target age group?","9–14 years girls (before sexual debut) – 2 doses",TEAL,TEAL_ICE))
story.append(sp(0.2))

# Syringes
story.append(subbanner("Syringes", TEAL))
story.append(sp(0.1))
syr_rows=[
    ["2 mL Disposable Syringe","Immunization / vaccination  |  Administration of antibiotics"],
    ["Insulin Disposable Syringe","Insulin administration in diabetics  |  Small-dose drug injection"],
    ["Tuberculin Syringe (0.1 mL)","BCG vaccination (intradermal)  |  Mantoux test"],
]
ts=Table([[Paragraph("Syringe",hcell),Paragraph("Two Public Health Uses",hcell)]]+
         [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_l)] for r in syr_rows],
         colWidths=[5.5*cm,12.0*cm],repeatRows=1)
ts.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),TEAL),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,TEAL_BG]),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#99f6e4")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(ts)
story.append(sp(0.3))

# ═══════════════════ PAGE BREAK ════════════════════════════════════════════
story.append(PageBreak())

# ═══════════════════ SECTION 3: DISEASE MODELS ════════════════════════════
story.append(banner("3.  DISEASE MODELS / CLINICAL SPOTTERS", WINE))
story.append(sp(0.15))

# Measles
story.append(subbanner("Measles (Rubeola)", WINE))
story.append(sp(0.1))
meas=[
    ["Causative agent","RNA Paramyxovirus","Incubation period","10–14 days (range 7–18 days)"],
    ["Mode of transmission","Droplet / airborne / direct contact","Most common age","6 months – 5 years"],
]
tm=Table(meas,colWidths=[3.0*cm,5.3*cm,3.0*cm,5.2*cm])
tm.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[PINK_BG,WHITE]),
    ("FONTNAME",(0,0),(0,-1),"Helvetica-Bold"),("FONTNAME",(2,0),(2,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",(0,0),(0,-1),WINE),("TEXTCOLOR",(2,0),(2,-1),WINE),
    ("FONTSIZE",(0,0),(-1,-1),7.5),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#fbcfe8")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(tm)
story.append(sp(0.1))
story.append(Paragraph("Koplik's Spots (Pathognomonic): Small bluish-white spots on red base (table salt crystals) on buccal mucosa opposite 1st & 2nd molar β€” appear 1-2 days BEFORE rash", note_s))
story.append(sp(0.06))
story.append(Paragraph("Rash: Maculopapular – starts at hairline β†’ face β†’ downward (cephalocaudal spread)", note_s))
story.append(sp(0.1))
comp_rows=[["Otitis media (MOST COMMON)","Diarrhoea","Pneumonia","SSPE (rare, late)"]]
tc=Table([[Paragraph("Complications",hcell),Paragraph("Otitis Media (M/C)",cell_c),Paragraph("Diarrhoea",cell_c),Paragraph("Pneumonia",cell_c),Paragraph("SSPE (rare/late)",cell_c)]],
         colWidths=[3.0*cm,3.8*cm,3.8*cm,3.0*cm,3.9*cm])
tc.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(0,0),WINE),("BACKGROUND",(1,0),(-1,0),PINK_BG),
    ("FONTSIZE",(0,0),(-1,-1),7.5),("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#fbcfe8")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(tc)
story.append(sp(0.08))
story.append(Paragraph("Prevention: Active immunization (MR/MMR vaccine) | Passive (Immunoglobulin 0.25 mL/kg) | Isolation | Oral Vit A | Health education", note_s))
story.append(sp(0.2))

# Chickenpox
story.append(subbanner("Chickenpox (Varicella)", WINE))
story.append(sp(0.1))
cpox=[
    ["Causative agent","Varicella-Zoster Virus (VZV) – DNA herpesvirus","Incubation","14–21 days"],
    ["Transmission","Droplet, airborne, direct vesicle contact","Characteristic rash","PLEOMORPHIC – all stages together"],
]
tcp=Table(cpox,colWidths=[3.0*cm,5.3*cm,3.0*cm,5.2*cm])
tcp.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[PINK_BG,WHITE]),
    ("FONTNAME",(0,0),(0,-1),"Helvetica-Bold"),("FONTNAME",(2,0),(2,-1),"Helvetica-Bold"),
    ("TEXTCOLOR",(0,0),(0,-1),WINE),("TEXTCOLOR",(2,0),(2,-1),WINE),
    ("FONTSIZE",(0,0),(-1,-1),7.5),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#fbcfe8")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(tcp)
story.append(sp(0.1))
story.append(simple_table(
    ["Feature","Chickenpox","Smallpox"],
    [["Distribution","Centripetal (trunk > face/limbs)","Centrifugal (face/limbs > trunk)"],
     ["Rash stages","All stages at same time (pleomorphic)","All at same stage (monomorphic)"],
     ["Depth","Superficial","Deep"],
     ["Scarring","Rare","Common (pitted scars)"]],
    [3.0*cm,7.0*cm,6.5*cm], WINE, [WHITE, PINK_BG]))
story.append(sp(0.2))

# Rickets
story.append(subbanner("Rickets", WINE))
story.append(sp(0.1))
story.append(qa_block("Identify?","Rickets – Vitamin D deficiency in children",WINE,PINK_BG))
story.append(sp(0.08))
story.append(qa_block("Vitamin deficiency?","Vitamin D deficiency β†’ poor calcium absorption β†’ defective bone mineralisation",WINE,PINK_BG))
story.append(sp(0.08))
story.append(Paragraph("Clinical features: Bow legs (genu varum) | Rachitic rosary | Harrison's sulcus | Craniotabes | Delayed dentition", note_s))
story.append(sp(0.06))
story.append(Paragraph("Prevention: Sunlight exposure (UV-B) | Vit D 400 IU/day for infants | Fortified foods (milk, cereals) | Fish liver oil, egg yolk", note_s))
story.append(sp(0.3))

# ═══════════════════ PAGE BREAK ════════════════════════════════════════════
story.append(PageBreak())

# ═══════════════════ SECTION 4: NUTRITION ════════════════════════════════
story.append(banner("4.  NUTRITION SPOTTERS", GREEN))
story.append(sp(0.15))

# Vitamin A
story.append(subbanner("Vitamin A (Capsule / Syrup)", GREEN))
story.append(sp(0.1))
story.append(Paragraph("Functions: Vision (rhodopsin / night vision) | Immune function | Skin & mucous membrane integrity | Growth & development", a_s))
story.append(sp(0.06))
story.append(Paragraph("Deficiency: Night blindness (earliest) β†’ Bitot's spots β†’ Xerophthalmia β†’ Keratomalacia (corneal ulceration = blindness)", a_s))
story.append(sp(0.06))
story.append(Paragraph("Sources: Liver, egg, milk, butter (preformed Vit A) | Carrot, mango, papaya, green leafy veg (beta-carotene)", a_s))
story.append(sp(0.1))
story.append(subbanner("National Vitamin A Programme (Nepal, 1998) – Aim: Prevent nutritional blindness", GREEN))
story.append(sp(0.08))
vita_rows=[
    ["6 months – 1 year","1,00,000 IU (1 lakh)","Oral","Every 6 months"],
    ["1 year – 5 years","2,00,000 IU (2 lakh) + Albendazole","Oral","Every 6 months (biannually)"],
    ["Rounds","Kartik (Round 1) & Baisakh (Round 2)","Total doses","9 doses = 17 lakh IU total"],
]
story.append(simple_table(["Age Group","Dose","Route","Frequency"],vita_rows,
    [3.5*cm,5.5*cm,2.5*cm,5.0*cm],GREEN))
story.append(sp(0.2))

# Bitot's spots
story.append(subbanner("Bitot's Spots", GREEN))
story.append(sp(0.1))
story.append(qa_block("Identify?","Bitot's Spots – triangular/oval foamy silvery-white patch on conjunctiva (sclera), lateral to cornea",GREEN,GREEN_BG))
story.append(sp(0.08))
story.append(qa_block("Vitamin deficiency?","Vitamin A deficiency (WHO Stage X1B Xerophthalmia)",GREEN,GREEN_BG))
story.append(sp(0.1))
xero_rows=[
    ["X1A","Conjunctival xerosis (dry)"],["X1B","Bitot's spots ← THIS SPOTTER"],
    ["X2","Corneal xerosis"],["X3A","Corneal ulcer <1/3"],
    ["X3B","Keratomalacia >1/3 cornea"],["XS","Corneal scar"],["XN","Night blindness"],
]
txe=Table([[Paragraph("Stage",hcell),Paragraph("Description",hcell)]]+
          [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_l)] for r in xero_rows],
          colWidths=[2.5*cm,15.0*cm],repeatRows=1)
txe.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),GREEN),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,GREEN_BG]),
    ("BACKGROUND",(0,2),(-1,2),colors.HexColor("#bbf7d0")),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#86efac")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(txe)
story.append(sp(0.2))

# Shakir tape
story.append(subbanner("Shakir Tape (MUAC Tape)", GREEN))
story.append(sp(0.1))
story.append(qa_block("Identify?","Shakir Tape / MUAC Tape – Mid-Upper Arm Circumference Tape",GREEN,GREEN_BG))
story.append(sp(0.08))
story.append(qa_block("Uses?","Assessment of protein-energy malnutrition (PEM) in children 1–5 years | Community screening for malnutrition",GREEN,GREEN_BG))
story.append(sp(0.1))
muac_rows=[
    ["RED (< 12.5 cm)","Severe Acute Malnutrition (SAM)"],
    ["YELLOW (12.5–13.5 cm)","Moderate Acute Malnutrition (MAM) / Borderline"],
    ["GREEN (> 13.5 cm)","Normal / Well-nourished"],
]
tm2=Table([[Paragraph("Colour / MUAC",hcell),Paragraph("Interpretation",hcell)]]+
          [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_l)] for r in muac_rows],
          colWidths=[5.5*cm,12.0*cm],repeatRows=1)
tm2.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),GREEN),
    ("BACKGROUND",(0,1),(-1,1),colors.HexColor("#fee2e2")),
    ("BACKGROUND",(0,2),(-1,2),YELLOW_BG),
    ("BACKGROUND",(0,3),(-1,3),GREEN_BG),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#86efac")),
    ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),6),
]))
story.append(tm2)
story.append(sp(0.2))

# BMI
story.append(subbanner("BMI – Body Mass Index", GREEN))
story.append(sp(0.1))
story.append(Paragraph("Formula: BMI = Weight (kg) Γ· HeightΒ² (mΒ²)", bold_a))
story.append(sp(0.08))
bmi_rows=[
    ["< 18.5","Underweight"],["18.5 – 24.9","Normal (Healthy weight)"],
    ["25.0 – 29.9","Overweight"],["30.0 – 34.9","Obese Class I"],
    ["35.0 – 39.9","Obese Class II"],["β‰₯ 40","Obese Class III (Morbid obesity)"],
]
tb=Table([[Paragraph("BMI (kg/mΒ²)",hcell),Paragraph("WHO Classification",hcell)]]+
         [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_l)] for r in bmi_rows],
         colWidths=[4.5*cm,13.0*cm],repeatRows=1)
tb.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),GREEN),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,GREEN_BG]),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#86efac")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
]))
story.append(tb)
story.append(sp(0.1))
story.append(memory_box("Asian cut-off: Overweight β‰₯ 23  |  Obese β‰₯ 27.5 kg/mΒ²"))
story.append(sp(0.2))

# Growth Chart
story.append(subbanner("Growth Chart (Road-to-Health Chart)", GREEN))
story.append(sp(0.1))
story.append(qa_block("Identify?","WHO Growth Chart / Road-to-Health Chart – graphical representation of child weight vs age",GREEN,GREEN_BG))
story.append(sp(0.08))
story.append(qa_block("Upper Reference Curve (URC)?","50th percentile for BOYS",GREEN,GREEN_BG))
story.append(sp(0.08))
story.append(qa_block("Lower Reference Curve (LRC)?","3rd percentile for GIRLS",GREEN,GREEN_BG))
story.append(sp(0.08))
story.append(qa_block("Road to Health?","Space BETWEEN the 2 curves = Zone of normality for most children",GREEN,GREEN_BG))
story.append(sp(0.08))
story.append(Paragraph("Uses: Growth monitoring | Nutritional status assessment | Early identification of high-risk children | Health education for mothers | Policy planning | Programme evaluation", a_s))
story.append(sp(0.2))

# ═══════════════════ PAGE BREAK ════════════════════════════════════════════
story.append(PageBreak())

# ═══════════════════ SECTION 5: FOOD ITEMS ════════════════════════════════
story.append(banner("5.  FOOD ITEM SPOTTERS – Nutritive Values", ORANGE))
story.append(sp(0.15))

food_rows=[
    ["Rice","6.5 g","75 g","0.5 g","350","Lysine (LAA)","Polished rice β†’ Beriberi (Vit B1 lost)"],
    ["Wheat","12 g","72 g","1.5 g","350","Threonine & Lysine","Refined flour (Maida) β†’ poor nutrition"],
    ["Maize","12 g","65 g","3.5 g","345","Tryptophan & Lysine","Excess β†’ Pellagra (3Ds)"],
    ["Pulses (Dal)","22 g","60 g","2 g","330","Methionine & Cysteine","Poor man's meat; NPU < animal protein"],
    ["Soybean","43 g","20 g","19 g","430","β€”","Richest protein among pulses"],
    ["Egg","13 g","Nil","13 g","170","β€”","Reference protein; NPU=96; all 9 EAA"],
    ["Milk","3 g","(lactose)","4 g","70","β€”","Rich Ca; Poor Fe; NPU=75; casein 85%"],
]
story.append(simple_table(
    ["Food\n(100 g)","Protein","Carb","Fat","Energy\n(kcal)","Limiting AA","Public Health Note"],
    food_rows,
    [1.8*cm,1.6*cm,1.6*cm,1.3*cm,1.8*cm,3.2*cm,6.2*cm],
    ORANGE))
story.append(sp(0.12))
story.append(memory_box("Limiting AAs: Maize = Tryptophan+Lysine | Wheat = Threonine+Lysine | Pulses = Methionine+Cysteine"))
story.append(sp(0.15))

# Pellagra box
pellagra_rows=[
    ["Disease caused by excess maize","Pellagra – Niacin (Vit B3) deficiency"],
    ["Mechanism","Excess leucine in maize blocks tryptophan β†’ niacin conversion\n60 mg tryptophan = 1 mg niacin"],
    ["Classic signs","3 Ds: Dermatitis + Diarrhoea + Dementia (+ 4th D = Death if untreated)"],
    ["Advantage of parboiled over polished rice","Parboiling drives B vitamins into grain core – not lost during milling"],
    ["Advantage of germinated pulses","Increases protein digestibility & Vit C content"],
    ["Why egg protein = Reference protein?","Contains all 9 essential amino acids in ideal proportion; NPU = 96"],
]
tp=Table(pellagra_rows,colWidths=[5.5*cm,12.0*cm])
tp.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1),[ORANGE_BG,WHITE]),
    ("FONTNAME",(0,0),(0,-1),"Helvetica-Bold"),("TEXTCOLOR",(0,0),(0,-1),ORANGE),
    ("FONTSIZE",(0,0),(-1,-1),7.5),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#fed7aa")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(tp)
story.append(sp(0.15))

# Energy requirements
story.append(subbanner("Energy & Protein Requirements (ICMR 2011)", ORANGE))
story.append(sp(0.1))
energy_rows=[
    ["Adult male – sedentary","2320","65"],
    ["Adult male – moderate","2730","65"],
    ["Adult male – heavy work","3490","65"],
    ["Adult female – sedentary","1900","55"],
    ["Pregnancy (extra above female)","+ 350","+ 23"],
    ["Lactation 0–6 months (extra)","+ 600","+ 19"],
    ["Lactation 6–12 months (extra)","+ 520","+ 13"],
    ["Infants 0–6 months","92 kcal/kg/day","1.16 g/kg/day"],
    ["Infants 6–12 months","80 kcal/kg/day","1.69 g/kg/day"],
]
story.append(simple_table(["Group","Energy (kcal/day)","Protein (g/day)"],energy_rows,
    [8.0*cm,5.0*cm,4.5*cm],ORANGE))
story.append(sp(0.2))

# ═══════════════════ SECTION 6: ANTISEPTICS ═══════════════════════════════
story.append(banner("6.  ANTISEPTICS & PROGRAMME ITEMS", PURPLE))
story.append(sp(0.15))

anti_rows=[
    ["Betadine (Povidone-iodine)","Povidone-iodine 10% (= 1% available iodine)","Wound cleaning | Pre-operative skin prep | Skin infections"],
    ["Dettol Solution","Chloroxylenol 4.8% + pine oil + castor oil soap","Wound antiseptic | Instrument disinfection | Hand washing"],
    ["Savlon","Chlorhexidine gluconate 1.5% + Cetrimide 15%","Wound cleaning | Skin disinfection before injections"],
    ["Iodized Salt","Iodine: 30 ppm (production) / 15 ppm (consumer)","Prevention of IDD: goitre, cretinism, mental retardation, hypothyroidism"],
    ["IFA Tablet (Adult)","100 mg elemental iron + 500 mcg folic acid","Prevention of Iron Deficiency Anaemia (IDA)"],
    ["IFA Tablet (Paediatric)","20 mg elemental iron + 100 mcg folic acid","Prevention of childhood anaemia"],
    ["Albendazole Tablet","400 mg (single dose deworming)","Reduce parasitic infestation & childhood anaemia; given with Vit A"],
    ["Zinc Supplement","<6 mo: 10 mg/day  |  >6 mo: 20 mg/day for 10–14 days","Diarrhoea management; immune function; growth; wound healing"],
]
ta=Table([[Paragraph(h,hcell) for h in ["Item","Composition","Public Health Use"]]]+
         [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_l),Paragraph(r[2],cell_l)] for r in anti_rows],
         colWidths=[3.0*cm,5.5*cm,9.0*cm],repeatRows=1)
ta.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),PURPLE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,PURPLE_BG]),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#c4b5fd")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(ta)
story.append(sp(0.3))

# ═══════════════════ SECTION 7: STATISTICS ════════════════════════════════
story.append(banner("7.  STATISTICS SPOTTERS", MED_BLUE))
story.append(sp(0.15))

stat_rows=[
    ["Pie Chart","Circle divided into sectors","Discrete/categorical data","Shows proportions/percentages of a whole"],
    ["Bar Diagram","Bars with GAPS between them","Discrete/categorical data","Compares quantities across separate categories"],
    ["Histogram","Bars with NO GAPS (touching)","Continuous data","Shows frequency distribution; class intervals on X-axis"],
    ["Frequency Polygon","Line joining midpoints of histogram bars","Continuous data","Shows distribution of continuous data"],
    ["Line Graph","Points joined by lines","Time-series / continuous data","Shows trends over time"],
    ["Scatter Diagram","Dots plotted on X-Y axes","Two continuous variables","Shows correlation between two variables"],
]
story.append(simple_table(
    ["Diagram","Appearance","Data Type","Use"],
    stat_rows,
    [2.5*cm,4.5*cm,3.5*cm,7.0*cm],MED_BLUE))
story.append(sp(0.12))
story.append(memory_box("Bar = GAPS (discrete/categories)  |  Histogram = NO GAPS (continuous)  |  Pie = Parts of a WHOLE"))
story.append(sp(0.3))

# ═══════════════════ SECTION 8: RESEARCH METHODOLOGY ════════════════════
story.append(banner("8.  RESEARCH METHODOLOGY SPOTTERS", colors.HexColor("#4f46e5")))
story.append(sp(0.15))

# Evidence pyramid
story.append(subbanner("Evidence Pyramid / Hierarchy of Evidence", colors.HexColor("#4f46e5")))
story.append(sp(0.1))
evid_rows=[
    ["1 (TOP)","Systematic Reviews & Meta-analyses","Combines results of multiple RCTs; maximum statistical power; minimises bias"],
    ["2","Randomised Controlled Trials (RCTs)","Gold standard for causation; random allocation eliminates confounding"],
    ["3","Cohort Studies","Prospective; follows exposed vs unexposed"],
    ["4","Case-Control Studies","Retrospective; cases vs controls"],
    ["5","Cross-sectional Studies","Prevalence; snapshot at one time point"],
    ["6","Case Reports / Series","Individual patient observations"],
    ["7 (BOTTOM)","Expert Opinion / Editorials","Lowest quality; subject to bias"],
]
te=Table([[Paragraph(h,hcell) for h in ["Level","Study Type","Why this level?"]]]+
         [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_b),Paragraph(r[2],cell_l)] for r in evid_rows],
         colWidths=[1.5*cm,5.5*cm,10.5*cm],repeatRows=1)
te.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),colors.HexColor("#4f46e5")),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,PURPLE_BG]),
    ("BACKGROUND",(0,1),(-1,1),colors.HexColor("#c7d2fe")),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#c4b5fd")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(te)
story.append(sp(0.15))

# Research spotters
rm_rows=[
    ["Declaration of Helsinki","WMA 1964 – cornerstone document for ETHICAL PRINCIPLES in medical research involving human subjects",
     "Spotter 2"],
    ["Informed Consent","Ethical principle requiring VOLUNTARY AGREEMENT from participants (based on principle of Autonomy)\nElements: Disclosure, Comprehension, Voluntariness, Competence, Consent",
     "Spotter 3"],
    ["SMART Objectives","Specific | Measurable | Achievable | Relevant | Time-bound","Spotter 4"],
    ["Community Diagnosis\nResearch Design","CROSS-SECTIONAL (Descriptive) study design\nData at ONE time point | No follow-up | Measures prevalence | Describes community health status",
     "Spotter 5"],
    ["Types of Reasoning","Deductive (general β†’ specific, hypothesis-testing)\nInductive (specific β†’ general, pattern recognition)","β€”"],
]
trm=Table([[Paragraph(h,hcell) for h in ["Spotter","Answer","Ref"]]]+
          [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_l),Paragraph(r[2],cell_c)] for r in rm_rows],
          colWidths=[3.5*cm,12.5*cm,1.5*cm],repeatRows=1)
trm.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),colors.HexColor("#4f46e5")),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,PURPLE_BG]),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#c4b5fd")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(trm)
story.append(sp(0.3))

# ═══════════════════ PAGE BREAK ════════════════════════════════════════════
story.append(PageBreak())

# ═══════════════════ SECTION 9: QUICK REFERENCE ═══════════════════════════
story.append(banner("9.  EXAM MORNING QUICK-RECALL TABLE", RED))
story.append(sp(0.15))

qr_rows=[
    ["Coloured tape (red/yellow/green)","Shakir Tape – MUAC assessment; Red=SAM, Yellow=MAM, Green=Normal"],
    ["Pale triangular patch on eye (sclera)","Bitot's Spots – Vitamin A deficiency"],
    ["Bluish-white spots in mouth","Koplik's Spots – MEASLES (pathognomonic)"],
    ["Bowed legs in child","Rickets – Vitamin D deficiency"],
    ["Pleomorphic rash (all stages at once)","Chickenpox – Varicella-Zoster Virus"],
    ["ORS packet","Glucose 75 + Na 75 + K 20 + Cl 65 mEq/L | Osmolarity 245 mOsm/L"],
    ["BCG vial + tuberculin syringe","Live attenuated | ID | Left deltoid | At birth | Strain: Danish-1331"],
    ["MMR vial","Live attenuated | S/C | Right arm | 9 months + 15 months"],
    ["HPV vaccine","Prevents cervical cancer | 9–14 yr girls | 2 doses"],
    ["Growth chart with 2 curves","Road-to-Health chart | Upper = 50th %ile boys | Lower = 3rd %ile girls"],
    ["Bar chart (gaps between bars)","Discrete/categorical data"],
    ["Histogram (no gaps)","Continuous data – class intervals on X-axis"],
    ["Pie chart","Parts of a whole – discrete/categorical data"],
    ["Pyramid with study types","Evidence hierarchy – Systematic review at TOP"],
    ["SMART","Specific | Measurable | Achievable | Relevant | Time-bound"],
    ["Helsinki Declaration","WMA 1964 – research ethics cornerstone"],
    ["Informed consent principle","Autonomy – voluntary agreement before participation"],
    ["Community Diagnosis design","Cross-sectional (descriptive) study design"],
    ["Iodized salt","30 ppm production | 15 ppm consumer | Prevents IDD/goitre/cretinism"],
    ["Zinc dose in diarrhoea","<6 mo: 10 mg/day | >6 mo: 20 mg/day | Duration: 10–14 days"],
    ["IFA adult tablet","100 mg iron + 500 mcg folic acid | Prevents IDA"],
    ["Albendazole","400 mg single dose | Deworming | Given with Vit A biannually"],
    ["Shakir Tape colours","Red <12.5 cm = SAM | Yellow 12.5–13.5 = MAM | Green >13.5 = Normal"],
    ["Pellagra (excess maize)","3 Ds: Dermatitis + Diarrhoea + Dementia | Niacin deficiency"],
    ["Reference protein","Egg (NPU=96, all 9 essential amino acids)"],
    ["Richest protein in pulses","Soybean – 43 g protein per 100 g"],
    ["Betadine","Povidone-iodine 10% | Wound antiseptic | Pre-op skin prep"],
    ["Dettol","Chloroxylenol 4.8% | Antiseptic + disinfectant"],
    ["Savlon","Chlorhexidine 1.5% + Cetrimide 15% | Wound antiseptic"],
]
tqr=Table([[Paragraph(h,hcell) for h in ["When you see…","Correct Answer"]]]+
          [[Paragraph(r[0],cell_b),Paragraph(r[1],cell_l)] for r in qr_rows],
          colWidths=[5.5*cm,12.0*cm],repeatRows=1)
tqr.setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,0),RED),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,RED_BG]),
    ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#fca5a5")),
    ("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
    ("LEFTPADDING",(0,0),(-1,-1),5),
    ("VALIGN",(0,0),(-1,-1),"TOP"),
]))
story.append(tqr)
story.append(sp(0.2))

# footer
foot=Table([[Paragraph(
    "Source: MBBS 2nd Year PBQ & Spotters – Dr. Narendra Kumar Yadav  |  Compiled by Orris Medical AI  |  All the best for your PSM exam! 🌟",
    ps("ft",fontSize=7,fontName="Helvetica-Oblique",textColor=MID_GREY,alignment=TA_CENTER)
)]],colWidths=["100%"])
foot.setStyle(TableStyle([("LINEABOVE",(0,0),(-1,0),0.5,MID_GREY),("TOPPADDING",(0,0),(-1,-1),5)]))
story.append(foot)

# ── BUILD ─────────────────────────────────────────────────────────────────────
doc.build(story)
print("PDF created:", OUTPUT)
Running Command

cd /home/daytona/workspace/psm-spotters && python generate_psm_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/psm-spotters/PSM_Spotter_Answers.pdf

Your PDF is ready! Download it here:

PSM Spotter Answers

PDF Document Β· PDF


What's inside (4 pages, 9 colour-coded sections):

SectionColourContent
1 - ORSNavy/BlueComposition table, 2 uses, home-made ORS
2 - VaccinesTealBCG (full details + reaction timeline), MMR, HPV, Syringes
3 - Disease ModelsWine/PinkMeasles (Koplik's spots, complications), Chickenpox vs Smallpox, Rickets
4 - NutritionGreenVitamin A + National Programme doses, Bitot's spots + Xerophthalmia stages, Shakir Tape, BMI, Growth Chart
5 - Food ItemsOrangeAll food nutritive values table, Limiting AAs, Pellagra, Energy requirements
6 - AntisepticsPurpleBetadine, Dettol, Savlon, Iodized salt, IFA, Albendazole, Zinc
7 - StatisticsBluePie chart, Bar diagram, Histogram - data types
8 - ResearchIndigoEvidence pyramid, Helsinki Declaration, Informed Consent, SMART
9 - Quick RecallRed29-row "When you see β†’ Answer" rapid-fire revision table
Print the last page (Quick Recall Table) and keep it with you walking into the exam! 🌟

Tomorrow is my PSM practica exam. Examiner will surely ask from this pdf and i dont know anything about them and i have no concept of this . please help me to understand this topic in very easy language and remember all of them so i will secure better marks

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

A 23 years old male present with multiple large joint pain, without fever and without any associates aymptoms

Reading File
Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.