attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Please make exam answers from standard textbooks in pdf format for each paper separately and give

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
general-purpose

You are an expert medical writer. Generate 4 comprehensive exam answer PDFs for MD General Medicine June 2024 papers. Read the PDF skill first at /tmp/skills/pdf/SKILL.md, then create 4 PDFs. ## Paper Questions: ### PAPER I (RSA-1) - General Medicine Paper I - Q1 (26 marks): Discuss the coagulation cascade. Add a note on clinical features and management of Haemophilia and prevention of chronic Haemophilic Arthropathy. - Q2 (26 marks): Describe vitamin D metabolism. Discuss vitamin D in health and disease. - Q3 Short notes (24 marks - 8 marks each): a. Drug-induced lupus b. Oxygen dissociation curve and its determinants c. Lab. diagnosis of cholera - Q4 Short notes (24 marks - 8 marks each): a. Gene Therapy b. Ketogenic Diet c. Monkey-pox ### PAPER II (RSA-2) - General Medicine Paper II - Q1 (26 marks): Discuss sickle cell Anaemia. - Q2 (26 marks): Describe the anatomy of portal venous system. Discuss the causes, clinical features, complication and management of portal hypertension. - Q3 Short notes (8x3=24 marks): a. Neurocutaneous markers b. Hypercalcemia of malignancy c. Heat related illness - Q4 Short notes (8x3=24 marks): a. Malabsorption syndrome b. Tropical spastic Para paresis c. Hemophagocytic syndrome ### PAPER III (RSA-3) - General Medicine Paper III - Q1 (26 marks): Discuss Systematic Sclerosis in detail. - Q2 (26 marks): Describe the conduction system of the heart. Classify Tachyarrhythmias and discuss Narrow Complex Tachycardia. - Q3 Short notes (8x3=24 marks): a. Sarcoidosis: clinical features & management b. Rheumatic manifestations of HIV c. Thyroid emergencies - Q4 Short notes (8x3=24 marks): a. Acute kidney disease in Tropics b. Steven-Johnson Syndrome c. Monoclonal Antibodies ### PAPER IV (RSA-4) - General Medicine Paper IV - Q1 (25 marks): High Altitude illness - Q2 (25 marks): Micro-organisms in medical therapy - Q3 (25 marks): Adult Vaccination - Q4 (25 marks): Human genome project. Add a note on genetic basis of cancer. - Q5 (25 marks): Obesity Management - Recent trends ## Instructions: 1. First read /tmp/skills/pdf/SKILL.md to understand how to create PDFs 2. Create workspace: /tmp/workspace/md-exam-answers/ 3. For each paper, write COMPREHENSIVE, DETAILED MD-level answers (each long answer ~1000-1500 words, each short note ~300-400 words) using standard textbook content (Harrison's Principles of Internal Medicine, Davidson's, Kumar & Clark's, etc.) 4. Generate 4 separate PDF files: - /tmp/workspace/md-exam-answers/Paper_I_General_Medicine.pdf - /tmp/workspace/md-exam-answers/Paper_II_General_Medicine.pdf - /tmp/workspace/md-exam-answers/Paper_III_General_Medicine.pdf - /tmp/workspace/md-exam-answers/Paper_IV_General_Medicine.pdf ## PDF Content Requirements: Each PDF must have: - Header: "MD Examination June 2024 - General Medicine Paper [X]" - Each question clearly numbered and marked - All answers written comprehensively with headings, subheadings - Tables where appropriate (e.g., classification tables) - Diagrams described in text format with [ ] notation where visual diagrams would normally appear - Sources cited: Harrison's Principles of Internal Medicine 22E, Davidson's Principles and Practice of Medicine, etc. - Professional formatting with proper fonts ## CONTENT GUIDE - Write these answers based on standard medical knowledge: ### Paper I Content: **Q1 - Coagulation Cascade + Haemophilia:** - Coagulation cascade: Extrinsic pathway (TF-VIIa activates X), Intrinsic pathway (XII→XI→IX→VIII→X), Common pathway (X+V→prothrombin→thrombin→fibrinogen→fibrin), regulatory mechanisms (Protein C, S, AT-III), fibrinolysis - Haemophilia A: Factor VIII deficiency (X-linked recessive), B: Factor IX. Clinical: haemarthrosis, muscle bleeds, spontaneous bleeding. Investigations: APTT prolonged, PT normal, Factor assay. Management: Factor replacement, DDAVP, antifibrinolytics. Prevention of arthropathy: prophylactic factor replacement, physiotherapy, avoid NSAIDs **Q2 - Vitamin D metabolism:** - Synthesis: skin (7-dehydrocholesterol→D3 by UV), dietary D2/D3, liver 25-hydroxylation (25-OH-D3), kidney 1-alpha-hydroxylation (1,25-dihydroxyvitamin D3=calcitriol), regulation by PTH, FGF-23, calcium - Functions: calcium absorption, bone mineralization, immune modulation, muscle function - Deficiency: rickets (children), osteomalacia (adults), secondary hyperparathyroidism - Excess: hypercalcemia, nephrolithiasis - Vitamin D in disease: autoimmune diseases, cancers, cardiovascular disease, COVID-19 **Q3a - Drug-induced lupus:** - Drugs: hydralazine, procainamide, isoniazid, minocycline, anti-TNF agents. Mechanism: methylation changes, complement activation. Features: arthralgia, fever, serositis, ANA+, anti-histone antibodies. Unlike SLE: no renal/CNS involvement, resolves on drug withdrawal **Q3b - Oxygen dissociation curve:** - Sigmoidal S-curve, P50=26 mmHg. Right shift (decreased O2 affinity): increased CO2, H+ (Bohr effect), temperature, 2,3-DPG. Left shift: decreased CO2, H+, temp, 2,3-DPG, HbF. Clinical significance: altitude, anemia, CO poisoning **Q3c - Lab diagnosis of cholera:** - Specimen: rice-water stool. Direct microscopy: darting motility, Gram-negative comma-shaped bacilli. Culture: TCBS agar (yellow colonies). Serology: vibriocidal antibodies. Rapid diagnostic tests. PCR **Q4a - Gene Therapy:** - Definition, vectors (viral: adenovirus, AAV, retrovirus; non-viral: liposomes, electroporation), approaches (gene addition, gene silencing, gene editing-CRISPR), applications: ADA-SCID, hemophilia, CAR-T cells, limitations **Q4b - Ketogenic Diet:** - Very low carb (<50g/day), high fat, moderate protein. Mechanism: ketosis (beta-hydroxybutyrate), reduces glucose metabolism. Uses: epilepsy (drug-resistant), type 2 diabetes, obesity, GLUT1 deficiency. Adverse effects: kidney stones, dyslipidemia, nutritional deficiencies **Q4c - Monkeypox:** - Orthopoxvirus, zoonotic. Transmission: animal-human, human-human. Clinical: prodrome (fever, lymphadenopathy), rash (centrifugal, deep, umbilicated lesions, all same stage). Diagnosis: PCR, electron microscopy. Treatment: tecovirimat, cidofovir. Prevention: smallpox vaccine (85% effective) ### Paper II Content: **Q1 - Sickle Cell Anaemia:** - Pathogenesis: HbS (glutamate→valine mutation at position 6 of beta-globin), polymerization under deoxygenation, sickling, vaso-occlusion - Clinical features: painful crises, acute chest syndrome, stroke, aplastic crisis (parvovirus B19), sequestration crisis, chronic organ damage - Investigations: peripheral smear (sickle cells, target cells), Hb electrophoresis (HbS), sickling test - Management: hydroxyurea (increases HbF), transfusions, bone marrow transplant, supportive care, penicillin prophylaxis, vaccinations - Complications: avascular necrosis, retinopathy, cardiomyopathy, renal papillary necrosis **Q2 - Portal Venous System + Portal Hypertension:** - Anatomy: formed by union of superior mesenteric vein + splenic vein, tributaries, normal portal pressure 5-10 mmHg - Causes of portal hypertension: pre-hepatic (portal vein thrombosis), hepatic (cirrhosis, schistosomiasis, Budd-Chiari), post-hepatic (hepatic vein obstruction, cardiac causes) - Clinical features: splenomegaly, varices (oesophageal, gastric), ascites, caput medusae, haemorrhoids, hepatic encephalopathy - Complications: variceal bleeding, spontaneous bacterial peritonitis, hepatorenal syndrome - Management: propranolol (primary prophylaxis), endoscopic band ligation, TIPS, liver transplant, ascites management (diuretics, paracentesis), prevention of SBP (norfloxacin) **Q3a - Neurocutaneous markers:** - Neurofibromatosis type 1: cafe-au-lait spots, Lisch nodules, axillary freckling, neurofibromas (NF1 gene) - Tuberous sclerosis: ash-leaf spots, shagreen patches, angiofibromas, periungual fibromas (TSC1/TSC2) - Sturge-Weber: port-wine stain in V1 distribution, leptomeningeal angioma, seizures - Von Hippel-Lindau: retinal/cerebellar hemangioblastomas, renal cell carcinoma **Q3b - Hypercalcemia of malignancy:** - Most common: PTHrP secretion (humoral hypercalcemia of malignancy - lung, breast, renal), osteolytic metastases (multiple myeloma, breast), 1,25-D3 production (lymphomas), ectopic PTH - Clinical: "bones, groans, stones, psychiatric moans" - polyuria, dehydration, nausea, confusion, coma - Management: IV fluids, bisphosphonates (zoledronate), calcitonin, denosumab, dialysis in severe cases, treat underlying malignancy **Q3c - Heat related illness:** - Heat cramps: exertion + salt depletion, spasms of used muscles, treat with salt + water - Heat exhaustion: volume depletion, temp <40°C, weakness, headache, nausea; treat with IV fluids - Heat stroke: temp >40°C + CNS dysfunction (classic vs exertional); treat with rapid cooling, supportive care, avoid antipyretics; complications: rhabdomyolysis, DIC, AKI, ARDS **Q4a - Malabsorption syndrome:** - Causes: celiac disease (gluten-sensitive enteropathy, anti-TTG antibodies, villous atrophy), Tropical sprue, small bowel bacterial overgrowth, Whipple disease, pancreatic exocrine insufficiency, short bowel syndrome - Features: steatorrhea, weight loss, nutritional deficiencies (iron, B12, folate, fat-soluble vitamins) - Investigations: fecal fat, D-xylose test, small bowel biopsy, breath tests - Management: treat underlying cause, nutritional supplementation **Q4b - Tropical Spastic Paraparesis (HTLV-1-Associated Myelopathy):** - Cause: HTLV-1 (Human T-lymphotropic virus type 1), CD4+ cell tropism - Endemic: Caribbean, Japan, South America, Africa - Clinical: slowly progressive spastic paraparesis, bladder dysfunction, sensory disturbance, back pain - Diagnosis: serology (HTLV-1 antibodies in blood and CSF), PCR, MRI spine (white matter changes) - Management: corticosteroids, vitamin C, supportive physiotherapy; no curative treatment **Q4c - Hemophagocytic Syndrome (HLH):** - Definition: life-threatening hyperinflammatory syndrome due to uncontrolled macrophage activation - Primary (familial): genetic mutations (PRF1, UNC13D, etc.) - Secondary (acquired): triggers - EBV, other infections, autoimmune diseases (MAS in sJIA), malignancies - Diagnostic criteria (HLH-2004): fever, splenomegaly, cytopenias (≥2 cell lines), hypertriglyceridemia/hypofibrinogenemia, hemophagocytosis, low NK cell activity, elevated ferritin (>500), elevated sCD25 - Management: HLH-94 protocol - dexamethasone, etoposide, cyclosporine, IVIG; HSCT for primary ### Paper III Content: **Q1 - Systemic Sclerosis:** - Definition: autoimmune connective tissue disease with fibrosis, vascular damage, immune dysregulation - Classification: Limited cutaneous SSc (lcSSc - formerly CREST: Calcinosis, Raynaud's, Esophageal dysmotility, Sclerodactyly, Telangiectasia) vs Diffuse cutaneous SSc (dcSSc) - Pathogenesis: endothelial injury → Raynaud's → fibroblast activation → TGF-β → collagen deposition - Autoantibodies: ANA, anti-Scl-70 (topoisomerase I - dcSSc), anti-centromere (lcSSc), anti-RNA polymerase III - Clinical features: - Skin: Raynaud's phenomenon (first manifestation), sclerodactyly, skin thickening, telangiectasia, calcinosis - GI: dysphagia, watermelon stomach, malabsorption - Pulmonary: ILD (NSIP pattern - worst complication in dcSSc), PAH - Cardiac: pericarditis, cardiomyopathy, conduction defects - Renal: scleroderma renal crisis (hypertensive emergency with microangiopathic hemolysis) - Investigations: ANA, specific antibodies, PFTs, HRCT chest, Echo, barium swallow - Management: CCB for Raynaud's (nifedipine), prostacyclins, ACE inhibitors (scleroderma renal crisis), mycophenolate/cyclophosphamide for ILD, bosentan/sildenafil for PAH, PPI for GERD **Q2 - Conduction System + Tachyarrhythmias + Narrow Complex Tachycardia:** - Conduction system: SA node (60-100 bpm pacemaker, supplied by RCA), internodal tracts, AV node (delay 120-200ms, supplied by RCA), Bundle of His, Right and Left bundle branches (anterior and posterior fascicles), Purkinje fibers - Classification of tachyarrhythmias: - By origin: supraventricular (narrow complex QRS <120ms) vs ventricular (broad complex QRS >120ms) - By mechanism: reentry, automaticity, triggered activity - Narrow Complex Tachycardia: - Sinus tachycardia: rate 100-150, P before QRS, treat cause - AVNRT (most common SVT): reentry within AV node, "no-p" or retrograde P, rate 150-250 bpm, treat: vagal maneuvers, adenosine, verapamil, ablation - AVRT (WPW syndrome): accessory pathway (delta wave in sinus rhythm), treat: adenosine, ablation; AVOID digoxin/verapamil in AF+WPW - Atrial flutter: saw-tooth P waves, 2:1 or 4:1 block, rate 150/75 bpm, treat: cardioversion, rate control, anticoagulation - Atrial fibrillation: irregularly irregular, absent P waves, rate control (beta-blockers, CCBs, digoxin), rhythm control (amiodarone, flecainide), anticoagulation (CHA2DS2-VASc score) - MAT: 3+ P wave morphologies, no p-p baseline, associated with COPD **Q3a - Sarcoidosis:** - Non-caseating granulomas, CD4+ T cell activation, unknown trigger - Clinical: Lofgren syndrome (acute: bilateral hilar lymphadenopathy + erythema nodosum + arthralgia, good prognosis), insidious (chronic) - Multi-organ: pulmonary (stages I-IV), skin (lupus pernio), eyes (uveitis), cardiac (conduction defects, cardiomyopathy), neurosarcoidosis (CN VII palsy), hypercalcemia (1α-hydroxylase in macrophages) - Investigations: CXR/CT chest (bilateral hilar lymphadenopathy), serum ACE, BAL (CD4/CD8>3.5), biopsy (non-caseating granulomas), no Langhans giant cells in centre (vs TB) - Management: observe if asymptomatic (stage I/II), oral prednisolone (0.5 mg/kg for 6-24 months), hydroxychloroquine for skin, methotrexate steroid-sparing **Q3b - Rheumatic manifestations of HIV:** - Arthralgia (most common), reactive arthritis, psoriatic arthritis, septic arthritis (opportunistic) - HIV-associated arthropathy: painful oligoarthritis, normal investigations, responds to NSAIDs - Diffuse infiltrative lymphocytosis syndrome (DILS): sicca syndrome-like, bilateral parotid enlargement, CD8+ infiltration - Myopathy: HIV-associated (inflammatory), HAART-induced (nucleoside analogue - mitochondrial toxicity), polymyositis-like - Avascular necrosis: increased with corticosteroids and HIV itself - Vasculitis: PAN-like, leukocytoclastic **Q3c - Thyroid emergencies:** - Thyroid storm: precipitated by infection, surgery, iodine, RAI; features: fever >38.5°C, tachycardia, AF, agitation, vomiting, jaundice, coma; scoring: Burch-Wartofsky score; management: propylthiouracil (blocks synthesis AND T4→T3 conversion), beta-blockers (propranolol IV), iodine (Lugol's - given 1hr AFTER PTU), hydrocortisone, supportive care - Myxedema coma: precipitated by cold, infection, drugs; features: hypothermia, bradycardia, hyponatremia, CO2 retention; management: IV T3 or T4, IV hydrocortisone (adrenal insufficiency co-exists), warm IV fluids, respiratory support **Q4a - Acute kidney disease in Tropics:** - Common causes: falciparum malaria (blackwater fever - hemoglobinuria, AKI), leptospirosis (Weil's disease - AKI + jaundice + uveitis), dengue (AKI uncommon), snake envenomation, scrub typhus, enteric fever - Malaria-AKI: intravasal hemolysis, cytoadherence, hypovolemia; treatment: artesunate + dialysis if needed - Leptospirosis-AKI: penicillin/doxycycline, dialysis; non-oliguric AKI common - Management principles: identify cause, renal replacement therapy (peritoneal dialysis often used in resource-limited settings), specific antibiotic therapy **Q4b - Stevens-Johnson Syndrome:** - Severe cutaneous adverse reaction (SCAR) spectrum: SJS (<10% BSA), SJS-TEN overlap (10-30%), TEN (>30%) - Causes: drugs (allopurinol, carbamazepine, lamotrigine, sulfonamides, NSAIDs, nevirapine - HLA-B*1502 for carbamazepine in Asians), infections (Mycoplasma in SJS) - Pathogenesis: drug-specific CD8+ T cells, perforin-granzyme pathway, FasL-mediated keratinocyte apoptosis - Clinical: prodrome (fever, sore throat) → targetoid lesions → skin detachment (Nikolsky sign positive), mucous membrane involvement (at least 2 sites), ocular complications (symblepharon) - Management: immediate drug withdrawal, ICU/burn unit care, wound care, ophthalmology, cyclosporine or IVIg (controversial), systemic steroids (controversial), no aspirin/NSAIDs **Q4c - Monoclonal Antibodies:** - Nomenclature: -mab suffix, murine (-omab), chimeric (-ximab), humanized (-zumab), fully human (-umab) - Types: naked (rituximab, bevacizumab, trastuzumab), conjugated (ADC - brentuximab vedotin), bispecific (blinatumomab - CD3xCD19) - Mechanisms: ADCC, CDC, direct apoptosis induction, neutralization, immune checkpoint blockade (pembrolizumab-anti-PD1, nivolumab, ipilimumab-anti-CTLA4) - Examples in medicine: rituximab (anti-CD20, B-cell lymphoma, RA), trastuzumab (HER2+ breast cancer), infliximab (anti-TNF, IBD, RA), bevacizumab (anti-VEGF), tocilizumab (anti-IL6R, cytokine storm) - Adverse effects: infusion reactions, immunosuppression, PML (natalizumab), cardiac toxicity (trastuzumab) ### Paper IV Content: **Q1 - High Altitude Illness:** - Definition: >2500m altitude. Problems due to hypobaric hypoxia, reduced PO2 - Acclimatization: hyperventilation (respiratory alkalosis), increased EPO → erythropoiesis, increased 2,3-DPG, angiogenesis - Conditions: - Acute Mountain Sickness (AMS): headache + one of: nausea, fatigue, dizziness, insomnia within 6-12 hours of ascent above 2500m. Lake Louise score. Treatment: descent, acetazolamide, analgesics - High Altitude Cerebral Edema (HACE): severe AMS + ataxia/altered consciousness, papilledema. Treatment: immediate descent, supplemental O2, dexamethasone, hyperbaric bag (Gamow bag) - High Altitude Pulmonary Edema (HAPE): non-cardiogenic pulmonary edema, most deadly; dry cough → pink frothy sputum, dyspnea, crackles. Treatment: descent, O2, nifedipine, sildenafil/tadalafil, Gamow bag - Chronic Mountain Sickness (Monge's disease): polycythemia, cyanosis, cor pulmonale - Prevention: gradual ascent (<300m/day above 3000m), acetazolamide prophylaxis (250 mg BD starting 24h before ascent), avoid alcohol/sedatives **Q2 - Micro-organisms in Medical Therapy:** - Bacteria: Lactobacillus (probiotics), E.coli Nissle 1917 (IBD), Clostridium botulinum toxin (botulinum toxin - dystonia, cosmetic, hyperhidrosis, migraine), Bacillus anthracis (anthrax toxin research) - Fungi: Penicillium notatum (penicillin), Aspergillus (lovastatin, citric acid), Saccharomyces cerevisiae (insulin production, hepatitis B vaccine), yeast for recombinant proteins - Viruses as vectors: Adenovirus (gene therapy vectors), AAV (gene therapy - hemophilia, SMA - nusinersen related), Oncolytic viruses (T-VEC/talimogene laherparepvec - melanoma) - Bacteria in production: E.coli (insulin, erythropoietin, growth hormone production), Streptomyces (streptomycin, tetracycline, erythromycin, vancomycin) - Fecal microbiota transplantation (FMT): recurrent C.difficile infection, IBD, metabolic syndrome - Phage therapy: bacteriophages against MDR organisms - Maggot therapy: Lucilia sericata larvae for wound debridement - Leech therapy: Hirudo medicinalis for postoperative congestion, reconstructive surgery - Helminth therapy (TSO, Trichuris suis ova): experimental for IBD, autoimmune conditions (hygiene hypothesis) **Q3 - Adult Vaccination:** - Principles: primary prevention, herd immunity, catch-up vaccination - Recommended vaccines for adults: - Influenza: annual, all adults especially >65, immunocompromised, pregnant, healthcare workers - Pneumococcal: PCV15/PCV20 + PPSV23 for >65 years, immunocompromised (HIV, asplenia), chronic illness - Td/Tdap: Tdap once (for Td-vaccinated adults), Td booster every 10 years, Tdap in every pregnancy (27-36 weeks) - Hepatitis B: unvaccinated adults, healthcare workers, 2-dose Heplisav-B or 3-dose series - MMR: adults born after 1957 without immunity, 2 doses if healthcare worker - Varicella: 2 doses if no history of chickenpox or prior vaccination - Zoster: Shingrix (recombinant, 2 doses, preferred) for age ≥50 - HPV: up to age 45 (2 doses if <15, 3 doses if 15-45) - COVID-19: updated mRNA vaccines annually - Hepatitis A: travelers, MSM, liver disease, drug users - Meningococcal: MCV4 for asplenia, complement deficiency, college freshmen; MenB for high-risk - Yellow Fever: travelers to endemic areas - Japanese Encephalitis: travelers to Asia - Rabies: pre-exposure for high-risk occupations, travelers - Special populations: immunocompromised (avoid live vaccines), pregnancy, elderly, asplenia - National Immunization Schedule India (adult): Td, Hepatitis B, TT in pregnancy **Q4 - Human Genome Project + Genetic Basis of Cancer:** - Human Genome Project (HGP): - Started 1990, completed 2003, US DOE + NIH, international consortium (18 countries) - Goals: sequence 3 billion base pairs, identify 20,000-25,000 genes, map genetic variation - Methods: Sanger sequencing (first draft), shotgun sequencing, computational assembly - Findings: ~3.2 billion bp, ~20,000-25,000 protein-coding genes, only 1.5% coding, 98.5% "junk DNA" (regulatory, transposons, etc.), SNPs every 300-500 bp - Applications: pharmacogenomics, genetic disease diagnosis, personalized medicine, forensics, evolution studies - Related projects: HapMap, 1000 Genomes Project, ENCODE, GTEx - Genetic Basis of Cancer: - Cancer = genetic disease of somatic cells (clonal evolution) - Proto-oncogenes → Oncogenes: gain-of-function mutations, amplification, translocation (RAS, MYC, HER2/neu, BCR-ABL in CML) - Tumor Suppressor Genes: loss-of-function mutations, "two-hit hypothesis" (Knudson): Rb (retinoblastoma), p53 (guardian of genome, Li-Fraumeni syndrome), BRCA1/2 (breast/ovarian cancer), APC (familial adenomatous polyposis), VHL (renal cell carcinoma) - DNA repair genes: MMR defects → microsatellite instability → Lynch syndrome (HNPCC) - colorectal/endometrial cancer; BRCA1/2 - homologous recombination repair - Epigenetics: methylation of tumor suppressor gene promoters, histone modifications, non-coding RNAs - Hallmarks of Cancer (Hanahan & Weinberg): self-sufficiency in growth signals, insensitivity to anti-growth signals, evading apoptosis, limitless replicative potential (telomerase), sustained angiogenesis (VEGF), invasion/metastasis (EMT), reprogramming energy metabolism (Warburg effect), evading immune destruction - Hereditary cancer syndromes: BRCA1/2 (breast/ovarian), Lynch syndrome (colon), FAP (APC gene), Li-Fraumeni (TP53), MEN syndromes (RET proto-oncogene), NF1/NF2 **Q5 - Obesity Management - Recent Trends:** - Definition: BMI >30 kg/m2, central obesity (waist circumference >102 cm men, >88 cm women) - Assessment: BMI, waist circumference, body composition, comorbidities (DM, hypertension, dyslipidemia, NAFLD, OSA, PCOS, OA) - Lifestyle interventions: dietary modification (500-1000 kcal/day deficit), physical activity (150-300 min/week moderate intensity), behavioral therapy, CBT - Pharmacotherapy: - GLP-1 receptor agonists: semaglutide (Wegovy 2.4 mg weekly SC) - STEP trials showed 15-17% weight loss; liraglutide (Saxenda 3 mg daily SC) - 5-8% weight loss; tirzepatide (Zepbound - dual GIP/GLP-1 agonist) - SURMOUNT trials 22.5% weight loss - Orlistat: pancreatic lipase inhibitor, 120 mg TDS with meals, GI side effects, 5% weight loss - Naltrexone/bupropion (Contrave): 6-9% weight loss - Phentermine/topiramate (Qsymia): up to 10% weight loss - Older agents: phentermine, diethylpropion (short-term only) - Bariatric surgery (BMI >40 or >35 with comorbidities): - Roux-en-Y gastric bypass (RYGB): gold standard, 30-35% weight loss, resolves DM in 80% - Sleeve gastrectomy: most common, 25-30% weight loss - Adjustable gastric banding: falling out of favor - Biliopancreatic diversion: highest weight loss but complications - Recent: endoscopic procedures (intragastric balloon, endoscopic sleeve gastroplasty) - Recent advances: - Dual/triple incretin agonists: tirzepatide (GIP+GLP-1), retatrutide (GIP+GLP-1+glucagon) - NASH/NAFLD treatment overlap - Set-point theory and neurobiological basis of obesity - Gut microbiome manipulation - Brown adipose tissue activation - Adipokine targets (leptin resistance, adiponectin) Now create the PDFs. Use Python with reportlab. Each PDF should be well-formatted, professional, with: - Title page for each paper - All questions and comprehensive answers - Proper headings (H1, H2, H3 style formatting) - Professional medical document appearance Save to /tmp/workspace/md-exam-answers/ directory. After creating all 4 PDFs, verify they exist and report the file paths.

