i have my muhs university exam in 15 days help meout with frequently asked questions in physiology

Asking for Preferences
Great! First MBBS Physiology for MUHS. Let me pull up the high-yield content from authoritative textbooks and also check the latest MUHS exam patterns.
Searching sources...
Reading File
Searching the Web

MUHS university first MBBS physiology frequently asked questions exam 2025 2026

Now let me query the medical library for key First MBBS Physiology topics simultaneously:
Finding Sources
Searching the Web

MUHS first MBBS physiology important questions long essay short notes 2024 2025

I have all 4 physiology textbooks available (Guyton, Ganong, Costanzo, Boron). Now let me pull key content from them on the highest-yield MUHS First MBBS topics simultaneously.
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
I now have excellent content from Guyton and Boron textbooks to build a comprehensive answer. Let me compile the complete guide.
Finding Sources
I have all the content needed. Here is your comprehensive MUHS First MBBS Physiology guide:

MUHS First MBBS Physiology - High-Yield Exam Guide


HOW THE PAPER IS SET

MUHS First MBBS Physiology is a 100-mark paper (3 hours):
  • Section A - 2 Long Essays x 10 marks = 20 marks
  • Section B - 4 Short Essays x 5 marks = 20 marks
  • Section C - 10 Short Notes x 3 marks = 30 marks
  • Section D - MCQs / Practicals = 30 marks
Topics below are ranked by repeat frequency across MUHS papers.

UNIT 1 - GENERAL PHYSIOLOGY & NERVE-MUSCLE

⭐⭐⭐ LONG ESSAY (10 marks) - Most Repeated

Q1. Describe the ionic basis of resting membrane potential and action potential in a nerve fiber. Add a note on the refractory period.
Key points to write:
  • Resting MP = -70 mV due to K+ leak channels, Na+/K+ ATPase pump (3 Na+ out, 2 K+ in)
  • Stages of Action Potential (from Guyton & Hall):
    1. Resting stage - membrane polarized at -70 mV
    2. Depolarization - stimulus reaches threshold (~-55 mV); Na+ channels open; Na+ rushes in; membrane overshoots to +35 mV
    3. Repolarization - Na+ channels close; K+ channels open; K+ rushes out; returns to -70 mV
    4. Hyperpolarization/Undershoot - K+ channels stay open briefly; dips below -70 mV
  • Absolute Refractory Period (Na+ channels inactivated - no AP possible)
  • Relative Refractory Period (needs stronger stimulus)
  • All-or-none law
Q2. Describe the ultrastructure of skeletal muscle and explain the sliding filament theory of muscle contraction.
Key points:
  • Sarcomere: A band, I band, H zone, M line, Z line
  • Thin filaments (actin + troponin + tropomyosin); Thick filaments (myosin heavy chain + S1 heads)
  • Sliding filament mechanism (Guyton & Hall): Actin slides inward among myosin filaments; cross-bridges from myosin interact with actin; ATP is hydrolyzed to power the power stroke
  • Role of Ca2+: Ca2+ released from SR binds troponin C → tropomyosin shifts → active sites on actin exposed → cross-bridge cycling
  • Add a note on Rigor Mortis (post-death: ATP depletion → permanent cross-bridge formation)

⭐⭐⭐ SHORT ESSAY (5 marks)

Q. Neuromuscular junction - structure and transmission (VERY frequently asked)
From Guyton & Hall:
  • Large myelinated motor nerve branches to form motor end plate
  • Synaptic cleft = 20-30 nm wide; lined with acetylcholinesterase
  • Subneural clefts increase surface area
  • On action potential: Ca2+ channels open at dense bars → vesicles dock and fuse by exocytosis → ~125 vesicles release ACh → binds nicotinic receptors on post-junctional membrane → Na+/K+ channels open → EPP → muscle AP
  • ACh degraded by AChE within milliseconds
  • Note on Myasthenia Gravis (autoantibodies vs. nicotinic ACh receptors)
Q. Types of nerve fibers and their classification
  • Erlanger-Gasser classification: A (Aα, Aβ, Aγ, Aδ), B, C fibers
  • Myelinated vs. unmyelinated; saltatory conduction

⭐⭐ SHORT NOTES (3 marks)

  • Resting membrane potential
  • All-or-none law
  • Rigor mortis
  • Motor unit
  • Electromyography (EMG)
  • Isotonic vs. isometric contraction
  • Smooth muscle - types and properties

UNIT 2 - BLOOD & BODY FLUIDS

⭐⭐⭐ LONG ESSAYS

Q1. Describe the process of haemostasis and blood coagulation. Add a note on anticoagulants.
Key points:
  • Primary haemostasis: vascular spasm → platelet adhesion (vWF + GPIb) → platelet activation → platelet aggregation (GPIIb/IIIa + fibrinogen) → platelet plug
  • Coagulation cascade: Extrinsic (TF + VII) and Intrinsic (XII → XI → IX → VIII) pathways converge at Factor X
  • Common pathway: Xa + Va → Prothrombin → Thrombin → Fibrinogen → Fibrin → Factor XIII cross-links
  • Anticoagulants: Heparin (activates antithrombin III), Warfarin (blocks Vit K-dependent factors II, VII, IX, X), Citrate (chelates Ca2+)
  • Note on Haemophilia A (factor VIII deficiency)
Q2. Describe ABO and Rh blood group systems. Add a note on blood transfusion reactions.
  • ABO: antigens on RBC, antibodies in plasma; Landsteiner's law
  • Group O = universal donor; Group AB = universal recipient
  • Rh system: Rh antigen (D antigen); Rh incompatibility in pregnancy → Erythroblastosis fetalis → Prevention with Anti-D immunoglobulin

⭐⭐⭐ Short Essays

Q. Oxygen dissociation curve of haemoglobin - draw and explain
  • Sigmoid (S-shaped) curve; P50 = 26 mmHg (PO2 at which Hb is 50% saturated)
  • Bohr effect: Rightward shift with ↑CO2, ↑H+, ↑Temperature, ↑2,3-DPG → facilitates O2 unloading to tissues
  • Left shift: ↓CO2, ↓H+, Fetal Hb (HbF), CO poisoning, Methaemoglobin
  • Clinical significance: why venous blood has lower affinity = O2 delivery to tissues
Q. Erythropoiesis - stages and regulation
  • Sequence: CFU-E → Proerythroblast → Basophilic → Polychromatic → Orthochromatic erythroblast → Reticulocyte → RBC
  • Requirements: Erythropoietin (kidney), Iron, Vit B12, Folic acid, Intrinsic factor
  • Regulation by tissue hypoxia via EPO from peritubular cells

⭐⭐ Short Notes

  • Plasma proteins and their functions
  • Functions of platelets
  • Bleeding time vs. clotting time
  • Anaemia - classification
  • ESR (Westergren method, normal values, clinical significance)
  • WBC differential count and functions

UNIT 3 - CARDIOVASCULAR SYSTEM

⭐⭐⭐ LONG ESSAYS

Q1. Describe the cardiac cycle with pressure and volume changes. Add a note on heart sounds.
From Boron & Boulpaep Medical Physiology:
  • Heart rate 75/min → cycle = 0.8 seconds
  • Four phases:
    1. Isovolumetric contraction - all valves closed; pressure rises; no change in volume
    2. Ejection phase - aortic/pulmonary valves open; blood ejected; SV ~70 mL
    3. Isovolumetric relaxation - all valves closed; pressure drops; no change in volume
    4. Filling phase - AV valves open; ventricular filling (rapid + slow + atrial kick)
  • EDV = 120 mL; ESV = 50 mL; Stroke Volume = 70 mL; Ejection Fraction = 58-65%
  • Heart sounds: S1 (closure of mitral + tricuspid) = "lub"; S2 (closure of aortic + pulmonary) = "dub"
  • Wiggers diagram - draw and label
Q2. Describe the regulation of blood pressure. Add a note on hypertension.
  • Short-term: Baroreceptor reflex (carotid sinus + aortic arch → NTS → SNS/PSNS), Chemoreceptors, CNS ischemic response
  • Long-term: Renin-Angiotensin-Aldosterone system (RAAS), ADH, Atrial Natriuretic Peptide (ANP)
  • Autoregulation (Bayliss effect - myogenic; metabolic)
  • Hypertension: primary vs. secondary; complications (stroke, MI, renal failure)

⭐⭐⭐ Short Essays

Q. Cardiac conducting system and its significance
  • SA node (pacemaker, 70-80/min) → AV node (40-60/min, 0.1 sec delay) → Bundle of His → Right & Left bundle branches → Purkinje fibers (15-40/min)
  • Dominant pacemaker = SA node (fastest rate)
  • Significance: unidirectional impulse conduction; AV delay allows atrial contribution to ventricular filling
Q. ECG - Normal waves and clinical significance
  • P wave (atrial depolarization), PR interval (0.12-0.2 sec, AV conduction), QRS complex (ventricular depolarization, <0.12 sec), T wave (ventricular repolarization), QT interval
  • Clinical uses: MI, arrhythmias, conduction blocks
Q. Frank-Starling law of the heart
  • The more the ventricle fills during diastole, the greater the force of contraction and stroke volume
  • Mechanism: optimal sarcomere length (2.0-2.4 µm) allows maximum cross-bridge overlap
  • Clinical significance: cardiac compensation in heart failure

