This is my exam paper as medicine resident kindly make a answer sheet for this exam paper

Reading File
Reading File
Running Command

cd /home/daytona/workspace/attachments/26d0f81c-8d38-4d0d-b365-238e5fc41f18/ && pandoc --track-changes=all "Exam paper R2 .docx" -o exam_paper.md && cat exam_paper.md

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Browsing Directory

/home/daytona/workspace

Running Command

mkdir -p /home/daytona/workspace/r2-exam-answer-sheet

Writing File

~/r2-exam-answer-sheet/create_answer_sheet.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageBreak, UnderlineType
} = require('docx');
const fs = require('fs');

function heading1(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 28, color: '1F3864' })],
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 400, after: 200 },
    border: {
      bottom: { color: '1F3864', space: 1, style: BorderStyle.SINGLE, size: 6 }
    }
  });
}

function heading2(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 24, color: '2E75B6' })],
    spacing: { before: 300, after: 120 }
  });
}

function heading3(text) {
  return new Paragraph({
    children: [new TextRun({ text, bold: true, size: 22, underline: { type: UnderlineType.SINGLE }, color: '375623' })],
    spacing: { before: 200, after: 100 }
  });
}

function body(text) {
  return new Paragraph({
    children: [new TextRun({ text, size: 22 })],
    spacing: { after: 100 },
    alignment: AlignmentType.JUSTIFIED
  });
}

function bullet(text, level = 0) {
  return new Paragraph({
    children: [new TextRun({ text: (level === 0 ? '• ' : '  - ') + text, size: 22 })],
    indent: { left: 400 + level * 360 },
    spacing: { after: 80 }
  });
}

function boldBullet(label, text) {
  return new Paragraph({
    children: [
      new TextRun({ text: '• ', size: 22 }),
      new TextRun({ text: label + ': ', bold: true, size: 22 }),
      new TextRun({ text, size: 22 })
    ],
    indent: { left: 400 },
    spacing: { after: 80 }
  });
}

function makeTable(headers, rows) {
  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({
        children: headers.map(h => new TableCell({
          children: [new Paragraph({ children: [new TextRun({ text: h, bold: true, size: 20 })] })],
          shading: { fill: '2E75B6', type: ShadingType.CLEAR, color: 'FFFFFF' }
        }))
      }),
      ...rows.map((row, ri) => new TableRow({
        children: row.map(cell => new TableCell({
          children: [new Paragraph({ children: [new TextRun({ text: cell, size: 20 })] })],
          shading: { fill: ri % 2 === 0 ? 'DEEAF1' : 'FFFFFF', type: ShadingType.CLEAR }
        }))
      }))
    ]
  });
}

function spacer() {
  return new Paragraph({ children: [new TextRun('')], spacing: { after: 100 } });
}