Reading File
Running Command

mkdir -p /tmp/workspace/md-exam-answers && echo "Directory created successfully"

Writing File

~/md-exam-answers/create_paper1.py

#!/usr/bin/env python3
"""
Create Paper I PDF for MD General Medicine June 2024
"""

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

def create_styles():
    styles = getSampleStyleSheet()
    
    # Custom styles
    styles.add(ParagraphStyle(
        name='DocTitle',
        parent=styles['Title'],
        fontSize=18,
        textColor=colors.HexColor('#1a237e'),
        spaceAfter=6,
        spaceBefore=6,
        alignment=TA_CENTER,
        fontName='Helvetica-Bold'
    ))
    
    styles.add(ParagraphStyle(
        name='SubTitle',
        parent=styles['Normal'],
        fontSize=13,
        textColor=colors.HexColor('#283593'),
        spaceAfter=4,
        spaceBefore=4,
        alignment=TA_CENTER,
        fontName='Helvetica-Bold'
    ))
    
    styles.add(ParagraphStyle(
        name='PaperInfo',
        parent=styles['Normal'],
        fontSize=11,
        textColor=colors.HexColor('#37474f'),
        spaceAfter=3,
        alignment=TA_CENTER,
        fontName='Helvetica'
    ))
    
    styles.add(ParagraphStyle(
        name='QuestionHeader',
        parent=styles['Normal'],
        fontSize=13,
        textColor=colors.HexColor('#b71c1c'),
        spaceAfter=6,
        spaceBefore=14,
        fontName='Helvetica-Bold',
        borderPad=4,
        leftIndent=0,
    ))
    
    styles.add(ParagraphStyle(
        name='H1Answer',
        parent=styles['Normal'],
        fontSize=12,
        textColor=colors.HexColor('#1a237e'),
        spaceAfter=4,
        spaceBefore=10,
        fontName='Helvetica-Bold'
    ))
    
    styles.add(ParagraphStyle(
        name='H2Answer',
        parent=styles['Normal'],
        fontSize=11,
        textColor=colors.HexColor('#0d47a1'),
        spaceAfter=3,
        spaceBefore=7,
        fontName='Helvetica-Bold'
    ))
    
    styles.add(ParagraphStyle(
        name='H3Answer',
        parent=styles['Normal'],
        fontSize=10.5,
        textColor=colors.HexColor('#1565c0'),
        spaceAfter=3,
        spaceBefore=5,
        fontName='Helvetica-BoldOblique'
    ))
    
    styles.add(ParagraphStyle(
        name='BodyText2',
        parent=styles['Normal'],
        fontSize=10,
        spaceAfter=4,
        spaceBefore=2,
        leading=15,
        alignment=TA_JUSTIFY,
        fontName='Helvetica'
    ))
    
    styles.add(ParagraphStyle(
        name='BulletText',
        parent=styles['Normal'],
        fontSize=10,
        spaceAfter=2,
        spaceBefore=1,
        leading=14,
        leftIndent=20,
        fontName='Helvetica'
    ))
    
    styles.add(ParagraphStyle(
        name='SubBulletText',
        parent=styles['Normal'],
        fontSize=10,
        spaceAfter=2,
        spaceBefore=1,
        leading=14,
        leftIndent=40,
        fontName='Helvetica'
    ))
    
    styles.add(ParagraphStyle(
        name='NoteText',
        parent=styles['Normal'],
        fontSize=9.5,
        textColor=colors.HexColor('#37474f'),
        spaceAfter=3,
        spaceBefore=3,
        leading=13,
        leftIndent=10,
        fontName='Helvetica-Oblique'
    ))
    
    styles.add(ParagraphStyle(
        name='ShortNoteHeader',
        parent=styles['Normal'],
        fontSize=12,
        textColor=colors.HexColor('#4a148c'),
        spaceAfter=5,
        spaceBefore=12,
        fontName='Helvetica-Bold'
    ))
    
    styles.add(ParagraphStyle(
        name='DiagramBox',
        parent=styles['Normal'],
        fontSize=9.5,
        textColor=colors.HexColor('#1b5e20'),
        spaceAfter=4,
        spaceBefore=4,
        leading=13,
        leftIndent=15,
        fontName='Courier'
    ))
    
    styles.add(ParagraphStyle(
        name='ReferenceText',
        parent=styles['Normal'],
        fontSize=8.5,
        textColor=colors.HexColor('#78909c'),
        spaceAfter=2,
        spaceBefore=2,
        fontName='Helvetica-Oblique'
    ))
    
    return styles