⭐⭐ Short Notes

  • Stroke volume and its determinants (preload, afterload, contractility)
  • Cardiac output and its measurement (Fick's principle)
  • Coronary circulation and its regulation
  • Peripheral resistance and its regulation
  • JVP (Jugular Venous Pulse)

UNIT 4 - RESPIRATORY SYSTEM

⭐⭐⭐ LONG ESSAYS

Q1. Describe the mechanics of breathing. Explain the role of surfactant. Add a note on pneumothorax.
  • Inspiratory muscles: diaphragm (main), external intercostals
  • Intrapleural pressure: -2.5 cmH2O (resting) → -6 cmH2O (inspiration)
  • Compliance = ΔV/ΔP; surfactant (DPPC from Type II pneumocytes) reduces surface tension, prevents alveolar collapse
  • Surfactant deficiency → Respiratory Distress Syndrome (premature neonates)
  • Pneumothorax: air in pleural cavity → lung collapse
Q2. Transport of CO2 in blood. Chloride shift.
  • CO2 transport: dissolved (10%), carbaminohaemoglobin (30%), as HCO3- (60%) - most important
  • CO2 + H2O → H2CO3 → H+ + HCO3- (catalyzed by carbonic anhydrase in RBCs)
  • Chloride shift (Hamburger phenomenon): HCO3- moves out of RBC via band 3 protein; Cl- moves in to maintain electrical neutrality
  • Haldane effect: Oxygenation of Hb decreases CO2 carrying capacity

⭐⭐⭐ Short Essays

  • Lung volumes and capacities (with normal values; draw spirogram)
    • TV = 500 mL, IRV = 3000 mL, ERV = 1100 mL, RV = 1200 mL
    • VC = 4600 mL, TLC = 5800 mL, FRC = 2300 mL
  • Hypoxia - types (hypoxic, anaemic, stagnant, histotoxic)
  • Regulation of respiration (dorsal and ventral respiratory groups; apneustic and pneumotaxic centres; Hering-Breuer reflex)

UNIT 5 - RENAL SYSTEM

⭐⭐⭐ LONG ESSAY

Q. Describe the process of glomerular filtration. Add a note on GFR and its regulation.
  • Filtration barrier: fenestrated endothelium + GBM + podocytes (filtration slits)
  • GFR = 125 mL/min; filtration fraction = 20%
  • Starling forces: Net filtration pressure = (Pcap - Pbs) - (πcap - πbs)
  • Autoregulation: myogenic mechanism + tubuloglomerular feedback (macula densa)
  • Normal values: Pcap = 60 mmHg; Pbs = 18 mmHg; πcap = 32 mmHg; Net = +10 mmHg
  • Measurement: Inulin clearance (gold standard), Creatinine clearance (clinical)
Q. Countercurrent mechanism in the kidney and concentration of urine.
  • Loop of Henle - countercurrent multiplier (ascending limb pumps NaCl; descending limb permeable to water)
  • Vasa recta - countercurrent exchanger (preserves medullary gradient)
  • ADH (vasopressin): increases water permeability of collecting duct via aquaporin-2
  • Maximum urine concentration = 1200-1400 mOsm/kg; minimum dilute = 50 mOsm/kg

⭐⭐ Short Notes

  • Tubular reabsorption and secretion (proximal tubule reabsorbs 67% of filtrate)
  • Juxtaglomerular apparatus - structure and function
  • Renal clearance concept
  • Renin-angiotensin-aldosterone system
  • Micturition reflex

UNIT 6 - ENDOCRINE SYSTEM

⭐⭐⭐ LONG ESSAYS

Q1. Thyroid hormones - synthesis, secretion, actions, and disorders.
  • Synthesis: Iodide trapping → Oxidation (TPO) → Organification → Coupling → T3 (triiodothyronine) + T4 (thyroxine) stored as thyroglobulin in colloid
  • T4 is prohormone; T3 is active form (deiodination in periphery)
  • Actions: ↑BMR, ↑heart rate, growth and development, thermogenesis, ↑gut motility
  • Hypothyroidism (myxoedema, cretinism in children); Hyperthyroidism (Grave's disease)
Q2. Describe the hormones regulating calcium metabolism.
  • PTH (from chief cells): ↑serum Ca2+ by ↑bone resorption, ↑renal Ca2+ reabsorption, ↑1,25-dihydroxyvitamin D synthesis
  • Calcitonin (from parafollicular C cells): ↓serum Ca2+
  • Vitamin D (Calcitriol): ↑intestinal Ca2+ absorption, ↑bone mineralisation
  • Hypoparathyroidism → hypocalcaemia → tetany (Chvostek sign, Trousseau sign)

⭐⭐ Short Notes

  • Growth hormone (actions + GH excess = acromegaly/gigantism; deficiency = dwarfism)
  • Diabetes insipidus (central vs. nephrogenic; ADH deficiency/resistance)
  • Insulin - mechanism of action and secretion
  • Cortisol - synthesis and actions (stress response)
  • Anterior pituitary hormones (enumerate + brief functions)

UNIT 7 - NERVOUS SYSTEM & SPECIAL SENSES

⭐⭐⭐ Long Essays

Q1. Trace the visual pathway and describe visual field defects at different levels of lesion.
  • Retina → Optic nerve → Optic chiasm (nasal fibers cross) → Optic tract → Lateral Geniculate Nucleus (thalamus) → Optic radiations → Primary visual cortex (V1, area 17, occipital lobe)
  • Lesions: optic nerve = monocular blindness; chiasm = bitemporal hemianopia (pituitary tumor); optic tract = contralateral homonymous hemianopia; occipital cortex = cortical blindness with macular sparing
Q2. Auditory pathway and conduction deafness vs. sensorineural deafness.
  • Sound → Pinna → External auditory canal → Tympanic membrane → Ossicles (malleus-incus-stapes) → Oval window → Cochlea (basilar membrane) → Organ of Corti → CN VIII → Cochlear nuclei → Superior olivary nucleus → Inferior colliculus → MGN → Auditory cortex
  • Rinne test and Weber test to differentiate conduction vs. sensorineural deafness

⭐⭐ Short Notes

  • Cerebellar functions and cerebellar ataxia signs
  • Blood-brain barrier (structure and significance)
  • Synaptic transmission
  • Sleep - stages and REM sleep
  • Pain and gate control theory

UNIT 8 - GASTROINTESTINAL PHYSIOLOGY

⭐⭐ Short Essays

  • Gastric secretion - phases of secretion (cephalic, gastric, intestinal) and control
  • Bile - composition, functions, role in digestion
  • Absorption of iron, Vitamin B12 (intrinsic factor), and fat (chylomicrons)
  • Digestion and absorption of carbohydrates and proteins

UNIT 9 - REPRODUCTIVE PHYSIOLOGY

⭐⭐ Short Essays

  • Menstrual cycle - phases, hormonal changes (FSH, LH, estrogen, progesterone)
  • Spermatogenesis - stages and regulation
  • Pregnancy: hCG, placental hormones

QUICK REVISION FACTS (Normal Values to Memorise)

ParameterValue
Resting Membrane Potential (nerve)-70 mV
Threshold Potential-55 mV
Heart Rate72 beats/min
Cardiac Output5 L/min
Stroke Volume70 mL
GFR125 mL/min
Blood pH7.35-7.45
Hb (male)14-16 g/dL
Hb (female)12-14 g/dL
WBC count4000-11000/µL
Platelet count1.5-4 lakh/µL
P50 of Hb26 mmHg
Vital capacity4.6 L
FRC2.3 L
RV1.2 L

15-DAY STUDY PLAN (Recommended)

DaysFocus
Day 1-2General Physiology + Nerve-Muscle (Action potential, NMJ, sliding filament)
Day 3-4Blood (coagulation, ABO/Rh, erythropoiesis, O2-Hb curve)
Day 5-6CVS (cardiac cycle, ECG, Frank-Starling, BP regulation)
Day 7-8Respiratory (mechanics, lung volumes, CO2 transport, O2-Hb curve revision)
Day 9-10Renal (GFR, tubular functions, countercurrent, micturition)
Day 11Endocrine (thyroid, Ca2+ regulation, pituitary, insulin)
Day 12Nervous system + Special Senses (visual/auditory pathways)
Day 13GIT + Reproductive
Day 14Revision of ALL short notes + normal values
Day 15Past papers + quick diagrams practice

Pro tips for MUHS:
  • Always draw labelled diagrams - they fetch easy marks (Wiggers diagram, sarcomere structure, nephron, visual pathway)
  • Start each long essay with a definition + classification
  • Write normal values wherever applicable
  • End each answer with a clinical note (disease/disorder)
Sources: Guyton and Hall Textbook of Medical Physiology (14th Ed.), Boron & Boulpaep Medical Physiology (3rd Ed.), Ganong's Review of Medical Physiology (26th Ed.), Medical Junction MBBS Important Questions

can you give me direct answers for every question you gave me in a pdf?

Reading File
Now let me pull detailed textbook content for all the major questions in parallel:
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
I have enough rich textbook content. Now let me generate the comprehensive PDF:
Running Command

mkdir -p /tmp/workspace/muhs-physiology && ls /tmp/workspace/muhs-physiology/

Writing File

~/muhs-physiology/generate_pdf.py

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

OUTPUT = "/tmp/workspace/muhs-physiology/MUHS_Physiology_QA_Guide.pdf"

# Colors
DARK_BLUE = HexColor("#1a3a5c")
MED_BLUE = HexColor("#2e6da4")
LIGHT_BLUE = HexColor("#dce9f5")
ACCENT = HexColor("#e8f4fd")
GOLD = HexColor("#f5a623")
GREEN = HexColor("#2e7d32")
RED = HexColor("#c0392b")
LIGHT_GRAY = HexColor("#f5f5f5")
BORDER_GRAY = HexColor("#cccccc")
DARK_TEXT = HexColor("#1a1a2e")

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2.5*cm, bottomMargin=2.5*cm,
    title="MUHS First MBBS Physiology - Complete Q&A Guide",
    author="Orris Medical AI"
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle('Title', parent=styles['Title'],
    fontSize=24, textColor=white, alignment=TA_CENTER,
    spaceAfter=6, fontName='Helvetica-Bold')

subtitle_style = ParagraphStyle('Subtitle', parent=styles['Normal'],
    fontSize=13, textColor=LIGHT_BLUE, alignment=TA_CENTER,
    spaceAfter=4, fontName='Helvetica')

unit_header_style = ParagraphStyle('UnitHeader', parent=styles['Normal'],
    fontSize=16, textColor=white, alignment=TA_LEFT,
    spaceBefore=10, spaceAfter=6,
    fontName='Helvetica-Bold', leftIndent=0, leading=20)

question_style = ParagraphStyle('Question', parent=styles['Normal'],
    fontSize=12, textColor=DARK_BLUE, alignment=TA_LEFT,
    spaceBefore=12, spaceAfter=4,
    fontName='Helvetica-Bold', leftIndent=0, leading=16)

subheading_style = ParagraphStyle('Subheading', parent=styles['Normal'],
    fontSize=11, textColor=MED_BLUE, alignment=TA_LEFT,
    spaceBefore=8, spaceAfter=3,
    fontName='Helvetica-Bold', leftIndent=0)

body_style = ParagraphStyle('Body', parent=styles['Normal'],
    fontSize=10, textColor=DARK_TEXT, alignment=TA_JUSTIFY,
    spaceBefore=2, spaceAfter=3,
    fontName='Helvetica', leftIndent=0, leading=15)

bullet_style = ParagraphStyle('Bullet', parent=styles['Normal'],
    fontSize=10, textColor=DARK_TEXT, alignment=TA_LEFT,
    spaceBefore=1, spaceAfter=1,
    fontName='Helvetica', leftIndent=14, leading=14,
    bulletIndent=4)

clinical_style = ParagraphStyle('Clinical', parent=styles['Normal'],
    fontSize=10, textColor=GREEN, alignment=TA_LEFT,
    spaceBefore=4, spaceAfter=4,
    fontName='Helvetica-BoldOblique', leftIndent=8)

note_style = ParagraphStyle('Note', parent=styles['Normal'],
    fontSize=9.5, textColor=HexColor("#5d4037"), alignment=TA_JUSTIFY,
    spaceBefore=2, spaceAfter=2,
    fontName='Helvetica-Oblique', leftIndent=8, leading=14)

def unit_box(title):
    data = [[Paragraph(title, unit_header_style)]]
    t = Table(data, colWidths=[17*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
        ('ROUNDEDCORNERS', [6,6,6,6]),
        ('TOPPADDING', (0,0), (-1,-1), 8),
        ('BOTTOMPADDING', (0,0), (-1,-1), 8),
        ('LEFTPADDING', (0,0), (-1,-1), 12),
    ]))
    return t

def question_box(qnum, qtext):
    data = [[Paragraph(f"Q{qnum}. {qtext}", question_style)]]
    t = Table(data, colWidths=[17*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), LIGHT_BLUE),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('TOPPADDING', (0,0), (-1,-1), 6),
        ('BOTTOMPADDING', (0,0), (-1,-1), 6),
        ('BOX', (0,0), (-1,-1), 1, MED_BLUE),
    ]))
    return t

def marks_badge(marks_text):
    data = [[Paragraph(f"<font color='white'><b>{marks_text}</b></font>", 
                       ParagraphStyle('badge', fontSize=9, fontName='Helvetica-Bold', alignment=TA_CENTER))]]
    t = Table(data, colWidths=[3.5*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), GOLD),
        ('TOPPADDING', (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
    ]))
    return t

def clinical_note(text):
    data = [[Paragraph(f"<b>Clinical Note:</b> {text}", clinical_style)]]
    t = Table(data, colWidths=[17*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), HexColor("#e8f5e9")),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('BOX', (0,0), (-1,-1), 1, GREEN),
    ]))
    return t

def b(text): return f"<b>{text}</b>"
def u(text): return f"<u>{text}</u>"
def i(text): return f"<i>{text}</i>"