const doc = new Document({
  sections: [{
    properties: { page: { margin: { top: 1000, right: 900, bottom: 900, left: 900 } } },
    children: [

      // ─── TITLE PAGE ───
      new Paragraph({
        children: [new TextRun({ text: 'SMT N H L M M C', bold: true, size: 36, color: '1F3864' })],
        alignment: AlignmentType.CENTER,
        spacing: { after: 100 }
      }),
      new Paragraph({
        children: [new TextRun({ text: 'General Medicine – May 2026', bold: true, size: 28 })],
        alignment: AlignmentType.CENTER,
        spacing: { after: 100 }
      }),
      new Paragraph({
        children: [new TextRun({ text: 'R2 Examination | Duration: 3 Hours | Total Marks: 100', size: 24 })],
        alignment: AlignmentType.CENTER,
        spacing: { after: 100 }
      }),
      new Paragraph({
        children: [new TextRun({ text: 'MODEL ANSWER SHEET', bold: true, size: 32, color: 'C00000' })],
        alignment: AlignmentType.CENTER,
        spacing: { before: 300, after: 600 }
      }),

      // ═══════════════════════════════════════════════
      // Q1: UTI (20 marks)
      // ═══════════════════════════════════════════════
      heading1('Q.1. Evaluate and Manage a Patient Admitted with Urinary Tract Infection [20 Marks]'),

      heading2('Definition'),
      body('A urinary tract infection (UTI) is an infection involving any part of the urinary system – kidneys, ureters, bladder, or urethra – caused predominantly by microbial invasion of urothelial cells. It is one of the most common bacterial infections encountered in clinical practice.'),

      heading2('Classification'),
      makeTable(
        ['Type', 'Site', 'Features'],
        [
          ['Lower UTI (Cystitis)', 'Bladder/Urethra', 'Dysuria, frequency, urgency, suprapubic pain'],
          ['Upper UTI (Pyelonephritis)', 'Kidney/Renal pelvis', 'Fever, flank pain, nausea/vomiting, CVAT'],
          ['Uncomplicated UTI', 'Normal urinary tract', 'Non-pregnant women without structural/functional abnormality'],
          ['Complicated UTI', 'Abnormal urinary tract', 'Males, pregnancy, DM, immunocompromised, structural anomaly'],
          ['Catheter-associated UTI (CAUTI)', 'Any', '>48 hrs after urinary catheter insertion'],
          ['Asymptomatic Bacteriuria', 'Any', 'Positive culture without symptoms']
        ]
      ),
      spacer(),

      heading2('Common Causative Organisms'),
      bullet('E. coli – most common (80–85% of community-acquired)'),
      bullet('Staphylococcus saprophyticus – young sexually active women'),
      bullet('Klebsiella pneumoniae, Proteus mirabilis, Enterococcus'),
      bullet('Pseudomonas aeruginosa – hospital-acquired/catheter-associated'),

      heading2('Risk Factors'),
      bullet('Female sex (short urethra), sexual intercourse, pregnancy'),
      bullet('Urinary obstruction (BPH, calculi, stricture)'),
      bullet('Vesicoureteral reflux, neurogenic bladder'),
      bullet('Diabetes mellitus, immunosuppression'),
      bullet('Indwelling urinary catheter, recent instrumentation'),

      heading2('Evaluation'),
      heading3('History'),
      bullet('Dysuria, frequency, urgency, nocturia'),
      bullet('Suprapubic pain (cystitis) or flank/loin pain (pyelonephritis)'),
      bullet('Fever, chills, rigors – suggest upper UTI or urosepsis'),
      bullet('Haematuria, cloudy/malodorous urine'),
      bullet('Prior UTIs, antibiotic use, hospitalisation, catheterisation'),
      bullet('Pregnancy status, sexual history, contraceptive use'),

      heading3('Physical Examination'),
      bullet('Vital signs: fever (>38°C), tachycardia, hypotension (sepsis)'),
      bullet('Suprapubic tenderness (cystitis)'),
      bullet('Costovertebral angle tenderness (CVAT) – hallmark of pyelonephritis'),
      bullet('Assess for signs of systemic sepsis'),

      heading3('Investigations'),
      makeTable(
        ['Investigation', 'Expected Findings in UTI'],
        [
          ['Urine dipstick', 'Positive nitrites, leukocyte esterase, haematuria'],
          ['Urine microscopy', '>5 WBC/hpf (pyuria), bacteria, RBCs, casts (pyelonephritis)'],
          ['Urine culture & sensitivity (UCSM)', 'Gold standard – >10⁵ CFU/mL; guides antibiotic therapy'],
          ['CBC', 'Leukocytosis with neutrophilia (bacterial infection)'],
          ['CRP, ESR', 'Elevated in pyelonephritis/urosepsis'],
          ['Blood culture (×2)', 'Required if fever, rigors, or sepsis suspected'],
          ['Serum creatinine, BUN, electrolytes', 'Assess renal function, especially in upper UTI'],
          ['Blood glucose/HbA1c', 'Screen for diabetes mellitus'],
          ['Ultrasound KUB', 'Obstruction, abscess, hydronephrosis, structural anomaly'],
          ['CT Urogram', 'Calculi, abscess, complicated pyelonephritis'],
          ['VCUG / Cystoscopy', 'Recurrent UTI in children or suspected reflux/stricture']
        ]
      ),
      spacer(),

      heading2('Management'),

      heading3('General Measures'),
      bullet('Adequate hydration (oral/IV fluids) to maintain urine output >0.5 mL/kg/hr'),
      bullet('Analgesia: paracetamol, NSAID for fever/pain; avoid NSAIDs in renal impairment'),
      bullet('Remove/change indwelling catheter if CAUTI'),
      bullet('Relieve obstruction if present (nephrostomy, ureteric stenting)'),

      heading3('Antibiotic Therapy'),
      makeTable(
        ['Condition', 'First-Line Treatment', 'Duration'],
        [
          ['Uncomplicated cystitis (women)', 'Nitrofurantoin 100 mg BD OR Trimethoprim 200 mg BD', '5–7 days'],
          ['Uncomplicated cystitis (alternative)', 'Fosfomycin 3 g single dose', '1 day'],
          ['Complicated cystitis / men', 'Co-amoxiclav 625 mg TDS OR Ciprofloxacin 500 mg BD', '7–14 days'],
          ['Mild–moderate pyelonephritis (OP)', 'Ciprofloxacin 500 mg BD PO OR Co-amoxiclav', '7–10 days'],
          ['Severe pyelonephritis (IP)', 'IV Ceftriaxone 1–2 g OD OR IV Piperacillin-Tazobactam', '10–14 days'],
          ['Urosepsis', 'IV Meropenem 1 g TDS (empiric) + blood cultures, ICU', '14–21 days'],
          ['UTI in pregnancy', 'Nitrofurantoin (1st/2nd trimester) or Cephalexin', '7 days'],
          ['CAUTI', 'Remove/change catheter; Ciprofloxacin or Nitrofurantoin PO', '7 days']
        ]
      ),
      spacer(),
      body('Note: Antibiotic choice should always be guided by local antibiogram and urine culture sensitivity results.'),

      heading3('Management of Urosepsis / Septic Shock'),
      bullet('Sepsis bundle (Surviving Sepsis Campaign): initiate within 1 hour'),
      bullet('Blood cultures ×2 BEFORE antibiotics'),
      bullet('IV broad-spectrum antibiotics immediately (do not delay)'),
      bullet('IV fluid resuscitation: 30 mL/kg crystalloid bolus if hypotensive'),
      bullet('Vasopressors (norepinephrine) if MAP <65 mmHg despite fluids'),
      bullet('Urine output monitoring; ICU referral if organ dysfunction'),

      heading3('Prevention of Recurrent UTI'),
      bullet('Post-coital voiding and adequate hydration'),
      bullet('Prophylactic nitrofurantoin 50 mg ON for 6 months (recurrent UTI women)'),
      bullet('Estrogen cream (post-menopausal women)'),
      bullet('Cranberry products (limited evidence)'),
      bullet('Treat underlying abnormalities (obstruction, calculi, DM)'),
      spacer(),

      // ═══════════════════════════════════════════════
      // Q2: Acute Abdominal Pain in 16-yr girl with family history of DM (20 marks)
      // ═══════════════════════════════════════════════
      heading1('Q.2. Etiology and Evaluation of Acute Abdominal Pain in a 16-Year-Old Girl with Family History of Diabetes [20 Marks]'),

      heading2('Introduction'),
      body('Acute abdominal pain is a common emergency presentation. In a 16-year-old girl with a sibling diagnosed with Type 1 Diabetes Mellitus (T1DM) at age 27, the differential diagnosis must include both common surgical/gynaecological causes and metabolic/diabetic emergencies. The sibling\'s diabetes history raises the possibility that this patient may also have T1DM (autoimmune susceptibility) or be developing diabetic ketoacidosis (DKA) as the presenting feature of new-onset diabetes.'),

      heading2('Etiology of Acute Abdominal Pain in Adolescent Girls'),

      heading3('A. Gynaecological Causes (MOST COMMON in this age group)'),
      bullet('Ectopic pregnancy – must always be excluded (urine/serum beta-hCG)'),
      bullet('Pelvic inflammatory disease (PID) – sexually active adolescents'),
      bullet('Dysmenorrhoea (primary or secondary)'),
      bullet('Mittleschmerz (mid-cycle ovulation pain)'),
      bullet('Ovarian cyst – torsion, rupture, haemorrhage'),
      bullet('Endometriosis'),

      heading3('B. Gastrointestinal Causes'),
      bullet('Acute appendicitis – most common surgical emergency in this age group'),
      bullet('Mesenteric adenitis – viral illness in young patients'),
      bullet('Gastroenteritis (infective)'),
      bullet('Intestinal obstruction'),
      bullet('Constipation'),
      bullet('Peptic ulcer disease / GERD'),
      bullet('Inflammatory bowel disease (Crohn\'s, Ulcerative colitis)'),

      heading3('C. Metabolic Causes (HIGH PRIORITY given family history)'),
      bullet('Diabetic Ketoacidosis (DKA) – acute abdominal pain is a classic feature; can mimic "acute abdomen"'),
      bullet('Acute pancreatitis (may be DKA-associated)'),
      bullet('Hypoglycaemia (if insulin-treated)'),
      bullet('Addisonian crisis'),

      heading3('D. Urological Causes'),
      bullet('Renal/ureteric calculi (renal colic)'),
      bullet('Urinary tract infection / pyelonephritis'),

      heading3('E. Rare/Others'),
      bullet('Abdominal migraine'),
      bullet('Psychosomatic / functional abdominal pain'),
      bullet('Porphyria, lead poisoning'),
      spacer(),

      heading2('RED FLAG – Diabetic Ketoacidosis (DKA)'),
      body('Given the family history of T1DM (sibling), DKA must be the priority diagnosis to exclude as it is life-threatening and commonly presents with abdominal pain, nausea, and vomiting. DKA can mimic or co-exist with surgical emergencies.'),
      makeTable(
        ['DKA Feature', 'Details'],
        [
          ['Abdominal pain', 'Diffuse, may mimic peritonitis; due to electrolyte imbalance/gastric dilatation'],
          ['Blood glucose', '>11 mmol/L (>200 mg/dL)'],
          ['Ketonaemia', 'Blood ketones >3 mmol/L or urine ketones 2+ or more'],
          ['Bicarbonate', '<18 mmol/L; pH <7.3 (metabolic acidosis)'],
          ['Kussmaul breathing', 'Deep sighing breaths (compensatory respiratory alkalosis)'],
          ['Fruity/acetone breath', 'Ketone exhalation'],
          ['Dehydration', 'Average 3–6 litres fluid deficit in DKA']
        ]
      ),
      spacer(),

      heading2('Evaluation'),

      heading3('History'),
      bullet('Onset, character, site, radiation, severity (1–10), duration of pain'),
      bullet('Associated: nausea, vomiting, diarrhoea, constipation, fever'),
      bullet('Gynaecological: LMP, cycle regularity, sexual activity, vaginal discharge'),
      bullet('Urinary: dysuria, frequency, haematuria'),
      bullet('Metabolic: polyuria, polydipsia, polyphagia, weight loss (T1DM)'),
      bullet('Precipitating illness, trauma, medications'),
      bullet('Family history of DM (detailed – specifically sibling with T1DM)'),

      heading3('Physical Examination'),
      bullet('General: hydration status, BMI, body habitus, consciousness (GCS)'),
      bullet('Vitals: temp, BP, HR, RR (Kussmaul breathing), SpO2'),
      bullet('Breath: fruity/acetone odour (ketosis)'),
      bullet('Abdomen: inspection, auscultation, palpation (guarding, rigidity), percussion'),
      bullet('Rebound tenderness, Rovsing\'s sign, McBurney\'s point (appendix)'),
      bullet('Cervical motion tenderness, adnexal tenderness (PID/ectopic)'),
      bullet('Bimanual pelvic examination (with consent)'),

      heading3('Investigations'),
      makeTable(
        ['Investigation', 'Purpose'],
        [
          ['Blood glucose (urgent capillary)', 'Screen for DKA/hyperglycaemia immediately'],
          ['Serum beta-hCG (urine and serum)', 'Exclude ectopic pregnancy (mandatory in all females of reproductive age)'],
          ['Urine dipstick + ketones + microscopy', 'Ketonuria (DKA), infection, haematuria'],
          ['ABG / VBG', 'pH, bicarbonate, pCO2 – confirm metabolic acidosis in DKA'],
          ['Blood ketones', '>3 mmol/L confirms DKA'],
          ['CBC with differential', 'Leukocytosis (infection/appendicitis), anaemia'],
          ['CRP, ESR', 'Inflammation/infection'],
          ['Serum electrolytes (Na, K, Cl, HCO3)', 'Critical in DKA – hypokalaemia, anion gap metabolic acidosis'],
          ['LFT, Amylase, Lipase', 'Pancreatitis, hepatobiliary cause'],
          ['Serum creatinine, BUN', 'Renal function'],
          ['HbA1c + anti-GAD/anti-islet antibodies', 'Diagnose T1DM if new onset'],
          ['Urine R/E, culture', 'UTI/pyelonephritis'],
          ['Ultrasound abdomen & pelvis (TVUS)', 'Ovarian cyst, ectopic, appendix, free fluid, kidney'],
          ['CT abdomen/pelvis', 'If diagnosis unclear after US, suspect appendicitis/perforation'],
          ['ECG', 'Hyperkalaemia/dysrhythmia in DKA']
        ]
      ),
      spacer(),

      heading2('Management (DKA Protocol – if confirmed)'),
      bullet('Admit to HDU/ICU; continuous monitoring'),
      bullet('IV fluid resuscitation: 0.9% NaCl 10–20 mL/kg over first hour, then 500 mL/hr for 4 hours'),
      bullet('Insulin infusion: 0.1 units/kg/hr (do NOT start until K+ >3.5 mmol/L)'),
      bullet('Potassium replacement: add 40 mmol KCl per litre of saline if K+ <5.5 mmol/L'),
      bullet('Monitor: blood glucose hourly, electrolytes 2-hourly, ABG/VBG 2-hourly, urine output'),
      bullet('Continue IV insulin until ketonaemia resolved (pH >7.3, bicarbonate >18, ketones <0.6)'),
      bullet('Identify and treat precipitating cause (infection, non-compliance)'),
      bullet('Transition to subcutaneous insulin when eating; diabetes education, endocrinology review'),
      spacer(),

      // ═══════════════════════════════════════════════
      // Q3: Hypertension (20 marks)
      // ═══════════════════════════════════════════════
      heading1('Q.3. Definition, Classification, Evaluation and Management of Hypertension [20 Marks]'),

      heading2('Definition'),
      body('Hypertension (HTN) is defined as a sustained elevation of blood pressure (BP) with Systolic BP ≥130 mmHg and/or Diastolic BP ≥80 mmHg (ACC/AHA 2017 Guidelines), measured on at least 2 occasions on 2 separate visits. The WHO/JNC 8 definition uses a threshold of ≥140/90 mmHg. BP is measured in the office with appropriate technique (seated, rested for 5 minutes, appropriate cuff size, average of 2 readings).'),

      heading2('Classification of Hypertension'),
      makeTable(
        ['Category', 'Systolic BP (mmHg)', '', 'Diastolic BP (mmHg)'],
        [
          ['Normal', '<120', 'and', '<80'],
          ['Elevated / Pre-hypertension', '120–129', 'and', '<80'],
          ['Stage 1 Hypertension', '130–139', 'or', '80–89'],
          ['Stage 2 Hypertension', '≥140', 'or', '≥90'],
          ['Hypertensive Crisis – Urgency', '≥180', 'or', '≥120 (no end-organ damage)'],
          ['Hypertensive Emergency', '≥180', 'or', '≥120 (WITH end-organ damage)']
        ]
      ),
      spacer(),

      heading3('By Aetiology'),
      boldBullet('Primary (Essential) HTN', '90–95% of all cases; no identifiable cause; polygenic/multifactorial'),
      boldBullet('Secondary HTN', '5–10%; identifiable cause – must be excluded, especially in young patients'),
      spacer(),

      makeTable(
        ['Cause of Secondary HTN', 'Investigation Clue'],
        [
          ['Chronic Kidney Disease (CKD)', 'Most common cause – raised creatinine, proteinuria'],
          ['Renovascular disease (Renal artery stenosis)', 'Young woman, flank bruit, refractory HTN – Doppler US'],
          ['Primary hyperaldosteronism (Conn\'s syndrome)', 'Hypokalaemia, aldosterone/renin ratio >30'],
          ['Phaeochromocytoma', 'Episodic headache, sweating, palpitations – 24-hr urine catecholamines'],
          ['Cushing\'s syndrome', 'Centripetal obesity, striae, buffalo hump – 24-hr urinary cortisol'],
          ['Coarctation of aorta', 'Young patient, radio-femoral delay, rib notching on CXR'],
          ['Hypothyroidism/Hyperthyroidism', 'TFTs'],
          ['OSA (Obstructive sleep apnoea)', 'Obesity, snoring, nocturnal HTN – polysomnography'],
          ['Drugs', 'OCPs, NSAIDs, steroids, decongestants, cocaine']
        ]
      ),
      spacer(),

      heading2('Risk Factors for Primary Hypertension'),
      bullet('Non-modifiable: age >55 (M), >65 (F), male sex, family history, ethnicity (Black)'),
      bullet('Modifiable: obesity (BMI >30), high sodium/low potassium diet, physical inactivity'),
      bullet('Excessive alcohol intake, smoking, psychosocial stress'),
      bullet('Diabetes mellitus, dyslipidaemia, CKD'),

      heading2('Evaluation (Assessment)'),

      heading3('History'),
      bullet('Duration of HTN, previous BP readings, adherence to medications'),
      bullet('Symptoms: headache, dizziness, visual changes, chest pain, SOB, palpitations'),
      bullet('Symptoms suggesting secondary causes (see above)'),
      bullet('Cardiovascular risk factors: smoking, DM, dyslipidaemia'),
      bullet('Family history of HTN, stroke, MI, CKD'),
      bullet('Medication history (OCPs, NSAIDs, steroids, decongestants, illicit drugs)'),
      bullet('Dietary history (salt, alcohol, potassium intake)'),

      heading3('Physical Examination'),
      bullet('Accurate BP measurement: both arms (difference >20 mmHg suggests coarctation/dissection)'),
      bullet('BMI, waist circumference'),
      bullet('Fundoscopy: hypertensive retinopathy (AV nipping, haemorrhages, exudates, papilloedema)'),
      bullet('JVP, heart sounds (S4 gallop, murmurs), peripheral pulses'),
      bullet('Renal bruits (renovascular disease), radio-femoral delay (coarctation)'),
      bullet('Signs of Cushing\'s, acromegaly, thyroid disease'),

      heading3('Investigations'),
      makeTable(
        ['Investigation', 'Purpose'],
        [
          ['CBC', 'Anaemia (secondary CKD), polycythaemia'],
          ['Fasting blood glucose / HbA1c', 'Diabetes mellitus (risk factor)'],
          ['Fasting lipid profile', 'Cardiovascular risk assessment'],
          ['Serum electrolytes (Na, K)', 'Hypokalaemia (Conn\'s, diuretics), hyponatraemia'],
          ['Serum creatinine, eGFR', 'CKD as cause or complication'],
          ['Urinalysis + urine albumin:creatinine ratio', 'Proteinuria (CKD, pre-eclampsia)'],
          ['12-lead ECG', 'LVH (Cornell/Sokolow criteria), ischaemia, arrhythmia'],
          ['Echocardiogram', 'LVH, diastolic dysfunction (if ECG changes or heart failure)'],
          ['Chest X-ray', 'Cardiomegaly, aortic knuckle, rib notching (coarctation)'],
          ['Renal Doppler US', 'Renal artery stenosis (young, refractory HTN)'],
          ['24-hour ambulatory BP monitoring (ABPM)', 'White coat HTN, masked HTN, nocturnal dipping'],
          ['Aldosterone/Renin ratio', 'If suspected primary hyperaldosteronism'],
          ['24-hr urine metanephrines/catecholamines', 'Phaeochromocytoma'],
          ['Thyroid function tests (TSH)', 'Thyroid disease'],
          ['Urine cortisol / dexamethasone suppression', 'Cushing\'s syndrome']
        ]
      ),
      spacer(),

      heading2('Management of Hypertension'),

      heading3('1. Non-Pharmacological (Lifestyle Modifications) – First-line for all stages'),
      makeTable(
        ['Intervention', 'Expected BP Reduction'],
        [
          ['Low-sodium diet (<2.3 g/day = 5.8 g NaCl)', 'SBP ↓ 5–6 mmHg'],
          ['DASH diet (fruits, vegetables, low-fat dairy)', 'SBP ↓ 8–14 mmHg'],
          ['Weight loss (10 kg)', 'SBP ↓ 5–20 mmHg'],
          ['Regular aerobic exercise (30 min/day, 5 days/week)', 'SBP ↓ 4–9 mmHg'],
          ['Alcohol reduction (<2 units/day men, <1 unit/day women)', 'SBP ↓ 2–4 mmHg'],
          ['Smoking cessation (cardiovascular risk reduction)', 'No direct effect on BP but reduces CV events'],
          ['Stress management / relaxation techniques', 'SBP ↓ 2–4 mmHg']
        ]
      ),
      spacer(),

      heading3('2. Pharmacological Management'),
      body('Indications: Stage 1 HTN with high CV risk (10-year risk ≥10%), Stage 2 HTN (≥140/90 mmHg regardless of risk), or failure of lifestyle modification after 3–6 months.'),
      makeTable(
        ['Drug Class', 'Example', 'Indication / Notes'],
        [
          ['ACE Inhibitors (ACEi)', 'Ramipril, Enalapril', 'DM, CKD with proteinuria, HFrEF. Avoid in pregnancy, bilateral RAS, hyperkalaemia'],
          ['ARBs', 'Losartan, Valsartan', 'Same as ACEi; if ACEi cough intolerable'],
          ['Calcium Channel Blockers (CCB)', 'Amlodipine (DHP); Verapamil (non-DHP)', 'Elderly, Afro-Caribbean, isolated systolic HTN, angina'],
          ['Thiazide / Thiazide-like diuretics', 'Indapamide, Chlorthalidone', 'Elderly, isolated systolic, heart failure. Avoid in gout'],
          ['Beta-blockers', 'Bisoprolol, Metoprolol, Carvedilol', 'Post-MI, HFrEF, AF, young pregnant women (Labetalol)'],
          ['Alpha-blockers', 'Doxazosin', 'BPH with HTN, Phaeochromocytoma'],
          ['Spironolactone', '25–50 mg OD', '4th line; Conn\'s syndrome, resistant HTN, heart failure'],
          ['Hydralazine / Methyldopa', 'Methyldopa 250–500 mg TDS', 'Hypertension in pregnancy (Labetalol first-line)']
        ]
      ),
      spacer(),

      heading3('Step-Up Algorithm (AHA/NICE)'),
      bullet('Step 1: Monotherapy – ACEi/ARB or CCB or Thiazide diuretic'),
      bullet('Step 2: Combination of 2 drugs – ACEi/ARB + CCB (preferred) or + Thiazide'),
      bullet('Step 3: Triple therapy – ACEi/ARB + CCB + Thiazide diuretic'),
      bullet('Step 4 (Resistant HTN): Add spironolactone 25 mg; review secondary causes and adherence'),

      heading3('Hypertensive Emergency'),
      bullet('Definition: BP ≥180/120 mmHg WITH acute target organ damage (encephalopathy, ACS, pulmonary oedema, AKI, aortic dissection)'),
      bullet('Goal: Reduce MAP by no more than 25% in first hour, then to 160/100 over 2–6 hours'),
      bullet('IV agents: Labetalol, Nicardipine, Sodium Nitroprusside, Esmolol (aortic dissection)'),
      bullet('Admit to ICU; continuous intra-arterial BP monitoring'),

      heading3('BP Targets'),
      makeTable(
        ['Patient Group', 'BP Target'],
        [
          ['General population', '<130/80 mmHg (ACC/AHA); <140/90 (JNC 8)'],
          ['Elderly >65 years', '<130/80 (if tolerated) – avoid diastolic <60 mmHg'],
          ['Diabetes mellitus', '<130/80 mmHg'],
          ['CKD with proteinuria', '<130/80 mmHg (ACEi/ARB preferred)'],
          ['Post-stroke / TIA', '<130/80 mmHg'],
          ['Pregnancy', '<150/100 mmHg target; Labetalol/Methyldopa first-line']
        ]
      ),
      spacer(),

      // ═══════════════════════════════════════════════
      // Q4: SHORT NOTES (6 marks each)
      // ═══════════════════════════════════════════════
      heading1('Q.4. Short Notes [6 Marks Each × 5 = 30 Marks]'),

      // 4.1 SVT
      heading2('4.1. Management of Supraventricular Tachycardia (SVT)'),

      heading3('Definition'),
      body('SVT refers to a group of tachyarrhythmias (HR >100 bpm) originating above the bundle of His, most commonly AVNRT (AV Nodal Re-entrant Tachycardia – 60%), AVRT, and atrial tachycardia. Onset is characteristically sudden ("paroxysmal"), with abrupt termination.'),

      heading3('Clinical Features'),
      bullet('Palpitations, dizziness/light-headedness, near-syncope'),
      bullet('Chest tightness, dyspnoea, anxiety'),
      bullet('Polyuria post-conversion (ANP release)'),
      bullet('ECG: narrow complex tachycardia (HR 150–250 bpm), regular, P waves hidden in or just after QRS, retrograde P in V1/II/III/aVF'),

      heading3('Management Algorithm'),
      body('Step 1 – ASSESS HAEMODYNAMIC STATUS:'),
      bullet('Unstable (hypotension, syncope, chest pain, pulmonary oedema) → Immediate synchronised DC cardioversion (50–150 J biphasic)'),
      bullet('Stable → Proceed with vagal manoeuvres and drugs'),
      spacer(),

      body('Step 2 – VAGAL MANOEUVRES (for stable patients):'),
      bullet('Valsalva manoeuvre (strain for 15 seconds) – 20–50% success rate'),
      bullet('Modified Valsalva (patient supine, legs elevated 45°) – more effective (43% success)'),
      bullet('Carotid sinus massage (avoid if carotid bruit, elderly, history of stroke)'),
      bullet('Cold water facial immersion'),
      spacer(),

      body('Step 3 – PHARMACOLOGICAL (if vagal fails):'),
      makeTable(
        ['Drug', 'Dose', 'Notes'],
        [
          ['Adenosine (1st choice)', '6 mg rapid IV bolus; if fails: 12 mg × 2', 'Half-life 10 sec; give into large vein with saline flush; contraindicated in asthma/heart transplant'],
          ['Verapamil (non-DHP CCB)', '5–10 mg slow IV over 2 min', 'Avoid if wide complex tachycardia, hypotension, or WPW'],
          ['Diltiazem', '0.25 mg/kg IV over 2 min', 'Alternative to verapamil'],
          ['Metoprolol (beta-blocker)', '2.5–5 mg IV slowly', 'Alternative if CCB contraindicated'],
          ['Amiodarone', '150 mg IV over 10 min', 'Wide complex or WPW-associated SVT; last resort']
        ]
      ),
      spacer(),

      body('Step 4 – PREVENTION (chronic/recurrent SVT):'),
      bullet('Beta-blockers (metoprolol, atenolol) or CCBs (verapamil, diltiazem) – first-line oral prophylaxis'),
      bullet('Flecainide / Propafenone – if structurally normal heart'),
      bullet('Radiofrequency catheter ablation – definitive cure (>95% success); preferred for symptomatic recurrent SVT'),
      bullet('Pill-in-the-pocket approach: single dose diltiazem or flecainide at onset of SVT'),
      spacer(),

      // 4.2 Hyaline Membrane Disease
      heading2('4.2. Hyaline Membrane Disorders (Respiratory Distress Syndrome – RDS)'),

      heading3('Definition'),
      body('Hyaline Membrane Disease (HMD), also known as Infant Respiratory Distress Syndrome (IRDS), is a condition primarily affecting premature neonates, characterised by surfactant deficiency leading to widespread alveolar collapse (atelectasis) and the formation of eosinophilic hyaline membranes lining the alveoli and terminal bronchioles on histology.'),

      heading3('Pathophysiology'),
      bullet('Surfactant (dipalmitoyl phosphatidylcholine/DPPC) is produced by type II pneumocytes from ~24 weeks gestation, reaching adequate levels by 35–36 weeks'),
      bullet('Surfactant deficiency → increased alveolar surface tension → alveolar collapse on expiration'),
      bullet('Atelectasis → V/Q mismatch → hypoxia → pulmonary vasoconstriction → right-to-left shunting'),
      bullet('Protein-rich exudate leaks into alveoli → hyaline membrane formation'),

      heading3('Risk Factors'),
      bullet('Prematurity (<37 weeks – risk inversely proportional to gestational age)'),
      bullet('Male sex, Caucasian race'),
      bullet('Maternal diabetes, caesarean section without labour'),
      bullet('Perinatal asphyxia, hypothermia, second twin'),

      heading3('Clinical Features'),
      bullet('Onset within 4–6 hours of birth (preterm neonate)'),
      bullet('Tachypnoea (RR >60/min), tachycardia'),
      bullet('Grunting (keeps alveoli open at end expiration), nasal flaring'),
      bullet('Intercostal, subcostal, and sternal retractions (suprasternal)'),
      bullet('Cyanosis, desaturation despite oxygen'),
      bullet('CXR: bilateral ground-glass opacification, air bronchograms, reduced lung volumes ("white-out" in severe cases)'),

      heading3('Management'),
      body('Preventive:'),
      bullet('Antenatal corticosteroids: Betamethasone 12 mg IM × 2 doses 24 hrs apart (given to mother when preterm delivery anticipated <34 weeks) – accelerates fetal lung maturity and surfactant production; reduces RDS severity by 50%'),
      bullet('Optimal neonatal resuscitation at delivery'),
      spacer(),

      body('Supportive:'),
      bullet('Oxygen supplementation to maintain SpO2 91–95% (avoid hyperoxia)'),
      bullet('CPAP (Continuous Positive Airway Pressure) via nasal prongs – prevents alveolar collapse; first-line for mild–moderate RDS'),
      bullet('Mechanical ventilation (intubation + PPV) for severe RDS or failure of CPAP'),
      bullet('Temperature regulation (incubator), minimal handling, IV fluids'),
      bullet('Treat complications: patent ductus arteriosus (PDA), intraventricular haemorrhage (IVH), air leaks, infection'),
      spacer(),

      body('Definitive – Exogenous Surfactant Replacement Therapy:'),
      bullet('Poractant alfa (Curosurf) 100–200 mg/kg intratracheal OR beractant (Survanta)'),
      bullet('Administered via endotracheal tube after intubation'),
      bullet('Early rescue surfactant: within 2 hours of birth for RDS confirmed on CXR + FiO2 >0.30'),
      bullet('LISA/MIST technique (Less Invasive Surfactant Administration) – avoids intubation, given via thin catheter during CPAP'),
      bullet('Reduces mortality by 40% and severity of chronic lung disease (bronchopulmonary dysplasia)'),
      spacer(),

      // 4.3 Hypercalcaemia
      heading2('4.3. Hypercalcemia – Definition and Management'),

      heading3('Definition'),
      body('Hypercalcaemia is defined as serum total calcium >10.5 mg/dL (>2.6 mmol/L) or ionised calcium >1.3 mmol/L. Always correct for serum albumin: Corrected Ca = Measured Ca + 0.8 × (4.0 – Serum Albumin in g/dL).'),

      heading3('Severity Classification'),
      makeTable(
        ['Severity', 'Serum Calcium Level', 'Symptoms'],
        [
          ['Mild', '10.5–12.0 mg/dL (2.6–3.0 mmol/L)', 'Often asymptomatic; fatigue, constipation, polyuria'],
          ['Moderate', '12.0–14.0 mg/dL (3.0–3.5 mmol/L)', 'Nausea, vomiting, cognitive impairment, muscle weakness'],
          ['Severe (Hypercalcaemic Crisis)', '>14.0 mg/dL (>3.5 mmol/L)', 'Confusion, stupor, coma, cardiac dysrhythmia, pancreatitis, renal failure']
        ]
      ),
      spacer(),

      heading3('Aetiology (Mnemonic: CHIMPANZEES)'),
      bullet('C – Calcium supplementation / Milk-alkali syndrome'),
      bullet('H – Hyperparathyroidism (primary) – most common cause in outpatients (PTH-mediated)'),
      bullet('I – Immobilisation (especially in Paget\'s disease)'),
      bullet('M – Malignancy – most common cause in hospitalised patients (PTHrP, osteolysis, calcitriol from lymphoma)'),
      bullet('P – Paget\'s disease'),
      bullet('A – Addison\'s disease'),
      bullet('N – Neoplasm (multiple myeloma, breast, lung, renal, prostate cancers)'),
      bullet('Z – Zollinger-Ellison syndrome (MEN1)'),
      bullet('E – Excess Vitamin D (supplementation, granulomatous disease – sarcoidosis, TB)'),
      bullet('E – Excess thyroid hormone (hyperthyroidism)'),
      bullet('S – Sarcoidosis, thiazide diuretics'),

      heading3('Clinical Features (Mnemonic: "Bones, Stones, Groans, Thrones, Psychic Moans")'),
      bullet('Bones: osteitis fibrosa cystica, pathological fractures, bone pain'),
      bullet('Stones: renal calculi (calcium oxalate/phosphate), nephrocalcinosis'),
      bullet('Groans (GI): nausea, vomiting, constipation, anorexia, peptic ulcer, pancreatitis'),
      bullet('Thrones: polyuria (nephrogenic DI), polydipsia, dehydration'),
      bullet('Psychic Moans: depression, anxiety, cognitive impairment, confusion, coma'),
      bullet('Cardiac: shortened QT interval on ECG, bradycardia, heart block'),

      heading3('Management'),
      body('Mild asymptomatic hypercalcaemia: Treat underlying cause; increase oral hydration; avoid thiazides, calcium supplements, Vitamin D.'),
      spacer(),
      body('Acute/Moderate-Severe Hypercalcaemia:'),
      makeTable(
        ['Intervention', 'Dose/Detail', 'Mechanism/Notes'],
        [
          ['IV Normal Saline 0.9%', '200–500 mL/hr (target UO 100–150 mL/hr)', 'Rehydration + calciuresis; FIRST and MOST IMPORTANT step'],
          ['IV Furosemide (loop diuretic)', '20–40 mg IV once euvolaemic', 'Increases renal calcium excretion; give ONLY after hydration'],
          ['IV Bisphosphonates', 'Zoledronic acid 4 mg IV over 15 min OR Pamidronate 60–90 mg IV over 2 hr', 'Inhibit osteoclast activity; onset 24–72 hrs; preferred for malignancy'],
          ['Calcitonin', '4 IU/kg SC/IM q12h', 'Rapid onset (4–6 hrs); tachyphylaxis after 48 hrs; bridge to bisphosphonate'],
          ['Denosumab', '120 mg SC monthly', 'RANKL inhibitor; bisphosphonate-refractory hypercalcaemia of malignancy'],
          ['Glucocorticoids', 'Prednisolone 40–60 mg/day', 'Granulomatous disease (sarcoidosis, TB), lymphoma, Vitamin D toxicity'],
          ['Haemodialysis', 'Calcium-free dialysate', 'Severe hypercalcaemia with renal failure or cardiac compromise'],
          ['Cinacalcet', '30 mg BD (up to 90 mg QDS)', 'Calcimimetic; primary hyperparathyroidism not suitable for surgery']
        ]
      ),
      spacer(),

      // 4.4 Anaemia with Hb 7 g/dL + SOB
      heading2('4.4. Evaluation and Management of a Patient with Shortness of Breath and Haemoglobin 7 g/dL'),

      heading3('Definition'),
      body('Anaemia is defined as Hb <13 g/dL in adult males and <12 g/dL in adult non-pregnant females (WHO criteria). An Hb of 7 g/dL represents moderate-to-severe anaemia and warrants prompt evaluation. Dyspnoea (SOB) at Hb 7 g/dL results from compensatory increased cardiac output and tachycardia to maintain adequate oxygen delivery to tissues.'),

      heading3('Evaluation'),
      body('History:'),
      bullet('Duration and onset of SOB (acute vs. chronic)'),
      bullet('Dietary history: vegan/vegetarian diet (B12/folate deficiency), poverty, pica (iron deficiency)'),
      bullet('Menstrual history: heavy periods (iron deficiency in women)'),
      bullet('GI bleeding: melaena, haematochezia, haematemesis, NSAID/aspirin use'),
      bullet('Haematuria, haemoptysis (blood loss)'),
      bullet('Family history: sickle cell disease, thalassaemia, G6PD deficiency, hereditary spherocytosis'),
      bullet('Medications: methotrexate (folate antagonist), chemotherapy, phenytoin, zidovudine'),
      bullet('Chronic disease history: CKD, malignancy, HIV, rheumatoid arthritis, hypothyroidism, liver disease'),
      bullet('Symptoms of hypothyroidism (weight gain, cold intolerance, constipation)'),
      bullet('Alcohol history (macrocytosis, folate deficiency)'),
      spacer(),

      body('Physical Examination:'),
      bullet('General: pallor (conjunctival, palmar, nail-bed), tachycardia, tachypnoea, jaundice (haemolysis), splenomegaly'),
      bullet('Cardiovascular: tachycardia, flow murmur, cardiomegaly (high-output state)'),
      bullet('Koilonychia (spoon nails) – iron deficiency'),
      bullet('Glossitis, angular stomatitis, atrophic glossitis – B12/iron deficiency'),
      bullet('Neurological: peripheral neuropathy, subacute combined degeneration of spinal cord – B12 deficiency'),
      bullet('Signs of haemolysis: jaundice, splenomegaly, dark urine (Hb-uria)'),

      heading3('Investigations'),
      makeTable(
        ['Investigation', 'Findings and Interpretation'],
        [
          ['CBC with indices (MCV, MCH, MCHC, RDW)', 'Microcytic (IDA, thalassaemia), Normocytic (haemolysis, chronic disease), Macrocytic (B12/folate, liver, hypothyroid)'],
          ['Peripheral blood smear', 'Target cells (thalassaemia), sickle cells, spherocytes, hypersegmented neutrophils (megaloblastic), schistocytes (MAHA)'],
          ['Reticulocyte count', 'High = haemolysis/bleeding/response; Low = bone marrow failure/nutritional deficiency'],
          ['Serum iron, TIBC, ferritin', 'IDA: ↓iron, ↑TIBC, ↓ferritin; Anaemia of chronic disease: ↓iron, ↓TIBC, normal/↑ferritin'],
          ['Serum B12 and Folate', 'Deficiency in megaloblastic anaemia'],
          ['Direct Coombs test (DAT)', 'Autoimmune haemolytic anaemia (AIHA)'],
          ['Hb electrophoresis', 'Sickle cell disease, thalassaemia'],
          ['Serum LDH, indirect bilirubin, haptoglobin', 'Haemolysis: ↑LDH, ↑bilirubin, ↓haptoglobin'],
          ['Renal function (creatinine, eGFR)', 'Anaemia of CKD'],
          ['TFTs', 'Hypothyroidism'],
          ['Stool for occult blood (FOBT)', 'GI blood loss (IDA)'],
          ['Bone marrow biopsy', 'Aplastic anaemia, haematological malignancy'],
          ['Upper/lower GI endoscopy', 'GI source of bleeding (ulcer, cancer, IBD)'],
          ['Chest X-ray, ECHO', 'Cardiac changes secondary to severe anaemia (cardiomegaly, effusion)']
        ]
      ),
      spacer(),

      heading3('Management'),
      body('1. Immediate stabilisation (Hb 7 g/dL with SOB):'),
      bullet('Administer supplemental O2 to maintain SpO2 >95%'),
      bullet('Blood transfusion: indicated for Hb <7 g/dL with symptoms OR <8 g/dL in post-operative/cardiac patients; give 1–2 units packed RBCs (pRBCs) with reassessment; target Hb 8–10 g/dL'),
      bullet('IV access; monitor vital signs, ECG, fluid balance'),
      spacer(),

      body('2. Iron Deficiency Anaemia (most common cause):'),
      bullet('Oral iron: Ferrous sulphate 200 mg TDS (65 mg elemental iron per tablet); continue for 3–6 months after normalisation of Hb to replenish stores'),
      bullet('IV iron (ferric carboxymaltose): if oral not tolerated, malabsorption (celiac, IBD), renal anaemia'),
      bullet('Identify and treat underlying cause of iron loss (e.g., menorrhagia, GI bleeding, peptic ulcer)'),
      spacer(),

      body('3. Megaloblastic Anaemia (B12/Folate deficiency):'),
      bullet('B12 deficiency: IM cyanocobalamin/hydroxocobalamin 1 mg daily × 7 days, then weekly × 4, then monthly (if pernicious anaemia/malabsorption: lifelong)'),
      bullet('Folate deficiency: folic acid 5 mg PO daily × 4 months (always rule out B12 deficiency first)'),
      spacer(),

      body('4. Anaemia of Chronic Disease / CKD:'),
      bullet('Treat underlying condition; IV iron if iron deficient; Erythropoiesis-stimulating agents (EPO) if eGFR <30 or dialysis-dependent'),
      spacer(),

      body('5. Haemolytic Anaemia:'),
      bullet('AIHA: prednisolone 1 mg/kg/day; splenectomy; rituximab for refractory cases'),
      bullet('G6PD: avoid oxidant drugs/foods (antimalarials, dapsone, fava beans)'),
      spacer(),

      // 4.5 Giddiness
      heading2('4.5. Causes of Giddiness (Dizziness/Vertigo) and Investigations'),

      heading3('Definition and Types'),
      body('Giddiness is a non-specific symptom. It is classified into 4 subtypes:'),
      makeTable(
        ['Type', 'Description', 'Common Cause'],
        [
          ['Vertigo', 'Illusion of rotational movement (self or environment)', 'BPPV, labyrinthitis, Menière\'s disease, central lesions'],
          ['Pre-syncope / Near-faint', 'Sensation of impending loss of consciousness', 'Orthostatic hypotension, vasovagal syncope, cardiac'],
          ['Disequilibrium', 'Unsteadiness without head sensation, especially on walking', 'Cerebellar disease, peripheral neuropathy, Parkinson\'s'],
          ['Non-specific dizziness', 'Lightheadedness, "floating" sensation', 'Anxiety, hyperventilation, depression, medications']
        ]
      ),
      spacer(),

      heading3('Causes – Enumerated'),
      body('A. PERIPHERAL (Inner Ear / Vestibular Nerve) – Most Common:'),
      bullet('Benign Paroxysmal Positional Vertigo (BPPV) – most common cause overall; brief, position-triggered; positive Dix-Hallpike test; treated with Epley manoeuvre'),
      bullet('Vestibular neuritis / Labyrinthitis – acute onset, prolonged, post-viral; no hearing loss (neuritis) or with hearing loss (labyrinthitis)'),
      bullet('Menière\'s disease – triad: episodic vertigo + fluctuating sensorineural hearing loss + tinnitus; due to endolymphatic hydrops'),
      bullet('Acoustic neuroma (vestibular schwannoma) – progressive unilateral hearing loss, tinnitus, facial numbness; MRI required'),
      bullet('Chronic otitis media (cholesteatoma)'),
      bullet('Ototoxic drugs (aminoglycosides, cisplatin, loop diuretics, quinine)'),

      heading3(''),
      body('B. CENTRAL (Brainstem / Cerebellum):'),
      bullet('Vertebrobasilar insufficiency / Posterior circulation TIA or stroke – sudden onset, direction-changing nystagmus, focal neurological signs (diplopia, dysarthria, dysphagia, ataxia)'),
      bullet('Cerebellar infarction or haemorrhage'),
      bullet('Multiple sclerosis (MS) – demyelinating plaques in brainstem/cerebellum'),
      bullet('Cerebellar tumours (primary or metastatic)'),
      bullet('Chiari malformation'),

      body('C. SYSTEMIC/MEDICAL CAUSES:'),
      bullet('Orthostatic hypotension (antihypertensives, diuretics, autonomic neuropathy)'),
      bullet('Cardiac arrhythmias (AF, complete heart block, sick sinus syndrome)'),
      bullet('Hypoglycaemia, anaemia, dehydration'),
      bullet('Hypothyroidism, hyperventilation, anxiety, panic disorder'),
      bullet('Medications: antihypertensives, sedatives, antiepileptics, antidepressants'),
      bullet('Cervical spondylosis (proprioceptive dysfunction)'),
      bullet('Anaemia (Hb <7 g/dL → cerebral hypoperfusion)'),

      heading3('Investigations'),
      makeTable(
        ['Investigation', 'Purpose'],
        [
          ['Full clinical exam including neurological + ear exam', 'Distinguish peripheral vs. central; nystagmus assessment'],
          ['Dix-Hallpike manoeuvre', 'Diagnose BPPV (fatigable, geotropic rotational nystagmus)'],
          ['Head Impulse Test (HIT)', 'Peripheral (positive HIT) vs. central vertigo (negative HIT = dangerous)'],
          ['HINTS exam (Head Impulse, Nystagmus, Test of Skew)', 'Rule out posterior circulation stroke (more sensitive than CT)'],
          ['CBC, blood glucose, serum electrolytes', 'Anaemia, hypoglycaemia, electrolyte imbalance'],
          ['TFTs (TSH)', 'Hypothyroidism'],
          ['Postural BP (lying and standing)', 'Orthostatic hypotension'],
          ['ECG, Holter monitoring', 'Arrhythmias, cardiac cause'],
          ['Pure tone audiometry (PTA)', 'Hearing loss in Menière\'s, acoustic neuroma'],
          ['MRI brain (gadolinium)', 'Gold standard for posterior fossa pathology, acoustic neuroma, MS, cerebellar lesion'],
          ['CT brain (urgent)', 'If acute central vertigo suspected, posterior circulation stroke'],
          ['Electronystagmography (ENG) / Video-HIT (vHIT)', 'Quantify vestibular function'],
          ['Caloric testing', 'Canal paresis – unilateral vestibular hypofunction'],
          ['Blood pressure monitoring / ABPM', 'Autonomic dysfunction, antihypertensive-related'],
          ['Echocardiogram', 'If cardiac source of embolism suspected']
        ]
      ),
      spacer(),

      // ═══════════════════════════════════════════════
      // Q5: ABG components and respiratory disease (10 marks)
      // ═══════════════════════════════════════════════
      heading1('Q.5. Components of ABG and ABG Analysis in Various Respiratory Diseases [10 Marks]'),

      heading2('Arterial Blood Gas (ABG) – Components'),
      body('An ABG is obtained by direct arterial puncture (radial artery preferred) and gives immediate information about oxygenation, ventilation, and acid-base status.'),

      makeTable(
        ['Parameter', 'Normal Range', 'What It Measures'],
        [
          ['pH', '7.35–7.45', 'Overall acidity/alkalinity of the blood (H+ concentration)'],
          ['PaO2', '80–100 mmHg (10.6–13.3 kPa)', 'Partial pressure of dissolved oxygen in arterial blood (oxygenation)'],
          ['PaCO2', '35–45 mmHg (4.7–6.0 kPa)', 'Partial pressure of CO2 – respiratory parameter (ventilation)'],
          ['HCO3- (bicarbonate)', '22–26 mmol/L', 'Metabolic buffer; represents metabolic component of acid-base balance'],
          ['Base Excess (BE)', '-2 to +2 mEq/L', 'Reflects metabolic status; negative = acidosis; positive = alkalosis'],
          ['SaO2 (oxygen saturation)', '>95%', 'Haemoglobin oxygen saturation'],
          ['Lactate', '<2.0 mmol/L', 'Tissue perfusion; >2 mmol/L suggests hypoperfusion'],
          ['Haemoglobin (Hb)', '13.5–17.5 g/dL (M); 12–16 g/dL (F)', 'Oxygen-carrying capacity'],
          ['FiO2 (fraction of inspired O2)', '0.21 (room air)', 'Used to calculate P/F ratio (PaO2/FiO2)']
        ]
      ),
      spacer(),

      heading2('Step-by-Step ABG Interpretation'),
      bullet('Step 1: Assess pH – Acidaemia (<7.35) or Alkalaemia (>7.45)?'),
      bullet('Step 2: Assess PaCO2 – High (>45) = respiratory acidosis; Low (<35) = respiratory alkalosis'),
      bullet('Step 3: Assess HCO3- – Low (<22) = metabolic acidosis; High (>26) = metabolic alkalosis'),
      bullet('Step 4: Determine primary disorder – matches the pH deviation'),
      bullet('Step 5: Is there compensation? (Partial or complete?)'),
      bullet('Step 6: Is the oxygenation adequate? (PaO2/SaO2)'),
      bullet('Step 7: Calculate anion gap if metabolic acidosis: AG = Na+ – (Cl- + HCO3-); Normal = 8–12 mEq/L'),
      spacer(),

      heading2('ABG in Various Respiratory Diseases'),

      makeTable(
        ['Respiratory Disease', 'pH', 'PaCO2', 'HCO3-', 'PaO2', 'SaO2', 'Notes'],
        [
          ['Acute Asthma (mild-moderate)', 'Normal/↑ (alkalosis)', '↓ (hyperventilation)', '↓/Normal', '↓ or Normal', 'Normal', 'Respiratory alkalosis due to hyperventilation; normal PaCO2 may indicate fatigue'],
          ['Acute Severe Asthma (life-threatening)', 'Normal or ↓', 'Normal or ↑', 'Normal/↑', '↓ (<60 mmHg)', '↓ (<90%)', 'Normalising PaCO2 in acute severe asthma is a DANGER sign – respiratory muscle fatigue, impending respiratory failure'],
          ['COPD Exacerbation (Type 2 RF)', '↓ (acidosis)', '↑ (>45 mmHg)', '↑ (compensatory)', '↓ (<60 mmHg)', '↓', 'Hypercapnic respiratory failure; chronic CO2 retention with chronic metabolic compensation; give controlled O2 (target SpO2 88-92%); avoid high-flow O2 (reduces hypoxic drive)'],
          ['COPD – Stable (Type 2 RF)', 'Normal (7.35–7.45)', '↑ (chronic)', '↑ (fully compensated)', '↓', 'Low', 'Fully compensated respiratory acidosis; high HCO3- distinguishes from acute'],
          ['Pulmonary Embolism (Massive)', '↑ (alkalosis)', '↓', '↓/Normal', '↓↓', '↓', 'Hypoxia + hypocapnia (hyperventilation); widened A-a gradient'],
          ['Pneumonia', '↓ or Normal', '↓/Normal/↑', 'Variable', '↓↓', '↓', 'Hypoxia from V/Q mismatch/consolidation; PaCO2 initially low (hyperventilation), rises with respiratory failure'],
          ['Acute Respiratory Distress Syndrome (ARDS)', '↓', '↓ initially, ↑ late', 'Low', '↓↓ (<60 mmHg)', '↓↓', 'P/F ratio <200 (ARDS), <300 (ALI); severe refractory hypoxia despite high FiO2; low tidal volume ventilation (6 mL/kg) is key'],
          ['Pneumothorax (tension)', '↓', '↑', '↑', '↓↓', '↓↓', 'Respiratory failure due to lung collapse; requires immediate decompression'],
          ['Neuromuscular disease (Type 2 RF)', '↓', '↑', '↑', '↓', '↓', 'Hypoventilation (e.g., GBS, MND, diaphragm paralysis); elevated PaCO2 due to inability to breathe'],
          ['Hyperventilation syndrome', '↑ (alkalosis)', '↓ (<35 mmHg)', '↓', 'Normal/↑', 'Normal', 'Anxiety/panic; PaO2 normal or high; symptoms: paraesthesia, tetany, carpopedal spasm'],
          ['Pulmonary Oedema (cardiogenic)', '↓/Normal', '↑ late', '↑', '↓↓', '↓↓', 'Hypoxia from alveolar flooding; PaCO2 rises in severe pulmonary oedema']
        ]
      ),
      spacer(),

      heading2('Compensation Rules (Quick Reference)'),
      makeTable(
        ['Primary Disorder', 'Primary Abnormality', 'Compensation', 'Expected Compensation Formula'],
        [
          ['Respiratory Acidosis – Acute', '↑ PaCO2', '↑ HCO3-', 'HCO3- increases by 1 mEq/L per 10 mmHg ↑ PaCO2'],
          ['Respiratory Acidosis – Chronic', '↑ PaCO2', '↑ HCO3-', 'HCO3- increases by 3.5 mEq/L per 10 mmHg ↑ PaCO2'],
          ['Respiratory Alkalosis – Acute', '↓ PaCO2', '↓ HCO3-', 'HCO3- decreases by 2 mEq/L per 10 mmHg ↓ PaCO2'],
          ['Respiratory Alkalosis – Chronic', '↓ PaCO2', '↓ HCO3-', 'HCO3- decreases by 5 mEq/L per 10 mmHg ↓ PaCO2'],
          ['Metabolic Acidosis', '↓ HCO3-', '↓ PaCO2', 'Winter\'s formula: Expected PaCO2 = (1.5 × HCO3-) + 8 ± 2'],
          ['Metabolic Alkalosis', '↑ HCO3-', '↑ PaCO2', 'PaCO2 increases by 0.7 mmHg per 1 mEq/L ↑ HCO3-']
        ]
      ),
      spacer(),

      heading2('Clinical Significance'),
      bullet('ABG is mandatory in: respiratory failure, sepsis/septic shock, DKA/metabolic acidosis, altered consciousness, severe asthma/COPD exacerbation, post-cardiac arrest'),
      bullet('VBG (venous blood gas) may substitute for ABG for acid-base assessment (pH approximately 0.03–0.05 lower, PaCO2 approximately 4–5 mmHg higher) but NOT for PaO2'),
      bullet('P/F ratio (PaO2 / FiO2): Normal >400; ALI: 200–300; ARDS: <200 (Berlin criteria)'),

      spacer(),
      new Paragraph({
        children: [new TextRun({ text: '─ End of Answer Sheet ─', bold: true, size: 20, color: '808080' })],
        alignment: AlignmentType.CENTER,
        spacing: { before: 600, after: 200 }
      })

    ]
  }]
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync('/home/daytona/workspace/r2-exam-answer-sheet/R2_General_Medicine_Answer_Sheet.docx', buffer);
  console.log('Document created successfully!');
}).catch(err => {
  console.error('Error:', err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/r2-exam-answer-sheet && node create_answer_sheet.js

Running Command

ls -lh /home/daytona/workspace/r2-exam-answer-sheet/R2_General_Medicine_Answer_Sheet.docx && python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/r2-exam-answer-sheet/R2_General_Medicine_Answer_Sheet.docx

Running Command

cd /home/daytona/workspace/r2-exam-answer-sheet && pandoc R2_General_Medicine_Answer_Sheet.docx -o verify.md && wc -l verify.md && head -80 verify.md

Your answer sheet is ready! Download it here:

R2 General Medicine Answer Sheet

Word Document · DOCX


Here's what the answer sheet covers (1,478 lines, fully formatted with colored headings, tables, and bullet points):

Q.1 – UTI Evaluation & Management (20 marks)
  • Definition, classification (lower/upper/complicated/CAUTI)
  • Causative organisms, risk factors
  • Full history, examination, and investigations (including urine culture, imaging)
  • Antibiotic table (cystitis → pyelonephritis → urosepsis, with doses & durations)
  • Urosepsis/septic shock management (sepsis bundle)
  • Prevention of recurrent UTI
Q.2 – Acute Abdominal Pain in 16-yr Girl with DM Family History (20 marks)
  • Comprehensive etiology (gynaecological, GI, metabolic, urological)
  • DKA as priority diagnosis highlighted (with diagnostic criteria table)
  • Full evaluation: history, examination, investigations (including beta-hCG, ABG, blood ketones)
  • DKA management protocol (fluids, insulin, potassium)
Q.3 – Hypertension: Definition, Classification, Evaluation & Management (20 marks)
  • ACC/AHA 2017 classification table (Normal → Hypertensive Emergency)
  • Secondary causes table with investigation clues
  • Risk factors, history, examination, full investigation table
  • Lifestyle modification table with expected BP reductions
  • Drug table (ACEi/ARBs/CCBs/diuretics/beta-blockers) with indications
  • Step-up algorithm, BP targets by patient group, hypertensive emergency management
Q.4 – Short Notes (6 marks each)
  1. SVT Management – vagal manoeuvres, adenosine, cardioversion algorithm, catheter ablation
  2. Hyaline Membrane Disease – surfactant deficiency, RDS, antenatal steroids, CPAP, surfactant replacement therapy (LISA/MIST)
  3. Hypercalcaemia – CHIMPANZEES mnemonic, "Bones/Stones/Groans/Thrones/Psychic moans," management table (saline → bisphosphonates → denosumab → dialysis)
  4. Anaemia (Hb 7 g/dL) with SOB – evaluation, blood transfusion thresholds, IDA/megaloblastic/haemolytic management
  5. Giddiness/Vertigo – peripheral vs. central table, BPPV, Menière's, stroke, HINTS exam, full investigation table
Q.5 – ABG Components & Respiratory Diseases (10 marks)
  • All ABG parameters with normal ranges
  • Step-by-step ABG interpretation guide
  • Comprehensive table: ABG patterns in asthma, COPD, PE, pneumonia, ARDS, tension pneumothorax, pulmonary oedema, hyperventilation
  • Compensation rules (Winter's formula, etc.)
  • P/F ratio criteria for ARDS

A/W ACUTE DISSEMINATED ENCEPHALOMYELITIS (NEUROMYELITIS OPTICA SPECTRUM DISORDER LIKELY) + SECONDARY SEPTICEMIA + GRADE 1 BED SORE

Reading File
Running Command

cd /home/daytona/workspace/attachments/26d0f81c-8d38-4d0d-b365-238e5fc41f18/ && pandoc --track-changes=all "Exam paper R2 (1).docx" -o exam2.md && cat exam2.md

Asking for Preferences

The document made is not readable

Running Command

cd /home/daytona/workspace/r2-exam-answer-sheet && pandoc R2_General_Medicine_Answer_Sheet.docx -o verify.txt --plain && head -100 verify.txt

Asking for Preferences
Reading File
Running Command

cd /home/daytona/workspace/r2-exam-answer-sheet && python3 /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf R2_General_Medicine_Answer_Sheet.docx && ls -lh *.pdf

Writing File

~/r2-exam-answer-sheet/build_pdf.py

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

OUTPUT = '/home/daytona/workspace/r2-exam-answer-sheet/R2_General_Medicine_Answer_Sheet.pdf'

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor('#1F3864')
MED_BLUE    = colors.HexColor('#2E75B6')
GREEN       = colors.HexColor('#375623')
RED         = colors.HexColor('#C00000')
TBL_HEADER  = colors.HexColor('#2E75B6')
TBL_ALT     = colors.HexColor('#DEEAF1')
TBL_WHITE   = colors.white
LIGHT_GREY  = colors.HexColor('#F2F2F2')

# ── Styles ───────────────────────────────────────────────────────────────────
def make_styles():
    s = {}
    base = getSampleStyleSheet()

    s['title'] = ParagraphStyle('title', fontName='Helvetica-Bold', fontSize=18,
                                 textColor=DARK_BLUE, alignment=TA_CENTER,
                                 spaceAfter=4, leading=22)
    s['subtitle'] = ParagraphStyle('subtitle', fontName='Helvetica-Bold', fontSize=13,
                                    textColor=DARK_BLUE, alignment=TA_CENTER,
                                    spaceAfter=4, leading=16)
    s['model'] = ParagraphStyle('model', fontName='Helvetica-Bold', fontSize=15,
                                 textColor=RED, alignment=TA_CENTER,
                                 spaceAfter=18, leading=18)
    s['q'] = ParagraphStyle('q', fontName='Helvetica-Bold', fontSize=13,
                              textColor=DARK_BLUE, spaceBefore=18, spaceAfter=6,
                              borderPadding=(4,4,4,6), leading=16,
                              backColor=LIGHT_GREY, borderColor=DARK_BLUE,
                              borderWidth=0.5, borderRadius=2)
    s['h2'] = ParagraphStyle('h2', fontName='Helvetica-Bold', fontSize=11,
                               textColor=MED_BLUE, spaceBefore=10, spaceAfter=4,
                               leading=14)
    s['h3'] = ParagraphStyle('h3', fontName='Helvetica-BoldOblique', fontSize=10,
                               textColor=GREEN, spaceBefore=7, spaceAfter=3,
                               leading=13)
    s['body'] = ParagraphStyle('body', fontName='Helvetica', fontSize=9.5,
                                 leading=14, spaceAfter=4, alignment=TA_JUSTIFY)
    s['bullet'] = ParagraphStyle('bullet', fontName='Helvetica', fontSize=9.5,
                                   leading=13, spaceAfter=3,
                                   leftIndent=14, firstLineIndent=-10)
    s['bullet2'] = ParagraphStyle('bullet2', fontName='Helvetica', fontSize=9,
                                    leading=12, spaceAfter=2,
                                    leftIndent=26, firstLineIndent=-10)
    s['note'] = ParagraphStyle('note', fontName='Helvetica-Oblique', fontSize=9,
                                 textColor=colors.HexColor('#555555'),
                                 leading=12, spaceAfter=4, leftIndent=8)
    s['cell'] = ParagraphStyle('cell', fontName='Helvetica', fontSize=8.5, leading=11)
    s['cell_b'] = ParagraphStyle('cell_b', fontName='Helvetica-Bold', fontSize=8.5,
                                   leading=11, textColor=colors.white)
    return s

S = make_styles()

# ── Helpers ───────────────────────────────────────────────────────────────────
def q_heading(text):
    return [Paragraph(text, S['q']),
            HRFlowable(width='100%', thickness=1.5, color=DARK_BLUE, spaceAfter=4)]

def h2(text): return Paragraph(text, S['h2'])
def h3(text): return Paragraph(text, S['h3'])
def body(text): return Paragraph(text, S['body'])
def note(text): return Paragraph(f'<i>{text}</i>', S['note'])
def sp(h=6): return Spacer(1, h)

def bullet(text, level=0):
    sym = '•' if level == 0 else '–'
    style = S['bullet'] if level == 0 else S['bullet2']
    return Paragraph(f'{sym}  {text}', style)

def bb(label, text):
    return Paragraph(f'•  <b>{label}:</b> {text}', S['bullet'])

def hr(): return HRFlowable(width='100%', thickness=0.5,
                              color=colors.HexColor('#CCCCCC'), spaceAfter=6)

def make_table(headers, rows, col_widths=None):
    pw = 17*cm
    if col_widths is None:
        n = len(headers)
        col_widths = [pw/n]*n

    def cp(t): return Paragraph(str(t), S['cell'])
    def ch(t): return Paragraph(str(t), S['cell_b'])

    data = [[ch(h) for h in headers]]
    for row in rows:
        data.append([cp(c) for c in row])

    style = [
        ('BACKGROUND', (0,0), (-1,0), TBL_HEADER),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 8.5),
        ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#AAAAAA')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [TBL_ALT, TBL_WHITE]),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('RIGHTPADDING', (0,0), (-1,-1), 5),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]
    return Table(data, colWidths=col_widths, style=style, repeatRows=1,
                 hAlign='LEFT', splitByRow=True)


# ════════════════════════════════════════════════════════════════════════════
# BUILD CONTENT
# ════════════════════════════════════════════════════════════════════════════
story = []

# ── Title block ──────────────────────────────────────────────────────────────
story += [
    Paragraph('SMT N H L M M C', S['title']),
    Paragraph('General Medicine – May 2026', S['subtitle']),
    Paragraph('R2 Examination  |  Duration: 3 Hours  |  Total Marks: 100', S['subtitle']),
    sp(6),
    Paragraph('MODEL ANSWER SHEET', S['model']),
    HRFlowable(width='100%', thickness=2, color=DARK_BLUE, spaceAfter=12),
]

# ════════════════════════════════════════════════════════════════════════════
# Q1: UTI
# ════════════════════════════════════════════════════════════════════════════
story += q_heading('Q.1.  Evaluate and Manage the Patient Admitted with Urinary Tract Infection  [20 Marks]')

story += [h2('Definition')]
story += [body('A Urinary Tract Infection (UTI) is a microbial invasion of any part of the urinary system – kidneys, ureters, bladder or urethra. It is one of the most common bacterial infections in clinical practice, accounting for >8 million outpatient visits annually.'), sp(4)]

story += [h2('Classification')]
story += [make_table(
    ['Type', 'Site', 'Key Features'],
    [
        ['Lower UTI (Cystitis)', 'Bladder / Urethra', 'Dysuria, frequency, urgency, suprapubic pain; no fever'],
        ['Upper UTI (Pyelonephritis)', 'Kidney / Renal pelvis', 'Fever >38°C, flank pain, nausea/vomiting, CVAT'],
        ['Uncomplicated UTI', 'Normal urinary tract', 'Non-pregnant women, no structural/functional anomaly'],
        ['Complicated UTI', 'Abnormal urinary tract', 'Men, pregnancy, DM, immunocompromised, structural anomaly'],
        ['CAUTI', 'Any site', '>48 hrs with indwelling catheter'],
        ['Asymptomatic Bacteriuria', 'Any', '>10⁵ CFU/mL without symptoms; treat only in pregnancy/pre-surgery'],
    ],
    [3.5*cm, 3.5*cm, 10*cm]
), sp(6)]

story += [h2('Common Causative Organisms')]
for t in ['E. coli – most common (80–85% community-acquired)',
          'Staphylococcus saprophyticus – young sexually active women',
          'Klebsiella pneumoniae, Proteus mirabilis, Enterococcus faecalis',
          'Pseudomonas aeruginosa – hospital-acquired / catheter-associated']:
    story += [bullet(t)]

story += [sp(4), h2('Risk Factors')]
for t in ['Female sex (short urethra ~4 cm), sexual intercourse, spermicide use',
          'Urinary obstruction: BPH, calculi, strictures, tumour',
          'Vesicoureteral reflux, neurogenic bladder, urinary stasis',
          'Diabetes mellitus, immunosuppression (steroids, HIV, transplant)',
          'Indwelling urinary catheter, recent urological instrumentation',
          'Pregnancy, post-menopause (reduced oestrogen → altered vaginal flora)']:
    story += [bullet(t)]

story += [sp(4), h2('Evaluation')]
story += [h3('History')]
for t in ['Dysuria, frequency, urgency, nocturia, haematuria',
          'Suprapubic pain / discomfort (cystitis)',
          'Flank / loin pain, fever, chills, rigors (pyelonephritis / urosepsis)',
          'Cloudy, foul-smelling urine',
          'Prior UTI episodes, recent antibiotic use, hospitalisation, catheterisation',
          'Pregnancy status, sexual history, contraceptive use',
          'Chronic illnesses: DM, CKD, immunosuppression']:
    story += [bullet(t)]

story += [h3('Physical Examination')]
for t in ['Vitals: fever (>38°C), tachycardia, hypotension, tachypnoea (urosepsis)',
          'Suprapubic tenderness on deep palpation (cystitis)',
          'Costovertebral angle tenderness (CVAT) – hallmark of pyelonephritis',
          'Assess for systemic signs of sepsis: altered sensorium, mottling, poor perfusion']:
    story += [bullet(t)]

story += [h3('Investigations')]
story += [make_table(
    ['Investigation', 'Expected Findings / Purpose'],
    [
        ['Urine dipstick', 'Positive nitrites, leukocyte esterase, haematuria'],
        ['Urine microscopy (R/E)', '>5 WBC/hpf (pyuria), bacteria, RBCs; casts suggest pyelonephritis/GN'],
        ['Urine culture & sensitivity (Gold Standard)', '>10⁵ CFU/mL; identifies organism and antibiotic sensitivity'],
        ['CBC with differential', 'Leukocytosis with neutrophilia; bandaemia in severe infection'],
        ['CRP, ESR', 'Elevated; useful to monitor treatment response'],
        ['Blood cultures ×2', 'Mandatory if fever/rigors/sepsis suspected – taken BEFORE antibiotics'],
        ['Serum creatinine, BUN, electrolytes', 'Renal function assessment (especially in upper UTI/urosepsis)'],
        ['Blood glucose / HbA1c', 'Screen for underlying diabetes mellitus'],
        ['Ultrasound KUB', 'Obstruction, abscess, hydronephrosis, structural anomalies'],
        ['CT urogram (non-contrast)', 'Renal calculi, abscess, complicated pyelonephritis'],
        ['VCUG / Cystoscopy', 'Recurrent UTI – vesicoureteral reflux, structural anomaly'],
    ],
    [5.5*cm, 11.5*cm]
), sp(6)]

story += [h2('Management')]
story += [h3('General Measures')]
for t in ['Adequate oral/IV hydration – maintain urine output >0.5 mL/kg/hr',
          'Antipyretics/analgesia: paracetamol; NSAIDs with caution (renal function)',
          'Remove or change indwelling catheter if CAUTI',
          'Relieve obstruction promptly (nephrostomy, ureteric stent, PCNL)']:
    story += [bullet(t)]

story += [h3('Antibiotic Therapy')]
story += [make_table(
    ['Condition', 'First-line Drug / Dose', 'Duration'],
    [
        ['Uncomplicated cystitis (women)', 'Nitrofurantoin 100 mg BD  OR  Trimethoprim 200 mg BD', '5–7 days'],
        ['Single-dose alternative', 'Fosfomycin 3 g sachet PO (single dose)', '1 day'],
        ['Complicated cystitis / Men', 'Co-amoxiclav 625 mg TDS  OR  Ciprofloxacin 500 mg BD', '7–14 days'],
        ['Mild-moderate pyelonephritis (OP)', 'Ciprofloxacin 500 mg BD PO  OR  Co-amoxiclav PO', '7–10 days'],
        ['Severe pyelonephritis (IP)', 'IV Ceftriaxone 1–2 g OD  OR  IV Co-amoxiclav 1.2 g TDS', '10–14 days'],
        ['Urosepsis (empiric)', 'IV Piperacillin-Tazobactam 4.5 g TDS  OR  IV Meropenem 1 g TDS', '14–21 days'],
        ['UTI in pregnancy', 'Cefalexin 500 mg TDS  OR  Nitrofurantoin (avoid at term)', '7 days'],
        ['CAUTI', 'Remove/change catheter + Ciprofloxacin PO or IV', '7 days'],
    ],
    [5*cm, 8*cm, 4*cm]
), sp(4)]
story += [note('Always de-escalate antibiotics once culture and sensitivity results are available.')]

story += [h3('Urosepsis Management (Sepsis Bundle – within 1 hour)')]
for t in ['Blood cultures ×2 BEFORE administering antibiotics',
          'IV broad-spectrum antibiotics immediately (piperacillin-tazobactam or carbapenem)',
          'IV fluid resuscitation: 30 mL/kg 0.9% NaCl bolus if MAP <65 mmHg or hypotension',
          'Vasopressors (norepinephrine first-line) if MAP remains <65 mmHg despite fluids',
          'Urine output monitoring (target >0.5 mL/kg/hr); consider urinary catheter',
          'Lactate measurement; repeat if initial lactate >2 mmol/L',
          'ICU admission if organ dysfunction (SOFA score ≥2)']:
    story += [bullet(t)]

story += [h3('Prevention of Recurrent UTI')]
for t in ['Adequate daily fluid intake (>2 litres/day)',
          'Post-coital voiding; avoid spermicide use',
          'Prophylactic nitrofurantoin 50–100 mg ON (6 months) for recurrent UTI in women',
          'Post-menopausal women: topical vaginal oestrogen cream',
          'Treat underlying conditions: DM control, relieve obstruction, manage stones']:
    story += [bullet(t)]

story += [sp(4), PageBreak()]

# ════════════════════════════════════════════════════════════════════════════
# Q2: Acute Abdominal Pain – 16yr girl + DM sibling
# ════════════════════════════════════════════════════════════════════════════
story += q_heading('Q.2.  Etiology, Evaluation of a 16-Year-Old Girl with Acute Abdominal Pain and Family History of Diabetes  [20 Marks]')

story += [h2('Introduction')]
story += [body('Acute abdominal pain in a 16-year-old girl requires a broad differential diagnosis spanning gynaecological, gastrointestinal, urological, and metabolic causes. The critical additional clue is the family history of Type 1 Diabetes Mellitus (T1DM) in a sibling – this raises the strong possibility of new-onset T1DM presenting as Diabetic Ketoacidosis (DKA), which is a life-threatening metabolic emergency that can mimic an acute abdomen.'), sp(4)]

story += [h2('Etiology of Acute Abdominal Pain')]
story += [h3('A. Gynaecological Causes (Most Common in Adolescent Girls)')]
for t in ['Ectopic pregnancy – MUST be excluded first in all females of reproductive age',
          'Pelvic Inflammatory Disease (PID) – sexually active; cervical motion tenderness',
          'Ovarian cyst – torsion (sudden severe pain), rupture, haemorrhage',
          'Primary dysmenorrhoea – cyclical, crampy, periumbilical / suprapubic',
          'Mittelschmerz – mid-cycle ovulation pain',
          'Endometriosis – chronic pelvic pain, dysmenorrhoea, infertility']:
    story += [bullet(t)]

story += [h3('B. Gastrointestinal Causes')]
for t in ['Acute appendicitis – most common surgical emergency in this age group; RIF pain, Rovsing\'s, PSOAS sign',
          'Mesenteric adenitis – viral illness preceding pain; mimics appendicitis',
          'Gastroenteritis (infective) – vomiting, diarrhoea, fever',
          'Intestinal obstruction – adhesions, intussusception (adolescents)',
          'Peptic ulcer disease / Gastritis',
          'Inflammatory Bowel Disease – Crohn\'s, Ulcerative Colitis']:
    story += [bullet(t)]

story += [h3('C. Metabolic Causes (HIGH PRIORITY – Family History of T1DM)')]
for t in ['Diabetic Ketoacidosis (DKA) – abdominal pain is a CLASSIC feature; mimic of acute abdomen',
          'Acute pancreatitis – may occur in DKA; epigastric pain radiating to back; elevated amylase/lipase',
          'Addisonian crisis – vomiting, abdominal pain, hypotension']:
    story += [bullet(t)]

story += [h3('D. Urological Causes')]
for t in ['Renal/ureteric calculi (renal colic) – colicky, loin-to-groin, haematuria',
          'Pyelonephritis – fever, flank pain, CVAT']:
    story += [bullet(t)]

story += [h3('E. Others')]
for t in ['Abdominal migraine', 'Porphyria (rare)', 'Functional/psychogenic abdominal pain']:
    story += [bullet(t)]

story += [sp(4), h2('RED FLAG: Diabetic Ketoacidosis (DKA) – Priority Diagnosis')]
story += [body('Given the family history of T1DM (autoimmune susceptibility is strongly familial), DKA presenting as the first manifestation of new-onset T1DM must be the priority diagnosis to exclude, as it is immediately life-threatening.'), sp(4)]
story += [make_table(
    ['DKA Diagnostic Feature', 'Details'],
    [
        ['Blood glucose', '>11 mmol/L (>200 mg/dL)'],
        ['Ketonaemia', 'Blood ketones >3 mmol/L  OR  urine ketones 2+ or greater'],
        ['Metabolic acidosis', 'pH <7.3  AND/OR  bicarbonate <18 mmol/L'],
        ['Abdominal pain', 'Diffuse; due to gastric dilatation, electrolyte imbalance, ketone-induced ileus'],
        ['Kussmaul breathing', 'Deep, sighing respirations – respiratory compensation for metabolic acidosis'],
        ['Acetone breath', 'Fruity/ketone odour on breath'],
        ['Dehydration', 'Average fluid deficit of 3–6 litres in DKA'],
        ['Precipitants', 'New-onset DM, infection, non-compliance with insulin, stress'],
    ],
    [6*cm, 11*cm]
), sp(6)]

story += [h2('Evaluation')]
story += [h3('History')]
for t in ['Onset, character (colicky/constant/crampy), site, radiation, severity (1–10), duration',
          'Associated: nausea, vomiting, diarrhoea, constipation, fever',
          'Gynaecological: LMP, cycle regularity, sexual activity, vaginal discharge, contraception',
          'Metabolic "3 P\'s": polyuria, polydipsia, polyphagia; unexplained weight loss (T1DM onset)',
          'Urinary: dysuria, frequency, haematuria',
          'Family history of T1DM, autoimmune disease, or surgical conditions',
          'Diet history, recent illness, medications, trauma']:
    story += [bullet(t)]

story += [h3('Physical Examination')]
for t in ['Vitals: temperature, BP, HR, RR (Kussmaul breathing?), SpO2',
          'Breath: fruity/acetone odour (ketosis)',
          'Hydration status: mucous membranes, skin turgor, sunken eyes',
          'Neurological: GCS, consciousness level',
          'Abdomen: inspection, auscultation (bowel sounds), palpation (guarding, rigidity, rebound)',
          'McBurney\'s point, Rovsing\'s sign, PSOAS sign (appendicitis)',
          'Renal angle tenderness (pyelonephritis)',
          'Pelvic/bimanual examination (with consent): adnexal tenderness, cervical motion tenderness']:
    story += [bullet(t)]

story += [h3('Investigations')]
story += [make_table(
    ['Investigation', 'Purpose'],
    [
        ['Capillary blood glucose (urgent)', 'Immediate screening for DKA/hyperglycaemia'],
        ['Serum/urine beta-hCG', 'MANDATORY – exclude ectopic pregnancy in all reproductive-age females'],
        ['Blood ketones / Urine ketones', '>3 mmol/L confirms DKA; urine 2+ also significant'],
        ['ABG / VBG', 'pH, bicarbonate, pCO2 – confirm and grade metabolic acidosis'],
        ['Serum electrolytes (Na, K, Cl, HCO3)', 'Anion gap, hypokalaemia risk in DKA; anion gap = Na – (Cl + HCO3), normal 8–12'],
        ['CBC with differential', 'Leukocytosis (infection/appendicitis); mild leukocytosis also in DKA'],
        ['CRP, ESR', 'Inflammation; very high = infection/appendicitis'],
        ['LFT, Serum amylase, lipase', 'Hepatobiliary cause, acute pancreatitis (often elevated in DKA itself)'],
        ['Serum creatinine, BUN', 'Renal function; pre-renal AKI common in DKA (dehydration)'],
        ['HbA1c + Anti-GAD / Anti-islet antibodies', 'Diagnose new-onset T1DM; confirm autoimmune aetiology'],
        ['Urine R/E and culture', 'UTI/pyelonephritis as precipitant'],
        ['Ultrasound abdomen and pelvis', 'Ovarian pathology, ectopic, appendix, free fluid, renal calculi'],
        ['CT abdomen/pelvis (if USS inconclusive)', 'Appendicitis, perforation, pelvic mass'],
        ['ECG', 'Hyperkalaemia/hypokalaemia-related dysrhythmias in DKA'],
        ['Cervical / vaginal swabs', 'If PID suspected (GC/Chlamydia culture, NAAT)'],
    ],
    [5.5*cm, 11.5*cm]
), sp(6)]

story += [h2('Management – DKA Protocol (if confirmed)')]
for t in ['Admit to HDU/ICU; 12-lead ECG and continuous cardiac monitoring',
          '<b>IV Fluid resuscitation:</b> 0.9% NaCl 10–20 mL/kg over 1st hour; then 500 mL/hr for 4 hrs, then 250 mL/hr – reassess frequently',
          '<b>Potassium replacement:</b> Add 40 mmol KCl/litre if K+ 3.5–5.5 mmol/L; do NOT start insulin if K+ <3.5 mmol/L (risk of fatal hypokalaemia)',
          '<b>Insulin infusion:</b> Fixed rate 0.1 units/kg/hr IV (FRIII); start only after K+ confirmed >3.5 mmol/L',
          '<b>Monitoring:</b> Blood glucose hourly; electrolytes 2-hourly; ABG/VBG 2-hourly; urine output (catheterise)',
          '<b>Target:</b> Blood ketones <0.6 mmol/L; pH >7.3; bicarbonate >18 mmol/L; glucose 5–10 mmol/L',
          'Identify and treat precipitating cause (infection → antibiotics, stress, omission of insulin)',
          'When eating and ketones resolved: transition to subcutaneous insulin; diabetes education; endocrinology referral']:
    story += [bullet(t)]

story += [sp(4), PageBreak()]

# ════════════════════════════════════════════════════════════════════════════
# Q3: Hypertension
# ════════════════════════════════════════════════════════════════════════════
story += q_heading('Q.3.  Define, Classify, Evaluate and Manage Hypertension  [20 Marks]')

story += [h2('Definition')]
story += [body('<b>Hypertension (HTN)</b> is defined as a sustained elevation of blood pressure (BP) with Systolic BP ≥130 mmHg and/or Diastolic BP ≥80 mmHg (ACC/AHA 2017 Guidelines), confirmed on at least 2 occasions on 2 separate visits using standardised measurement technique. The older JNC 8 / WHO threshold is ≥140/90 mmHg. BP is measured seated after 5 minutes\' rest with an appropriate cuff size, taking the average of 2 readings.'), sp(4)]

story += [h2('Classification of Blood Pressure')]
story += [make_table(
    ['Category', 'Systolic BP (mmHg)', '', 'Diastolic BP (mmHg)'],
    [
        ['Normal', '<120', 'and', '<80'],
        ['Elevated / Pre-hypertension', '120–129', 'and', '<80'],
        ['Stage 1 Hypertension', '130–139', 'or', '80–89'],
        ['Stage 2 Hypertension', '≥140', 'or', '≥90'],
        ['Hypertensive Crisis – Urgency', '≥180', 'or', '≥120 (no end-organ damage)'],
        ['Hypertensive Emergency', '≥180', 'or', '≥120 (WITH end-organ damage)'],
    ],
    [6*cm, 3.5*cm, 1.5*cm, 6*cm]
), sp(6)]

story += [h3('By Aetiology')]
story += [bb('Primary (Essential) HTN', '90–95% of all cases; no identifiable single cause; polygenic, environmental, lifestyle factors')]
story += [bb('Secondary HTN', '5–10%; identifiable and often correctable cause; suspect in young patients, resistant HTN, or unusual features'), sp(4)]
story += [make_table(
    ['Cause of Secondary HTN', 'Clues / Investigation'],
    [
        ['CKD (most common secondary cause)', 'Raised creatinine, proteinuria, reduced eGFR'],
        ['Renovascular disease (renal artery stenosis)', 'Young woman, flank bruit, resistant HTN – Renal Doppler USS'],
        ['Primary hyperaldosteronism (Conn\'s)', 'Hypokalaemia; aldosterone:renin ratio >30'],
        ['Phaeochromocytoma', 'Episodic headache, palpitations, sweating – 24-hr urine metanephrines'],
        ['Cushing\'s syndrome', 'Central obesity, striae, buffalo hump – 24-hr urinary cortisol / DST'],
        ['Coarctation of aorta', 'Young patient, radio-femoral delay, rib notching on CXR'],
        ['Hypothyroidism / Hyperthyroidism', 'Weight changes, fatigue, palpitations – TSH'],
        ['OSA', 'Obesity, snoring, non-dipping nocturnal BP – polysomnography'],
        ['Drug-induced', 'OCPs, NSAIDs, steroids, decongestants, cocaine, liquorice'],
    ],
    [7*cm, 10*cm]
), sp(6)]

story += [h2('Risk Factors for Primary Hypertension')]
story += [bb('Non-modifiable', 'Age (>55 M, >65 F), male sex, family history, Afro-Caribbean ethnicity')]
story += [bb('Modifiable', 'Obesity (BMI >30), high-sodium diet, physical inactivity, excessive alcohol (>2 units/day), smoking, psychosocial stress, DM, dyslipidaemia')]

story += [sp(4), h2('Evaluation')]
story += [h3('History')]
for t in ['Duration, known BP readings, adherence to medications',
          'Symptoms: headache (morning, occipital), dizziness, visual changes (blurring, diplopia)',
          'Chest pain, SOB (HF), palpitations, haematuria (renal involvement)',
          'Symptoms of secondary causes (see above table)',
          'Full cardiovascular risk factor assessment: smoking, DM, dyslipidaemia, obesity',
          'Family history of HTN, stroke, MI, CKD, sudden cardiac death',
          'Medication history: OCPs, NSAIDs, steroids, decongestants, illicit drugs',
          'Dietary: salt intake, alcohol, potassium']:
    story += [bullet(t)]

story += [h3('Physical Examination')]
for t in ['Accurate BP: both arms (>20 mmHg difference → coarctation/dissection); measure lying and standing if elderly',
          'BMI, waist circumference (central obesity)',
          'Fundoscopy: hypertensive retinopathy (AV nipping, haemorrhages, exudates, papilloedema)',
          'JVP, apex beat, heart sounds (S4 – LVH; murmurs)',
          'Peripheral pulses, radio-femoral delay (coarctation)',
          'Renal bruits (renal artery stenosis)',
          'Signs of Cushing\'s, acromegaly, thyroid disease']:
    story += [bullet(t)]

story += [h3('Investigations')]
story += [make_table(
    ['Investigation', 'Purpose'],
    [
        ['CBC', 'Anaemia (CKD), polycythaemia'],
        ['Fasting blood glucose / HbA1c', 'DM as risk factor or cause'],
        ['Fasting lipid profile', 'Cardiovascular risk assessment (10-year ASCVD risk)'],
        ['Serum electrolytes (Na, K)', 'Hypokalaemia (Conn\'s, diuretics), hyponatraemia'],
        ['Serum creatinine + eGFR', 'CKD as cause or complication'],
        ['Urinalysis + ACR', 'Proteinuria (target organ damage / CKD)'],
        ['12-lead ECG', 'LVH (Sokolow-Lyon, Cornell criteria), ischaemia, arrhythmia'],
        ['Echocardiogram', 'LVH, diastolic dysfunction, EF (if clinical HF or ECG changes)'],
        ['CXR', 'Cardiomegaly, aortic knuckle, rib notching (coarctation)'],
        ['24-hour ABPM or home BP monitoring', 'White coat HTN, masked HTN, nocturnal dipping pattern'],
        ['Renal Doppler USS', 'RAS in young patient or refractory HTN'],
        ['Aldosterone:renin ratio', 'Primary hyperaldosteronism (if K+ low or refractory HTN)'],
        ['24-hr urine metanephrines', 'Phaeochromocytoma (episodic symptoms)'],
        ['TSH', 'Thyroid disease'],
        ['Urine free cortisol / dexamethasone suppression test', 'Cushing\'s syndrome'],
    ],
    [6.5*cm, 10.5*cm]
), sp(6)]

story += [h2('Management')]
story += [h3('1. Non-Pharmacological (Lifestyle) – First-Line for All Stages')]
story += [make_table(
    ['Intervention', 'Target / Detail', 'Expected BP Reduction'],
    [
        ['Low-sodium diet', '<2.3 g sodium/day (= 5.8 g NaCl)', 'SBP ↓ 5–6 mmHg'],
        ['DASH diet', 'Fruits, vegetables, low-fat dairy, whole grains', 'SBP ↓ 8–14 mmHg'],
        ['Weight loss', 'Per 10 kg reduction in body weight', 'SBP ↓ 5–20 mmHg'],
        ['Regular aerobic exercise', '≥30 min moderate intensity, ≥5 days/week', 'SBP ↓ 4–9 mmHg'],
        ['Alcohol reduction', 'Men ≤2 units/day; Women ≤1 unit/day', 'SBP ↓ 2–4 mmHg'],
        ['Smoking cessation', 'Reduces overall CV event risk significantly', '—'],
        ['Stress management', 'Relaxation techniques, yoga, CBT', 'SBP ↓ 2–4 mmHg'],
    ],
    [4.5*cm, 7*cm, 5.5*cm]
), sp(6)]

story += [h3('2. Pharmacological – Drug Classes')]
story += [make_table(
    ['Drug Class', 'Example (Dose)', 'Preferred In / Notes'],
    [
        ['ACE Inhibitors', 'Ramipril 2.5–10 mg OD', 'DM with proteinuria, CKD, HFrEF, post-MI. Avoid in pregnancy, bilateral RAS, hyperkalaemia'],
        ['ARBs', 'Losartan 50–100 mg OD', 'Same as ACEi; use if ACEi cough. Avoid in pregnancy'],
        ['Dihydropyridine CCB', 'Amlodipine 5–10 mg OD', 'Elderly, isolated systolic HTN, Afro-Caribbean, angina'],
        ['Thiazide-like diuretic', 'Indapamide 1.5 mg OD / Chlorthalidone', 'Elderly, isolated systolic HTN, HF. Avoid in gout'],
        ['Beta-blockers', 'Bisoprolol 5–10 mg OD / Carvedilol', 'Post-MI, HFrEF, AF rate control. Labetalol in pregnancy'],
        ['Alpha-blockers', 'Doxazosin 4–8 mg OD', 'BPH + HTN, phaeochromocytoma'],
        ['MRA / Spironolactone', 'Spironolactone 25–50 mg OD', '4th-line; resistant HTN, Conn\'s, HFrEF'],
        ['Centrally acting', 'Methyldopa 250–500 mg TDS', 'Hypertension in pregnancy (1st-line with labetalol)'],
    ],
    [4*cm, 5*cm, 8*cm]
), sp(4)]

story += [h3('Step-Up Treatment Algorithm')]
for t in ['Step 1: Monotherapy – ACEi/ARB <b>OR</b> CCB (amlodipine) <b>OR</b> Thiazide diuretic',
          'Step 2: Dual therapy – ACEi/ARB <b>+</b> CCB (preferred combination)  OR  ACEi/ARB + Thiazide',
          'Step 3: Triple therapy – ACEi/ARB <b>+</b> CCB <b>+</b> Thiazide diuretic',
          'Step 4 (Resistant HTN): Add spironolactone 25 mg OD; exclude secondary causes; check adherence; consider alpha- or beta-blocker']:
    story += [bullet(t)]

story += [h3('BP Targets')]
story += [make_table(
    ['Patient Group', 'BP Target'],
    [
        ['General population (ACC/AHA 2017)', '<130/80 mmHg'],
        ['Elderly ≥65 years', '<130/80 mmHg (if tolerated); avoid diastolic <60 mmHg'],
        ['Diabetes mellitus', '<130/80 mmHg (ACEi/ARB preferred)'],
        ['CKD with proteinuria (ACR >30)', '<130/80 mmHg (ACEi/ARB first-line)'],
        ['Post-stroke / TIA', '<130/80 mmHg'],
        ['Pregnancy', '<150/100 mmHg; Labetalol/Methyldopa first-line; avoid ACEi/ARB'],
    ],
    [8*cm, 9*cm]
), sp(4)]

story += [h3('Hypertensive Emergency')]
story += [body('<b>Definition:</b> BP ≥180/120 mmHg WITH acute target-organ damage (hypertensive encephalopathy, ACS, acute pulmonary oedema, AKI, aortic dissection, stroke, eclampsia).'), sp(2)]
for t in ['Goal: reduce MAP by <b>no more than 25%</b> in first hour; then to 160/100 mmHg over 2–6 hours (avoid precipitous drop)',
          'IV agents: Labetalol IV, Nicardipine IV, Sodium Nitroprusside IV (severe), Esmolol IV (aortic dissection)',
          'Admit to ICU with intra-arterial continuous BP monitoring',
          'Exception: Aortic dissection – target SBP <120 mmHg within 20 minutes (IV esmolol + vasodilator)']:
    story += [bullet(t)]

story += [sp(4), PageBreak()]

# ════════════════════════════════════════════════════════════════════════════
# Q4: SHORT NOTES
# ════════════════════════════════════════════════════════════════════════════
story += q_heading('Q.4.  Short Notes  [6 Marks Each × 5 = 30 Marks]')

# 4.1 SVT
story += [h2('4.1  Management of Supraventricular Tachycardia (SVT)'), sp(2)]
story += [h3('Definition and Background')]
story += [body('SVT is a group of tachyarrhythmias (HR >100 bpm) originating above the bundle of His. The most common type is AVNRT (AV Nodal Re-entrant Tachycardia – 60%), followed by AVRT (accessory pathway) and atrial tachycardia. Onset is characteristically sudden ("paroxysmal") with abrupt termination. ECG shows narrow complex tachycardia (HR 150–250 bpm), regular rhythm, with P waves hidden in or immediately after QRS.'), sp(4)]

story += [h3('Step-by-Step Management')]
story += [body('<b>STEP 1 – Assess haemodynamic stability:</b>')]
for t in ['<b>Unstable</b> (hypotension, syncope, chest pain, acute pulmonary oedema) → Immediate synchronised DC cardioversion: 50–150 J biphasic',
          '<b>Stable</b> → Proceed with vagal manoeuvres first, then pharmacological']:
    story += [bullet(t)]

story += [sp(2), body('<b>STEP 2 – Vagal Manoeuvres (stable patients):</b>')]
for t in ['Valsalva manoeuvre: strain hard for 15 seconds (20–50% success)',
          'Modified Valsalva (supine + leg elevation to 45°): increases success to ~43%',
          'Carotid sinus massage: avoid if carotid bruit, stroke history, or elderly',
          'Cold water facial immersion (diving reflex)']:
    story += [bullet(t)]

story += [sp(2), body('<b>STEP 3 – Pharmacological (if vagal manoeuvres fail):</b>')]
story += [make_table(
    ['Drug', 'Dose', 'Notes'],
    [
        ['Adenosine (1st choice)', '6 mg rapid IV bolus; repeat 12 mg × 2 if needed', 'Half-life 10 sec; give into antecubital vein with rapid saline flush; warn of transient chest tightness/flushing; contraindicated in asthma, heart transplant'],
        ['Verapamil (non-DHP CCB)', '5–10 mg slow IV over 2 min', 'Avoid if wide-complex tachycardia, hypotension, or WPW syndrome'],
        ['Diltiazem', '0.25 mg/kg IV over 2 min', 'Alternative to verapamil'],
        ['Metoprolol / Esmolol', '2.5–5 mg IV slowly', 'Beta-blocker alternative; useful if CCB contraindicated'],
        ['Amiodarone', '150 mg IV over 10 min', 'Reserve for WPW-associated SVT or when above drugs fail'],
    ],
    [3.5*cm, 4.5*cm, 9*cm]
), sp(4)]

story += [h3('Prevention (Chronic/Recurrent SVT)')]
for t in ['Beta-blockers (metoprolol, atenolol) or CCBs (verapamil, diltiazem) – oral prophylaxis',
          'Flecainide / Propafenone – structurally normal heart; avoid in ischaemic or structural heart disease',
          '<b>Radiofrequency catheter ablation</b> – definitive cure (>95% success); treatment of choice for recurrent, symptomatic SVT',
          '"Pill-in-the-pocket": single dose flecainide 200–300 mg or diltiazem at SVT onset (selected patients)']:
    story += [bullet(t)]

story += [sp(6), hr()]

# 4.2 Hyaline Membrane Disease
story += [h2('4.2  Hyaline Membrane Disorders (Neonatal Respiratory Distress Syndrome – RDS)'), sp(2)]
story += [h3('Definition')]
story += [body('Hyaline Membrane Disease (HMD), synonymous with Infant Respiratory Distress Syndrome (IRDS), is a condition predominantly affecting premature neonates, caused by <b>surfactant deficiency</b>. It is characterised by widespread alveolar collapse and formation of eosinophilic hyaline membranes lining the alveolar ducts and terminal bronchioles on histological examination.'), sp(4)]

story += [h3('Pathophysiology')]
for t in ['Surfactant (dipalmitoylphosphatidylcholine – DPPC) is produced by Type II pneumocytes; adequate levels by 35–36 weeks\' gestation',
          'Prematurity → surfactant deficiency → increased alveolar surface tension → alveolar collapse on expiration',
          'Atelectasis → V/Q mismatch → hypoxaemia → pulmonary vasoconstriction → right-to-left shunting',
          'Protein-rich plasma exudate floods alveoli → hyaline membrane formation → reduced compliance']:
    story += [bullet(t)]

story += [h3('Risk Factors')]
for t in ['Prematurity (risk inversely proportional to gestational age; severe if <28 weeks)',
          'Male sex, Caucasian race, second twin',
          'Maternal diabetes mellitus (inhibits fetal surfactant synthesis)',
          'Caesarean section without labour (lack of cortisol surge)',
          'Perinatal asphyxia, hypothermia']:
    story += [bullet(t)]

story += [h3('Clinical Features')]
for t in ['Onset within 4–6 hours of birth in a preterm neonate',
          'Tachypnoea (RR >60/min), tachycardia',
          'Expiratory grunting – partially closes glottis to maintain alveolar patency (auto-PEEP)',
          'Nasal flaring (accessory muscle use)',
          'Intercostal, subcostal, sternal retractions – compliant chest wall of preterm baby',
          'Central cyanosis and desaturation despite supplemental oxygen',
          '<b>CXR:</b> bilateral diffuse ground-glass opacification, air bronchograms, reduced lung volumes ("white lung/white-out" in severe cases)']:
    story += [bullet(t)]

story += [h3('Management')]
story += [body('<b>1. Prevention (Antenatal):</b>')]
for t in ['<b>Antenatal corticosteroids:</b> Betamethasone 12 mg IM ×2 doses, 24 hrs apart (to mother when preterm birth anticipated <34 weeks) – accelerates fetal lung maturity; reduces RDS severity by 50% and NEC, IVH risk',
          'Optimal thermal management and resuscitation at delivery']:
    story += [bullet(t)]

story += [sp(2), body('<b>2. Supportive Care:</b>')]
for t in ['Oxygen supplementation to maintain SpO2 91–95% (avoid hyperoxia → retinopathy of prematurity)',
          '<b>CPAP</b> (Continuous Positive Airway Pressure) via nasal prongs – prevents alveolar collapse; first-line for mild-moderate RDS; reduces need for intubation',
          '<b>Mechanical ventilation</b> (intubation + IPPV) – for severe RDS or failure of CPAP; use low tidal volume ventilation (4–6 mL/kg)',
          'Temperature regulation (incubator 36.5–37°C), minimal handling, IV nutrition',
          'Monitor and treat complications: PDA (indomethacin/ibuprofen/ligation), IVH, air leaks, infection']:
    story += [bullet(t)]

story += [sp(2), body('<b>3. Definitive – Exogenous Surfactant Replacement Therapy:</b>')]
for t in ['<b>Poractant alfa (Curosurf):</b> 100–200 mg/kg intratracheal  OR  <b>Beractant (Survanta)</b>',
          'Early rescue surfactant: within 2 hours of birth once RDS confirmed (CXR + FiO2 >0.30)',
          '<b>LISA / MIST technique</b> (Less Invasive Surfactant Administration): given via thin catheter during CPAP – avoids intubation; reduces BPD and mortality',
          'Reduces mortality by 40% and chronic lung disease (bronchopulmonary dysplasia)']:
    story += [bullet(t)]

story += [sp(6), hr()]

# 4.3 Hypercalcaemia
story += [h2('4.3  Hypercalcaemia – Definition and Management'), sp(2)]
story += [h3('Definition')]
story += [body('<b>Hypercalcaemia</b> = serum total calcium >10.5 mg/dL (>2.6 mmol/L) or ionised calcium >1.3 mmol/L. Always correct for albumin: <b>Corrected Ca = Measured Ca + 0.8 × (4.0 – Serum albumin [g/dL])</b>.'), sp(4)]

story += [make_table(
    ['Severity', 'Serum Calcium', 'Features'],
    [
        ['Mild', '10.5–12.0 mg/dL', 'Often asymptomatic; fatigue, constipation, mild polyuria'],
        ['Moderate', '12.0–14.0 mg/dL', 'Nausea, vomiting, cognitive impairment, muscle weakness'],
        ['Severe (Hypercalcaemic Crisis)', '>14.0 mg/dL (>3.5 mmol/L)', 'Confusion, stupor, coma, arrhythmia, pancreatitis, renal failure'],
    ],
    [3.5*cm, 4*cm, 9.5*cm]
), sp(4)]

story += [h3('Aetiology (Mnemonic: CHIMPANZEES)')]
for t in ['C – Calcium supplements / Milk-alkali syndrome',
          'H – Hyperparathyroidism (primary) – most common in outpatients; elevated PTH',
          'I – Immobilisation (especially Paget\'s disease)',
          'M – Malignancy – most common in hospitalised patients (PTHrP, osteolysis, lymphoma producing calcitriol)',
          'P – Paget\'s disease of bone',
          'A – Addison\'s disease / Acromegaly',
          'N – Neoplasm (multiple myeloma, breast, lung, renal, prostate cancer)',
          'Z – Zollinger-Ellison syndrome (MEN1)',
          'E – Excess Vitamin D / Excess thyroid hormone',
          'E – Excess (granulomatous disease – sarcoidosis, TB, histoplasmosis)',
          'S – Sarcoidosis; thiazide diuretics']:
    story += [bullet(t)]

story += [h3('Clinical Features ("Bones, Stones, Groans, Thrones, Psychic Moans")')]
for t in ['<b>Bones:</b> bone pain, pathological fractures, osteitis fibrosa cystica',
          '<b>Stones:</b> renal calculi (calcium oxalate/phosphate), nephrocalcinosis',
          '<b>Groans (GI):</b> nausea, vomiting, constipation, anorexia, peptic ulcer, acute pancreatitis',
          '<b>Thrones (polyuria/polydipsia):</b> nephrogenic DI, dehydration',
          '<b>Psychic Moans:</b> depression, anxiety, cognitive impairment, confusion, coma',
          '<b>Cardiac:</b> shortened QT interval, bradycardia, heart block (ECG changes)']:
    story += [bullet(t)]

story += [h3('Management')]
story += [make_table(
    ['Intervention', 'Dose / Detail', 'Mechanism / Notes'],
    [
        ['IV 0.9% NaCl (FIRST STEP)', '200–500 mL/hr; target UO 100–150 mL/hr', 'Rehydration + calciuresis; most important initial step'],
        ['IV Furosemide', '20–40 mg IV; only after euvolaemia achieved', 'Calciuresis via loop diuretic; risk of worsening dehydration if given early'],
        ['IV Zoledronic acid (bisphosphonate)', '4 mg IV over 15 min', 'Osteoclast inhibition; onset 24–72 hrs; preferred in malignancy; avoid if GFR <35'],
        ['IV Pamidronate', '60–90 mg IV over 2–4 hrs (if zoledronate unavailable)', 'Osteoclast inhibition; slower onset'],
        ['Calcitonin', '4 IU/kg SC/IM q12h', 'Rapid onset (4–6 hrs); useful as bridge; tachyphylaxis after 48 hrs'],
        ['Denosumab', '120 mg SC q4 weeks', 'RANKL inhibitor; bisphosphonate-refractory hypercalcaemia of malignancy'],
        ['Glucocorticoids (Prednisolone)', '40–60 mg/day PO', 'Granulomatous disease (sarcoidosis, TB), lymphoma, Vitamin D toxicity'],
        ['Haemodialysis', 'Calcium-free dialysate', 'Severe hypercalcaemia with renal failure or cardiac compromise; most rapid'],
        ['Cinacalcet', '30 mg BD → up to 90 mg QDS', 'Calcimimetic; primary hyperparathyroidism; patients unsuitable for surgery'],
    ],
    [4*cm, 5*cm, 8*cm]
), sp(6)]

story += [hr(), PageBreak()]

# 4.4 Anaemia
story += [h2('4.4  Evaluation and Management of Patient with Shortness of Breath and Hb = 7 g/dL'), sp(2)]
story += [h3('Definition')]
story += [body('<b>Anaemia:</b> Hb <13 g/dL in adult males; <12 g/dL in adult non-pregnant females (WHO). An Hb of 7 g/dL represents moderate-to-severe anaemia. Dyspnoea at this level results from compensatory increased cardiac output and tachycardia to maintain oxygen delivery to tissues.'), sp(4)]

story += [h3('Evaluation – History')]
for t in ['Duration and onset of SOB (acute vs. insidious)',
          'Diet: vegan/vegetarian (B12/folate deficiency), poverty, pica (iron deficiency)',
          'Menstrual history: menorrhagia, metrorrhagia (iron deficiency – most common in women)',
          'GI bleeding: melaena, haematochezia, haematemesis; NSAID/aspirin use',
          'Haematuria, haemoptysis, haematemesis',
          'Family history: sickle cell disease, thalassaemia, G6PD deficiency, hereditary spherocytosis',
          'Medications: methotrexate (folate antagonist), chemotherapy, phenytoin, zidovudine, proton pump inhibitors',
          'Chronic diseases: CKD, malignancy, HIV, rheumatoid arthritis, hypothyroidism, liver disease, IBD',
          'Alcohol history (macrocytosis, folate deficiency, hepatic disease)',
          'Constitutional symptoms: weight loss, fever, night sweats (malignancy)']:
    story += [bullet(t)]

story += [h3('Evaluation – Physical Examination')]
for t in ['Pallor: conjunctival, palmar, nail-bed pallor (most reliable signs)',
          'Tachycardia, tachypnoea, flow murmur (high-output state)',
          'Jaundice + splenomegaly (haemolytic anaemia)',
          'Koilonychia (spoon nails), brittle hair/nails – iron deficiency',
          'Glossitis, angular stomatitis, atrophic glossitis – B12/iron deficiency',
          'Peripheral neuropathy, subacute combined degeneration of cord – B12 deficiency',
          'Lymphadenopathy, hepatosplenomegaly (haematological malignancy)',
          'Dark urine (haemoglobinuria – intravascular haemolysis)']:
    story += [bullet(t)]

story += [h3('Investigations')]
story += [make_table(
    ['Investigation', 'Findings / Interpretation'],
    [
        ['CBC + indices (MCV, MCH, RDW)', 'Microcytic (IDA, thalassaemia, sideroblastic); Normocytic (haemolysis, chronic disease, aplastic); Macrocytic (B12/folate, liver, hypothyroid, drugs)'],
        ['Peripheral blood smear', 'Target cells (thalassaemia, liver disease); sickle cells; spherocytes (hereditary spherocytosis, AIHA); hypersegmented neutrophils (megaloblastic); schistocytes (MAHA/TTP)'],
        ['Reticulocyte count', 'High (>2%) = haemolysis / bleeding / treatment response; Low = bone marrow failure / nutritional deficiency'],
        ['Serum iron, TIBC, ferritin', 'IDA: ↓Fe, ↑TIBC, ↓ferritin; Anaemia of chronic disease: ↓Fe, ↓TIBC, ↑/normal ferritin'],
        ['Serum B12 and Folate', 'Deficiency in megaloblastic anaemia; measure BEFORE supplementation'],
        ['Direct Coombs test (DAT)', 'Positive = AIHA; negative = other haemolytic aetiology'],
        ['Hb electrophoresis', 'Sickle cell disease (HbSS), thalassaemia (HbA2 elevated in beta-thal trait)'],
        ['LDH, indirect bilirubin, haptoglobin', 'Haemolysis: ↑LDH, ↑indirect bilirubin, ↓haptoglobin'],
        ['Serum creatinine, eGFR', 'CKD-related anaemia (EPO deficiency)'],
        ['TSH', 'Hypothyroidism (normocytic or macrocytic anaemia)'],
        ['Stool FOBT / faecal immunochemical test', 'GI blood loss (iron deficiency)'],
        ['Bone marrow biopsy', 'Aplastic anaemia, haematological malignancy, myelodysplasia'],
        ['Upper/lower GI endoscopy', 'GI source of bleeding (ulcer, cancer, IBD, angiodysplasia)'],
        ['Urine R/E', 'Haematuria, haemoglobinuria'],
        ['CXR + Echocardiogram', 'Cardiomegaly, pericardial effusion, LV dysfunction (chronic severe anaemia)'],
    ],
    [5.5*cm, 11.5*cm]
), sp(4)]

story += [h3('Management')]
story += [body('<b>1. Immediate Stabilisation (Hb 7 g/dL with symptoms):</b>')]
for t in ['Supplemental O2 – maintain SpO2 >95%; high-flow if severely compromised',
          '<b>Blood transfusion:</b> Indicated if Hb <7 g/dL with symptoms OR <8 g/dL post-operative/cardiac patients; give 1–2 units packed RBCs (pRBC); target Hb 8–10 g/dL',
          'IV access; monitor vitals, O2 saturation, fluid balance, ECG']:
    story += [bullet(t)]

story += [sp(2), body('<b>2. Iron Deficiency Anaemia (most common cause):</b>')]
for t in ['<b>Oral iron:</b> Ferrous sulphate 200 mg TDS (65 mg elemental iron/tablet); take on empty stomach; continue 3–6 months after Hb normalisation to replenish stores; side effects: nausea, constipation, dark stools',
          '<b>IV iron (ferric carboxymaltose):</b> if oral not tolerated, malabsorption (coeliac, IBD, bariatric surgery), severe IDA, renal anaemia',
          'Identify and treat underlying source of bleeding (GI, menorrhagia, peptic ulcer)']:
    story += [bullet(t)]

story += [sp(2), body('<b>3. B12/Folate Deficiency (Megaloblastic Anaemia):</b>')]
for t in ['<b>B12 deficiency:</b> IM hydroxocobalamin 1 mg daily ×7 days, then weekly ×4, then monthly (lifelong if pernicious anaemia)',
          '<b>Folate deficiency:</b> Folic acid 5 mg OD PO ×4 months (always exclude B12 deficiency first to avoid masking subacute combined degeneration)']:
    story += [bullet(t)]

story += [sp(2), body('<b>4. Anaemia of Chronic Disease / CKD:</b>')]
for t in ['Treat underlying condition; IV iron if iron deficient',
          'Erythropoiesis-stimulating agents (EPO: darbepoetin alfa) if eGFR <30 or dialysis-dependent']:
    story += [bullet(t)]

story += [sp(2), body('<b>5. Haemolytic Anaemia:</b>')]
for t in ['<b>AIHA:</b> Prednisolone 1 mg/kg/day; splenectomy for refractory cases; rituximab',
          '<b>G6PD deficiency:</b> Avoid oxidant drugs (primaquine, dapsone, sulphonamides) and fava beans',
          '<b>Sickle cell crisis:</b> IV fluids, analgesia (opioids), O2, exchange transfusion for severe complications']:
    story += [bullet(t)]

story += [sp(6), hr()]

# 4.5 Giddiness
story += [h2('4.5  Causes of Giddiness and Investigations'), sp(2)]
story += [h3('Definition and Classification')]
story += [body('Giddiness (dizziness) is a non-specific symptom. Accurate classification guides diagnosis:'), sp(4)]
story += [make_table(
    ['Type', 'Description', 'Common Cause'],
    [
        ['Vertigo', 'Illusion of rotational movement of self or environment', 'BPPV, labyrinthitis, Menière\'s disease, posterior circulation stroke'],
        ['Pre-syncope', 'Sensation of impending fainting/blackout', 'Orthostatic hypotension, vasovagal, cardiac arrhythmia'],
        ['Disequilibrium', 'Unsteadiness / imbalance especially on walking; no head sensation', 'Cerebellar disease, peripheral neuropathy, Parkinson\'s'],
        ['Non-specific', 'Lightheadedness, floating, "not right in the head"', 'Anxiety, hyperventilation, depression, polypharmacy'],
    ],
    [3.5*cm, 5.5*cm, 8*cm]
), sp(4)]

story += [h3('Causes – Peripheral (Inner Ear / Vestibular Nerve) – Most Common')]
for t in ['<b>BPPV (Benign Paroxysmal Positional Vertigo)</b> – most common cause overall; brief (<1 min), position-triggered (lying, rolling in bed); positive Dix-Hallpike; treated with Epley manoeuvre',
          '<b>Vestibular neuritis</b> – acute severe vertigo, prolonged (days), post-viral; no hearing loss; positive head impulse test',
          '<b>Labyrinthitis</b> – same as neuritis + concurrent hearing loss/tinnitus',
          '<b>Menière\'s disease</b> – episodic vertigo (20 min–12 hrs) + fluctuating sensorineural hearing loss + tinnitus + aural fullness; endolymphatic hydrops',
          '<b>Acoustic neuroma (vestibular schwannoma)</b> – progressive unilateral sensorineural hearing loss, tinnitus, facial numbness; MRI required',
          '<b>Ototoxic drugs</b>: aminoglycosides (gentamicin), cisplatin, loop diuretics, quinine']:
    story += [bullet(t)]

story += [h3('Causes – Central (Brainstem / Cerebellum) – DANGEROUS, must not miss')]
for t in ['<b>Posterior circulation TIA / Stroke</b> (vertebrobasilar insufficiency) – sudden onset, direction-changing nystagmus, focal neuro signs (diplopia, dysarthria, dysphagia, ataxia, facial numbness)',
          '<b>Cerebellar infarction or haemorrhage</b> – often with truncal ataxia, inability to stand',
          '<b>Multiple sclerosis (MS)</b> – demyelinating plaques in brainstem/cerebellum; relapsing-remitting course',
          '<b>Cerebellar tumours</b> – primary or metastatic',
          '<b>Chiari malformation</b> – position-related; occipital headache']:
    story += [bullet(t)]

story += [h3('Causes – Systemic / Medical')]
for t in ['Orthostatic hypotension – antihypertensives, diuretics, autonomic neuropathy, dehydration',
          'Cardiac arrhythmias – AF, complete heart block, sick sinus syndrome, VT',
          'Hypoglycaemia, anaemia (Hb <7 g/dL), dehydration, electrolyte imbalance',
          'Hypothyroidism, hyperventilation syndrome, anxiety, panic disorder',
          'Polypharmacy – antihypertensives, sedatives, antiepileptics, antidepressants, opioids',
          'Cervical spondylosis (proprioceptive dysfunction)']:
    story += [bullet(t)]

story += [h3('Investigations')]
story += [make_table(
    ['Investigation', 'Purpose'],
    [
        ['Clinical exam: neurological + otoscopic', 'Distinguish peripheral vs. central; nystagmus characteristics'],
        ['Dix-Hallpike manoeuvre', 'Diagnose BPPV: fatigable, geotropic rotational nystagmus with latency'],
        ['Head Impulse Test (HIT)', 'Peripheral (positive corrective saccade) vs. central (negative HIT = dangerous)'],
        ['HINTS exam (Head Impulse + Nystagmus + Test of Skew)', 'Bedside rule to exclude posterior circulation stroke (more sensitive than CT in first 48 hrs)'],
        ['Postural BP (lying and standing)', 'Orthostatic hypotension: SBP drop ≥20 or DBP drop ≥10 mmHg on standing'],
        ['CBC, blood glucose, serum electrolytes', 'Anaemia, hypoglycaemia, hyponatraemia/hypokalaemia'],
        ['TSH', 'Hypothyroidism'],
        ['ECG + 24-hr Holter / Event monitor', 'Arrhythmias, sick sinus syndrome, heart block'],
        ['Pure tone audiometry (PTA)', 'Sensorineural hearing loss: Menière\'s, acoustic neuroma, labyrinthitis'],
        ['MRI brain with gadolinium (gold standard)', 'Posterior fossa pathology, acoustic neuroma, MS plaques, cerebellar lesion'],
        ['CT brain (urgent)', 'Acute cerebellar haemorrhage/infarction if clinically suspected'],
        ['Electronystagmography (ENG) / Video-HIT (vHIT)', 'Quantify canal function; vestibular hypofunction'],
        ['Caloric testing', 'Canal paresis – unilateral vestibular hypofunction (Menière\'s, neuritis)'],
        ['ABPM / cardiac monitoring', 'Vasovagal, autonomic dysfunction, antihypertensive-related'],
        ['Echocardiogram + carotid Doppler', 'Cardioembolic cause, vertebrobasilar TIA'],
    ],
    [5.5*cm, 11.5*cm]
), sp(4)]

story += [PageBreak()]

# ════════════════════════════════════════════════════════════════════════════
# Q5: ABG
# ════════════════════════════════════════════════════════════════════════════
story += q_heading('Q.5.  Components of ABG and ABG Analysis in Various Respiratory Diseases  [10 Marks]')

story += [h2('Arterial Blood Gas (ABG) – Components and Normal Values')]
story += [body('An ABG is obtained by direct arterial puncture (radial artery preferred, Allen\'s test first) and provides immediate information on oxygenation, ventilation, and acid-base balance.'), sp(4)]
story += [make_table(
    ['Parameter', 'Normal Range', 'What It Measures'],
    [
        ['pH', '7.35 – 7.45', 'Overall acid-base status (H⁺ concentration)'],
        ['PaO2', '80 – 100 mmHg (10.6–13.3 kPa)', 'Dissolved oxygen in arterial blood – oxygenation'],
        ['PaCO2', '35 – 45 mmHg (4.7–6.0 kPa)', 'Partial pressure of CO2 – reflects alveolar ventilation'],
        ['HCO3⁻ (bicarbonate)', '22 – 26 mmol/L', 'Metabolic buffer – represents metabolic component'],
        ['Base Excess (BE)', '-2 to +2 mEq/L', 'Overall metabolic status; negative = metabolic acidosis'],
        ['SaO2', '>95%', 'Haemoglobin oxygen saturation'],
        ['Lactate', '<2.0 mmol/L', 'Tissue perfusion marker; >2 = hypoperfusion/sepsis'],
        ['Haemoglobin (Hb)', '13.5–17.5 g/dL (M); 12–16 (F)', 'Oxygen-carrying capacity of blood'],
        ['FiO2', '0.21 (room air)', 'Used to calculate PaO2/FiO2 (P/F ratio)'],
        ['A-a Gradient', '<10–15 mmHg on room air', 'Alveolar-arterial O2 difference; elevated in V/Q mismatch, shunt, diffusion limitation'],
    ],
    [3.5*cm, 4.5*cm, 9*cm]
), sp(6)]

story += [h2('Step-by-Step ABG Interpretation')]
for t in ['<b>Step 1:</b> Assess pH → Acidaemia (<7.35) or Alkalaemia (>7.45)?',
          '<b>Step 2:</b> Assess PaCO2 → ↑(>45) = respiratory cause; ↓(<35) = hyperventilation',
          '<b>Step 3:</b> Assess HCO3⁻ → ↓(<22) = metabolic acidosis; ↑(>26) = metabolic alkalosis',
          '<b>Step 4:</b> Determine primary disorder – the parameter that matches the pH deviation',
          '<b>Step 5:</b> Assess compensation – expected compensation? (Partial or complete)',
          '<b>Step 6:</b> Assess oxygenation – PaO2, SaO2, P/F ratio, A-a gradient',
          '<b>Step 7 (if metabolic acidosis):</b> Calculate anion gap = Na⁺ – (Cl⁻ + HCO3⁻); Normal = 8–12 mEq/L. Elevated AG = MUDPILES (Methanol, Uraemia, DKA, Propylene glycol, INH/Isoniazid, Lactic acidosis, Ethylene glycol, Salicylates)']:
    story += [bullet(t)]

story += [sp(4), h2('ABG Patterns in Respiratory Diseases')]
story += [make_table(
    ['Disease', 'pH', 'PaCO2', 'HCO3⁻', 'PaO2', 'Key Notes'],
    [
        ['Acute Asthma (mild-mod)', '↑ (alkalosis)', '↓ <35', 'Normal/↓', '↓ or Nl', 'Respiratory alkalosis from hyperventilation; normalising PaCO2 = DANGER sign (fatigue)'],
        ['Acute Severe Asthma', 'Normal or ↓', 'Normal or ↑', 'Normal', '↓ <60', 'Normal PaCO2 in severe asthma = impending respiratory failure; intubation threshold'],
        ['COPD Exacerbation (Type 2 RF)', '↓ (acidosis)', '↑ >45 (acute on chronic)', '↑ (compensated)', '↓ <60', 'Give controlled O2 (SpO2 target 88–92%); avoid high-flow (hypoxic drive suppression); consider NIV (BiPAP)'],
        ['Stable COPD (chronic Type 2)', '7.35–7.45', '↑ (chronic)', '↑ (fully compensated)', '↓ chronically', 'Fully compensated respiratory acidosis; elevated HCO3 distinguishes from acute'],
        ['Pulmonary Embolism', '↑ (alkalosis)', '↓', 'Normal/↓', '↓↓', 'Hypoxaemia + hypocapnia (hyperventilation); widened A-a gradient; normal ABG does NOT exclude PE'],
        ['Pneumonia', 'Variable (↓ in severe)', '↓ or ↑ (late)', 'Variable', '↓↓', 'Hypoxia from consolidation/V:Q mismatch; PaCO2 rises in respiratory muscle fatigue'],
        ['ARDS', '↓ (acidosis)', '↓ early, ↑ late', '↓', '↓↓ <60 despite FiO2', 'P/F ratio: ALI <300; ARDS <200 (Berlin); refractory hypoxaemia; low TV ventilation (6 mL/kg ideal BW)'],
        ['Tension Pneumothorax', '↓', '↑', '↑', '↓↓', 'Respiratory failure from lung collapse; immediate needle decompression (2nd ICS MCL)'],
        ['Pulmonary Oedema (cardiogenic)', '↓ or normal (early)', '↑ (late)', '↑', '↓↓', 'Alveolar flooding; NIV (CPAP) first-line; PaCO2 rises in severe/decompensated pulmonary oedema'],
        ['Hyperventilation Syndrome', '↑ (alkalosis)', '↓ <30', '↓', 'Normal/↑', 'Anxiety/panic; PaO2 normal; symptoms: perioral paraesthesia, tetany, carpopedal spasm'],
        ['Neuromuscular (GBS, MND)', '↓', '↑ (progressive)', '↑', '↓', 'Hypoventilation; FVC <20 mL/kg or <1 L = intubation threshold; Type 2 RF'],
    ],
    [3.2*cm, 1.5*cm, 2*cm, 2*cm, 2*cm, 6.3*cm]
), sp(6)]

story += [h2('Compensation Rules (Quick Reference)')]
story += [make_table(
    ['Primary Disorder', 'Expected Compensation', 'Formula'],
    [
        ['Respiratory Acidosis – Acute', '↑ HCO3⁻', '+1 mEq/L HCO3 per 10 mmHg ↑ PaCO2'],
        ['Respiratory Acidosis – Chronic', '↑ HCO3⁻', '+3.5 mEq/L HCO3 per 10 mmHg ↑ PaCO2'],
        ['Respiratory Alkalosis – Acute', '↓ HCO3⁻', '−2 mEq/L HCO3 per 10 mmHg ↓ PaCO2'],
        ['Respiratory Alkalosis – Chronic', '↓ HCO3⁻', '−5 mEq/L HCO3 per 10 mmHg ↓ PaCO2'],
        ['Metabolic Acidosis', '↓ PaCO2', 'Winter\'s formula: Expected PaCO2 = (1.5 × HCO3) + 8 ± 2'],
        ['Metabolic Alkalosis', '↑ PaCO2', 'PaCO2 increases 0.7 mmHg per 1 mEq/L ↑ HCO3'],
    ],
    [5.5*cm, 4*cm, 7.5*cm]
), sp(4)]

story += [h2('P/F Ratio (Oxygenation Index)')]
for t in ['P/F ratio = PaO2 ÷ FiO2  (Normal: >400 mmHg)',
          'P/F <300 = Acute Lung Injury (ALI)',
          'P/F <200 = ARDS (Berlin Definition)',
          'P/F <100 = Severe ARDS',
          'ABG is mandatory in: respiratory failure, sepsis/septic shock, DKA, altered GCS, severe asthma/COPD exacerbation, post-cardiac arrest',
          'VBG may substitute for acid-base assessment (pH ~0.03–0.05 lower; PaCO2 ~4–5 mmHg higher) but NOT for PaO2']:
    story += [bullet(t)]

story += [sp(8),
    HRFlowable(width='100%', thickness=1, color=DARK_BLUE),
    sp(4),
    Paragraph('— End of Answer Sheet —', ParagraphStyle('end', fontName='Helvetica-Oblique',
               fontSize=10, textColor=colors.grey, alignment=TA_CENTER)),
    sp(2),
    Paragraph('SMT N H L M M C  ·  General Medicine R2  ·  May 2026',
              ParagraphStyle('footer', fontName='Helvetica', fontSize=8,
                              textColor=colors.grey, alignment=TA_CENTER))
]

# ── Build PDF ─────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2*cm, bottomMargin=2*cm,
    title='R2 General Medicine Answer Sheet – May 2026',
    author='SMT N H L M M C'
)
doc.build(story)
print(f'PDF created: {OUTPUT}')
Running Command

python3 /home/daytona/workspace/r2-exam-answer-sheet/build_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/r2-exam-answer-sheet/R2_General_Medicine_Answer_Sheet.pdf

Your PDF answer sheet is ready - 58 KB, clean and fully readable on any device:

R2 General Medicine Answer Sheet

PDF Document · PDF

The PDF includes:
  • Clean typography with colour-coded headings (dark blue for questions, teal for sub-headings, green for sub-sections)
  • Formatted tables with alternating row colours for all drug charts, investigation lists, and classification tables
  • Bullet-pointed answers for easy reading
  • All 5 questions fully answered across multiple pages with logical sections
  • Opens directly in any browser, phone, or PDF reader without needing Microsoft Word
This is a shared conversation. Sign in to Orris to start your own chat.