def add_header_footer(canvas, doc):
    """Add header and footer to each page."""
    canvas.saveState()
    width, height = A4
    
    # Header
    canvas.setFillColor(colors.HexColor('#1a237e'))
    canvas.rect(0, height - 35, width, 35, fill=1, stroke=0)
    canvas.setFillColor(colors.white)
    canvas.setFont('Helvetica-Bold', 9)
    canvas.drawString(30, height - 14, 'MD Examination June 2024')
    canvas.drawRightString(width - 30, height - 14, 'General Medicine - Paper I (RSA-1)')
    canvas.setFont('Helvetica', 8)
    canvas.drawString(30, height - 26, 'Based on: Harrison\'s Principles of Internal Medicine 22E | Davidson\'s | Kumar & Clark\'s')
    
    # Footer
    canvas.setFillColor(colors.HexColor('#e8eaf6'))
    canvas.rect(0, 0, width, 25, fill=1, stroke=0)
    canvas.setFillColor(colors.HexColor('#37474f'))
    canvas.setFont('Helvetica', 8)
    canvas.drawString(30, 9, 'MD General Medicine Examination Answers | June 2024 | Paper I')
    canvas.drawRightString(width - 30, 9, f'Page {doc.page}')
    
    canvas.restoreState()

def create_paper1():
    output_path = '/tmp/workspace/md-exam-answers/Paper_I_General_Medicine.pdf'
    
    doc = SimpleDocTemplate(
        output_path,
        pagesize=A4,
        rightMargin=2.2*cm,
        leftMargin=2.2*cm,
        topMargin=3.2*cm,
        bottomMargin=2.2*cm,
        title='MD General Medicine Paper I - June 2024',
        author='MD Examination Board',
        subject='General Medicine Paper I (RSA-1) Answers'
    )
    
    styles = create_styles()
    story = []
    
    # ===================== TITLE PAGE =====================
    story.append(Spacer(1, 1.5*inch))
    story.append(Paragraph("MD EXAMINATION — JUNE 2024", styles['DocTitle']))
    story.append(Spacer(1, 0.15*inch))
    story.append(Paragraph("GENERAL MEDICINE", styles['SubTitle']))
    story.append(Paragraph("PAPER I (RSA-1)", styles['SubTitle']))
    story.append(Spacer(1, 0.3*inch))
    
    # Decorative box
    data = [[
        Paragraph("<b>Total Marks: 100 &nbsp;|&nbsp; Time: 3 Hours</b>", 
                  ParagraphStyle('box', parent=styles['Normal'], alignment=TA_CENTER, fontSize=11))
    ]]
    t = Table(data, colWidths=[14*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#e8eaf6')),
        ('BOX', (0,0), (-1,-1), 1.5, colors.HexColor('#3f51b5')),
        ('TOPPADDING', (0,0), (-1,-1), 10),
        ('BOTTOMPADDING', (0,0), (-1,-1), 10),
        ('ALIGN', (0,0), (-1,-1), 'CENTER'),
    ]))
    story.append(t)
    story.append(Spacer(1, 0.3*inch))
    
    story.append(Paragraph("Q1 (26 marks) | Q2 (26 marks) | Q3 (24 marks) | Q4 (24 marks)", styles['PaperInfo']))
    story.append(Spacer(1, 0.5*inch))
    
    # Instructions box
    instructions = [
        ["INSTRUCTIONS TO CANDIDATES"],
        ["1. Answer ALL questions."],
        ["2. Q1 and Q2 carry 26 marks each."],
        ["3. Q3 and Q4 contain 3 short notes of 8 marks each."],
        ["4. Neat diagrams wherever applicable will fetch additional marks."],
        ["5. References: Harrison's 22E, Davidson's, Kumar & Clark's Clinical Medicine."],
    ]
    inst_table = Table([[Paragraph(row[0], 
        ParagraphStyle('inst', parent=styles['Normal'], fontSize=9.5, 
                       fontName='Helvetica-Bold' if i==0 else 'Helvetica',
                       textColor=colors.HexColor('#1a237e') if i==0 else colors.black))] 
        for i, row in enumerate(instructions)], colWidths=[14*cm])
    inst_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (0,0), colors.HexColor('#c5cae9')),
        ('BACKGROUND', (0,1), (-1,-1), colors.HexColor('#f3f4fb')),
        ('BOX', (0,0), (-1,-1), 1, colors.HexColor('#5c6bc0')),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#9fa8da')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
    ]))
    story.append(inst_table)
    story.append(PageBreak())
    
    # ===================== QUESTION 1 =====================
    story.append(Paragraph(
        "QUESTION 1 (26 MARKS)",
        styles['QuestionHeader']
    ))
    story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#b71c1c'), spaceAfter=6))
    story.append(Paragraph(
        "<b>Discuss the coagulation cascade. Add a note on clinical features and management of Haemophilia and prevention of chronic Haemophilic Arthropathy.</b>",
        styles['BodyText2']
    ))
    story.append(Spacer(1, 0.1*inch))
    
    # --- Coagulation cascade ---
    story.append(Paragraph("ANSWER", styles['H1Answer']))
    story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#9fa8da'), spaceAfter=4))
    
    story.append(Paragraph("1. THE COAGULATION CASCADE", styles['H1Answer']))
    story.append(Paragraph(
        "Haemostasis is the process by which bleeding is arrested following vascular injury. It involves a carefully orchestrated sequence of events including vascular spasm, platelet plug formation (primary haemostasis), and the coagulation cascade (secondary haemostasis) leading to fibrin clot formation.",
        styles['BodyText2']
    ))
    
    story.append(Paragraph("A. Extrinsic Pathway (Tissue Factor Pathway)", styles['H2Answer']))
    story.append(Paragraph(
        "Vascular injury exposes subendothelial <b>Tissue Factor (TF/Factor III)</b> to circulating blood. TF binds plasma Factor VII to form the TF-VIIa complex (extrinsic tenase):",
        styles['BodyText2']
    ))
    story.append(Paragraph("• Vascular injury → Tissue Factor (TF) exposed", styles['BulletText']))
    story.append(Paragraph("• TF + Factor VII → TF-VIIa complex (primary trigger)", styles['BulletText']))
    story.append(Paragraph("• TF-VIIa activates Factor X → Xa (via extrinsic tenase)", styles['BulletText']))
    story.append(Paragraph("• TF-VIIa also activates Factor IX → IXa (cross-activation)", styles['BulletText']))
    story.append(Paragraph(
        "[ DIAGRAM: TF + VIIa → Xa (extrinsic pathway) ]",
        styles['DiagramBox']
    ))
    
    story.append(Paragraph("B. Intrinsic Pathway (Contact Activation Pathway)", styles['H2Answer']))
    story.append(Paragraph(
        "The intrinsic pathway is activated by contact of blood with exposed subendothelial collagen or negatively charged surfaces. This pathway amplifies thrombin generation:",
        styles['BodyText2']
    ))
    story.append(Paragraph("• Factor XII → XIIa (contact activation with collagen)", styles['BulletText']))
    story.append(Paragraph("• XIIa activates XI → XIa", styles['BulletText']))
    story.append(Paragraph("• XIa activates IX → IXa", styles['BulletText']))
    story.append(Paragraph("• IXa + VIIIa (cofactor) + Ca²⁺ + phospholipid → intrinsic tenase complex", styles['BulletText']))
    story.append(Paragraph("• Intrinsic tenase activates X → Xa", styles['BulletText']))
    story.append(Paragraph(
        "[ DIAGRAM: XII→XIIa→XIa→IXa + VIIIa → Xa (intrinsic pathway) ]",
        styles['DiagramBox']
    ))
    
    story.append(Paragraph("C. Common Pathway", styles['H2Answer']))
    story.append(Paragraph(
        "Both pathways converge at Factor X activation, leading to the common pathway:",
        styles['BodyText2']
    ))
    story.append(Paragraph("• Xa + Va (cofactor) + Ca²⁺ + phospholipid → Prothrombinase complex", styles['BulletText']))
    story.append(Paragraph("• Prothrombinase cleaves Prothrombin (II) → Thrombin (IIa)", styles['BulletText']))
    story.append(Paragraph("• Thrombin cleaves Fibrinogen → Fibrin monomer", styles['BulletText']))
    story.append(Paragraph("• Fibrin monomers polymerize → soluble fibrin polymer", styles['BulletText']))
    story.append(Paragraph("• Thrombin activates Factor XIII → XIIIa (transglutaminase)", styles['BulletText']))
    story.append(Paragraph("• XIIIa cross-links fibrin → stable insoluble fibrin clot", styles['BulletText']))
    story.append(Paragraph(
        "[ DIAGRAM: Xa + Va → Prothrombin → Thrombin → Fibrinogen → Fibrin → Cross-linked Clot (common pathway) ]",
        styles['DiagramBox']
    ))
    
    story.append(Paragraph("D. Amplification by Thrombin", styles['H2Answer']))
    story.append(Paragraph(
        "Thrombin is the central enzyme of coagulation with multiple positive feedback functions:",
        styles['BodyText2']
    ))
    story.append(Paragraph("• Activates Factors V, VIII, XI → amplification", styles['BulletText']))
    story.append(Paragraph("• Activates platelets via PAR-1 and PAR-4 receptors", styles['BulletText']))
    story.append(Paragraph("• Activates Protein C (when bound to thrombomodulin) → anticoagulation", styles['BulletText']))
    story.append(Paragraph("• Activates TAFI (Thrombin Activatable Fibrinolysis Inhibitor)", styles['BulletText']))
    
    story.append(Paragraph("E. Regulatory (Anticoagulant) Mechanisms", styles['H2Answer']))
    story.append(Paragraph(
        "To prevent thrombosis from spreading beyond the site of injury, several natural anticoagulant systems operate:",
        styles['BodyText2']
    ))
    
    reg_data = [
        ["Mechanism", "Site of Action", "Clinical Significance"],
        ["Protein C / Protein S", "Inactivates Va and VIIIa", "Deficiency → DVT, thrombophilia"],
        ["Antithrombin III (AT-III)", "Inhibits IIa, Xa, IXa, XIa", "Heparin enhances AT-III 1000×"],
        ["TFPI (Tissue Factor Pathway Inhibitor)", "Inhibits TF-VIIa-Xa complex", "Primary inhibitor of extrinsic pathway"],
        ["Thrombomodulin", "Binds thrombin → activates Protein C", "Expressed on endothelium"],
        ["Prostacyclin (PGI2)", "Inhibits platelet aggregation", "Released by endothelium"],
    ]
    reg_table = Table(reg_data, colWidths=[5*cm, 5.5*cm, 5.5*cm])
    reg_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a237e')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3f4fb'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ]))
    story.append(reg_table)
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph("F. Fibrinolysis", styles['H2Answer']))
    story.append(Paragraph(
        "The fibrinolytic system dissolves fibrin clots after wound healing. Tissue plasminogen activator (tPA) converts plasminogen → plasmin, which degrades fibrin into FDPs and D-dimers. Regulated by PAI-1 and alpha-2 antiplasmin.",
        styles['BodyText2']
    ))
    
    # --- Haemophilia ---
    story.append(Paragraph("2. HAEMOPHILIA — CLINICAL FEATURES AND MANAGEMENT", styles['H1Answer']))
    
    story.append(Paragraph("A. Definition and Classification", styles['H2Answer']))
    haemo_data = [
        ["Type", "Deficiency", "Inheritance", "Frequency"],
        ["Haemophilia A", "Factor VIII", "X-linked recessive", "1 in 5,000 male births"],
        ["Haemophilia B (Christmas disease)", "Factor IX", "X-linked recessive", "1 in 30,000 male births"],
        ["Haemophilia C (Rosenthal)", "Factor XI", "Autosomal recessive", "Rare; common in Ashkenazi Jews"],
    ]
    haemo_table = Table(haemo_data, colWidths=[4.5*cm, 4*cm, 4*cm, 3.5*cm])
    haemo_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#b71c1c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#ffebee'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ef9a9a')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ]))
    story.append(haemo_table)
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph("B. Severity Classification", styles['H2Answer']))
    sev_data = [
        ["Severity", "Factor Level", "Clinical Features"],
        ["Severe (<1%)", "<1 IU/dL", "Spontaneous bleeds: joints, muscles, intracranial"],
        ["Moderate (1-5%)", "1-5 IU/dL", "Bleeds with mild trauma; rarely spontaneous"],
        ["Mild (5-40%)", "5-40 IU/dL", "Only with significant trauma/surgery"],
    ]
    sev_table = Table(sev_data, colWidths=[4.5*cm, 4*cm, 7.5*cm])
    sev_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#4a148c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3e5f5'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ce93d8')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ]))
    story.append(sev_table)
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph("C. Clinical Features of Haemophilia", styles['H2Answer']))
    story.append(Paragraph("<b>(i) Haemarthrosis (most common bleeding site — 70-80% of bleeds):</b>", styles['H3Answer']))
    story.append(Paragraph("• Target joints: knees, elbows, ankles, hips, shoulders", styles['BulletText']))
    story.append(Paragraph("• Presents as warm, swollen, painful joint with limited range of motion", styles['BulletText']))
    story.append(Paragraph("• Acute haemarthrosis → synovitis → cartilage destruction → haemophilic arthropathy", styles['BulletText']))
    
    story.append(Paragraph("<b>(ii) Muscle Bleeds:</b>", styles['H3Answer']))
    story.append(Paragraph("• Iliopsoas bleed: mimics appendicitis; hip flexed, extension painful; can compress femoral nerve", styles['BulletText']))
    story.append(Paragraph("• Compartment syndrome risk with forearm and calf bleeds", styles['BulletText']))
    
    story.append(Paragraph("<b>(iii) Life-Threatening Bleeds:</b>", styles['H3Answer']))
    story.append(Paragraph("• Intracranial haemorrhage: most feared complication; treat immediately", styles['BulletText']))
    story.append(Paragraph("• Throat/neck haemorrhage: risk of airway compromise", styles['BulletText']))
    story.append(Paragraph("• GI bleeding: haematemesis, melaena", styles['BulletText']))
    
    story.append(Paragraph("<b>(iv) Other Manifestations:</b>", styles['H3Answer']))
    story.append(Paragraph("• Prolonged bleeding after cuts, dental extraction, surgery, circumcision", styles['BulletText']))
    story.append(Paragraph("• Haematuria (renal and ureteric origin)", styles['BulletText']))
    story.append(Paragraph("• Pseudotumours (encapsulated haematomas within bone/soft tissue)", styles['BulletText']))
    
    story.append(Paragraph("D. Investigations", styles['H2Answer']))
    inv_data = [
        ["Test", "Haemophilia A/B", "Significance"],
        ["APTT", "Prolonged", "Reflects intrinsic pathway defect"],
        ["PT", "Normal", "Extrinsic pathway intact"],
        ["Bleeding Time", "Normal", "Primary haemostasis intact"],
        ["Platelet Count", "Normal", "Platelets normal in haemophilia"],
        ["Factor VIII assay", "Low in Haemp A", "Differentiates A from B"],
        ["Factor IX assay", "Low in Haemp B", "Specific for Christmas disease"],
        ["Inhibitor screen", "May be positive", "After factor replacement therapy"],
        ["Genetic testing", "X-linked mutation", "Carrier detection, prenatal diagnosis"],
    ]
    inv_table = Table(inv_data, colWidths=[5*cm, 4*cm, 7*cm])
    inv_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1b5e20')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8f5e9'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#81c784')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ]))
    story.append(inv_table)
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph("E. Management of Haemophilia", styles['H2Answer']))
    story.append(Paragraph("<b>(i) Factor Replacement Therapy (cornerstone):</b>", styles['H3Answer']))
    story.append(Paragraph("• <b>Haemophilia A:</b> Recombinant Factor VIII concentrate (preferred) or plasma-derived FVIII", styles['BulletText']))
    story.append(Paragraph("• <b>Haemophilia B:</b> Recombinant Factor IX concentrate", styles['BulletText']))
    story.append(Paragraph("• Dose: Units required = Weight (kg) × Desired factor level (%) × 0.5 (for FVIII) or 1 (for FIX)", styles['BulletText']))
    story.append(Paragraph("• Target factor levels: Minor bleeds 30-50%, Major bleeds/surgery 80-100%", styles['BulletText']))
    
    story.append(Paragraph("<b>(ii) Desmopressin (DDAVP):</b>", styles['H3Answer']))
    story.append(Paragraph("• Releases stored FVIII/vWF from endothelium (Weibel-Palade bodies)", styles['BulletText']))
    story.append(Paragraph("• Useful in mild Haemophilia A (not B) and vWD type I", styles['BulletText']))
    story.append(Paragraph("• Given IV (0.3 mcg/kg) or intranasal spray; tachyphylaxis develops", styles['BulletText']))
    
    story.append(Paragraph("<b>(iii) Antifibrinolytics:</b>", styles['H3Answer']))
    story.append(Paragraph("• Tranexamic acid: inhibits fibrinolysis; useful for mucosal bleeds (dental, epistaxis, menorrhagia)", styles['BulletText']))
    story.append(Paragraph("• Epsilon aminocaproic acid: similar mechanism", styles['BulletText']))
    story.append(Paragraph("• NOT used in haematuria (risk of ureteric clot obstruction)", styles['BulletText']))
    
    story.append(Paragraph("<b>(iv) Novel/Extended Half-Life Products:</b>", styles['H3Answer']))
    story.append(Paragraph("• PEGylated FVIII/FIX: prolonged half-life, less frequent dosing", styles['BulletText']))
    story.append(Paragraph("• <b>Emicizumab (Hemlibra):</b> Bispecific antibody mimicking FVIIIa; SC weekly/bi-weekly; used in inhibitor patients", styles['BulletText']))
    story.append(Paragraph("• Fitusiran (anti-antithrombin), Concizumab (anti-TFPI): rebalancing agents", styles['BulletText']))
    
    story.append(Paragraph("<b>(v) Management of Inhibitors:</b>", styles['H3Answer']))
    story.append(Paragraph("• High-dose factor infusion (low titre inhibitors)", styles['BulletText']))
    story.append(Paragraph("• Bypassing agents: rFVIIa (NovoSeven), aPCC (FEIBA) — activate coagulation downstream", styles['BulletText']))
    story.append(Paragraph("• Immune Tolerance Induction (ITI): high-dose factor infusion daily to eliminate inhibitor", styles['BulletText']))
    
    story.append(Paragraph("F. Gene Therapy (Recent Advance)", styles['H2Answer']))
    story.append(Paragraph(
        "AAV-based gene therapy (Valoctocogene roxaparvovec for Haemophilia A; Fidanacogene elaparvovec for Haemophilia B) has shown sustained factor levels in clinical trials, potentially offering a functional cure. Approved in USA/Europe (2023).",
        styles['BodyText2']
    ))
    
    story.append(Paragraph("3. PREVENTION OF CHRONIC HAEMOPHILIC ARTHROPATHY", styles['H1Answer']))
    story.append(Paragraph(
        "Haemophilic arthropathy is the most debilitating long-term complication, resulting from repeated haemarthroses leading to synovial hypertrophy, articular cartilage erosion, and joint destruction.",
        styles['BodyText2']
    ))
    
    story.append(Paragraph("A. Primary Prophylaxis", styles['H2Answer']))
    story.append(Paragraph(
        "<b>Definition:</b> Regular factor replacement initiated before 2 years of age and before the first joint bleed (or after first joint bleed), aimed at maintaining factor levels above 1% (trough level).",
        styles['BodyText2']
    ))
    story.append(Paragraph("• <b>Malmo regimen:</b> FVIII 25-40 IU/kg every alternate day (3×/week)", styles['BulletText']))
    story.append(Paragraph("• <b>Utrecht regimen:</b> FVIII 15-30 IU/kg 3×/week", styles['BulletText']))
    story.append(Paragraph("• Goal: Trough FVIII >1%; treat like moderate haemophilia", styles['BulletText']))
    story.append(Paragraph("• Evidence: Reduces haemarthroses by >90%, preserves joint function", styles['BulletText']))
    
    story.append(Paragraph("B. Secondary Prophylaxis", styles['H2Answer']))
    story.append(Paragraph("• Started after established joint disease to prevent further damage", styles['BulletText']))
    story.append(Paragraph("• Less effective than primary prophylaxis but still beneficial", styles['BulletText']))
    
    story.append(Paragraph("C. Physiotherapy and Rehabilitation", styles['H2Answer']))
    story.append(Paragraph("• Strengthening periarticular muscles (especially quadriceps) reduces haemarthrosis frequency", styles['BulletText']))
    story.append(Paragraph("• Hydrotherapy: low-impact exercise preserving joint mobility", styles['BulletText']))
    story.append(Paragraph("• Splinting during acute bleeds; early mobilization after factor replacement", styles['BulletText']))
    story.append(Paragraph("• Serial casting for fixed flexion deformities", styles['BulletText']))
    
    story.append(Paragraph("D. Avoidance of Risk Factors", styles['H2Answer']))
    story.append(Paragraph("• <b>Avoid NSAIDs</b> (impair platelet function, increase bleeding risk); use COX-2 inhibitors if analgesia needed", styles['BulletText']))
    story.append(Paragraph("• Avoid aspirin-containing products", styles['BulletText']))
    story.append(Paragraph("• Avoid IM injections; use SC route only", styles['BulletText']))
    story.append(Paragraph("• Vaccinate (Hepatitis B, Hepatitis A — risk from blood products)", styles['BulletText']))
    
    story.append(Paragraph("E. Surgical Interventions", styles['H2Answer']))
    story.append(Paragraph("• Synovectomy (surgical or radionuclide — P-32, Y-90): reduces bleeding frequency in target joints", styles['BulletText']))
    story.append(Paragraph("• Total joint replacement: end-stage arthropathy; excellent outcomes with adequate factor cover", styles['BulletText']))
    story.append(Paragraph("• Orthotic devices, assistive mobility aids", styles['BulletText']))
    
    story.append(Paragraph("F. Monitoring", styles['H2Answer']))
    story.append(Paragraph("• Regular joint assessment: clinical score (WFH scale), musculoskeletal ultrasound (annual)", styles['BulletText']))
    story.append(Paragraph("• MRI joint — gold standard for early haemophilic arthropathy detection", styles['BulletText']))
    story.append(Paragraph("• Annual inhibitor screening in all patients on factor replacement", styles['BulletText']))
    
    story.append(Paragraph(
        "Reference: Harrison's Principles of Internal Medicine, 22nd Edition; Williams Haematology; WFH Guidelines 2023",
        styles['ReferenceText']
    ))
    story.append(PageBreak())
    
    # ===================== QUESTION 2 =====================
    story.append(Paragraph("QUESTION 2 (26 MARKS)", styles['QuestionHeader']))
    story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#b71c1c'), spaceAfter=6))
    story.append(Paragraph(
        "<b>Describe vitamin D metabolism. Discuss vitamin D in health and disease.</b>",
        styles['BodyText2']
    ))
    story.append(Spacer(1, 0.1*inch))
    story.append(Paragraph("ANSWER", styles['H1Answer']))
    story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#9fa8da'), spaceAfter=4))
    
    story.append(Paragraph("1. VITAMIN D METABOLISM", styles['H1Answer']))
    
    story.append(Paragraph("A. Sources of Vitamin D", styles['H2Answer']))
    story.append(Paragraph("• <b>Vitamin D3 (Cholecalciferol):</b> Synthesized in skin from 7-dehydrocholesterol under UV-B radiation (290-315 nm); also from animal sources (fatty fish, liver, egg yolk)", styles['BulletText']))
    story.append(Paragraph("• <b>Vitamin D2 (Ergocalciferol):</b> Plant-derived (ergosterol + UV); fortified foods, supplements", styles['BulletText']))
    story.append(Paragraph("• Both D2 and D3 undergo identical metabolic activation; D3 slightly more potent", styles['BulletText']))
    
    story.append(Paragraph("B. Steps in Vitamin D Metabolism", styles['H2Answer']))
    story.append(Paragraph(
        "[ DIAGRAM: Skin (7-dehydrocholesterol + UV-B → Previtamin D3 → Vitamin D3) → Liver (25-hydroxylation by CYP2R1/CYP27A1 → 25-OH-D3/Calcidiol) → Kidney (1α-hydroxylation by CYP27B1 → 1,25(OH)2D3/Calcitriol) ]",
        styles['DiagramBox']
    ))
    
    story.append(Paragraph("<b>Step 1: Skin Synthesis</b>", styles['H3Answer']))
    story.append(Paragraph("• UV-B photons convert 7-dehydrocholesterol (provitamin D3) to Previtamin D3", styles['BulletText']))
    story.append(Paragraph("• Previtamin D3 undergoes thermal isomerization → Vitamin D3 (Cholecalciferol)", styles['BulletText']))
    story.append(Paragraph("• Excess UV-B converts Previtamin D3 → lumisterol/tachysterol (inactive) — natural ceiling on skin synthesis", styles['BulletText']))
    story.append(Paragraph("• Factors reducing skin synthesis: dark skin (melanin), sunscreen, winter months, northern latitudes, elderly, covered skin", styles['BulletText']))
    
    story.append(Paragraph("<b>Step 2: Hepatic 25-Hydroxylation (First Activation)</b>", styles['H3Answer']))
    story.append(Paragraph("• Vitamin D3 bound to Vitamin D Binding Protein (DBP/GC-globulin) transported to liver", styles['BulletText']))
    story.append(Paragraph("• Liver microsomal enzymes (CYP2R1 — main; CYP27A1 — mitochondrial): 25-OH Vitamin D3 (Calcidiol)", styles['BulletText']))
    story.append(Paragraph("• 25-OH-D3 is the main circulating form and best marker of Vitamin D status (normal: 30-100 ng/mL)", styles['BulletText']))
    story.append(Paragraph("• This step is minimally regulated (substrate-driven); liver disease rarely causes significant deficiency", styles['BulletText']))
    
    story.append(Paragraph("<b>Step 3: Renal 1α-Hydroxylation (Second Activation — Tightly Regulated)</b>", styles['H3Answer']))
    story.append(Paragraph("• Proximal tubular mitochondrial enzyme CYP27B1 (1α-hydroxylase) converts 25-OH-D3 → 1,25(OH)2D3 (Calcitriol)", styles['BulletText']))
    story.append(Paragraph("• <b>Calcitriol is the biologically active form</b> (binds Vitamin D Receptor with 1000× higher affinity than calcidiol)", styles['BulletText']))
    story.append(Paragraph("• Also produced extrarenally: placenta, macrophages (granulomatous diseases → hypercalcemia)", styles['BulletText']))
    
    story.append(Paragraph("C. Regulation of Vitamin D Metabolism", styles['H2Answer']))
    reg2_data = [
        ["Regulator", "Effect on CYP27B1 (1α-hydroxylase)", "Effect on CYP24A1 (24-hydroxylase)"],
        ["↑ PTH", "Stimulates (↑ calcitriol)", "Inhibits"],
        ["↓ Serum Calcium", "Stimulates (indirectly via PTH)", "—"],
        ["↓ Serum Phosphate", "Stimulates", "—"],
        ["↑ Calcitriol", "Inhibits (negative feedback)", "Stimulates (inactivation)"],
        ["↑ FGF-23 (from osteocytes)", "Inhibits", "Stimulates"],
        ["Insulin, Growth Hormone", "Stimulates", "—"],
        ["Glucocorticoids", "Inhibits (chronic use)", "—"],
    ]
    reg2_table = Table(reg2_data, colWidths=[4.5*cm, 5*cm, 5.5*cm])
    reg2_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e65100')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fff3e0'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ffcc80')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ]))
    story.append(reg2_table)
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph("D. Inactivation: 24-Hydroxylation", styles['H2Answer']))
    story.append(Paragraph("• CYP24A1 enzyme converts 25-OH-D3 → 24,25(OH)2D3 (less active) and 1,25(OH)2D3 → 1,24,25(OH)3D3 (inactive)", styles['BulletText']))
    story.append(Paragraph("• Feedback inactivation prevents vitamin D toxicity", styles['BulletText']))
    story.append(Paragraph("• CYP24A1 mutations → idiopathic infantile hypercalcemia, nephrocalcinosis", styles['BulletText']))
    
    story.append(Paragraph("2. MECHANISMS OF VITAMIN D ACTION", styles['H1Answer']))
    story.append(Paragraph("A. Genomic Actions (via Vitamin D Receptor — VDR)", styles['H2Answer']))
    story.append(Paragraph("• Calcitriol enters target cells, binds VDR (nuclear receptor superfamily)", styles['BulletText']))
    story.append(Paragraph("• VDR-calcitriol complex forms heterodimer with RXR (Retinoid X Receptor)", styles['BulletText']))
    story.append(Paragraph("• Binds Vitamin D Response Elements (VDREs) in DNA → transcriptional regulation of >2000 genes", styles['BulletText']))
    story.append(Paragraph("• VDR expressed in >30 tissues: intestine, kidney, bone, immune cells, muscle, brain, skin, pancreas", styles['BulletText']))
    
    story.append(Paragraph("B. Non-Genomic Actions", styles['H2Answer']))
    story.append(Paragraph("• Rapid effects via membrane-associated VDR and protein kinase C, MAPK, PI3K signaling", styles['BulletText']))
    story.append(Paragraph("• Rapid calcium entry (transcaltachia), insulin secretion", styles['BulletText']))
    
    story.append(Paragraph("3. PHYSIOLOGICAL FUNCTIONS OF VITAMIN D", styles['H1Answer']))
    story.append(Paragraph("• <b>Calcium & Phosphate Homeostasis:</b> Increases intestinal Ca2+ absorption (via TRPV6 calcium channels, calbindin-D9k); increases renal tubular Ca2+ reabsorption; mobilizes Ca2+ from bone (with PTH)", styles['BulletText']))
    story.append(Paragraph("• <b>Bone Mineralization:</b> Maintains calcium-phosphate product; activates osteoblasts; essential for bone matrix mineralization", styles['BulletText']))
    story.append(Paragraph("• <b>Immune Modulation:</b> Induces antimicrobial peptides (cathelicidin, defensins); shifts Th1 → Th2 (anti-inflammatory); enhances macrophage/monocyte function", styles['BulletText']))
    story.append(Paragraph("• <b>Muscle Function:</b> VDR in skeletal muscle; deficiency → proximal myopathy, falls in elderly", styles['BulletText']))
    story.append(Paragraph("• <b>Cell Differentiation:</b> Anti-proliferative, pro-differentiative effects (cancer protection hypothesis)", styles['BulletText']))
    story.append(Paragraph("• <b>Insulin Secretion:</b> VDR in beta cells; deficiency associated with T2DM", styles['BulletText']))
    story.append(Paragraph("• <b>Cardiovascular:</b> Renin suppression; VDR in cardiac myocytes, smooth muscle", styles['BulletText']))
    
    story.append(Paragraph("4. VITAMIN D IN DISEASE", styles['H1Answer']))
    
    story.append(Paragraph("A. Vitamin D Deficiency States", styles['H2Answer']))
    def_data = [
        ["Condition", "Age Group", "Key Features", "Treatment"],
        ["Nutritional Rickets", "Children", "Widened epiphyses, rachitic rosary, Harrison's sulcus, bowing of legs, tetany, delayed dentition", "Vit D 1000-5000 IU/day × 3 months + Calcium"],
        ["Osteomalacia", "Adults", "Bone pain (axial skeleton), proximal myopathy, Looser's zones (pseudofractures) on X-ray, waddling gait", "Vit D 50,000 IU weekly × 8 weeks, then maintenance"],
        ["Secondary Hyperparathyroidism", "CKD, elderly", "Elevated PTH, low Ca2+, high phosphate; renal osteodystrophy", "Active Vit D (calcitriol), phosphate binders"],
    ]
    def_table = Table(def_data, colWidths=[3.5*cm, 2.5*cm, 5.5*cm, 4.5*cm])
    def_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 8.5),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e3f2fd'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#90caf9')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('WORDWRAP', (0,0), (-1,-1), True),
    ]))
    story.append(def_table)
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph("B. Causes of Vitamin D Deficiency", styles['H2Answer']))
    story.append(Paragraph("• Inadequate sun exposure (indoor lifestyle, northern latitude, dark skin, sunscreen)", styles['BulletText']))
    story.append(Paragraph("• Poor dietary intake (veganism, milk avoidance)", styles['BulletText']))
    story.append(Paragraph("• Malabsorption (celiac disease, IBD, bariatric surgery)", styles['BulletText']))
    story.append(Paragraph("• Liver disease (reduced 25-hydroxylation)", styles['BulletText']))
    story.append(Paragraph("• Chronic kidney disease (reduced 1α-hydroxylation → most important cause of active Vit D deficiency)", styles['BulletText']))
    story.append(Paragraph("• Medications: anticonvulsants (CYP induction → increased catabolism), glucocorticoids, rifampicin", styles['BulletText']))
    story.append(Paragraph("• Hypoparathyroidism (reduced PTH → reduced 1α-hydroxylation)", styles['BulletText']))
    story.append(Paragraph("• Hereditary: Vitamin D-dependent rickets type I (CYP27B1 mutation), type II (VDR mutation)", styles['BulletText']))
    story.append(Paragraph("• Tumor-induced osteomalacia: FGF-23 excess from mesenchymal tumors", styles['BulletText']))
    
    story.append(Paragraph("C. Vitamin D Toxicity / Excess", styles['H2Answer']))
    story.append(Paragraph("• Sun exposure CANNOT cause toxicity (photodegradation of previtamin D3 provides ceiling)", styles['BulletText']))
    story.append(Paragraph("• Excess supplementation: 25-OH-D3 >150 ng/mL", styles['BulletText']))
    story.append(Paragraph("• Features: hypercalcemia, hypercalciuria, nephrolithiasis, nephrocalcinosis, soft tissue calcification", styles['BulletText']))
    story.append(Paragraph("• Treatment: discontinue vitamin D, hydration, glucocorticoids (reduce intestinal absorption), ketoconazole (inhibits CYP27B1)", styles['BulletText']))
    
    story.append(Paragraph("D. Vitamin D in Non-Classical Diseases (Pleiotropic Roles)", styles['H2Answer']))
    
    non_data = [
        ["Disease Category", "Evidence & Role of Vitamin D"],
        ["Autoimmune Diseases (T1DM, MS, SLE, RA)", "Low 25-OH-D correlates with disease activity; Vit D suppresses Th17, enhances Treg cells"],
        ["Cardiovascular Disease", "Deficiency linked to hypertension (renin suppression), left ventricular hypertrophy, heart failure; VITAL trial: supplementation reduced MI in African Americans"],
        ["Cancer", "Ecological studies: reduced sun exposure correlates with higher incidence of colon, breast, prostate cancers; calcitriol is anti-proliferative, pro-apoptotic; VITAL trial: reduced cancer mortality"],
        ["Type 2 Diabetes Mellitus", "VDR in beta cells; deficiency impairs insulin secretion; supplementation improves insulin sensitivity"],
        ["COVID-19", "Deficiency associated with severe COVID-19; Vit D enhances innate immunity, reduces cytokine storm; evidence mixed for supplementation efficacy"],
        ["Depression/Neurological", "VDR in brain; deficiency associated with depression, cognitive decline, schizophrenia; evidence of modest benefit with supplementation"],
        ["PCOS", "Vit D deficiency common in PCOS; improves metabolic parameters and menstrual regularity"],
        ["Tuberculosis", "Macrophage CYP27B1 produces calcitriol; stimulates cathelicidin against M. tuberculosis; adjuvant therapy in TB"],
    ]
    non_table = Table(non_data, colWidths=[4.5*cm, 11.5*cm])
    non_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#4a148c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3e5f5'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ce93d8')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]))
    story.append(non_table)
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph("E. Supplementation Guidelines", styles['H2Answer']))
    story.append(Paragraph("• RDA: 600-800 IU/day for adults; 1000-2000 IU/day recommended by endocrine societies", styles['BulletText']))
    story.append(Paragraph("• Optimal serum 25-OH-D: >30 ng/mL (75 nmol/L)", styles['BulletText']))
    story.append(Paragraph("• Therapeutic dose for deficiency: 50,000 IU weekly × 8-12 weeks, then maintenance 1500-2000 IU/day", styles['BulletText']))
    story.append(Paragraph("• Active Vit D (calcitriol 0.25-0.5 mcg/day) used in CKD, hypoparathyroidism", styles['BulletText']))
    
    story.append(Paragraph(
        "Reference: Harrison's Principles of Internal Medicine, 22nd Edition; Holick MF, NEJM 2007; VITAL Trial, NEJM 2019",
        styles['ReferenceText']
    ))
    story.append(PageBreak())
    
    # ===================== QUESTION 3 =====================
    story.append(Paragraph("QUESTION 3 — SHORT NOTES (8 MARKS EACH)", styles['QuestionHeader']))
    story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#b71c1c'), spaceAfter=6))
    
    # 3a Drug-induced lupus
    story.append(Paragraph("Q3(a): Drug-Induced Lupus (DIL) [8 Marks]", styles['ShortNoteHeader']))
    story.append(HRFlowable(width="50%", thickness=1, color=colors.HexColor('#ce93d8'), spaceAfter=4))
    
    story.append(Paragraph("Definition", styles['H2Answer']))
    story.append(Paragraph(
        "Drug-induced lupus (DIL) is a lupus-like syndrome caused by long-term exposure to certain drugs, characterized by autoantibody production and clinical features resembling SLE, which resolve upon drug withdrawal.",
        styles['BodyText2']
    ))
    
    story.append(Paragraph("Causative Drugs", styles['H2Answer']))
    dil_data = [
        ["High Risk (>5%)", "Moderate Risk", "Low Risk (<1%)"],
        ["Procainamide (15-20%)", "Quinidine, Phenytoin", "TNF-alpha inhibitors (infliximab, etanercept, adalimumab)"],
        ["Hydralazine (7-13%)", "Isoniazid, Methyldopa", "Minocycline, Sulfasalazine"],
        ["Chlorpromazine (4-7%)", "Carbamazepine, Lithium", "Interferons, Anti-PD1 agents"],
    ]
    dil_table = Table(dil_data, colWidths=[4.5*cm, 5*cm, 6.5*cm])
    dil_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#880e4f')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fce4ec'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#f48fb1')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]))
    story.append(dil_table)
    story.append(Spacer(1, 0.08*inch))
    
    story.append(Paragraph("Pathogenesis", styles['H2Answer']))
    story.append(Paragraph("• Most DIL drugs are <b>aromatic amines or hydrazines</b> metabolized by N-acetyltransferase 2 (NAT2)", styles['BulletText']))
    story.append(Paragraph("• <b>Slow acetylators</b> (homozygous) are at higher risk (hydralazine, procainamide, INH)", styles['BulletText']))
    story.append(Paragraph("• Mechanism: drug (or reactive metabolite) binds nuclear proteins → immune recognition", styles['BulletText']))
    story.append(Paragraph("• Hypomethylation of lymphocyte DNA → overexpression of integrin LFA-1 → T cell autoreactivity", styles['BulletText']))
    story.append(Paragraph("• Complement activation by drug-antibody-antigen complexes", styles['BulletText']))
    story.append(Paragraph("• Anti-histone antibodies most characteristic (positive in 95% DIL vs 50% SLE)", styles['BulletText']))
    
    story.append(Paragraph("Clinical Features", styles['H2Answer']))
    story.append(Paragraph("• <b>Onset:</b> After months to years of drug exposure (mean: procainamide 12 months, hydralazine 24 months)", styles['BulletText']))
    story.append(Paragraph("• <b>Systemic:</b> Fever, malaise, weight loss", styles['BulletText']))
    story.append(Paragraph("• <b>Musculoskeletal:</b> Arthralgia/arthritis (most common), myalgia", styles['BulletText']))
    story.append(Paragraph("• <b>Serositis:</b> Pleuritis, pericarditis (more common than SLE)", styles['BulletText']))
    story.append(Paragraph("• <b>Skin:</b> Malar rash, photosensitivity (less common than SLE)", styles['BulletText']))
    
    story.append(Paragraph("Key Differences from SLE", styles['H2Answer']))
    diff_data = [
        ["Feature", "Drug-Induced Lupus", "Systemic SLE"],
        ["Age", "Older adults", "Young women (F:M = 9:1)"],
        ["Anti-histone Ab", "Positive >95%", "Positive ~50%"],
        ["Anti-dsDNA", "Usually NEGATIVE", "Positive (marker of activity)"],
        ["Complement", "Normal (C3, C4)", "LOW (C3, C4 consumed)"],
        ["Renal involvement", "RARE (<5%)", "Common (50%)"],
        ["CNS involvement", "ABSENT", "Present (psychosis, seizures)"],
        ["Course", "Resolves on drug stop", "Chronic, relapsing"],
    ]
    diff_table = Table(diff_data, colWidths=[3.5*cm, 5.5*cm, 5*cm])
    diff_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#004d40')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 8.5),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e0f2f1'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#80cbc4')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ]))
    story.append(diff_table)
    story.append(Spacer(1, 0.08*inch))
    
    story.append(Paragraph("Investigations", styles['H2Answer']))
    story.append(Paragraph("• ANA: positive (90%); anti-histone antibodies (most specific for DIL)", styles['BulletText']))
    story.append(Paragraph("• Anti-dsDNA: usually negative (important distinguishing feature)", styles['BulletText']))
    story.append(Paragraph("• CBC: leukopenia, anaemia; ESR elevated; complement levels normal", styles['BulletText']))
    story.append(Paragraph("• Urinalysis: normal (no renal involvement)", styles['BulletText']))
    
    story.append(Paragraph("Management", styles['H2Answer']))
    story.append(Paragraph("• <b>Drug withdrawal</b>: primary treatment; most symptoms resolve within weeks-months", styles['BulletText']))
    story.append(Paragraph("• ANA may persist for months after withdrawal", styles['BulletText']))
    story.append(Paragraph("• Symptomatic treatment: NSAIDs for arthralgia/serositis", styles['BulletText']))
    story.append(Paragraph("• Hydroxychloroquine for persistent symptoms", styles['BulletText']))
    story.append(Paragraph("• Short-course corticosteroids for severe manifestations (rare)", styles['BulletText']))
    story.append(Paragraph("• TNF-inhibitor-induced lupus may require stopping biologic and short steroid course", styles['BulletText']))
    story.append(Spacer(1, 0.15*inch))
    
    # 3b Oxygen dissociation curve
    story.append(Paragraph("Q3(b): Oxygen Dissociation Curve and its Determinants [8 Marks]", styles['ShortNoteHeader']))
    story.append(HRFlowable(width="50%", thickness=1, color=colors.HexColor('#ce93d8'), spaceAfter=4))
    
    story.append(Paragraph("Definition", styles['H2Answer']))
    story.append(Paragraph(
        "The oxygen-hemoglobin dissociation curve (ODC) depicts the relationship between partial pressure of oxygen (PO2) and haemoglobin oxygen saturation (SaO2). It has a characteristic <b>sigmoid (S-shaped)</b> curve due to the cooperative binding of O2 to haemoglobin.",
        styles['BodyText2']
    ))
    
    story.append(Paragraph(
        "[ DIAGRAM: Sigmoid S-shaped curve — X-axis PO2 (mmHg), Y-axis % HbO2 Saturation. P50 = 26 mmHg (normal). Upper flat portion: lungs (loading); steep middle portion: tissues (unloading). ]",
        styles['DiagramBox']
    ))
    
    story.append(Paragraph("Key Points of the Normal Curve", styles['H2Answer']))
    story.append(Paragraph("• <b>P50:</b> PO2 at which Hb is 50% saturated = <b>26 mmHg</b> (normal)", styles['BulletText']))
    story.append(Paragraph("• At arterial PO2 of 100 mmHg: SaO2 ~98% (upper flat plateau — efficient O2 loading in lungs)", styles['BulletText']))
    story.append(Paragraph("• At venous PO2 of 40 mmHg: SaO2 ~75% (steep portion — efficient O2 unloading in tissues)", styles['BulletText']))
    story.append(Paragraph("• Cooperative binding (allosteric): first O2 binding increases affinity for subsequent O2 molecules → sigmoidal shape", styles['BulletText']))
    story.append(Paragraph("• T-state (deoxy-Hb): tense, low affinity; R-state (oxy-Hb): relaxed, high affinity", styles['BulletText']))
    
    story.append(Paragraph("Right Shift of ODC (Decreased Affinity — Enhanced O2 Release to Tissues)", styles['H2Answer']))
    story.append(Paragraph("Right shift = ↑ P50 (>26 mmHg) = Hb holds O2 less tightly = More O2 delivered to tissues", styles['BodyText2']))
    story.append(Paragraph("• <b>↑ CO2 (Bohr effect):</b> CO2 forms carbaminohaemoglobin; reduces pH → right shift", styles['BulletText']))
    story.append(Paragraph("• <b>↑ H+ (Bohr effect):</b> Acidosis (exercise, metabolic acidosis) → right shift; H+ binds beta chains → destabilizes R-state", styles['BulletText']))
    story.append(Paragraph("• <b>↑ Temperature:</b> Exercise, fever → right shift (increased O2 delivery)", styles['BulletText']))
    story.append(Paragraph("• <b>↑ 2,3-DPG (2,3-bisphosphoglycerate):</b> Binds beta chains of deoxyHb; stabilizes T-state; produced by RBC glycolysis (Rapoport-Luebering shunt); increased in: high altitude, anaemia, chronic hypoxia", styles['BulletText']))
    
    story.append(Paragraph("Left Shift of ODC (Increased Affinity — Less O2 Released to Tissues)", styles['H2Answer']))
    story.append(Paragraph("Left shift = ↓ P50 (<26 mmHg) = Hb holds O2 more tightly = Less O2 delivered to tissues", styles['BodyText2']))
    story.append(Paragraph("• <b>↓ CO2, ↓ H+:</b> Alkalosis, hyperventilation (lungs—favors loading)", styles['BulletText']))
    story.append(Paragraph("• <b>↓ Temperature:</b> Hypothermia → left shift", styles['BulletText']))
    story.append(Paragraph("• <b>↓ 2,3-DPG:</b> Stored bank blood (2,3-DPG depletes over days)", styles['BulletText']))
    story.append(Paragraph("• <b>HbF (Fetal haemoglobin):</b> 2,3-DPG cannot bind gamma chains → inherent left shift; allows O2 transfer from maternal to fetal Hb", styles['BulletText']))
    story.append(Paragraph("• <b>HbCO (Carbon monoxide poisoning):</b> CO binds Hb 240× more tightly than O2; also shifts remaining Hb left → tissue hypoxia despite 'normal' SaO2 on pulse oximetry (falsely reads 100%)", styles['BulletText']))
    story.append(Paragraph("• Methaemoglobinaemia: Fe3+ cannot bind O2; remaining Fe2+ shows left shift", styles['BulletText']))
    
    story.append(Paragraph("Clinical Significance", styles['H2Answer']))
    story.append(Paragraph("• <b>High altitude:</b> Acclimatization → ↑ 2,3-DPG (right shift) + ↑ Hb (erythropoiesis) → compensate for low PO2", styles['BulletText']))
    story.append(Paragraph("• <b>Anaemia:</b> ↑ 2,3-DPG → right shift → increased O2 unloading at tissues (compensatory mechanism)", styles['BulletText']))
    story.append(Paragraph("• <b>CO poisoning:</b> Left shift + reduced O2 carrying capacity → severe tissue hypoxia; treat with 100% O2 / hyperbaric O2", styles['BulletText']))
    story.append(Paragraph("• <b>Massive blood transfusion:</b> Stored blood has depleted 2,3-DPG → left shift → reduced tissue O2 delivery (clinically important in neonates)", styles['BulletText']))
    story.append(Paragraph("• <b>Sepsis:</b> Right shift (acidosis, fever) initially aids O2 delivery but later Hb dysfunction occurs", styles['BulletText']))
    story.append(Spacer(1, 0.15*inch))
    
    # 3c Lab diagnosis of cholera
    story.append(Paragraph("Q3(c): Laboratory Diagnosis of Cholera [8 Marks]", styles['ShortNoteHeader']))
    story.append(HRFlowable(width="50%", thickness=1, color=colors.HexColor('#ce93d8'), spaceAfter=4))
    
    story.append(Paragraph("Introduction", styles['H2Answer']))
    story.append(Paragraph(
        "Cholera is caused by toxigenic strains of <i>Vibrio cholerae</i> (serogroups O1 and O139), causing profuse watery 'rice-water' diarrhoea due to cholera toxin (CT) stimulating cAMP-mediated chloride secretion in intestinal epithelium.",
        styles['BodyText2']
    ))
    
    story.append(Paragraph("Specimen Collection", styles['H2Answer']))
    story.append(Paragraph("• Fresh stool (<4 hours): rice-water appearance — flocculent, watery with no fecal smell", styles['BulletText']))
    story.append(Paragraph("• Rectal swab: if no stool available; must be placed in Cary-Blair transport medium immediately", styles['BulletText']))
    story.append(Paragraph("• Transport medium: alkaline peptone water (APW) or Venkatraman Ramakrishnan (VR) medium", styles['BulletText']))
    story.append(Paragraph("• Specimen should reach lab <2 hours; if delayed, use Cary-Blair (transport medium of choice)", styles['BulletText']))
    
    story.append(Paragraph("Direct Microscopy", styles['H2Answer']))
    story.append(Paragraph("• <b>Wet preparation:</b> 'School of fish' or 'shooting star' pattern — characteristic rapid darting motility of curved rods", styles['BulletText']))
    story.append(Paragraph("• <b>Immobilization test:</b> Adding specific anti-O1 or anti-O139 antiserum inhibits motility (confirmatory)", styles['BulletText']))
    story.append(Paragraph("• <b>Gram stain:</b> Gram-negative, curved (comma-shaped), non-sporing rods ('bent vibrios')", styles['BulletText']))
    
    story.append(Paragraph("Culture Methods", styles['H2Answer']))
    lab_data = [
        ["Medium", "Characteristics", "Growth Pattern"],
        ["Thiosulfate Citrate Bile Salts Sucrose (TCBS) agar", "Selective, differential medium; alkaline pH", "Yellow colonies (sucrose fermenter, V. cholerae)"],
        ["Alkaline Peptone Water (APW)", "Enrichment medium; pH 8.6-9.0 (selective for Vibrio)", "Surface pellicle after 6-8 hrs; subculture to TCBS"],
        ["Monsur's Tellurite Taurocholate Gelatin Agar (TTGA)", "Selective for V. cholerae", "Grey-black colonies with cloudy halo (gelatin liquefaction)"],
        ["Blood Agar", "Non-selective; growth as grey colonies", "Haemolysis (El Tor biotype)"],
    ]
    lab_table = Table(lab_data, colWidths=[4.5*cm, 5*cm, 6.5*cm])
    lab_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1b5e20')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 8.5),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8f5e9'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#81c784')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]))
    story.append(lab_table)
    story.append(Spacer(1, 0.08*inch))
    
    story.append(Paragraph("Biochemical Identification", styles['H2Answer']))
    story.append(Paragraph("• Oxidase positive (key test — distinguishes from Enterobacteriaceae)", styles['BulletText']))
    story.append(Paragraph("• Ferments glucose without gas; ferments sucrose and mannose; does NOT ferment arabinose", styles['BulletText']))
    story.append(Paragraph("• Positive: catalase, nitrate reduction, lysine decarboxylase, ornithine decarboxylase", styles['BulletText']))
    story.append(Paragraph("• Negative: arginine dihydrolase, lactose fermentation (distinguishes from other Vibrios)", styles['BulletText']))
    story.append(Paragraph("• String test: positive (V. cholerae forms mucoid string when emulsified in 0.5% sodium deoxycholate)", styles['BulletText']))
    
    story.append(Paragraph("Serological/Agglutination Tests", styles['H2Answer']))
    story.append(Paragraph("• Slide agglutination with anti-O1 polyvalent antiserum: confirmatory of serogroup O1", styles['BulletText']))
    story.append(Paragraph("• Further typing: anti-Ogawa, anti-Inaba, anti-Hikojima antisera (to determine serotype)", styles['BulletText']))
    story.append(Paragraph("• Anti-O139 antiserum for Bengal strain (non-O1 pandemic strain)", styles['BulletText']))
    story.append(Paragraph("• Biotyping (El Tor vs Classical): El Tor — Voges-Proskauer positive, haemolysis (sheep RBC), polymyxin B resistant", styles['BulletText']))
    
    story.append(Paragraph("Molecular Methods", styles['H2Answer']))
    story.append(Paragraph("• <b>PCR:</b> Most sensitive and specific; detects ctxA (cholera toxin A gene), tcpA (toxin-coregulated pili gene), ompW gene", styles['BulletText']))
    story.append(Paragraph("• Multiplex PCR: differentiates O1 and O139 serogroups simultaneously", styles['BulletText']))
    story.append(Paragraph("• Whole genome sequencing: for outbreak investigation, strain tracking", styles['BulletText']))
    
    story.append(Paragraph("Rapid Diagnostic Tests (RDTs)", styles['H2Answer']))
    story.append(Paragraph("• Crystal VC dipstick test: point-of-care; detects V. cholerae O1/O139 specific antigens; sensitivity 89-93%, specificity 80-85%", styles['BulletText']))
    story.append(Paragraph("• WHO recommends RDT as first-line for field use; positive result requires laboratory confirmation", styles['BulletText']))
    
    story.append(Paragraph("Serology (Retrospective/Epidemiological)", styles['H2Answer']))
    story.append(Paragraph("• Rising vibriocidal antibody titres (>4-fold rise between acute and convalescent sera)", styles['BulletText']))
    story.append(Paragraph("• Anti-toxin antibodies (anti-CT IgG): indicator of immunity; used in vaccine trials", styles['BulletText']))
    story.append(Paragraph("• ELISA for CT detection in stool specimens", styles['BulletText']))
    story.append(Spacer(1, 0.1*inch))
    story.append(Paragraph(
        "Reference: Harrison's 22E; Mackie & McCartney Practical Medical Microbiology; WHO Laboratory Methods for Diagnosis of Cholera",
        styles['ReferenceText']
    ))
    story.append(PageBreak())
    
    # ===================== QUESTION 4 =====================
    story.append(Paragraph("QUESTION 4 — SHORT NOTES (8 MARKS EACH)", styles['QuestionHeader']))
    story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#b71c1c'), spaceAfter=6))
    
    # 4a Gene Therapy
    story.append(Paragraph("Q4(a): Gene Therapy [8 Marks]", styles['ShortNoteHeader']))
    story.append(HRFlowable(width="50%", thickness=1, color=colors.HexColor('#ce93d8'), spaceAfter=4))
    
    story.append(Paragraph("Definition", styles['H2Answer']))
    story.append(Paragraph(
        "Gene therapy is the introduction, alteration, or replacement of genetic material within a patient's cells to treat or prevent disease. It involves delivery of nucleic acid (DNA, RNA, oligonucleotides) into target cells using vectors.",
        styles['BodyText2']
    ))
    
    story.append(Paragraph("Types of Gene Therapy", styles['H2Answer']))
    story.append(Paragraph("• <b>Somatic gene therapy:</b> Modification of non-reproductive cells; not heritable; most current clinical applications", styles['BulletText']))
    story.append(Paragraph("• <b>Germline gene therapy:</b> Modification of germ cells (sperm/egg/embryo); heritable; ethically controversial; not currently approved", styles['BulletText']))
    
    story.append(Paragraph("Vectors for Gene Delivery", styles['H2Answer']))
    vec_data = [
        ["Vector Type", "Examples", "Key Properties", "Limitations"],
        ["Retroviral (integrating)", "Gammaretrovirus, Lentivirus", "Integrates into genome; long-term expression; dividing and non-dividing cells (lenti)", "Insertional mutagenesis risk; HIV-based vectors"],
        ["Adeno-Associated Virus (AAV)", "AAV1-13 serotypes", "Non-integrating (episomal); long-term expression; low immunogenicity; various tropisms", "Small payload (4.5 kb); pre-existing immunity to capsid"],
        ["Adenovirus", "Adv5, Adv35", "Large payload; non-integrating; high efficiency; broad tropism", "Strong immune response; transient expression"],
        ["Non-viral: Lipid nanoparticles", "mRNA-LNP (COVID vaccines)", "No insertional mutagenesis; easy production; transient expression", "Lower efficiency; less cell-type specific"],
        ["Non-viral: Electroporation/Naked DNA", "CAR-T cell manufacture", "Simple; low cost; transient", "Low efficiency in vivo"],
    ]
    vec_table = Table(vec_data, colWidths=[3.5*cm, 3*cm, 4*cm, 4.5*cm])
    vec_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a237e')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 8),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]))
    story.append(vec_table)
    story.append(Spacer(1, 0.08*inch))
    
    story.append(Paragraph("Strategies of Gene Therapy", styles['H2Answer']))
    story.append(Paragraph("• <b>Gene addition (augmentation):</b> Introduce functional gene to complement defective gene (most common; e.g., ADA-SCID)", styles['BulletText']))
    story.append(Paragraph("• <b>Gene silencing/knockdown:</b> RNA interference (siRNA, shRNA), antisense oligonucleotides; reduce expression of disease-causing gene (e.g., Patisiran for hATTR amyloidosis)", styles['BulletText']))
    story.append(Paragraph("• <b>Gene editing:</b> CRISPR-Cas9, TALEN, Zinc Finger Nuclease — precise DNA cutting and modification; Casgevy (Exa-cel) — first CRISPR therapy approved (2023) for sickle cell disease and beta-thalassemia", styles['BulletText']))
    story.append(Paragraph("• <b>Cell-based therapy:</b> Modify cells ex vivo then reintroduce (CAR-T cells for cancer)", styles['BulletText']))
    
    story.append(Paragraph("Clinical Applications (Approved)", styles['H2Answer']))
    story.append(Paragraph("• ADA-SCID: Strimvelis (retroviral, ex vivo) — first approved gene therapy (Europe, 2016)", styles['BulletText']))
    story.append(Paragraph("• Haemophilia A: Valoctocogene roxaparvovec (AAV5-FVIII; BioMarin) — approved 2023", styles['BulletText']))
    story.append(Paragraph("• Haemophilia B: Fidanacogene elaparvovec (AAV-FIX; Pfizer) — approved 2023", styles['BulletText']))
    story.append(Paragraph("• Spinal Muscular Atrophy (SMA): Onasemnogene abeparvovec (Zolgensma; AAV9-SMN1) — IV once, approved 2019", styles['BulletText']))
    story.append(Paragraph("• Leber's congenital amaurosis: Voretigene neparvovec (Luxturna; AAV-RPE65)", styles['BulletText']))
    story.append(Paragraph("• B-cell ALL: Tisagenlecleucel (Kymriah), Axicabtagene ciloleucel (Yescarta) — CAR-T therapies", styles['BulletText']))
    story.append(Paragraph("• Sickle Cell/Beta-thalassemia: Casgevy (exa-cel, CRISPR; approved 2023)", styles['BulletText']))
    
    story.append(Paragraph("Limitations and Challenges", styles['H2Answer']))
    story.append(Paragraph("• Immunogenicity against viral vectors; pre-existing neutralizing antibodies", styles['BulletText']))
    story.append(Paragraph("• Off-target effects (CRISPR); insertional mutagenesis (retroviral)", styles['BulletText']))
    story.append(Paragraph("• High cost (Zolgensma: ~$2.1 million USD); access issues", styles['BulletText']))
    story.append(Paragraph("• Long-term durability uncertain; re-administration challenging due to immune memory", styles['BulletText']))
    story.append(Paragraph("• Limited to accessible tissues; blood-brain barrier challenge", styles['BulletText']))
    story.append(Spacer(1, 0.15*inch))
    
    # 4b Ketogenic Diet
    story.append(Paragraph("Q4(b): Ketogenic Diet [8 Marks]", styles['ShortNoteHeader']))
    story.append(HRFlowable(width="50%", thickness=1, color=colors.HexColor('#ce93d8'), spaceAfter=4))
    
    story.append(Paragraph("Definition and Composition", styles['H2Answer']))
    story.append(Paragraph(
        "The ketogenic diet (KD) is a high-fat, adequate-protein, very-low-carbohydrate diet that shifts the body's primary fuel source from glucose to fatty acid-derived ketone bodies.",
        styles['BodyText2']
    ))
    story.append(Paragraph("• Classical KD ratio: fat:(protein+carbohydrate) = <b>4:1</b>", styles['BulletText']))
    story.append(Paragraph("• Macronutrient composition: Fat 70-80%, Protein 15-20%, Carbohydrates <5% (20-50g/day)", styles['BulletText']))
    story.append(Paragraph("• Variants: Modified Atkins diet, Low glycaemic index treatment (LGIT), Medium-chain triglyceride (MCT) diet", styles['BulletText']))
    
    story.append(Paragraph("Biochemical Mechanism", styles['H2Answer']))
    story.append(Paragraph("• Carbohydrate restriction (<50g/day) → depletes liver glycogen → reduced insulin, increased glucagon", styles['BulletText']))
    story.append(Paragraph("• Adipose tissue lipolysis: FFA released → hepatic mitochondrial beta-oxidation → Acetyl-CoA", styles['BulletText']))
    story.append(Paragraph("• Excess Acetyl-CoA → ketogenesis in liver: Acetoacetate, Beta-hydroxybutyrate (BHB), Acetone", styles['BulletText']))
    story.append(Paragraph("• Ketone bodies cross blood-brain barrier → used as alternative fuel by neurons (2/3 of brain energy needs in ketosis)", styles['BulletText']))
    story.append(Paragraph("• Anti-epileptic mechanisms: adenosine receptor activation, KATP channel opening, GABA-A enhancement, reduced glutamate, mitochondrial biogenesis", styles['BulletText']))
    
    story.append(Paragraph("Medical Indications", styles['H2Answer']))
    keto_data = [
        ["Indication", "Evidence Level", "Notes"],
        ["Drug-resistant epilepsy", "Class I evidence (RCTs)", "50% seizure reduction in 50% patients; first-line for specific syndromes"],
        ["GLUT1 Deficiency Syndrome", "Essential (treatment of choice)", "Glucose cannot enter brain; ketones bypass GLUT1"],
        ["Pyruvate Dehydrogenase Deficiency", "Treatment of choice", "Bypasses PDH enzyme defect"],
        ["Type 2 Diabetes Mellitus", "Class II evidence", "Reduces HbA1c, weight loss, reduces insulin requirements"],
        ["Obesity", "Effective short-term (6-12 months)", "Greater weight loss than low-fat diet short-term"],
        ["Non-Alcoholic Fatty Liver Disease", "Promising data", "Reduces hepatic steatosis, inflammation"],
        ["Cancer (adjunctive)", "Experimental", "Warburg effect — cancer cells depend on glucose; ketones protective for normal cells"],
    ]
    keto_table = Table(keto_data, colWidths=[3.5*cm, 3*cm, 9.5*cm])
    keto_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#bf360c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 8.5),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fbe9e7'), colors.white]),
        ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ffab91')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]))
    story.append(keto_table)
    story.append(Spacer(1, 0.08*inch))
    
    story.append(Paragraph("Adverse Effects", styles['H2Answer']))
    story.append(Paragraph("• <b>Short-term:</b> 'Keto flu' (fatigue, nausea, headache, dizziness), constipation, halitosis (acetone breath)", styles['BulletText']))
    story.append(Paragraph("• <b>Long-term:</b> Nephrolithiasis (uric acid/calcium oxalate stones — acidic urine), dyslipidaemia (↑LDL, ↑HDL), nutritional deficiencies (selenium, zinc, B vitamins, Vit D), hypoglycaemia (especially in children)", styles['BulletText']))
    story.append(Paragraph("• Cardiomyopathy (rare — selenium deficiency), growth retardation in children, hepatic steatosis", styles['BulletText']))
    
    story.append(Paragraph("Contraindications", styles['H2Answer']))
    story.append(Paragraph("• Pyruvate carboxylase deficiency, porphyria, fatty acid oxidation disorders", styles['BulletText']))
    story.append(Paragraph("• Primary carnitine deficiency, beta-oxidation defects", styles['BulletText']))
    story.append(Paragraph("• Active gallbladder/renal disease; pregnancy; type 1 diabetes (risk of DKA)", styles['BulletText']))
    story.append(Spacer(1, 0.15*inch))
    
    # 4c Monkeypox
    story.append(Paragraph("Q4(c): Monkeypox (Mpox) [8 Marks]", styles['ShortNoteHeader']))
    story.append(HRFlowable(width="50%", thickness=1, color=colors.HexColor('#ce93d8'), spaceAfter=4))
    
    story.append(Paragraph("Introduction", styles['H2Answer']))
    story.append(Paragraph(
        "Mpox (formerly Monkeypox) is a zoonotic viral disease caused by the <b>Monkeypox virus (MPXV)</b>, an enveloped double-stranded DNA virus belonging to the genus Orthopoxvirus (family Poxviridae). It was declared a Public Health Emergency of International Concern (PHEIC) by WHO in July 2022 (ended May 2023; re-declared in August 2024 due to clade Ib emergence in DRC).",
        styles['BodyText2']
    ))
    
    story.append(Paragraph("Classification", styles['H2Answer']))
    story.append(Paragraph("• <b>Clade I (Central African/Congo basin strain):</b> More severe, higher CFR (1-10%); CLADE Ib — human-to-human transmission; 2024 outbreak in DRC", styles['BulletText']))
    story.append(Paragraph("• <b>Clade II (West African strain):</b> Less severe; Clade IIb responsible for 2022 global outbreak (CFR ~0.03%)", styles['BulletText']))
    
    story.append(Paragraph("Epidemiology", styles['H2Answer']))
    story.append(Paragraph("• <b>Animal reservoir:</b> African rodents (rope squirrels, dormice, Gambian pouched rats) — NOT monkeys", styles['BulletText']))
    story.append(Paragraph("• <b>Transmission:</b>", styles['BulletText']))
    story.append(Paragraph("    — Zoonotic: direct contact with infected animals (bite, scratch, body fluids, meat preparation)", styles['SubBulletText']))
    story.append(Paragraph("    — Human-to-human: close contact with skin lesions, bodily fluids, respiratory droplets (prolonged close contact), sexual contact (2022 outbreak predominantly MSM)", styles['SubBulletText']))
    story.append(Paragraph("    — Fomites: contaminated bedding, clothing", styles['SubBulletText']))
    
    story.append(Paragraph("Clinical Features", styles['H2Answer']))
    story.append(Paragraph("<b>Incubation period:</b> 5-21 days (usually 6-13 days)", styles['BulletText']))
    story.append(Paragraph("<b>Prodrome (1-4 days):</b>", styles['BulletText']))
    story.append(Paragraph("• Fever (>38.5°C), intense headache, profound weakness/myalgia", styles['SubBulletText']))
    story.append(Paragraph("• <b>LYMPHADENOPATHY</b> (distinguishing feature from smallpox/chickenpox): submandibular, cervical, inguinal", styles['SubBulletText']))
    story.append(Paragraph("<b>Exanthem (2-4 weeks):</b>", styles['BulletText']))
    story.append(Paragraph("• Rash onset 1-3 days after fever; <b>centrifugal distribution</b> (face → palms/soles → trunk)", styles['SubBulletText']))
    story.append(Paragraph("• Progression: macule → papule → vesicle → pustule → scab (deep, well-circumscribed, umbilicated lesions)", styles['SubBulletText']))
    story.append(Paragraph("• <b>All lesions are at same stage</b> (unlike chickenpox where lesions are at different stages)", styles['SubBulletText']))
    story.append(Paragraph("• In 2022 outbreak: atypical presentation — perianal/genital lesions; fewer total lesions", styles['SubBulletText']))
    story.append(Paragraph("• Oral/anogenital mucous membrane involvement; ocular keratitis possible", styles['SubBulletText']))
    
    story.append(Paragraph("Complications", styles['H2Answer']))
    story.append(Paragraph("• Secondary bacterial superinfection of skin lesions, sepsis, pneumonia (ARDS)", styles['BulletText']))
    story.append(Paragraph("• Encephalitis (rare but severe), corneal scarring → blindness", styles['BulletText']))
    story.append(Paragraph("• Severely immunocompromised (HIV with CD4 <200): disseminated disease, high mortality", styles['BulletText']))
    
    story.append(Paragraph("Diagnosis", styles['H2Answer']))
    story.append(Paragraph("• <b>PCR (Orthopoxvirus/MPXV specific):</b> Vesicle fluid/roof/crust — gold standard; distinguishes from other orthopoxviruses", styles['BulletText']))
    story.append(Paragraph("• <b>Electron microscopy:</b> Brick-shaped virions (Orthopoxvirus characteristic)", styles['BulletText']))
    story.append(Paragraph("• Viral culture (BSL-3 facility required)", styles['BulletText']))
    story.append(Paragraph("• Serology (IgM, IgG): epidemiological tool; cross-reactive with vaccinia", styles['BulletText']))
    
    story.append(Paragraph("Treatment", styles['H2Answer']))
    story.append(Paragraph("• Mostly <b>supportive care</b> (fluid replacement, wound care, pain management, antibiotics for secondary infection)", styles['BulletText']))
    story.append(Paragraph("• <b>Tecovirimat (TPOXX):</b> VP37 envelope protein inhibitor; first-line antiviral for severe disease; approved by FDA/EMA for mpox", styles['BulletText']))
    story.append(Paragraph("• <b>Brincidofovir:</b> Cidofovir prodrug; oral; approved for smallpox (compassionate use for mpox)", styles['BulletText']))
    story.append(Paragraph("• <b>Cidofovir:</b> CMV antiviral with activity against poxviruses; renal toxicity limits use", styles['BulletText']))
    story.append(Paragraph("• <b>Vaccinia Immune Globulin (VIG):</b> For severe cases, especially immunocompromised", styles['BulletText']))
    
    story.append(Paragraph("Prevention and Vaccination", styles['H2Answer']))
    story.append(Paragraph("• <b>JYNNEOS (Imvamune/Imvanex):</b> 3rd generation smallpox vaccine; replication-deficient Modified Vaccinia Ankara (MVA); 2-dose SC (28 days apart); approved for mpox prevention; 80-85% effective", styles['BulletText']))
    story.append(Paragraph("• <b>ACAM2000:</b> 2nd generation live vaccinia; single dose; effective but more side effects (encephalitis, myopericarditis)", styles['BulletText']))
    story.append(Paragraph("• <b>Post-exposure prophylaxis:</b> JYNNEOS within 4 days of exposure (preferably <2 days)", styles['BulletText']))
    story.append(Paragraph("• Infection control: contact precautions + droplet precautions; N95 mask; isolation of cases", styles['BulletText']))
    story.append(Spacer(1, 0.1*inch))
    
    story.append(Paragraph(
        "Reference: Harrison's Principles of Internal Medicine, 22nd Edition; WHO Monkeypox fact sheet 2024; CDC Mpox guidelines",
        styles['ReferenceText']
    ))
    
    # Build PDF
    doc.build(story, onFirstPage=add_header_footer, onLaterPages=add_header_footer)
    print(f"Paper I PDF created successfully: {output_path}")
    return output_path

if __name__ == "__main__":
    create_paper1()
Running Command

cd /tmp/workspace/md-exam-answers && python create_paper1.py 2>&1

This is a shared conversation. Sign in to Orris to start your own chat.