story = []

# ===================== COVER PAGE =====================
story.append(Spacer(1, 1.5*cm))
cover_title_data = [[Paragraph("MUHS First MBBS Physiology", title_style)]]
ct = Table(cover_title_data, colWidths=[17*cm])
ct.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
    ('TOPPADDING', (0,0), (-1,-1), 20),
    ('BOTTOMPADDING', (0,0), (-1,-1), 10),
    ('LEFTPADDING', (0,0), (-1,-1), 15),
    ('RIGHTPADDING', (0,0), (-1,-1), 15),
]))
story.append(ct)

cover_sub_data = [[Paragraph("Complete Question & Answer Guide", subtitle_style)]]
cs = Table(cover_sub_data, colWidths=[17*cm])
cs.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), MED_BLUE),
    ('TOPPADDING', (0,0), (-1,-1), 10),
    ('BOTTOMPADDING', (0,0), (-1,-1), 14),
]))
story.append(cs)
story.append(Spacer(1, 0.8*cm))

info_data = [
    [Paragraph("<b>University:</b> Maharashtra University of Health Sciences (MUHS)", body_style)],
    [Paragraph("<b>Year:</b> First MBBS | <b>Subject:</b> Physiology", body_style)],
    [Paragraph("<b>Based on:</b> Guyton & Hall (14th Ed.) | Ganong's Review (26th Ed.) | Boron & Boulpaep (3rd Ed.)", body_style)],
    [Paragraph("<b>Content:</b> 20+ Exam Questions with Full Textbook Answers", body_style)],
]
it = Table(info_data, colWidths=[17*cm])
it.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), ACCENT),
    ('LEFTPADDING', (0,0), (-1,-1), 15),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('BOX', (0,0), (-1,-1), 1, MED_BLUE),
]))
story.append(it)
story.append(Spacer(1, 0.5*cm))

# Paper format table
story.append(Paragraph("<b>MUHS Physiology Paper Format</b>", subheading_style))
paper_data = [
    [Paragraph("<b>Section</b>", body_style), Paragraph("<b>Type</b>", body_style), Paragraph("<b>Marks</b>", body_style)],
    [Paragraph("A", body_style), Paragraph("2 Long Essays", body_style), Paragraph("2 x 10 = 20", body_style)],
    [Paragraph("B", body_style), Paragraph("4 Short Essays", body_style), Paragraph("4 x 5 = 20", body_style)],
    [Paragraph("C", body_style), Paragraph("10 Short Notes", body_style), Paragraph("10 x 3 = 30", body_style)],
    [Paragraph("D", body_style), Paragraph("MCQs / Practicals", body_style), Paragraph("30", body_style)],
    [Paragraph("<b>TOTAL</b>", body_style), Paragraph("", body_style), Paragraph("<b>100</b>", body_style)],
]
pt = Table(paper_data, colWidths=[3*cm, 8*cm, 6*cm])
pt.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('BACKGROUND', (0,-1), (-1,-1), LIGHT_BLUE),
    ('ROWBACKGROUNDS', (0,1), (-1,-2), [white, LIGHT_GRAY]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(pt)
story.append(PageBreak())

# ===================== UNIT 1: NERVE & MUSCLE =====================
story.append(unit_box("UNIT 1: GENERAL PHYSIOLOGY - NERVE & MUSCLE"))
story.append(Spacer(1, 0.3*cm))

# Q1 Action Potential
story.append(question_box(1, "Describe the ionic basis of resting membrane potential and action potential in a nerve fiber. Add a note on the refractory period. [10 marks - Long Essay]"))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>INTRODUCTION</b>", subheading_style))
story.append(Paragraph(
    "The resting membrane potential and action potential are fundamental electrical properties of nerve fibers. "
    "At rest, the inside of a nerve fiber is electronegative compared to the outside. When stimulated, a rapid "
    "change in membrane potential called the action potential is generated, which propagates along the nerve fiber "
    "to transmit information.",
    body_style))

story.append(Paragraph("<b>1. RESTING MEMBRANE POTENTIAL (RMP)</b>", subheading_style))
story.append(Paragraph(b("Definition:") + " The electrical potential difference across the cell membrane at rest = <b>-70 mV</b> (inside negative).", body_style))
story.append(Paragraph(b("Basis of RMP:"), body_style))
rmp_points = [
    "The cell membrane is selectively permeable - at rest, K+ permeability is high (K+ leak channels open), Na+ permeability is low",
    "K+ diffuses outward down its concentration gradient (intracellular [K+] ~140 mEq/L vs extracellular ~4 mEq/L), making inside negative",
    "Na+/K+ ATPase pump: actively transports 3 Na+ out and 2 K+ in per cycle, maintaining electrochemical gradients and contributing -4 mV to RMP",
    "Gibbs-Donnan equilibrium: large negatively charged intracellular proteins that cannot cross the membrane also contribute to the negative interior",
    "Chloride ions distribute passively based on the electrical gradient",
]
for pt_text in rmp_points:
    story.append(Paragraph(f"• {pt_text}", bullet_style))

story.append(Paragraph("<b>2. ACTION POTENTIAL (AP)</b>", subheading_style))
story.append(Paragraph(
    "An action potential is a rapid, transient reversal of membrane potential that propagates along the nerve fiber "
    "without decrement. It follows the " + b("All-or-None law") + " - once threshold is reached, a full AP is generated "
    "regardless of stimulus strength.",
    body_style))

story.append(Paragraph(b("Stages of the Action Potential:") + " (from Guyton & Hall, 14th Ed.)", body_style))

ap_data = [
    [Paragraph("<b>Stage</b>", body_style), Paragraph("<b>Membrane Potential</b>", body_style), Paragraph("<b>Ion Movements</b>", body_style)],
    [Paragraph("Resting Stage", body_style), Paragraph("-70 mV", body_style), Paragraph("K+ leak; Na+ channels closed", body_style)],
    [Paragraph("Depolarization", body_style), Paragraph("-70 mV → +35 mV", body_style), Paragraph("Threshold (~-55 mV) reached; voltage-gated Na+ channels open; rapid Na+ influx; membrane overshoots to +35 mV", body_style)],
    [Paragraph("Repolarization", body_style), Paragraph("+35 mV → -70 mV", body_style), Paragraph("Na+ channels inactivate; voltage-gated K+ channels open; K+ rushes out; returns to -70 mV", body_style)],
    [Paragraph("Hyperpolarization (Undershoot)", body_style), Paragraph("-70 to -90 mV briefly", body_style), Paragraph("K+ channels remain open briefly; potential dips below resting level", body_style)],
    [Paragraph("Recovery", body_style), Paragraph("Returns to -70 mV", body_style), Paragraph("K+ channels close; Na+/K+ pump restores gradients", body_style)],
]
apt = Table(ap_data, colWidths=[3.5*cm, 4*cm, 9.5*cm])
apt.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(apt)
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>3. REFRACTORY PERIOD</b>", subheading_style))
ref_data = [
    [Paragraph("<b>Type</b>", body_style), Paragraph("<b>Duration</b>", body_style), Paragraph("<b>Mechanism</b>", body_style), Paragraph("<b>Significance</b>", body_style)],
    [Paragraph("Absolute Refractory Period (ARP)", body_style), Paragraph("~1 ms", body_style), Paragraph("Na+ channels completely inactivated (m-gate closed, h-gate closed) - no AP possible regardless of stimulus strength", body_style), Paragraph("Limits max firing frequency; ensures unidirectional propagation", body_style)],
    [Paragraph("Relative Refractory Period (RRP)", body_style), Paragraph("~10-15 ms", body_style), Paragraph("K+ channels still open; Na+ channels partially recovered - AP possible only with suprathreshold stimulus", body_style), Paragraph("Modulates frequency of nerve firing", body_style)],
]
reft = Table(ref_data, colWidths=[3.8*cm, 2.2*cm, 6.2*cm, 4.8*cm])
reft.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(reft)
story.append(Spacer(1, 0.2*cm))
story.append(clinical_note("In myasthenia gravis, autoantibodies destroy nicotinic ACh receptors at the NMJ, leading to muscle weakness. Treatment: anticholinesterases (neostigmine) increase ACh at the NMJ."))
story.append(Spacer(1, 0.3*cm))

# Q2: Sliding filament
story.append(question_box(2, "Describe the ultrastructure of skeletal muscle and explain the sliding filament theory of muscle contraction. Add a note on Rigor Mortis. [10 marks]"))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>ULTRASTRUCTURE OF SKELETAL MUSCLE</b>", subheading_style))
story.append(Paragraph("Skeletal muscle is composed of muscle fibers (cells) containing myofibrils. Each myofibril is made up of repeating units called sarcomeres.", body_style))

story.append(Paragraph(b("Sarcomere - the basic contractile unit (from Z-line to Z-line):"), body_style))
sarcdata = [
    [Paragraph("<b>Band/Zone</b>", body_style), Paragraph("<b>Description</b>", body_style)],
    [Paragraph("A band (dark)", body_style), Paragraph("Full length of myosin filaments; includes H zone + flanking actin-myosin overlap region; does NOT shorten during contraction", body_style)],
    [Paragraph("I band (light)", body_style), Paragraph("Contains only thin actin filaments; bisected by Z-line; SHORTENS during contraction", body_style)],
    [Paragraph("H zone", body_style), Paragraph("Central pale zone within A band; contains only myosin (no actin); SHORTENS during contraction", body_style)],
    [Paragraph("M line", body_style), Paragraph("Midpoint of H zone; proteins that anchor myosin filaments together", body_style)],
    [Paragraph("Z disc (Z line)", body_style), Paragraph("Dense line at each end of sarcomere; anchors thin filaments; pulled toward each other during contraction", body_style)],
    [Paragraph("Titin", body_style), Paragraph("Giant elastic protein connecting myosin to Z-disc; provides passive elasticity to sarcomere", body_style)],
]
st = Table(sarcdata, colWidths=[4*cm, 13*cm])
st.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(st)
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph(b("Filament composition:"), body_style))
for pt_text in [
    "Thick filaments: myosin (MW 480,000); each myosin molecule has a double-headed structure (S1 heads) that contain ATPase activity and actin-binding sites",
    "Thin filaments: actin (F-actin double helix) + tropomyosin (regulatory, blocks active sites at rest) + troponin complex (TnT, TnI, TnC - TnC binds Ca2+)",
    "Sarcoplasmic reticulum (SR): stores Ca2+ around myofibrils; releases Ca2+ on action potential",
    "T-tubules (transverse tubules): invaginations of sarcolemma; transmit action potential deep into fiber to trigger SR Ca2+ release",
]:
    story.append(Paragraph(f"• {pt_text}", bullet_style))

story.append(Paragraph("<b>SLIDING FILAMENT THEORY OF MUSCLE CONTRACTION</b>", subheading_style))
story.append(Paragraph(
    "Proposed by Hugh Huxley and Jean Hanson (1954). The theory states that muscle contraction occurs by the "
    "sliding of thin actin filaments inward over thick myosin filaments, without any change in the lengths of "
    "the individual filaments themselves. The Z-lines are pulled toward each other, shortening the sarcomere.",
    body_style))

story.append(Paragraph(b("Steps in the cross-bridge cycle (Guyton & Hall):"), body_style))
steps = [
    ("Step 1 - Resting state:", "ATP bound to myosin head; tropomyosin blocks actin active sites; Ca2+ stored in SR"),
    ("Step 2 - Activation:", "Nerve impulse → AP along sarcolemma → down T-tubules → triggers SR to release Ca2+ into cytoplasm"),
    ("Step 3 - Ca2+ binds TnC:", "Ca2+ binds troponin C → conformational change in troponin-tropomyosin complex → tropomyosin shifts → active sites on actin exposed"),
    ("Step 4 - Cross-bridge formation:", "Myosin S1 head attaches to exposed actin active site → cross-bridge formed (rigor configuration)"),
    ("Step 5 - Power stroke:", "ADP + Pi released from myosin head → myosin head pivots 45° → actin filament pulled ~10 nm toward M-line → force generated"),
    ("Step 6 - Detachment:", "New ATP molecule binds to myosin head → myosin detaches from actin"),
    ("Step 7 - Recovery stroke:", "ATP hydrolysis (ATP → ADP + Pi) → myosin head returns to high-energy 90° position → ready to attach to next active site"),
    ("Step 8 - Relaxation:", "When AP stops → Ca2+ pumped back to SR by SERCA pump → Ca2+ dissociates from TnC → tropomyosin covers active sites → contraction ceases"),
]
for step, desc in steps:
    story.append(Paragraph(f"• {b(step)} {desc}", bullet_style))

story.append(Paragraph(b("Key energetics:"), body_style))
story.append(Paragraph("• One ATP is required per cross-bridge cycle", bullet_style))
story.append(Paragraph("• Energy sources: ATP (immediate), Creatine phosphate (short-term), Glycolysis and oxidative phosphorylation (sustained)", bullet_style))
story.append(Spacer(1, 0.15*cm))

story.append(Paragraph("<b>RIGOR MORTIS</b>", subheading_style))
story.append(Paragraph(
    "After death, ATP production ceases within 3-6 hours. Without ATP: (1) myosin heads cannot detach from actin, "
    "(2) SERCA cannot pump Ca2+ back to SR. Result: permanent actin-myosin cross-bridge formation → rigid, stiff muscles. "
    "Rigor mortis develops 3-6 hours post-death, maximal at 12 hours, resolves at 48-72 hours as muscle proteins degrade.",
    body_style))
story.append(clinical_note("Forensic importance: Rigor mortis helps estimate time of death. Order: jaw/neck → trunk → limbs (rostrocaudal progression)."))
story.append(Spacer(1, 0.3*cm))

# Q3: NMJ
story.append(question_box(3, "Describe the structure and physiology of the neuromuscular junction. [5 marks - Short Essay]"))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>STRUCTURE OF NEUROMUSCULAR JUNCTION (NMJ)</b>", subheading_style))
story.append(Paragraph("The NMJ (motor end plate) is the synapse between a myelinated motor neuron and a skeletal muscle fiber.", body_style))

story.append(Paragraph(b("Presynaptic (Nerve terminal):"), body_style))
for p in ["Large myelinated Aa motor nerve fiber from anterior horn of spinal cord",
          "Axon terminal invaginates into muscle surface but lies outside sarcolemma",
          "Contains ~300,000 acetylcholine (ACh) vesicles per terminal",
          "Dense bars: sites for vesicle docking; flanked by voltage-gated Ca2+ channels",
          "Mitochondria: supply ATP for ACh synthesis"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("Synaptic cleft:"), body_style))
for p in ["Width: 20-30 nm",
          "Contains acetylcholinesterase (AChE): degrades ACh rapidly",
          "Basal lamina forms scaffold"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("Postsynaptic (Muscle membrane):"), body_style))
for p in ["Synaptic gutter/trough: fold in sarcolemma",
          "Subneural clefts: further folds, greatly increase surface area",
          "Nicotinic ACh receptors (nAChR): Na+/K+ channels, concentrated at junctional folds"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph("<b>PHYSIOLOGY OF TRANSMISSION</b>", subheading_style))
story.append(Paragraph("Neuromuscular transmission follows these steps:", body_style))
nmj_steps = [
    "Nerve AP arrives at terminal → voltage-gated Ca2+ channels open",
    "Ca2+ influx activates calmodulin-dependent kinase → phosphorylates synapsin proteins → frees ACh vesicles",
    "~125 vesicles dock and fuse by exocytosis → ACh released into cleft",
    "ACh diffuses across cleft and binds to nicotinic receptors on postsynaptic membrane",
    "nAChR channels open → Na+ influx + K+ efflux → End-plate potential (EPP) ~70 mV (always suprathreshold)",
    "EPP triggers muscle fiber action potential → propagates in both directions",
    "AChE hydrolyzes ACh → choline recycled back into nerve terminal + acetate",
    "Muscle AP propagates along T-tubules → SR releases Ca2+ → contraction begins",
]
for i, s in enumerate(nmj_steps, 1):
    story.append(Paragraph(f"{i}. {s}", bullet_style))

story.append(clinical_note(
    "Myasthenia Gravis: Autoimmune - IgG antibodies against nicotinic ACh receptors → receptor destruction → progressive muscle weakness. "
    "Worse with activity (fatigability). Ptosis + diplopia typical. Treatment: anticholinesterases (pyridostigmine), immunosuppressants, thymectomy. "
    "Lambert-Eaton: Antibodies against presynaptic voltage-gated Ca2+ channels → reduced ACh release."))
story.append(PageBreak())

# ===================== UNIT 2: BLOOD =====================
story.append(unit_box("UNIT 2: BLOOD & BODY FLUIDS"))
story.append(Spacer(1, 0.3*cm))

# Q4: Coagulation
story.append(question_box(4, "Describe the process of haemostasis and blood coagulation. Add a note on anticoagulants. [10 marks]"))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>HAEMOSTASIS</b>", subheading_style))
story.append(Paragraph("Haemostasis is the process by which bleeding from a damaged blood vessel is stopped. It occurs in three overlapping phases:", body_style))

story.append(Paragraph(b("1. Vascular Phase (Immediate - seconds):"), body_style))
for p in ["Local vasoconstriction of damaged vessel (myogenic reflex + local thromboxane A2 + serotonin)",
          "Reduces blood flow and rate of blood loss"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("2. Platelet Phase (Primary Haemostasis - 1-3 minutes):"), body_style))
for p in ["Platelet adhesion: exposed subendothelial collagen binds von Willebrand factor (vWF); vWF bridges collagen to platelet GPIb receptor",
          "Platelet activation: shape change, degranulation → releases ADP, thromboxane A2, serotonin, Ca2+",
          "Platelet aggregation: GPIIb/IIIa receptor binds fibrinogen → forms bridges between platelets → platelet plug (white thrombus)",
          "Prostacyclin (PGI2) from intact endothelium limits plug to area of damage"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("3. Coagulation Phase (Secondary Haemostasis - minutes):"), body_style))
story.append(Paragraph(
    "Blood coagulation converts soluble fibrinogen to insoluble fibrin to reinforce the platelet plug. "
    "From Guyton & Hall: Clotting occurs in three essential steps:",
    body_style))

story.append(Paragraph(b("Step 1: Formation of Prothrombin Activator"), body_style))
coag_data = [
    [Paragraph("<b>Pathway</b>", body_style), Paragraph("<b>Trigger</b>", body_style), Paragraph("<b>Key Factors</b>", body_style)],
    [Paragraph("Extrinsic Pathway", body_style), Paragraph("Tissue damage → Tissue Factor (TF/Factor III) released from endothelium", body_style), Paragraph("TF + Factor VII → VIIa → activates Factor X", body_style)],
    [Paragraph("Intrinsic Pathway", body_style), Paragraph("Contact activation - blood contacts damaged vessel collagen (XII activation)", body_style), Paragraph("XII→XI→IX→VIII (tenase complex) → activates Factor X", body_style)],
    [Paragraph("Common Pathway", body_style), Paragraph("Both pathways converge at Factor X activation", body_style), Paragraph("Xa + Va + Ca2+ + phospholipid = Prothrombin activator", body_style)],
]
ct2 = Table(coag_data, colWidths=[3.5*cm, 6.5*cm, 7*cm])
ct2.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(ct2)
story.append(Spacer(1, 0.1*cm))

story.append(Paragraph(b("Step 2: Prothrombin → Thrombin"), body_style))
story.append(Paragraph("Prothrombin activator + Ca2+ → converts prothrombin (MW 68,700, a2-globulin, made in liver) → thrombin (MW 33,700)", bullet_style))

story.append(Paragraph(b("Step 3: Fibrinogen → Fibrin"), body_style))
story.append(Paragraph("Thrombin cleaves fibrinopeptides A and B from fibrinogen → fibrin monomers → polymerize to loose fibrin → Factor XIII (activated by thrombin) cross-links fibrin → stable clot", bullet_style))

story.append(Paragraph("<b>ANTICOAGULANTS</b>", subheading_style))
anti_data = [
    [Paragraph("<b>Anticoagulant</b>", body_style), Paragraph("<b>Mechanism</b>", body_style), Paragraph("<b>Clinical Use</b>", body_style)],
    [Paragraph("Heparin", body_style), Paragraph("Activates antithrombin III → inhibits thrombin (IIa) and Factor Xa; also inhibits IX, XI, XII", body_style), Paragraph("Immediate anticoagulation, DVT, PE, dialysis; monitor with APTT", body_style)],
    [Paragraph("Warfarin", body_style), Paragraph("Blocks Vitamin K reductase → depletes Vit K-dependent factors II, VII, IX, X (and Protein C, S)", body_style), Paragraph("Oral; AF, DVT prophylaxis; monitor with PT/INR", body_style)],
    [Paragraph("Citrate / Oxalate", body_style), Paragraph("Chelates Ca2+ ions (needed at multiple steps); used in vitro only", body_style), Paragraph("Blood banking, laboratory tests", body_style)],
    [Paragraph("Aspirin", body_style), Paragraph("Irreversibly inhibits COX → blocks thromboxane A2 synthesis → reduces platelet aggregation", body_style), Paragraph("Antiplatelet; post-MI, stroke prevention", body_style)],
    [Paragraph("Direct Oral Anticoagulants (DOACs)", body_style), Paragraph("Rivaroxaban (Xa inhibitor); Dabigatran (direct thrombin inhibitor)", body_style), Paragraph("AF, VTE; no monitoring required", body_style)],
]
at = Table(anti_data, colWidths=[3.5*cm, 7.5*cm, 6*cm])
at.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(at)
story.append(clinical_note("Haemophilia A: Factor VIII deficiency; X-linked recessive; prolonged APTT, normal PT. Treatment: recombinant Factor VIII. Haemophilia B (Christmas disease): Factor IX deficiency."))
story.append(Spacer(1, 0.3*cm))

# Q5 ODC
story.append(question_box(5, "Draw and explain the oxygen-haemoglobin dissociation curve. Describe the Bohr effect and its physiological significance. [5 marks]"))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph("<b>OXYGEN-HAEMOGLOBIN DISSOCIATION CURVE (ODC)</b>", subheading_style))
story.append(Paragraph(b("Shape:") + " Sigmoid (S-shaped) - due to cooperativity of Hb's 4 subunits (binding of O2 to one subunit increases affinity of remaining subunits)", body_style))
story.append(Paragraph(b("Key values:"), body_style))
odc_vals = [
    "P50 = 26 mmHg: PO2 at which Hb is 50% saturated (normal value)",
    "At PO2 = 100 mmHg (arterial blood): Hb is 97.5% saturated",
    "At PO2 = 40 mmHg (venous blood): Hb is 75% saturated",
    "O2 delivered to tissues per 100 mL blood ≈ 5 mL (Fick principle)",
    "The flat upper part ensures Hb stays saturated even when alveolar PO2 drops (high altitude protective)"
]
for v in odc_vals:
    story.append(Paragraph(f"• {v}", bullet_style))

story.append(Paragraph(b("BOHR EFFECT - Rightward Shift of ODC:"), body_style))
story.append(Paragraph("A rightward shift means LOWER O2 affinity → O2 is unloaded more readily to tissues. Caused by:", body_style))
for p in ["Increased PCO2 (Haldane-Bohr interaction: CO2 binds to NH2 groups → carbamino-Hb)",
          "Increased H+ (decreased pH) - CO2 forms H2CO3 → H+ + HCO3-; H+ binds Hb → allosteric effect",
          "Increased Temperature (fever, exercising muscle)",
          "Increased 2,3-DPG (binds beta-chains of HbA, stabilizes deoxyHb)"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("LEFTWARD SHIFT - Increased O2 affinity (impairs O2 unloading):"), body_style))
for p in ["Decreased PCO2, Decreased H+ (alkalosis), Decreased temperature",
          "Fetal Hb (HbF): gamma-chains instead of beta-chains; less affinity for 2,3-DPG → higher O2 affinity than adult Hb → essential for extracting O2 from maternal blood",
          "CO (carbon monoxide) poisoning: CO binds Hb 200x more avidly than O2; HbCO has HIGH O2 affinity, cannot release O2 → tissue hypoxia",
          "Methaemoglobin: Fe2+ oxidized to Fe3+; cannot carry O2"]:
    story.append(Paragraph(f"• {p}", bullet_style))
story.append(clinical_note("CO poisoning: cherry-red skin, normal PO2 (misleadingly). Treatment: 100% O2 (displaces CO), hyperbaric O2. HbF advantage: P50 = 19 mmHg (vs. HbA P50 = 26 mmHg), so fetus extracts O2 from maternal blood efficiently."))
story.append(PageBreak())

# ===================== UNIT 3: CVS =====================
story.append(unit_box("UNIT 3: CARDIOVASCULAR SYSTEM"))
story.append(Spacer(1, 0.3*cm))

# Q6: Cardiac Cycle
story.append(question_box(6, "Describe the cardiac cycle with pressure and volume changes. Add a note on heart sounds and Wiggers diagram. [10 marks]"))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(b("Heart rate:") + " 72/min → Duration of one cardiac cycle = 60/72 = <b>0.8 seconds</b>", body_style))
story.append(Paragraph(b("EDV (End Diastolic Volume):") + " 120 mL | " + b("ESV (End Systolic Volume):") + " 50 mL | " + b("Stroke Volume:") + " 70 mL | " + b("Ejection Fraction:") + " 58-65%", body_style))

story.append(Paragraph("<b>PHASES OF THE CARDIAC CYCLE</b>", subheading_style))
phase_data = [
    [Paragraph("<b>Phase</b>", body_style), Paragraph("<b>Duration</b>", body_style), Paragraph("<b>Valve Status</b>", body_style), Paragraph("<b>Events</b>", body_style)],
    [Paragraph("1. Atrial Systole", body_style), Paragraph("0.1 s", body_style), Paragraph("MV/TV open; AoV/PV closed", body_style), Paragraph("Atria contract; 20-25 mL additional blood enters ventricles (atrial kick); accounts for last 20-25% filling", body_style)],
    [Paragraph("2. Isovolumetric Contraction", body_style), Paragraph("0.05 s", body_style), Paragraph("All valves CLOSED", body_style), Paragraph("Ventricles begin contracting; pressure rises sharply; NO blood flow; volume unchanged (120 mL); loudest oxygen consumption", body_style)],
    [Paragraph("3. Rapid Ejection", body_style), Paragraph("0.1 s", body_style), Paragraph("AoV/PV open; MV/TV closed", body_style), Paragraph("Pressure in ventricle > aorta; aortic/pulmonary valves open; ~70% of SV ejected rapidly; peak aortic pressure = 120 mmHg", body_style)],
    [Paragraph("4. Slow Ejection", body_style), Paragraph("0.15 s", body_style), Paragraph("AoV/PV open; MV/TV closed", body_style), Paragraph("Remaining 30% of SV ejected; ventricular pressure begins to fall", body_style)],
    [Paragraph("5. Isovolumetric Relaxation", body_style), Paragraph("0.08 s", body_style), Paragraph("All valves CLOSED", body_style), Paragraph("Ventricles relax; pressure drops rapidly; NO blood flow; volume unchanged (50 mL); aortic notch (incisura) marks aortic valve closure", body_style)],
    [Paragraph("6. Rapid Ventricular Filling", body_style), Paragraph("0.1 s", body_style), Paragraph("MV/TV open; AoV/PV closed", body_style), Paragraph("Ventricular pressure < atrial pressure; AV valves open; rapid passive filling (~70% of filling); S3 sound may occur", body_style)],
    [Paragraph("7. Slow Filling (Diastasis)", body_style), Paragraph("0.19 s", body_style), Paragraph("MV/TV open; AoV/PV closed", body_style), Paragraph("Slow passive filling; atria fill from venous return; precedes atrial systole", body_style)],
]
pht = Table(phase_data, colWidths=[3.2*cm, 1.8*cm, 3.5*cm, 8.5*cm])
pht.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('FONTSIZE', (0,0), (-1,-1), 8.5),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(pht)
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>HEART SOUNDS</b>", subheading_style))
hs_data = [
    [Paragraph("<b>Sound</b>", body_style), Paragraph("<b>Cause</b>", body_style), Paragraph("<b>Timing</b>", body_style), Paragraph("<b>Clinical Note</b>", body_style)],
    [Paragraph("S1 (Lub)", body_style), Paragraph("Closure of mitral + tricuspid valves", body_style), Paragraph("Start of systole (isovolumetric contraction)", body_style), Paragraph("Loud in mitral stenosis; soft in mitral regurgitation", body_style)],
    [Paragraph("S2 (Dub)", body_style), Paragraph("Closure of aortic + pulmonary valves", body_style), Paragraph("Start of diastole (isovolumetric relaxation)", body_style), Paragraph("Split S2 in ASD, RBBB; single in AS", body_style)],
    [Paragraph("S3", body_style), Paragraph("Rapid ventricular filling vibrating ventricular walls", body_style), Paragraph("Early diastole", body_style), Paragraph("Normal in children/young; pathological in heart failure (ventricular gallop)", body_style)],
    [Paragraph("S4", body_style), Paragraph("Atrial contraction against stiff ventricle", body_style), Paragraph("Late diastole (just before S1)", body_style), Paragraph("Always pathological; LVH, hypertension, AS", body_style)],
]
hst = Table(hs_data, colWidths=[2*cm, 5*cm, 4*cm, 6*cm])
hst.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(hst)
story.append(Spacer(1, 0.3*cm))

# Q7: ECG
story.append(question_box(7, "Describe the normal ECG waves and their clinical significance. [5 marks]"))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(b("Definition:") + " ECG (Electrocardiogram) records the electrical activity of the heart from body surface electrodes. Standard: 12 leads (6 limb + 6 precordial). Paper speed: 25 mm/s; 1 small box = 0.04 s; 1 large box = 0.2 s.", body_style))

ecg_data = [
    [Paragraph("<b>Wave/Interval</b>", body_style), Paragraph("<b>Represents</b>", body_style), Paragraph("<b>Normal Value</b>", body_style), Paragraph("<b>Abnormality</b>", body_style)],
    [Paragraph("P wave", body_style), Paragraph("Atrial depolarization (SA node → AV node)", body_style), Paragraph("<0.12 s; amplitude <2.5 mm", body_style), Paragraph("Absent in AF; peaked in RA hypertrophy; bifid in LA hypertrophy", body_style)],
    [Paragraph("PR interval", body_style), Paragraph("AV conduction time (atria to bundle of His)", body_style), Paragraph("0.12-0.20 s", body_style), Paragraph("Prolonged in 1st degree AV block; short in WPW syndrome", body_style)],
    [Paragraph("QRS complex", body_style), Paragraph("Ventricular depolarization", body_style), Paragraph("<0.12 s", body_style), Paragraph("Wide in LBBB, RBBB, VT; abnormal in MI (Q waves)", body_style)],
    [Paragraph("ST segment", body_style), Paragraph("Plateau of ventricular action potential (no net current)", body_style), Paragraph("Isoelectric (flat)", body_style), Paragraph("Elevated in STEMI, pericarditis; depressed in NSTEMI, ischaemia, digoxin", body_style)],
    [Paragraph("T wave", body_style), Paragraph("Ventricular repolarization", body_style), Paragraph("Upright in V1-V6; height <6 mm limb leads", body_style), Paragraph("Inverted in ischaemia, RVH; peaked tall in hyperkalaemia", body_style)],
    [Paragraph("QT interval", body_style), Paragraph("Total ventricular electrical systole", body_style), Paragraph("<440 ms (male); <460 ms (female)", body_style), Paragraph("Long QT: risk of Torsades de Pointes; short in hypercalcaemia, digoxin", body_style)],
]
ecgt = Table(ecg_data, colWidths=[3*cm, 4*cm, 3.5*cm, 6.5*cm])
ecgt.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('FONTSIZE', (0,0), (-1,-1), 8.5),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(ecgt)
story.append(PageBreak())

# ===================== UNIT 4: RESPIRATORY =====================
story.append(unit_box("UNIT 4: RESPIRATORY SYSTEM"))
story.append(Spacer(1, 0.3*cm))

# Q8: Mechanics + Surfactant
story.append(question_box(8, "Describe the mechanics of breathing. Explain the role of surfactant. Add a note on pneumothorax and RDS. [10 marks]"))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>MECHANICS OF BREATHING</b>", subheading_style))
story.append(Paragraph(b("Principles:") + " Breathing is powered by changes in intrathoracic pressure generated by respiratory muscles. Air flows from high to low pressure (Boyle's Law).", body_style))

story.append(Paragraph(b("INSPIRATION (Active Process):"), body_style))
for p in ["Primary muscle: Diaphragm (contracts → moves down ~1.5 cm) - responsible for 75% of tidal breathing",
          "Accessory: External intercostals (elevate ribs, increase AP diameter)",
          "Forced inspiration: Scalene, SCM, pectoralis minor",
          "Intrapleural pressure drops from -2.5 cmH2O → -6 cmH2O",
          "Lung expands → intra-alveolar pressure drops below atmospheric → air flows in"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("EXPIRATION (Passive at Rest):"), body_style))
for p in ["Respiratory muscles relax → elastic recoil of lungs + chest wall forces air out",
          "Intrapleural pressure returns to -2.5 cmH2O",
          "Forced expiration (active): Internal intercostals + Abdominals"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph("<b>LUNG COMPLIANCE</b>", subheading_style))
story.append(Paragraph("Compliance = Change in volume / Change in pressure = ΔV/ΔP. Normal lung compliance = 200 mL/cmH2O.", body_style))
story.append(Paragraph("• Decreased compliance: pulmonary fibrosis, RDS, pneumonia, pulmonary oedema - lungs are stiffer, more work to breathe", bullet_style))
story.append(Paragraph("• Increased compliance: emphysema - lungs easily distensible but lose elastic recoil", bullet_style))

story.append(Paragraph("<b>SURFACTANT</b>", subheading_style))
story.append(Paragraph(
    "From Guyton & Hall: Surfactant is a surface-active agent secreted by " + b("Type II alveolar epithelial cells") +
    " (pneumocytes), which constitute about 10% of alveolar surface area.",
    body_style))
story.append(Paragraph(b("Composition:") + " Dipalmitoyl phosphatidylcholine (DPPC) - most important component; also surfactant apoproteins (SP-A, SP-B, SP-C, SP-D) and calcium ions.", body_style))
story.append(Paragraph(b("Mechanism:") + " DPPC molecules are amphipathic - hydrophobic tails spread over water surface of alveoli, physically reducing surface tension. Does NOT dissolve uniformly in alveolar fluid.", body_style))
story.append(Paragraph(b("Effect on surface tension:"), body_style))
surf_data = [
    ["Fluid", "Surface Tension"],
    ["Pure water", "72 dynes/cm"],
    ["Alveolar fluid without surfactant", "50 dynes/cm"],
    ["Alveolar fluid WITH surfactant (normal)", "5-30 dynes/cm"],
]
sft = Table(surf_data, colWidths=[9*cm, 8*cm])
sft.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 8),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
]))
story.append(sft)
story.append(Spacer(1, 0.1*cm))

story.append(Paragraph(b("Functions of surfactant:"), body_style))
for p in ["Reduces work of breathing - prevents alveolar collapse (atelectasis)",
          "Prevents pulmonary oedema - by reducing alveolar surface tension, less fluid is drawn into alveoli",
          "Law of Laplace (P = 2T/r): smaller alveoli generate higher pressure - surfactant prevents smaller alveoli from collapsing into larger ones (alveolar stability)",
          "Develops late in fetal life - mature levels by 35-36 weeks gestation"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("Respiratory Distress Syndrome (RDS / Hyaline Membrane Disease):"), body_style))
story.append(Paragraph("Premature neonates (<35 weeks): insufficient surfactant production → alveolar collapse → stiff lungs → hypoxia → type II cell damage → hyaline membrane formation in alveoli. Treatment: antenatal steroids (betamethasone) to accelerate lung maturity; postnatal exogenous surfactant (beractant).", body_style))

story.append(Paragraph(b("PNEUMOTHORAX:"), body_style))
story.append(Paragraph("Air enters the pleural cavity (normally a potential space with -2.5 cmH2O negative pressure). The negative pressure is lost → elastic recoil causes lung to collapse.", body_style))
for p in ["Spontaneous: tall thin young males; rupture of apical bulla",
          "Tension pneumothorax: one-way valve mechanism; progressive air accumulation; shifts mediastinum → medical emergency",
          "Treatment: needle decompression (2nd ICS midclavicular) → chest tube"]:
    story.append(Paragraph(f"• {p}", bullet_style))
story.append(Spacer(1, 0.3*cm))

# Q9: Lung Volumes
story.append(question_box(9, "Describe lung volumes and capacities with their normal values and clinical significance. [5 marks]"))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph("Lung volumes are measured by spirometry. Note: Residual Volume (RV) CANNOT be measured by spirometry; needs helium dilution or body plethysmography.", body_style))

lv_data = [
    [Paragraph("<b>Parameter</b>", body_style), Paragraph("<b>Definition</b>", body_style), Paragraph("<b>Normal Value</b>", body_style)],
    [Paragraph("Tidal Volume (TV)", body_style), Paragraph("Air breathed in/out per normal breath", body_style), Paragraph("500 mL", body_style)],
    [Paragraph("Inspiratory Reserve Volume (IRV)", body_style), Paragraph("Extra air that can be inhaled above TV (max inspiration)", body_style), Paragraph("3000 mL", body_style)],
    [Paragraph("Expiratory Reserve Volume (ERV)", body_style), Paragraph("Extra air that can be exhaled below TV (max expiration)", body_style), Paragraph("1100 mL", body_style)],
    [Paragraph("Residual Volume (RV)", body_style), Paragraph("Air remaining after maximum expiration (cannot be expelled)", body_style), Paragraph("1200 mL", body_style)],
    [Paragraph("Vital Capacity (VC = IRV+TV+ERV)", body_style), Paragraph("Max air exhaled after max inspiration", body_style), Paragraph("4600 mL", body_style)],
    [Paragraph("Total Lung Capacity (TLC = VC+RV)", body_style), Paragraph("Total air in lungs after max inspiration", body_style), Paragraph("5800 mL", body_style)],
    [Paragraph("Functional Residual Capacity (FRC = ERV+RV)", body_style), Paragraph("Air in lungs at end of normal expiration", body_style), Paragraph("2300 mL", body_style)],
    [Paragraph("Inspiratory Capacity (IC = TV+IRV)", body_style), Paragraph("Max air inspired from FRC", body_style), Paragraph("3500 mL", body_style)],
    [Paragraph("FEV1 (Forced Expiratory Volume in 1 sec)", body_style), Paragraph("Air expelled in first second of forced expiration", body_style), Paragraph(">80% of FVC", body_style)],
    [Paragraph("FEV1/FVC ratio", body_style), Paragraph("Distinguishes obstructive vs restrictive disease", body_style), Paragraph(">0.7 (70%)", body_style)],
]
lvt = Table(lv_data, colWidths=[5.5*cm, 7*cm, 4.5*cm])
lvt.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(lvt)
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(b("Spirometry pattern: Obstructive") + " (asthma, COPD): FEV1 reduced, FVC normal/reduced, FEV1/FVC <70% | " + b("Restrictive") + " (fibrosis, RDS): FEV1 reduced, FVC reduced, FEV1/FVC >70% (ratio preserved)", body_style))
story.append(PageBreak())

# ===================== UNIT 5: RENAL =====================
story.append(unit_box("UNIT 5: RENAL PHYSIOLOGY"))
story.append(Spacer(1, 0.3*cm))

story.append(question_box(10, "Describe glomerular filtration and GFR. Explain countercurrent mechanism for concentration of urine. [10 marks]"))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>GLOMERULAR FILTRATION</b>", subheading_style))
story.append(Paragraph(b("Filtration barrier") + " (3 layers):", body_style))
for p in ["Fenestrated capillary endothelium: pores 70-100 nm; blocks cells and large proteins",
          "Glomerular basement membrane (GBM): negative charge (heparan sulfate proteoglycans) → repels negatively charged albumin",
          "Podocytes with filtration slits (25 nm): final size barrier; slit diaphragm contains nephrin"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("Starling Forces determining Net Filtration Pressure (NFP):"), body_style))
forces_data = [
    [Paragraph("<b>Force</b>", body_style), Paragraph("<b>Value (mmHg)</b>", body_style), Paragraph("<b>Direction</b>", body_style)],
    [Paragraph("Glomerular capillary hydrostatic pressure (Pcap)", body_style), Paragraph("60", body_style), Paragraph("Promotes filtration", body_style)],
    [Paragraph("Bowman's space hydrostatic pressure (Pbs)", body_style), Paragraph("18", body_style), Paragraph("Opposes filtration", body_style)],
    [Paragraph("Oncotic pressure of capillary blood (πcap)", body_style), Paragraph("32", body_style), Paragraph("Opposes filtration", body_style)],
    [Paragraph("Oncotic pressure of filtrate (πfiltrate)", body_style), Paragraph("0", body_style), Paragraph("Promotes filtration (negligible)", body_style)],
    [Paragraph("NET FILTRATION PRESSURE", body_style), Paragraph("60-18-32 = +10 mmHg", body_style), Paragraph("Net outward → filtration", body_style)],
]
fft = Table(forces_data, colWidths=[7*cm, 4*cm, 6*cm])
fft.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('BACKGROUND', (0,-1), (-1,-1), LIGHT_BLUE),
    ('ROWBACKGROUNDS', (0,1), (-1,-2), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(fft)
story.append(Spacer(1, 0.1*cm))

story.append(Paragraph(b("GFR = 125 mL/min") + " (180 L/day filtered; 1.5 L urine produced/day)", body_style))
story.append(Paragraph(b("Filtration fraction") + " = GFR / Renal Plasma Flow = 125/625 = 20%", body_style))
story.append(Paragraph(b("Measurement of GFR:") + " Inulin clearance (gold standard - freely filtered, not reabsorbed/secreted/metabolized). Clinically: creatinine clearance = (Ucr × V) / Pcr", body_style))

story.append(Paragraph("<b>AUTOREGULATION OF GFR (Range: MAP 80-180 mmHg)</b>", subheading_style))
for p in ["Myogenic mechanism: increased pressure → afferent arteriole stretch → constriction → maintains GFR",
          "Tubuloglomerular feedback (TGF): increased GFR → increased NaCl to macula densa → adenosine release → afferent arteriole constriction → reduces GFR back to normal"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph("<b>COUNTERCURRENT MECHANISM - CONCENTRATION OF URINE</b>", subheading_style))
story.append(Paragraph(
    "The kidney can produce urine ranging from 50 mOsm/kg (maximally dilute) to 1200-1400 mOsm/kg (maximally concentrated). "
    "This depends on the medullary osmotic gradient and ADH.",
    body_style))

story.append(Paragraph(b("1. Countercurrent Multiplier (Loop of Henle):"), body_style))
for p in ["Descending limb: permeable to water (but NOT solute); as fluid descends into hypertonic medulla, water leaves → tubular fluid becomes progressively concentrated; reaches ~1200 mOsm at tip of loop",
          "Ascending limb (thin): passively permeable to NaCl (not water); NaCl diffuses out",
          "Ascending limb (thick): ACTIVE NaCl transport (Na+/K+/2Cl- cotransporter NKCC2, blocked by furosemide) but impermeable to water → dilutes tubular fluid",
          "Net effect: builds up medullary interstitial hypertonicity (cortex 300 mOsm → medulla 1200 mOsm)"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("2. Countercurrent Exchanger (Vasa Recta):"), body_style))
story.append(Paragraph("Hairpin capillaries follow loop of Henle. Blood flowing down takes up solute/loses water; flowing up releases solute/gains water. Net: PRESERVES medullary gradient (does not wash it out).", body_style))

story.append(Paragraph(b("3. Role of ADH (Antidiuretic Hormone / Vasopressin):"), body_style))
for p in ["Secreted by posterior pituitary (synthesized in supraoptic and paraventricular nuclei of hypothalamus)",
          "Stimulus: increased plasma osmolality (>285 mOsm), decreased blood volume, decreased blood pressure",
          "Action: inserts aquaporin-2 (AQP2) channels into collecting duct apical membrane → water reabsorption → concentrated urine",
          "Without ADH: collecting duct impermeable to water → 15-20 L/day dilute urine → Diabetes Insipidus (DI)"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph(b("4. Role of Urea:"), body_style))
story.append(Paragraph("Inner medullary collecting duct is permeable to urea (ADH opens urea transporters UT-A1, UT-A3). Urea accumulates in medullary interstitium and contributes ~50% of medullary hypertonicity.", body_style))
story.append(clinical_note("Diabetes Insipidus: Central DI (ADH deficiency - head trauma, pituitary tumour): treat with desmopressin (DDAVP). Nephrogenic DI (ADH resistance - lithium, hypercalcaemia): treat with thiazide diuretics + low Na diet."))
story.append(PageBreak())

# ===================== UNIT 6: ENDOCRINE =====================
story.append(unit_box("UNIT 6: ENDOCRINE SYSTEM"))
story.append(Spacer(1, 0.3*cm))

story.append(question_box(11, "Describe the synthesis, secretion, transport, actions and disorders of thyroid hormones. [10 marks]"))
story.append(Spacer(1, 0.2*cm))

story.append(Paragraph("<b>THYROID HORMONE SYNTHESIS</b> (Guyton & Hall)", subheading_style))
story.append(Paragraph("The thyroid gland consists of follicles lined by follicular cells surrounding colloid (thyroglobulin). Steps:", body_style))
th_steps = [
    ("Step 1 - Iodide trapping:", "Active transport of I- from blood into thyroid cells via sodium-iodide symporter (NIS) on basolateral membrane. Thyroid:plasma ratio = 30:1 (up to 250:1 in hyperactive thyroid). Stimulated by TSH."),
    ("Step 2 - Thyroglobulin synthesis:", "Large glycoprotein (MW 660,000) synthesized in follicular cells → exported into follicular colloid."),
    ("Step 3 - Oxidation of iodide:", "I- → I2 (active iodine) by thyroid peroxidase (TPO) + H2O2. At the apical cell-colloid interface."),
    ("Step 4 - Organification:", "Oxidized iodine + tyrosine residues of thyroglobulin (catalyzed by TPO) → monoiodotyrosine (MIT) and diiodotyrosine (DIT)."),
    ("Step 5 - Coupling:", "MIT + DIT → T3 (triiodothyronine); DIT + DIT → T4 (thyroxine). Catalyzed by TPO. Ratio T4:T3 = 14:1 in secretion."),
    ("Step 6 - Storage:", "Thyroid hormones stored as thyroglobulin in colloid - unique among endocrine glands. Storage sufficient for 2-3 months."),
    ("Step 7 - Secretion:", "TSH stimulates endocytosis of thyroglobulin colloid → lysosomes cleave T3 and T4 → secreted into blood. MIT and DIT are deiodinated (iodine recycled). T4 is prohormone; converted to T3 (active form) in peripheral tissues by 5'-deiodinase."),
]
for step, desc in th_steps:
    story.append(Paragraph(f"• {b(step)} {desc}", bullet_style))

story.append(Paragraph("<b>TRANSPORT IN BLOOD</b>", subheading_style))
for p in ["99.97% of T4 and 99.7% of T3 are protein-bound",
          "Binding proteins: Thyroid Binding Globulin (TBG) - 70%; Transthyretin (TTR) - 10%; Albumin - 20%",
          "Only free (unbound) hormone is biologically active",
          "T3 is 3-5x more potent than T4; T4 has longer half-life (7 days vs. 1 day for T3)"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph("<b>ACTIONS OF THYROID HORMONES</b>", subheading_style))
story.append(Paragraph("From Guyton & Hall: Thyroid hormones activate nuclear transcription of many genes → synthesis of protein enzymes, structural proteins, transport proteins. Major effects:", body_style))
actions_data = [
    [Paragraph("<b>System</b>", body_style), Paragraph("<b>Effect</b>", body_style)],
    [Paragraph("Metabolism", body_style), Paragraph("Increases BMR (basal metabolic rate) by 60-100%; thermogenesis; increases O2 consumption in all tissues except brain, spleen, gonads", body_style)],
    [Paragraph("Cardiovascular", body_style), Paragraph("Increases HR, cardiac output, contractility; increases beta-adrenergic receptor sensitivity (causes tachycardia, palpitations in hyperthyroidism)", body_style)],
    [Paragraph("Nervous System", body_style), Paragraph("Essential for normal brain development in fetal/neonatal life (deficiency → cretinism); promotes alertness, reflexes, mental agility", body_style)],
    [Paragraph("Growth", body_style), Paragraph("Promotes growth and bone maturation (synergistic with GH); essential for normal skeletal development", body_style)],
    [Paragraph("GIT", body_style), Paragraph("Increases gut motility (hyperthyroidism → diarrhoea; hypothyroidism → constipation)", body_style)],
    [Paragraph("Reproduction", body_style), Paragraph("Normal levels needed for fertility; excess or deficiency → menstrual irregularities", body_style)],
]
at2 = Table(actions_data, colWidths=[4*cm, 13*cm])
at2.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(at2)
story.append(Spacer(1, 0.1*cm))

story.append(Paragraph("<b>DISORDERS</b>", subheading_style))
dis_data = [
    [Paragraph("<b>Disorder</b>", body_style), Paragraph("<b>Features</b>", body_style), Paragraph("<b>Cause</b>", body_style)],
    [Paragraph("Hyperthyroidism (Grave's Disease)", body_style), Paragraph("Weight loss, heat intolerance, tachycardia, tremor, exophthalmos, anxiety, diarrhoea, goitre", body_style), Paragraph("TSH receptor stimulating antibodies (TSI - thyroid stimulating immunoglobulins)", body_style)],
    [Paragraph("Hypothyroidism (Myxoedema)", body_style), Paragraph("Weight gain, cold intolerance, bradycardia, constipation, dry skin, hair loss, delayed reflexes, hoarse voice, periorbital oedema", body_style), Paragraph("Autoimmune (Hashimoto's) - most common; iodine deficiency, surgical/RAI", body_style)],
    [Paragraph("Cretinism (Congenital Hypothyroidism)", body_style), Paragraph("Intellectual disability, growth retardation, coarse facies, macroglossia, umbilical hernia, jaundice. Screened at birth.", body_style), Paragraph("Iodine deficiency in pregnancy (most common worldwide), congenital agenesis", body_style)],
]
dist = Table(dis_data, colWidths=[4.5*cm, 7.5*cm, 5*cm])
dist.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), RED),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(dist)
story.append(PageBreak())

# ===================== UNIT 7: NERVOUS SYSTEM =====================
story.append(unit_box("UNIT 7: NERVOUS SYSTEM & SPECIAL SENSES"))
story.append(Spacer(1, 0.3*cm))

story.append(question_box(12, "Trace the visual pathway. Describe the visual field defects produced by lesions at various levels. [10 marks]"))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph("<b>VISUAL PATHWAY</b>", subheading_style))
story.append(Paragraph("Light → Retina (photoreceptors: rods for dim light/scotopic; cones for colour/photopic) → Bipolar cells → Retinal Ganglion cells → Optic nerve (CN II) → Optic chiasm → Optic tract → Lateral Geniculate Nucleus (LGN) of thalamus → Optic radiation → Primary visual cortex (V1, Area 17, calcarine fissure, occipital lobe)", body_style))

story.append(Paragraph(b("Key anatomical points:"), body_style))
for p in ["Nasal (medial) retinal fibers from each eye cross at the optic chiasm",
          "Temporal (lateral) retinal fibers do NOT cross (remain ipsilateral)",
          "Right optic tract carries: right temporal retina (right visual field, right side) + left nasal retina (also right visual field from left eye)",
          "Therefore: each optic tract carries signals from the CONTRALATERAL visual field",
          "Meyer's loop: inferior fibers of optic radiation loop through temporal lobe → lesion causes 'pie in the sky' visual field defect (contralateral superior quadrantanopia)",
          "Superior fibers travel through parietal lobe → lesion causes 'pie on the floor' (inferior quadrantanopia)"]:
    story.append(Paragraph(f"• {p}", bullet_style))

story.append(Paragraph("<b>VISUAL FIELD DEFECTS AT DIFFERENT LESION SITES</b>", subheading_style))
vf_data = [
    [Paragraph("<b>Site of Lesion</b>", body_style), Paragraph("<b>Visual Field Defect</b>", body_style), Paragraph("<b>Common Cause</b>", body_style)],
    [Paragraph("Optic Nerve (right)", body_style), Paragraph("Monocular blindness (right eye only - ipsilateral)", body_style), Paragraph("Optic neuritis (MS), optic glioma", body_style)],
    [Paragraph("Optic Chiasm (centre/body)", body_style), Paragraph("Bitemporal heteronymous hemianopia (tunnel vision - both temporal fields lost)", body_style), Paragraph("Pituitary adenoma (most common)", body_style)],
    [Paragraph("Optic Chiasm (lateral)", body_style), Paragraph("Binasal hemianopia (rare - both nasal fields lost)", body_style), Paragraph("Bilateral carotid aneurysms", body_style)],
    [Paragraph("Optic Tract (right)", body_style), Paragraph("Left homonymous hemianopia (left visual field of both eyes lost)", body_style), Paragraph("Stroke, tumour", body_style)],
    [Paragraph("Temporal lobe (right) - Meyer's loop", body_style), Paragraph("Left superior quadrantanopia ('pie in the sky')", body_style), Paragraph("Temporal lobe tumour", body_style)],
    [Paragraph("Parietal lobe (right)", body_style), Paragraph("Left inferior quadrantanopia ('pie on the floor')", body_style), Paragraph("Parietal lobe tumour", body_style)],
    [Paragraph("Occipital cortex (right)", body_style), Paragraph("Left homonymous hemianopia WITH macular sparing", body_style), Paragraph("Posterior cerebral artery infarct (macula has dual blood supply)", body_style)],
]
vft = Table(vf_data, colWidths=[4.5*cm, 6*cm, 6.5*cm])
vft.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(vft)
story.append(Spacer(1, 0.2*cm))

story.append(question_box(13, "Describe the auditory pathway. Differentiate conduction deafness from sensorineural deafness. [5 marks]"))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph("<b>AUDITORY PATHWAY</b>", subheading_style))
story.append(Paragraph("Sound waves → Pinna → External auditory canal → Tympanic membrane (vibrates) → Ossicles (Malleus → Incus → Stapes; 20x mechanical advantage) → Oval window → Cochlea (perilymph in scala vestibuli and tympani; endolymph in scala media/cochlear duct) → Basilar membrane vibration (tonotopically organized: base = high frequency; apex = low frequency) → Organ of Corti → Stereocilia deflection of hair cells → Depolarization → CN VIII (Cochlear division) → Cochlear nuclei (medulla) → Superior olivary nuclei (crossing occurs here; binaural hearing, sound localization) → Lateral lemniscus → Inferior colliculus (midbrain; auditory reflexes) → Medial Geniculate Nucleus (MGN, thalamus) → Auditory cortex (temporal lobe, area 41 and 42, Heschl's gyri)", body_style))

story.append(Paragraph("<b>DIFFERENTIATION OF DEAFNESS</b>", subheading_style))
deaf_data = [
    [Paragraph("<b>Feature</b>", body_style), Paragraph("<b>Conduction Deafness</b>", body_style), Paragraph("<b>Sensorineural Deafness</b>", body_style)],
    [Paragraph("Pathology", body_style), Paragraph("Problem with sound conduction - external canal, tympanic membrane, or ossicles", body_style), Paragraph("Damage to hair cells in cochlea (sensory) or cochlear nerve (neural)", body_style)],
    [Paragraph("Causes", body_style), Paragraph("Wax impaction, otitis media, otosclerosis, perforated TM, ossicular chain disruption", body_style), Paragraph("Noise-induced, ototoxic drugs (aminoglycosides, furosemide), Meniere's disease, presbycusis, acoustic neuroma", body_style)],
    [Paragraph("Rinne Test (512 Hz tuning fork)", body_style), Paragraph("Negative Rinne: BC > AC (bone conduction better than air conduction)", body_style), Paragraph("Positive Rinne: AC > BC (same as normal but both reduced equally)", body_style)],
    [Paragraph("Weber Test (tuning fork on vertex)", body_style), Paragraph("Lateralizes to AFFECTED ear (bone conduction better in deaf ear due to reduced ambient noise masking)", body_style), Paragraph("Lateralizes to NORMAL ear (better function)", body_style)],
    [Paragraph("Audiogram", body_style), Paragraph("Air conduction threshold raised; bone conduction normal. Air-bone gap present.", body_style), Paragraph("Both air and bone conduction thresholds raised equally. No air-bone gap.", body_style)],
    [Paragraph("Treatment", body_style), Paragraph("Often correctable: wax removal, antibiotics, surgery (myringoplasty, stapedectomy)", body_style), Paragraph("Often irreversible; hearing aids, cochlear implants", body_style)],
]
dt = Table(deaf_data, colWidths=[3.5*cm, 6.5*cm, 7*cm])
dt.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), MED_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(dt)
story.append(PageBreak())

# ===================== SHORT NOTES =====================
story.append(unit_box("SHORT NOTES (3 marks each) - High-Yield Answers"))
story.append(Spacer(1, 0.3*cm))

short_notes = [
    ("SN1", "Frank-Starling Law of the Heart",
     ["States: The greater the end-diastolic volume (EDV), the greater the stroke volume (SV) and force of contraction, up to an optimal length.",
      "Mechanism: Optimal sarcomere length = 2.0-2.4 µm → maximum actin-myosin cross-bridge overlap → maximum force",
      "At rest EDV = 120 mL; on exercise EDV increases (more venous return) → SV increases",
      "Clinical significance: Heart adjusts its output beat-by-beat to match venous return. In heart failure, Starling curve is depressed - more filling needed to achieve same output."]),
    ("SN2", "Erythropoiesis - Stages and Regulation",
     ["Site: Red bone marrow (in adults - sternum, iliac crest, vertebrae, ribs)",
      "Stages: CFU-E → Proerythroblast → Basophilic erythroblast → Polychromatic erythroblast → Orthochromatic erythroblast → Reticulocyte (released into blood) → Mature RBC (after ~2 days; loses nucleus and organelles). Total time: ~7 days.",
      "Regulation: Tissue hypoxia → kidney peritubular cells release Erythropoietin (EPO) → stimulates BFU-E and CFU-E to proliferate and differentiate",
      "Requirements: Iron (for haem), Vitamin B12 + Folic acid (for DNA synthesis), Erythropoietin, Intrinsic factor (for B12 absorption from terminal ileum)",
      "Reticulocyte count: 1-2% of RBCs; elevated count indicates active erythropoiesis"]),
    ("SN3", "Blood Groups - ABO System",
     ["Based on glycoprotein antigens (agglutinogens) on RBC surface and corresponding antibodies (agglutinins) in plasma",
      "Landsteiner's Law: If an antigen is absent on RBC, the corresponding antibody is present in plasma",
      "A (antigen A + anti-B antibody) | B (antigen B + anti-A antibody) | AB (both antigens, no antibodies) - universal recipient | O (no antigens, both anti-A and anti-B) - universal donor",
      "Rh System: D antigen is most important. Rh+ (D antigen present) = 85% of population. Rh- person does not have preformed antibodies but can develop them on exposure.",
      "Erythroblastosis Fetalis: Rh- mother, Rh+ fetus. Sensitisation in 1st pregnancy; IgG anti-D crosses placenta in 2nd pregnancy → haemolysis of fetal RBCs. Prevention: anti-D immunoglobulin (Rhogam) within 72 hours of delivery/miscarriage."]),
    ("SN4", "Cerebrospinal Fluid (CSF)",
     ["Production: 500 mL/day, ~150 mL present at any time. Produced by choroid plexus of lateral ventricles (70%) and brain parenchyma.",
      "Circulation: Lateral ventricles → Foramen of Monro → 3rd ventricle → Aqueduct of Sylvius → 4th ventricle → Foramen of Magendie (median) and Luschka (lateral) → subarachnoid space → arachnoid villi → dural venous sinuses",
      "Normal composition: Clear, colourless; protein 15-45 mg/dL; glucose 50-80 mg/dL (60-70% of blood glucose); cells <5/mm3 (lymphocytes); pressure 70-180 mmH2O",
      "Functions: Mechanical cushion (buoyancy - brain weighs 1400 g in air but only 50 g in CSF), chemical buffer, nutrient transport, waste removal",
      "Hydrocephalus: CSF accumulation due to obstruction or overproduction or impaired absorption"]),
    ("SN5", "Renin-Angiotensin-Aldosterone System (RAAS)",
     ["Trigger: Decreased renal perfusion pressure, decreased Na+ delivery to macula densa, increased sympathetic activity → JGA granular cells secrete Renin",
      "Cascade: Renin cleaves Angiotensinogen (from liver) → Angiotensin I → ACE (lungs) converts to Angiotensin II (8 amino acids - most potent vasoconstrictor)",
      "Angiotensin II actions: (1) Vasoconstriction → ↑BP; (2) Stimulates adrenal cortex → Aldosterone → Na+ and water retention; (3) Stimulates ADH release; (4) Cardiac and vascular hypertrophy; (5) Increases thirst",
      "Aldosterone: Acts on distal tubule and collecting duct → inserts ENaC channels → Na+ reabsorption (with K+ excretion and H+ excretion)",
      "Clinical: ACE inhibitors (enalapril) and ARBs (losartan) block RAAS → used in hypertension, heart failure, CKD with proteinuria"]),
    ("SN6", "Pain - Gate Control Theory",
     ["Gate Control Theory (Melzack and Wall, 1965): Substantia gelatinosa (SG) of dorsal horn acts as a 'gate' that can modulate pain transmission.",
      "Large diameter Aβ fibers (touch, pressure) → activate SG inhibitory neurons → CLOSE the gate → reduce pain transmission",
      "Small diameter C and Aδ fibers (pain, temperature) → inhibit SG neurons → OPEN the gate → increase pain transmission",
      "Descending inhibition: periaqueductal gray (PAG) → raphe nuclei → dorsal horn → releases serotonin and enkephalins → CLOSE gate",
      "Clinical applications: TENS (transcutaneous electrical nerve stimulation), acupuncture, massage, rubbing - activate Aβ fibers to close gate"]),
]

for sn_id, title, points in short_notes:
    story.append(KeepTogether([
        question_box(sn_id, title),
        Spacer(1, 0.1*cm),
    ]))
    for p in points:
        story.append(Paragraph(f"• {p}", bullet_style))
    story.append(Spacer(1, 0.2*cm))

story.append(PageBreak())

# ===================== NORMAL VALUES TABLE =====================
story.append(unit_box("QUICK REFERENCE - NORMAL VALUES & MNEMONICS"))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("<b>Normal Physiological Values (Must Memorise)</b>", subheading_style))
nv_data = [
    [Paragraph("<b>Parameter</b>", body_style), Paragraph("<b>Normal Value</b>", body_style),
     Paragraph("<b>Parameter</b>", body_style), Paragraph("<b>Normal Value</b>", body_style)],
    [Paragraph("Resting Membrane Potential", body_style), Paragraph("-70 mV", body_style),
     Paragraph("Heart Rate", body_style), Paragraph("60-100 beats/min", body_style)],
    [Paragraph("Threshold Potential", body_style), Paragraph("-55 mV", body_style),
     Paragraph("Cardiac Output", body_style), Paragraph("5 L/min", body_style)],
    [Paragraph("Blood pH", body_style), Paragraph("7.35 - 7.45", body_style),
     Paragraph("Stroke Volume", body_style), Paragraph("70 mL", body_style)],
    [Paragraph("Haemoglobin (Male)", body_style), Paragraph("14-16 g/dL", body_style),
     Paragraph("Ejection Fraction", body_style), Paragraph("58-65%", body_style)],
    [Paragraph("Haemoglobin (Female)", body_style), Paragraph("12-14 g/dL", body_style),
     Paragraph("GFR", body_style), Paragraph("125 mL/min (180 L/day)", body_style)],
    [Paragraph("WBC Count", body_style), Paragraph("4,000-11,000 /µL", body_style),
     Paragraph("Filtration Fraction", body_style), Paragraph("20%", body_style)],
    [Paragraph("Platelet Count", body_style), Paragraph("1.5-4 lakh /µL", body_style),
     Paragraph("Tidal Volume", body_style), Paragraph("500 mL", body_style)],
    [Paragraph("P50 of Haemoglobin", body_style), Paragraph("26 mmHg", body_style),
     Paragraph("Vital Capacity", body_style), Paragraph("4600 mL", body_style)],
    [Paragraph("RBC count (Male)", body_style), Paragraph("5-5.5 million/µL", body_style),
     Paragraph("TLC", body_style), Paragraph("5800 mL", body_style)],
    [Paragraph("RBC count (Female)", body_style), Paragraph("4.5-5 million/µL", body_style),
     Paragraph("FRC", body_style), Paragraph("2300 mL", body_style)],
    [Paragraph("PCV/Haematocrit (Male)", body_style), Paragraph("42-52%", body_style),
     Paragraph("RV (Residual Volume)", body_style), Paragraph("1200 mL", body_style)],
    [Paragraph("PCV/Haematocrit (Female)", body_style), Paragraph("37-47%", body_style),
     Paragraph("FEV1/FVC ratio", body_style), Paragraph(">70%", body_style)],
    [Paragraph("ESR (Westergren, Male)", body_style), Paragraph("<15 mm/hr", body_style),
     Paragraph("Intrapleural pressure", body_style), Paragraph("-2.5 cmH2O (rest)", body_style)],
    [Paragraph("ESR (Westergren, Female)", body_style), Paragraph("<20 mm/hr", body_style),
     Paragraph("Alveolar PO2", body_style), Paragraph("104 mmHg", body_style)],
    [Paragraph("Blood pressure (normal)", body_style), Paragraph("<120/80 mmHg", body_style),
     Paragraph("Alveolar PCO2", body_style), Paragraph("40 mmHg", body_style)],
]
nvt = Table(nv_data, colWidths=[5*cm, 3.5*cm, 5*cm, 3.5*cm])
nvt.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
    ('TEXTCOLOR', (0,0), (-1,0), white),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, ACCENT]),
    ('GRID', (0,0), (-1,-1), 0.5, BORDER_GRAY),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('FONTSIZE', (0,0), (-1,-1), 9),
]))
story.append(nvt)
story.append(Spacer(1, 0.4*cm))

# Footer note
story.append(Paragraph(
    "<i>This guide is based on authoritative medical textbooks: Guyton and Hall Textbook of Medical Physiology (14th Ed.), "
    "Ganong's Review of Medical Physiology (26th Ed.), and Boron & Boulpaep Medical Physiology (3rd Ed.). "
    "Prepared for MUHS First MBBS Physiology examination. Generated by Orris Medical AI.</i>",
    note_style))

# Build PDF
doc.build(story)
print("PDF generated successfully at:", OUTPUT)
Running Command

cd /tmp/workspace/muhs-physiology && python generate_pdf.py 2>&1

Running Command

ls -lh /tmp/workspace/muhs-physiology/MUHS_Physiology_QA_Guide.pdf

Your PDF is ready! Download it here:

MUHS Physiology QA Guide

PDF Document · PDF


Here is what is inside the PDF:
13 fully answered questions across 7 units, formatted with colour-coded tables, bullet points, and clinical notes:
#QuestionType
Q1Action Potential + Refractory PeriodLong Essay (10 marks)
Q2Skeletal Muscle Ultrastructure + Sliding Filament Theory + Rigor MortisLong Essay (10 marks)
Q3Neuromuscular Junction - structure and transmissionShort Essay (5 marks)
Q4Haemostasis + Coagulation Cascade + AnticoagulantsLong Essay (10 marks)
Q5Oxygen-Haemoglobin Dissociation Curve + Bohr EffectShort Essay (5 marks)
Q6Cardiac Cycle + Heart Sounds (7-phase table)Long Essay (10 marks)
Q7Normal ECG Waves and Clinical SignificanceShort Essay (5 marks)
Q8Mechanics of Breathing + Surfactant + Pneumothorax + RDSLong Essay (10 marks)
Q9Lung Volumes and Capacities + Spirometry tableShort Essay (5 marks)
Q10GFR + Countercurrent Mechanism + ADH + Urine ConcentrationLong Essay (10 marks)
Q11Thyroid Hormones - full synthesis to disordersLong Essay (10 marks)
Q12Visual Pathway + Visual Field Defects tableLong Essay (10 marks)
Q13Auditory Pathway + Conduction vs Sensorineural DeafnessShort Essay (5 marks)
Plus 6 Short Note answers (Frank-Starling, Erythropoiesis, Blood Groups, CSF, RAAS, Pain Gate Control) and a complete Normal Values table at the end for last-minute revision. Good luck with your MUHS exam!
This is a shared conversation. Sign in to Orris to start your own chat.