attachment
attachment
attachment
attachment

Hi I am going to have end posting exam in surgery department and model qns are in photo .can you give me probable qns that can be asked in my exam ?

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
I have enough from the library + my knowledge to give you a thorough, well-structured answer. Here is your probable question bank based on the pattern from both model papers:

Probable Questions - General Medicine End Posting Exam

(Based on 2023 Batch Phase 3 Part 1 model papers)

ESSAY / LONG CASE (10 marks) - Most Probable Scenarios

The papers consistently use a clinical vignette format for the essay. Based on both papers (mitral stenosis cases), here are the most probable essay scenarios:

Probable Essay Question 1 - MITRAL STENOSIS (HIGHEST PRIORITY - appeared in BOTH papers)

A 30-year-old female presents with progressive breathlessness, palpitations, and occasional hemoptysis. She gives history of recurrent sore throat in childhood. On examination: Pulse 96/min irregular, BP 110/70 mmHg, apex beat not palpable, loud S1, opening snap, mid-diastolic murmur at apex.
Subparts to prepare:
a) Most probable diagnosis and differential diagnosis (3 marks)
  • Diagnosis: Mitral Stenosis (Rheumatic)
  • Differentials: Mitral regurgitation, left atrial myxoma, Austin Flint murmur of AR, tricuspid stenosis
b) CVS examination findings expected (4 marks)
  • Inspection: Mitral facies (malar flush), visible apex absent
  • Palpation: Tapping apex beat (palpable S1), parasternal heave (RV hypertrophy), diastolic thrill at apex
  • Percussion: Cardiac dullness may be shifted
  • Auscultation: Loud S1, opening snap (OS), low-pitched mid-diastolic rumble with presystolic accentuation (in sinus rhythm) at apex in left lateral decubitus; Graham Steell murmur if pulmonary hypertension present
c) Investigations (2 marks)
  • ECG: P mitrale (bifid P), AF, RVH
  • CXR: Straightening of left heart border, double right heart border (LA enlargement), Kerley B lines, upper lobe diversion
  • Echo (2D + Doppler): valve area, gradient, MVA by PHT, assess subvalvular apparatus (Wilkins score)
  • Cardiac catheterization if discrepancy
d) Reasons for recent worsening (1 mark)
  • Onset of Atrial Fibrillation (most common cause of acute decompensation in MS)
  • Pregnancy, intercurrent infection, infective endocarditis, anemia, hyperthyroidism

Probable Essay Question 2 - CARDIAC FAILURE / DYSPNEA WORKUP

A 55-year-old male presents with breathlessness on exertion for 6 months, now at rest, bilateral leg swelling, and orthopnea. On examination: JVP raised, pedal edema, bibasal crepts.
Subparts:
  • a) Causes of acute/chronic dyspnea
  • b) Diagnosis and reasoning
  • c) Clinical signs correlating to pathophysiology
  • d) Palpatory and auscultatory findings

Probable Essay Question 3 - PULMONARY TUBERCULOSIS / LUNG CONSOLIDATION

A 35-year-old presents with fever, weight loss, night sweats, and productive cough for 2 months. Examination shows dullness, bronchial breathing, and increased tactile vocal fremitus in right upper zone.
  • a) Diagnosis and differentials
  • b) Clinical findings in right upper lobe consolidation vs. left upper lobe adsorption collapse
  • c) Investigations
  • d) Management

SHORT ESSAYS (6 marks each) - High Probability Topics

These topics appeared directly or by pattern in both papers:

1. Clinical Examination Features of Chronic Liver Disease ⭐⭐⭐

Must prepare - appeared in Paper 1 directly
  • Hands: Leukonychia, clubbing, palmar erythema, Dupuytren's contracture, asterixis (flapping tremor)
  • Face/Eyes: Jaundice (scleral icterus), parotid enlargement, fetor hepaticus, spider naevi (> 5 on upper body), xanthelasma
  • Chest/Abdomen: Gynecomastia, sparse body hair, caput medusae, splenomegaly, hepatomegaly (or small liver in cirrhosis), shifting dullness (ascites), testicular atrophy
  • Neurological: Encephalopathy grading

2. Clinical Diagnosis of Chronic Liver Disease ⭐⭐⭐

(appeared in Paper 2 as short essay)
  • Child-Pugh score (Bilirubin, Albumin, PT/INR, Ascites, Encephalopathy)
  • MELD score
  • Investigations: LFT, USG abdomen, Upper GI endoscopy, liver biopsy

3. Cor Pulmonale ⭐⭐⭐

Appeared in Paper 1 directly
  • Definition: RV hypertrophy/failure due to pulmonary hypertension secondary to lung disease (NOT left heart disease)
  • Causes: COPD (most common), pulmonary fibrosis, pulmonary embolism, kyphoscoliosis, OSA
  • Clinical features: Breathlessness, cyanosis, elevated JVP with prominent 'a' wave (if in sinus rhythm), parasternal heave, loud P2, TR murmur, edema
  • ECG: P pulmonale, RVH, RBBB
  • CXR: Prominent pulmonary arteries, RV enlargement
  • Management: Treat underlying cause, O2, diuretics, phlebotomy if polycythemia

4. Rheumatic Fever - Jones Criteria ⭐⭐⭐

Appeared in Paper 1 directly
Major criteria (SPACE):
  • S - Sydenham's chorea
  • P - Pancarditis (carditis)
  • A - Arthritis (migratory polyarthritis)
  • C - Chorea (subcutaneous nodules)
  • E - Erythema marginatum
Minor criteria:
  • Fever, raised ESR/CRP, prolonged PR interval, arthralgia (if arthritis not used as major)
Evidence of preceding streptococcal infection: Elevated ASO titre, positive throat culture, recent scarlet fever
Diagnosis: 2 major OR 1 major + 2 minor + evidence of preceding streptococcal infection

5. Clinical Features of Right-Sided Pleural Effusion ⭐⭐⭐

Appeared in Paper 1 directly
  • Symptoms: Breathlessness (proportional to size), pleuritic chest pain (if exudative), dry cough
  • Inspection: Reduced chest movement on right side, fullness of intercostal spaces
  • Palpation: Reduced TVF on right side, trachea shifted to LEFT (in massive effusion), mediastinal shift
  • Percussion: Stony dull note
  • Auscultation: Absent breath sounds; at upper border - bronchial breathing (Skodaic resonance), aegophony ("e" to "a" change)
  • Grocco's triangle on left side

6. LMN Type Weakness of Both Upper and Lower Limbs ⭐⭐

Appeared in Paper 2
Clinical evaluation approach:
  • Differential diagnosis: Guillain-Barre Syndrome (GBS), CIDP, motor neuron disease, peripheral neuropathy (diabetes, B12 deficiency, heavy metals)
  • Clinical features of LMN lesion: Flaccidity, wasting, fasciculations, hyporeflexia/areflexia, no Babinski
  • Pattern recognition: Ascending weakness in GBS, glove-and-stocking in polyneuropathy
  • Investigations: NCS/EMG, CSF analysis (albuminocytological dissociation in GBS), serum B12, FBS

7. Edema - Evaluation ⭐⭐

(appeared in Paper 2)
Causes by mechanism:
  • Low oncotic pressure: Nephrotic syndrome, cirrhosis, malnutrition
  • Increased hydrostatic pressure: CCF, venous obstruction, DVT
  • Increased capillary permeability: Allergy, inflammation
  • Lymphatic obstruction: Filariasis, malignancy
Clinical approach:
  • Bilateral vs. unilateral; pitting vs. non-pitting
  • Distribution: Dependent (cardiac), periorbital (renal), facial (hypothyroid)

SHORT ANSWERS (2 marks each) - High Probability Topics

Based on both papers, prepare 2-3 line answers for:
TopicKey Points
JVP - Normal waveform'a' wave (atrial contraction), 'c' wave (tricuspid closure), 'x' descent, 'v' wave (venous filling), 'y' descent
S3 (Third Heart Sound)Low-pitched, early diastolic, at apex; due to rapid ventricular filling; heard in heart failure, MR, VSD; physiological in young/pregnancy
SAAG (Serum-Ascites Albumin Gradient)SAAG = Serum albumin - Ascites albumin; SAAG ≥ 1.1 = portal hypertension; SAAG < 1.1 = non-portal (TB, malignancy)
Babinski Sign / Plantar ResponseExtensor plantar = UMN lesion; stroke dorsum of foot lateral side; normal response = flexion of hallux
Flapping Tremor (Asterixis)Liver failure, CO2 narcosis, uremia; test with wrists extended - irregular flaps due to inability to maintain posture
Generalized LymphadenopathyCauses: infection (TB, EBV, HIV), lymphoma, leukemia, SLE, sarcoidosis; approach: size, consistency, tenderness, fixity
Lateral Medullary Syndrome (Wallenberg)PICA/vertebral artery occlusion; ipsilateral face pain/temp loss + cerebellar signs + Horner's; contralateral body pain/temp loss; dysphagia, hoarseness
Aphasia vs DysarthriaAphasia = language processing disorder (cortical, dominant hemisphere); Dysarthria = motor speech disorder (articulation), language intact
Syncope - EvaluationTransient LOC due to global cerebral hypoperfusion; causes: vasovagal, cardiac, orthostatic; ECG mandatory
Jaundice - EvaluationPre-hepatic / hepatic / post-hepatic; LFT pattern, USG abdomen, serum bilirubin (direct vs indirect)

PATTERN ANALYSIS - What to Expect

Based on analyzing both model papers, your exam will most likely have:
  1. Essay (10 marks): A cardiac case - likely mitral stenosis again OR a variation with aortic stenosis/regurgitation with subparts on diagnosis, CVS findings, investigation, and complications
  2. Short essays (4-6 marks): Pick 4 from this list:
    • Consolidation vs. collapse clinical findings
    • Clinical diagnosis of CLD
    • LMN weakness evaluation
    • Cor pulmonale
    • Rheumatic fever criteria
  3. Short answers (2 marks): JVP waveform (draw and label), S3, SAAG, Babinski sign, one of the neurological syndromes

Top 5 Must-Prepare Topics (Highest Repeat Probability)

  1. Mitral Stenosis - CVS findings, investigations, AF as complication
  2. Chronic Liver Disease - clinical signs head to toe
  3. Rheumatic Fever - Jones criteria (major + minor + strep evidence)
  4. Cor Pulmonale - definition, causes, ECG/CXR changes
  5. Pleural Effusion - clinical examination findings (consolidation vs. effusion differentiation)
Good luck with your exam! These topics have a very high likelihood of appearing given the direct repeat pattern across both model papers.

Can you give probable questions apart from the one I provided

Asking for Preferences
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
That covers a broad set of fresh questions across all major systems tested in Phase 3 Part 1 Medicine. A few things to keep in mind:
  • Aortic Regurgitation is the single most likely "new" essay topic - it pairs perfectly with the mitral stenosis cases in your model papers and tests the same format (peripheral signs + CVS exam + investigations + complications)
  • UMN vs LMN comparison table and Ischemic stroke management are the highest priority new short essays in the neurology section
  • For short answers, Osler's nodes vs Janeway lesions, Cheyne-Stokes respiration, and Wernicke's vs Broca's aphasia are extremely common 2-mark setters at this level
If you want me to give a detailed model answer for any specific topic above, just ask!

Create a study guide PDF for all probable topics

Reading File
Running Command

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

Running Command

mkdir -p /home/daytona/workspace/medicine-study-guide && echo "created"

Writing File

~/medicine-study-guide/generate_pdf.py

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

OUTPUT = "/home/daytona/workspace/medicine-study-guide/Medicine_EndPosting_StudyGuide.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2*cm,
    leftMargin=2*cm,
    topMargin=2.5*cm,
    bottomMargin=2*cm,
    title="General Medicine End Posting - Study Guide",
    author="Orris AI"
)

# ── COLOUR PALETTE ──────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a3a5c")
MID_BLUE    = colors.HexColor("#2563a8")
LIGHT_BLUE  = colors.HexColor("#dbeafe")
ACCENT_RED  = colors.HexColor("#b91c1c")
GOLD        = colors.HexColor("#b45309")
GREEN       = colors.HexColor("#15803d")
LIGHT_GREEN = colors.HexColor("#dcfce7")
LIGHT_GOLD  = colors.HexColor("#fef3c7")
LIGHT_RED   = colors.HexColor("#fee2e2")
GREY_BG     = colors.HexColor("#f1f5f9")
DARK_GREY   = colors.HexColor("#334155")
WHITE       = colors.white

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

cover_title = ParagraphStyle("cover_title",
    fontName="Helvetica-Bold", fontSize=28, textColor=WHITE,
    alignment=TA_CENTER, spaceAfter=6, leading=34)

cover_sub = ParagraphStyle("cover_sub",
    fontName="Helvetica", fontSize=14, textColor=LIGHT_BLUE,
    alignment=TA_CENTER, spaceAfter=4, leading=18)

cover_note = ParagraphStyle("cover_note",
    fontName="Helvetica-Oblique", fontSize=11, textColor=LIGHT_BLUE,
    alignment=TA_CENTER, spaceAfter=4)

chapter_title = ParagraphStyle("chapter_title",
    fontName="Helvetica-Bold", fontSize=18, textColor=WHITE,
    alignment=TA_LEFT, spaceAfter=4, leading=22)

section_head = ParagraphStyle("section_head",
    fontName="Helvetica-Bold", fontSize=13, textColor=DARK_BLUE,
    spaceBefore=10, spaceAfter=4, leading=16)

subsection_head = ParagraphStyle("subsection_head",
    fontName="Helvetica-Bold", fontSize=11, textColor=MID_BLUE,
    spaceBefore=6, spaceAfter=3, leading=14)

body_text = ParagraphStyle("body_text",
    fontName="Helvetica", fontSize=10, textColor=DARK_GREY,
    spaceAfter=3, leading=14, alignment=TA_JUSTIFY)

bullet_text = ParagraphStyle("bullet_text",
    fontName="Helvetica", fontSize=10, textColor=DARK_GREY,
    spaceAfter=2, leading=13, leftIndent=14, firstLineIndent=-10)

sub_bullet = ParagraphStyle("sub_bullet",
    fontName="Helvetica", fontSize=9.5, textColor=DARK_GREY,
    spaceAfter=2, leading=13, leftIndent=28, firstLineIndent=-10)

bold_label = ParagraphStyle("bold_label",
    fontName="Helvetica-Bold", fontSize=10, textColor=DARK_GREY,
    spaceAfter=1, leading=13)

highlight_box = ParagraphStyle("highlight_box",
    fontName="Helvetica-Bold", fontSize=10, textColor=ACCENT_RED,
    spaceAfter=2, leading=13)

toc_entry = ParagraphStyle("toc_entry",
    fontName="Helvetica", fontSize=10.5, textColor=DARK_BLUE,
    spaceAfter=3, leading=14, leftIndent=10)

toc_head = ParagraphStyle("toc_head",
    fontName="Helvetica-Bold", fontSize=12, textColor=DARK_BLUE,
    spaceAfter=5, leading=15)

story = []

# ════════════════════════════════════════════════════════════════════════════
# HELPER FUNCTIONS
# ════════════════════════════════════════════════════════════════════════════

def chapter_banner(title, subtitle=""):
    """Coloured banner for chapter headers."""
    inner = [Paragraph(title, chapter_title)]
    if subtitle:
        inner.append(Paragraph(subtitle, ParagraphStyle("cs",
            fontName="Helvetica-Oblique", fontSize=11, textColor=LIGHT_BLUE,
            alignment=TA_LEFT, leading=14)))
    t = Table([[inner]], colWidths=[17*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND",  (0,0), (-1,-1), DARK_BLUE),
        ("TOPPADDING",  (0,0), (-1,-1), 10),
        ("BOTTOMPADDING",(0,0),(-1,-1), 10),
        ("LEFTPADDING", (0,0), (-1,-1), 12),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return t

def info_box(text, bg=LIGHT_BLUE, border=MID_BLUE):
    p = Paragraph(text, ParagraphStyle("ib",
        fontName="Helvetica", fontSize=10, textColor=DARK_GREY,
        leading=14, alignment=TA_JUSTIFY))
    t = Table([[p]], colWidths=[17*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), bg),
        ("BOX",          (0,0),(-1,-1), 1, border),
        ("TOPPADDING",   (0,0),(-1,-1), 7),
        ("BOTTOMPADDING",(0,0),(-1,-1), 7),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("ROUNDEDCORNERS",[4]),
    ]))
    return t

def warn_box(text):
    return info_box("⭐ " + text, bg=LIGHT_GOLD, border=GOLD)

def key_box(text):
    return info_box("🔑 " + text, bg=LIGHT_GREEN, border=GREEN)

def red_box(text):
    return info_box("⚠ " + text, bg=LIGHT_RED, border=ACCENT_RED)

def b(text): return f"<b>{text}</b>"
def i(text): return f"<i>{text}</i>"
def br(): return Spacer(1, 0.3*cm)
def hline(): return HRFlowable(width="100%", thickness=0.5,
                                color=colors.HexColor("#cbd5e1"), spaceAfter=4)

def two_col_table(left_items, right_items, left_head="", right_head=""):
    """Two-column comparison table."""
    data = []
    if left_head or right_head:
        data.append([
            Paragraph(left_head, ParagraphStyle("th", fontName="Helvetica-Bold",
                fontSize=10, textColor=WHITE, leading=13)),
            Paragraph(right_head, ParagraphStyle("th", fontName="Helvetica-Bold",
                fontSize=10, textColor=WHITE, leading=13))
        ])
    for l, r in zip(left_items, right_items):
        data.append([
            Paragraph(l, bullet_text),
            Paragraph(r, bullet_text)
        ])
    t = Table(data, colWidths=[8.3*cm, 8.7*cm])
    style = [
        ("GRID",        (0,0),(-1,-1), 0.5, colors.HexColor("#94a3b8")),
        ("TOPPADDING",  (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING", (0,0),(-1,-1), 7),
        ("BACKGROUND",  (0,0),(-1,-1), GREY_BG),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GREY_BG]),
    ]
    if left_head or right_head:
        style += [("BACKGROUND",(0,0),(-1,0), DARK_BLUE)]
    t.setStyle(TableStyle(style))
    return t

def simple_table(headers, rows, col_widths=None):
    """Generic styled table."""
    if col_widths is None:
        col_widths = [17*cm / len(headers)] * len(headers)
    data = [[Paragraph(b(h), ParagraphStyle("th", fontName="Helvetica-Bold",
                fontSize=9.5, textColor=WHITE, leading=12)) for h in headers]]
    for row in rows:
        data.append([Paragraph(str(c), ParagraphStyle("td", fontName="Helvetica",
                fontSize=9.5, textColor=DARK_GREY, leading=12)) for c in row])
    t = Table(data, colWidths=col_widths)
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1, 0), DARK_BLUE),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, GREY_BG]),
        ("GRID",         (0,0),(-1,-1), 0.5, colors.HexColor("#94a3b8")),
        ("TOPPADDING",   (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("LEFTPADDING",  (0,0),(-1,-1), 6),
    ]))
    return t

def bp(text):   return Paragraph("• " + text, bullet_text)
def sbp(text):  return Paragraph("  - " + text, sub_bullet)
def head(text): return Paragraph(text, section_head)
def subh(text): return Paragraph(text, subsection_head)

# ════════════════════════════════════════════════════════════════════════════
# COVER PAGE
# ════════════════════════════════════════════════════════════════════════════

cover_bg = Table([
    [Paragraph("GENERAL MEDICINE", cover_title)],
    [Paragraph("End Posting Exam", cover_sub)],
    [Paragraph("Complete Study Guide", cover_sub)],
    [Spacer(1, 0.5*cm)],
    [Paragraph("Phase 3 · Part 1 · 2023 Batch", cover_note)],
    [Spacer(1, 0.3*cm)],
    [Paragraph("Govt. Medical College, Manjeri", cover_note)],
    [Spacer(1, 1*cm)],
    [Paragraph("Cardiology · Respiratory · Neurology · GI/Hepatology · Endocrine · Renal", cover_note)],
], colWidths=[17*cm])
cover_bg.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), DARK_BLUE),
    ("TOPPADDING",   (0,0),(-1,-1), 18),
    ("BOTTOMPADDING",(0,0),(-1,-1), 18),
    ("LEFTPADDING",  (0,0),(-1,-1), 20),
    ("RIGHTPADDING", (0,0),(-1,-1), 20),
]))
story.append(Spacer(1, 2*cm))
story.append(cover_bg)
story.append(Spacer(1, 1*cm))

notice_data = [
    [Paragraph(b("Exam Format"), ParagraphStyle("nf", fontName="Helvetica-Bold",
        fontSize=10, textColor=DARK_BLUE, leading=13)),
     Paragraph("Time: 1.5 hrs  |  Marks: 50  |  1 Essay (10m) + Short Essays (6m each) + Short Answers (2m each)",
        ParagraphStyle("nv", fontName="Helvetica", fontSize=10, textColor=DARK_GREY, leading=13))]
]
notice_t = Table(notice_data, colWidths=[4*cm, 13*cm])
notice_t.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(0,-1), LIGHT_BLUE),
    ("BACKGROUND", (1,0),(1,-1), WHITE),
    ("BOX",        (0,0),(-1,-1), 1, MID_BLUE),
    ("TOPPADDING", (0,0),(-1,-1), 8),
    ("BOTTOMPADDING",(0,0),(-1,-1), 8),
    ("LEFTPADDING",(0,0),(-1,-1), 8),
]))
story.append(notice_t)
story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# TABLE OF CONTENTS
# ════════════════════════════════════════════════════════════════════════════

story.append(Paragraph("Contents", ParagraphStyle("toc_main",
    fontName="Helvetica-Bold", fontSize=20, textColor=DARK_BLUE,
    spaceAfter=10, leading=24)))
story.append(hline())

toc_items = [
    ("SECTION 1", "CARDIOLOGY", [
        "1.1  Mitral Stenosis (Rheumatic)",
        "1.2  Aortic Regurgitation",
        "1.3  Aortic Stenosis",
        "1.4  Congestive Cardiac Failure",
        "1.5  Infective Endocarditis",
        "1.6  Cor Pulmonale",
        "1.7  Rheumatic Fever - Jones Criteria",
    ]),
    ("SECTION 2", "RESPIRATORY", [
        "2.1  Pulmonary Tuberculosis",
        "2.2  COPD",
        "2.3  Pleural Effusion",
        "2.4  Lung Consolidation vs Collapse",
        "2.5  Pneumothorax",
    ]),
    ("SECTION 3", "NEUROLOGY", [
        "3.1  UMN vs LMN Lesion",
        "3.2  Ischemic Stroke",
        "3.3  Lateral Medullary Syndrome",
        "3.4  Guillain-Barre Syndrome",
        "3.5  Aphasia vs Dysarthria",
        "3.6  Meningitis",
    ]),
    ("SECTION 4", "GI / HEPATOLOGY", [
        "4.1  Chronic Liver Disease - Clinical Diagnosis",
        "4.2  Jaundice - Evaluation",
        "4.3  Ascites & SAAG",
        "4.4  Hepatic Encephalopathy",
    ]),
    ("SECTION 5", "ENDOCRINE & RENAL", [
        "5.1  Hypothyroidism",
        "5.2  Diabetic Nephropathy",
        "5.3  Nephrotic vs Nephritic Syndrome",
        "5.4  Hypertensive Emergency",
    ]),
    ("SECTION 6", "CLINICAL SIGNS (SHORT ANSWERS)", [
        "JVP Waveform · S3 · Clubbing · Cyanosis",
        "Pulsus Paradoxus · Kussmaul's Sign · Cheyne-Stokes",
        "Babinski Sign · Plantar Response · Kernig's & Brudzinski's",
        "Flapping Tremor · Trousseau's · Chvostek's",
        "Osler's Nodes vs Janeway Lesions · Glasgow Coma Scale",
    ]),
]
for sec, sec_title, items in toc_items:
    story.append(Paragraph(f"<b>{sec}</b>  {sec_title}",
        ParagraphStyle("toc_sec", fontName="Helvetica-Bold", fontSize=11,
            textColor=DARK_BLUE, spaceBefore=8, spaceAfter=2,
            leftIndent=0, leading=14)))
    for it in items:
        story.append(Paragraph(it, toc_entry))

story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# SECTION 1 — CARDIOLOGY
# ════════════════════════════════════════════════════════════════════════════

story.append(chapter_banner("SECTION 1: CARDIOLOGY",
    "Mitral Stenosis · Aortic Regurgitation · Aortic Stenosis · CCF · IE · Cor Pulmonale"))
story.append(br())

# ── 1.1 MITRAL STENOSIS ───────────────────────────────────────────────────
story.append(head("1.1  Mitral Stenosis (Rheumatic)  ⭐⭐⭐"))
story.append(warn_box("HIGHEST PRIORITY - appeared in BOTH model papers. Expect this or a close variant as your Essay question."))
story.append(br())
story.append(subh("Most Probable Essay Vignette"))
story.append(info_box(
    "A 30-year-old female presents with progressive breathlessness, palpitations, and occasional hemoptysis. "
    "History of recurrent sore throat in childhood. Pulse 96/min irregular, BP 110/70 mmHg, "
    "apex beat not palpable, loud S1, opening snap, mid-diastolic murmur at apex.", GREY_BG, MID_BLUE))
story.append(br())
story.append(subh("a) Diagnosis & Differential Diagnosis"))
story.append(bp(b("Diagnosis:") + " Mitral Stenosis (Rheumatic)"))
story.append(bp(b("Differentials:") + " Mitral regurgitation, Left atrial myxoma, Austin Flint murmur of AR, Tricuspid stenosis"))
story.append(br())
story.append(subh("b) CVS Examination Findings"))
story.extend([
    bp(b("Inspection:") + " Mitral facies (malar flush), apex beat not visible"),
    bp(b("Palpation:") + " Tapping apex (palpable S1), parasternal heave (RVH), apical diastolic thrill"),
    bp(b("Auscultation:") + " Loud S1 + Opening Snap (OS) + Mid-diastolic rumble with presystolic accentuation"),
    sbp("Best heard: apex, left lateral decubitus, bell of stethoscope"),
    sbp("Graham Steell murmur: early diastolic at left sternal border if pulmonary hypertension"),
    bp(b("Signs of pulmonary HTN:") + " Loud P2, right parasternal heave, elevated JVP"),
])
story.append(br())
story.append(subh("c) Investigations"))
story.extend([
    bp(b("ECG:") + " P mitrale (bifid broad P in lead II), Atrial Fibrillation, RVH (right axis deviation)"),
    bp(b("CXR:") + " Straightening of left heart border, double right heart border (LA enlargement), Kerley B lines, upper lobe diversion"),
    bp(b("Echocardiography (2D + Doppler):") + " Gold standard - valve area (MVA <1.5 cm² = severe), pressure half time (PHT), Wilkins score for PTMC suitability"),
    bp(b("Cardiac catheterization:") + " If echo findings discrepant"),
])
story.append(br())
story.append(subh("d) Causes of Worsening (Decompensation)"))
story.extend([
    bp(b("Most common:") + " Onset of Atrial Fibrillation (loss of atrial kick → sudden rise in LA pressure)"),
    bp("Pregnancy (increased blood volume and HR)"),
    bp("Intercurrent infection / fever (increased metabolic demand)"),
    bp("Infective endocarditis"),
    bp("Anemia, hyperthyroidism"),
])
story.append(br())
story.append(key_box("Memory: MVA critical values: <2 cm² = significant, <1.5 cm² = severe, <1 cm² = very severe"))
story.append(br())
story.append(hline())

# ── 1.2 AORTIC REGURGITATION ──────────────────────────────────────────────
story.append(head("1.2  Aortic Regurgitation  ⭐⭐⭐"))
story.append(warn_box("Most probable 'NEW' essay topic - logically alternates with Mitral Stenosis."))
story.append(br())
story.append(subh("Peripheral Signs of AR (All named eponyms - exam favourite)"))
peripheral_ar = [
    ["Sign", "Description"],
    ["Corrigan's pulse", "Visible pulsation in neck (water-hammer pulse)"],
    ["De Musset's sign", "Head nodding with each heartbeat"],
    ["Quincke's sign", "Capillary pulsation at nail bed"],
    ["Duroziez's sign", "To-and-fro murmur over femoral artery with partial compression"],
    ["Traube's sign", "Pistol shot sound over femoral artery"],
    ["Müller's sign", "Pulsation of uvula"],
    ["Hill's sign", "Popliteal BP > brachial BP by >20 mmHg"],
    ["Lighthouse sign", "Flushing and blanching of forehead skin"],
]
t = simple_table(["Sign", "Description"], peripheral_ar[1:], [5*cm, 12*cm])
story.append(t)
story.append(br())
story.append(subh("CVS Examination Findings"))
story.extend([
    bp(b("Pulse:") + " Collapsing (water-hammer) - raise arm → feel more prominent"),
    bp(b("BP:") + " Wide pulse pressure (e.g. 160/40) - systolic high, diastolic low"),
    bp(b("Apex:") + " Displaced downward and outward (6th-7th ICS, anterior axillary line), hyperdynamic, heaving"),
    bp(b("Auscultation:") + " Early diastolic murmur (high-pitched, blowing) at 3rd ICS left sternal border (Erb's point)"),
    sbp("Accentuated by: patient sitting forward, deep expiration"),
    sbp("Austin Flint murmur: mid-diastolic rumble at apex (regurgitant jet vibrates anterior mitral leaflet)"),
    bp(b("S1:") + " Soft (early mitral valve closure); S2 soft or absent (A2)"),
])
story.append(br())
story.append(subh("Causes"))
story.extend([
    bp(b("Acute AR:") + " Infective endocarditis (most common cause of acute), aortic dissection, trauma"),
    bp(b("Chronic AR:") + " Rheumatic heart disease (most common in India), Marfan syndrome, ankylosing spondylitis, bicuspid aortic valve, syphilitic aortitis, hypertension"),
])
story.append(br())
story.append(hline())

# ── 1.3 AORTIC STENOSIS ───────────────────────────────────────────────────
story.append(head("1.3  Aortic Stenosis  ⭐⭐⭐"))
story.append(subh("Classic Triad - SAD"))
story.append(info_box(b("S")+"yncope  •  "+b("A")+"ngina  •  "+b("D")+"yspnea  (in order of appearance → increasing severity)", LIGHT_GREEN, GREEN))
story.append(br())
story.extend([
    bp(b("Pulse:") + " Pulsus parvus et tardus (slow rising, low volume, plateau pulse)"),
    bp(b("Apex:") + " Heaving, not displaced (pressure overload → concentric hypertrophy)"),
    bp(b("Thrill:") + " Systolic thrill in aortic area and carotids"),
    bp(b("Murmur:") + " Ejection systolic murmur, harsh, crescendo-decrescendo, 2nd ICS right sternal border, radiates to carotids"),
    bp(b("Severe AS signs:") + " Reversed split S2 (A2 delayed), S4 gallop (stiff LV), loss of A2"),
    bp(b("Investigations:") + " Echo (valve area by continuity equation: severe <1 cm², mean gradient >40 mmHg), ECG (LVH), CXR (post-stenotic dilatation of aorta)"),
    bp(b("Treatment:") + " Surgical AVR or TAVI (transcatheter); surgery indicated if symptomatic severe AS or asymptomatic with EF <50%"),
])
story.append(br())
story.append(hline())

# ── 1.4 CONGESTIVE CARDIAC FAILURE ────────────────────────────────────────
story.append(head("1.4  Congestive Cardiac Failure  ⭐⭐⭐"))
story.append(subh("Left vs Right Heart Failure"))
lhf = ["Dyspnea on exertion", "Orthopnea, PND", "Pulmonary edema", "Bibasal crackles",
       "S3 gallop (best at apex)", "Displaced apex beat", "Tachycardia, cold extremities"]
rhf = ["Raised JVP", "Pitting pedal edema (ankles to thighs)", "Hepatomegaly (tender, pulsatile)", "Ascites",
       "Sacral edema (bed-bound)", "Parasternal heave", "Kussmaul's sign (constrictive)"]
story.append(two_col_table(lhf, rhf, "Left Heart Failure", "Right Heart Failure"))
story.append(br())
story.append(subh("Pathophysiology of Orthopnea & PND"))
story.extend([
    bp(b("Orthopnea:") + " On lying flat → redistribution of blood from legs to pulmonary circulation → raised LA pressure → pulmonary congestion → breathlessness; relieved by sitting up"),
    bp(b("PND (Paroxysmal Nocturnal Dyspnea):") + " Same mechanism + reduced sympathetic tone during sleep + reabsorption of interstitial fluid → pulmonary edema at night; patient wakes up 1-2 hrs after sleeping, goes to window for air"),
])
story.append(br())
story.append(subh("Management (Pharmacological)"))
story.extend([
    bp(b("ACE inhibitors/ARB:") + " Reduce afterload and preload, improve survival (HFrEF EF <40%)"),
    bp(b("Beta-blockers:") + " Carvedilol, bisoprolol, metoprolol - reduce mortality, start low dose"),
    bp(b("Diuretics:") + " Furosemide (loop) - symptom relief; spironolactone/eplerenone (MRA) - mortality benefit"),
    bp(b("Digoxin:") + " Rate control in AF + HF; positive inotrope"),
    bp(b("SGLT2 inhibitors:") + " Empagliflozin, dapagliflozin - now first-line in HFrEF regardless of diabetes"),
    bp(b("ARNI:") + " Sacubitril/valsartan - superior to ACE inhibitor in HFrEF"),
])
story.append(br())
story.append(hline())

# ── 1.5 INFECTIVE ENDOCARDITIS ────────────────────────────────────────────
story.append(head("1.5  Infective Endocarditis  ⭐⭐"))
story.append(subh("Modified Duke Criteria"))
story.append(bp(b("MAJOR Criteria:")))
story.extend([
    sbp("Positive blood cultures: 2 separate sets with typical organisms (Strep viridans, Staph aureus, HACEK group)"),
    sbp("Echocardiographic evidence: vegetation, abscess, dehiscence of prosthetic valve, new valvular regurgitation"),
])
story.append(bp(b("MINOR Criteria:")))
story.extend([
    sbp("Predisposing condition (rheumatic valve disease, congenital HD, prosthetic valve, IV drug use)"),
    sbp("Fever > 38°C"),
    sbp("Vascular phenomena: septic arterial emboli, Janeway lesions (painless, palms/soles), conjunctival hemorrhage, intracranial hemorrhage"),
    sbp("Immunological phenomena: Osler's nodes (painful, fingers/toes), Roth spots (retina), glomerulonephritis, positive RF"),
    sbp("Microbiological: positive culture not meeting major criteria"),
])
story.append(br())
story.append(info_box(b("Diagnosis: ") + "2 Major  OR  1 Major + 3 Minor  OR  5 Minor criteria", LIGHT_GOLD, GOLD))
story.append(br())
story.append(subh("Peripheral Stigmata of IE"))
ie_signs = [
    ["Splinter hemorrhages", "Linear reddish-brown, nail beds, embolic"],
    ["Janeway lesions", "Painless erythematous macules, palms/soles, embolic"],
    ["Osler's nodes", "Painful, raised, finger/toe pads, immunological"],
    ["Roth spots", "Oval retinal hemorrhages with pale centre"],
    ["Clubbing", "Chronic IE"],
    ["Splenomegaly", "Immune activation + septic emboli"],
]
story.append(simple_table(["Sign", "Description"], ie_signs, [5*cm, 12*cm]))
story.append(br())
story.append(hline())

# ── 1.6 COR PULMONALE ────────────────────────────────────────────────────
story.append(head("1.6  Cor Pulmonale  ⭐⭐⭐"))
story.append(info_box(b("Definition: ") +
    "Right ventricular hypertrophy and/or failure secondary to pulmonary hypertension caused by diseases of the lung parenchyma, "
    "pulmonary vasculature, or chest wall — NOT due to left heart disease or congenital heart disease.", GREY_BG, MID_BLUE))
story.append(br())
story.extend([
    bp(b("Causes:") + " COPD (most common), pulmonary fibrosis, pulmonary embolism (chronic), kyphoscoliosis, OSA, primary pulmonary HTN"),
    bp(b("Symptoms:") + " Breathlessness, cyanosis, peripheral edema, fatigue"),
    bp(b("Signs:") + " Raised JVP with prominent 'a' wave (if sinus rhythm), parasternal heave (RVH), loud P2, TR murmur (pansystolic, louder on inspiration = Carvallo's sign), pedal edema"),
    bp(b("ECG:") + " P pulmonale (peaked P > 2.5mm in lead II), right axis deviation, RVH (R > S in V1), RBBB"),
    bp(b("CXR:") + " Prominent pulmonary arteries, RV enlargement, oligemic lung fields"),
    bp(b("Management:") + " Treat underlying cause, long-term O2 (LTOT if PaO2 <55 mmHg), diuretics for edema, phlebotomy if polycythemia, vasodilators in primary PHT"),
])
story.append(br())
story.append(hline())

# ── 1.7 RHEUMATIC FEVER ──────────────────────────────────────────────────
story.append(head("1.7  Rheumatic Fever - Jones Criteria  ⭐⭐⭐"))
story.append(warn_box("Appeared directly in Paper 1. Very likely to repeat as short note."))
story.append(br())
story.append(subh("Major Criteria  -  Mnemonic: SPACE"))
major = [
    ["S", "Sydenham's Chorea", "Involuntary, purposeless movements; emotional lability; 'milk maid grip'"],
    ["P", "Pancarditis (Carditis)", "Most serious - all 3 layers; new murmur, pericardial rub, cardiac enlargement, CCF"],
    ["A", "Arthritis (migratory)", "Large joints, fleeting, extremely painful, responds dramatically to aspirin"],
    ["C", "subcutaneous nodules", "Firm, painless, over bony prominences (elbows, wrists, occiput)"],
    ["E", "Erythema marginatum", "Serpiginous rash on trunk, pink border, central clearing, non-pruritic"],
]
story.append(simple_table(["Letter","Criterion","Description"], major, [1.5*cm, 5*cm, 10.5*cm]))
story.append(br())
story.append(subh("Minor Criteria"))
story.extend([
    bp("Fever > 38°C"),
    bp("Elevated ESR or CRP"),
    bp("Prolonged PR interval on ECG"),
    bp("Arthralgia (only if arthritis NOT used as major criterion)"),
])
story.append(br())
story.append(subh("Evidence of Preceding Strep Infection (MANDATORY)"))
story.extend([
    bp("Positive throat culture or rapid strep antigen test"),
    bp("Elevated or rising ASO (antistreptolysin O) titre"),
    bp("Recent scarlet fever"),
])
story.append(br())
story.append(red_box("Diagnosis = 2 Major  OR  1 Major + 2 Minor  + evidence of preceding strep infection"))
story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# SECTION 2 — RESPIRATORY
# ════════════════════════════════════════════════════════════════════════════

story.append(chapter_banner("SECTION 2: RESPIRATORY",
    "TB · COPD · Pleural Effusion · Consolidation vs Collapse · Pneumothorax"))
story.append(br())

# ── 2.1 TUBERCULOSIS ──────────────────────────────────────────────────────
story.append(head("2.1  Pulmonary Tuberculosis  ⭐⭐⭐"))
story.append(subh("Symptoms (Classic)"))
story.extend([
    bp(b("Constitutional:") + " Fever (evening rise), night sweats, weight loss, anorexia, malaise"),
    bp(b("Respiratory:") + " Cough >2 weeks (initially dry, later productive), hemoptysis, chest pain, breathlessness (if effusion/pneumothorax)"),
])
story.append(subh("Clinical Signs"))
story.extend([
    bp("Right upper zone: dullness (consolidation/fibrosis), bronchial breathing, crackles, TVF increased"),
    bp("Post-primary TB predominantly involves upper lobes (higher O2 tension favours Mycobacterium growth)"),
])
story.append(subh("Investigations"))
story.extend([
    bp(b("Sputum CBNAAT (Xpert MTB/RIF):") + " Most important first test - detects TB + rifampicin resistance in <2 hours"),
    bp(b("CXR:") + " Upper lobe consolidation, cavitation, fibrosis, bilateral disease; Ghon complex in primary TB"),
    bp(b("Sputum AFB (ZN stain):") + " 3 consecutive early morning samples"),
    bp(b("IGRA (Quantiferon Gold):") + " Latent TB detection"),
    bp(b("Culture (LJ medium):") + " 4-8 weeks; gold standard for sensitivity testing"),
])
story.append(subh("NTEP Treatment Regimen (ATT)"))
story.append(simple_table(
    ["Category", "Regimen", "Duration"],
    [
        ["New PTB/EPTB", "2HRZE + 4HR (daily)", "6 months"],
        ["Severe EPTB (TB meningitis, spinal TB)", "2HRZE + 10HR", "12 months"],
        ["MDR-TB", "Bedaquiline + Linezolid + Cycloserine + Clofazimine + Levofloxacin", "18-24 months"],
    ], [4*cm, 9*cm, 4*cm]))
story.append(br())
story.append(hline())

# ── 2.2 COPD ─────────────────────────────────────────────────────────────
story.append(head("2.2  Chronic Obstructive Pulmonary Disease (COPD)  ⭐⭐"))
story.append(subh("Types: Pink Puffer vs Blue Bloater"))
pp = ["Type A (emphysema predominant)", "Thin, cachectic, pursed lip breathing", "Barrel chest, no cyanosis", "Normal PaO2, low PaCO2 (hyperventilating)", "No cor pulmonale early", "Hyperresonant percussion"]
bb = ["Type B (chronic bronchitis predominant)", "Obese, cyanotic ('blue')", "Productive cough, peripheral edema", "Low PaO2, high PaCO2 (hypoventilating)", "Early cor pulmonale, polycythemia", "Normal percussion"]
story.append(two_col_table(pp, bb, "Pink Puffer (Emphysema)", "Blue Bloater (Chronic Bronchitis)"))
story.append(br())
story.append(subh("Spirometry & GOLD Classification"))
story.extend([
    bp(b("Obstruction:") + " FEV1/FVC < 0.70 (post-bronchodilator) - obstructive pattern"),
    bp(b("GOLD 1:") + " FEV1 ≥ 80% predicted (mild)"),
    bp(b("GOLD 2:") + " FEV1 50-79% (moderate)"),
    bp(b("GOLD 3:") + " FEV1 30-49% (severe)"),
    bp(b("GOLD 4:") + " FEV1 < 30% (very severe)"),
])
story.append(subh("Management"))
story.extend([
    bp(b("Smoking cessation:") + " Single most important intervention"),
    bp(b("Bronchodilators:") + " SABA (salbutamol) PRN → LABA (formoterol) + LAMA (tiotropium)"),
    bp(b("ICS:") + " Add if frequent exacerbations or eosinophil count >300"),
    bp(b("Long-term O2 (LTOT):") + " PaO2 <55 mmHg or <60 mmHg with polycythemia/cor pulmonale; ≥15 hrs/day"),
    bp(b("Acute exacerbation:") + " Controlled O2 (target SpO2 88-92%), nebulised SABA+SAMA, systemic steroids (prednisolone 40mg x 5 days), antibiotics if purulent sputum (amoxicillin/doxycycline), NIV if type 2 respiratory failure"),
])
story.append(br())
story.append(hline())

# ── 2.3 PLEURAL EFFUSION ──────────────────────────────────────────────────
story.append(head("2.3  Pleural Effusion - Clinical Examination  ⭐⭐⭐"))
story.append(subh("Right-sided Pleural Effusion - Examination Findings"))
story.extend([
    bp(b("Inspection:") + " Reduced chest expansion right side, fullness of intercostal spaces"),
    bp(b("Trachea:") + " Central (small-moderate) or shifted LEFT (massive - pushed away by fluid)"),
    bp(b("Palpation:") + " Reduced/absent TVF on right; reduced expansion"),
    bp(b("Percussion:") + " Stony dull (absolute dullness - unlike consolidation which is just dull)"),
    bp(b("Auscultation:") + " Absent breath sounds over effusion"),
    sbp("Upper border: Bronchial breathing (Skodaic resonance) + Aegophony ('E' → 'A' change)"),
    sbp("Grocco's triangle: area of dullness on opposite side near spine"),
])
story.append(br())
story.append(subh("Exudate vs Transudate (Light's Criteria)"))
story.append(info_box(
    b("Exudate if ANY ONE of: ") +
    "Pleural fluid protein/serum protein >0.5  |  "
    "Pleural fluid LDH/serum LDH >0.6  |  "
    "Pleural fluid LDH > 2/3 upper limit of normal serum LDH", LIGHT_GOLD, GOLD))
story.append(br())
exudate = ["Pneumonia (parapneumonic)", "TB pleural effusion", "Malignancy", "Pulmonary embolism", "Mesothelioma", "RA/SLE"]
transudate = ["Congestive cardiac failure (most common)", "Cirrhosis of liver", "Nephrotic syndrome", "Hypothyroidism", "Hypoalbuminemia"]
story.append(two_col_table(exudate + [""]*(len(transudate)-len(exudate)) if len(exudate)<len(transudate) else exudate,
    transudate + [""]*(len(exudate)-len(transudate)) if len(transudate)<len(exudate) else transudate,
    "Exudate", "Transudate"))
story.append(br())
story.append(hline())

# ── 2.4 CONSOLIDATION vs COLLAPSE ────────────────────────────────────────
story.append(head("2.4  Consolidation vs Collapse  ⭐⭐⭐"))
story.append(warn_box("Appeared as short essay in Paper 2 - comparing right upper lobe consolidation vs left upper lobe collapse."))
story.append(br())
c_headers = ["Feature", "Consolidation", "Collapse"]
c_rows = [
    ["Mechanism", "Air spaces filled with fluid/exudate (lung volume preserved)", "Loss of lung volume (airway obstruction or external compression)"],
    ["Mediastinum", "Central", "Shifted TOWARDS the lesion"],
    ["Trachea", "Central", "Pulled TOWARDS the lesion"],
    ["Expansion", "Reduced ipsilateral", "Reduced ipsilateral"],
    ["TVF/VR", "Increased (fluid conducts sound)", "Decreased (no air to transmit)"],
    ["Percussion", "Dull", "Dull"],
    ["Breath sounds", "Bronchial breathing", "Diminished/absent"],
    ["Added sounds", "Fine crackles", "Absent"],
    ["CXR", "Homogeneous opacity, air bronchogram", "Lobar opacity, mediastinal shift, elevated diaphragm"],
]
story.append(simple_table(c_headers, c_rows, [4*cm, 6.5*cm, 6.5*cm]))
story.append(br())
story.append(hline())

# ── 2.5 PNEUMOTHORAX ─────────────────────────────────────────────────────
story.append(head("2.5  Pneumothorax  ⭐⭐"))
story.extend([
    bp(b("Types:") + " Spontaneous primary (tall thin young male, no lung disease), Secondary (COPD, asthma, TB, Marfan's), Tension (emergency)"),
    bp(b("Symptoms:") + " Sudden unilateral pleuritic chest pain, breathlessness"),
    bp(b("Signs:") + " Reduced movement, hyperresonant percussion, absent breath sounds; trachea shifted AWAY from lesion (in tension)"),
    bp(b("Tension pneumothorax:") + " Also: hypotension, tachycardia, raised JVP, tracheal deviation - do NOT wait for CXR → immediate needle decompression 2nd ICS MCL"),
    bp(b("CXR:") + " Absent lung markings with visible visceral pleural edge; lung collapsed towards hilum"),
    bp(b("Management:") + " Observation if small (<2cm rim); aspiration if >2cm; intercostal drain; VATS for recurrent"),
])
story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# SECTION 3 — NEUROLOGY
# ════════════════════════════════════════════════════════════════════════════

story.append(chapter_banner("SECTION 3: NEUROLOGY",
    "UMN vs LMN · Stroke · Lateral Medullary · GBS · Aphasia · Meningitis"))
story.append(br())

# ── 3.1 UMN vs LMN ───────────────────────────────────────────────────────
story.append(head("3.1  UMN vs LMN Lesion  ⭐⭐⭐"))
story.append(warn_box("Appeared in Paper 2 as short essay (LMN weakness both limbs). Must know comparison table."))
story.append(br())
story.append(simple_table(
    ["Feature", "UMN Lesion", "LMN Lesion"],
    [
        ["Tone",          "Spastic (increased; clasp-knife rigidity)", "Flaccid (decreased)"],
        ["Power",         "Reduced", "Reduced"],
        ["Reflexes",      "Hyperreflexia (brisk, exaggerated)", "Hyporeflexia / areflexia"],
        ["Plantar",       "Extensor (Babinski positive)", "Flexor (normal)"],
        ["Clonus",        "Present", "Absent"],
        ["Wasting",       "Absent or minimal (disuse)", "Marked (denervation atrophy)"],
        ["Fasciculations","Absent", "Present"],
        ["Site of lesion","Cortex, internal capsule, brainstem, spinal cord (above anterior horn)", "Anterior horn cell, nerve root, peripheral nerve, NMJ, muscle"],
        ["Examples",      "Stroke, SOL, MS, spinal cord compression", "GBS, polio, peripheral neuropathy, motor neuron disease"],
    ],
    [4*cm, 6.5*cm, 6.5*cm]
))
story.append(br())
story.append(hline())

# ── 3.2 ISCHEMIC STROKE ───────────────────────────────────────────────────
story.append(head("3.2  Ischemic Stroke  ⭐⭐⭐"))
story.append(subh("Vascular Territory Syndromes"))
story.append(simple_table(
    ["Territory", "Clinical Features"],
    [
        ["MCA (most common)", "Contralateral hemiplegia (face + arm > leg), hemisensory loss, homonymous hemianopia; Dominant: aphasia (Broca's/Wernicke's); Non-dominant: neglect, aprosodia"],
        ["ACA", "Contralateral leg > arm weakness, urinary incontinence, frontal lobe signs (abulia, grasp reflex)"],
        ["PCA", "Contralateral homonymous hemianopia (with macular sparing), alexia without agraphia (dominant), prosopagnosia"],
        ["Vertebrobasilar", "Diplopia, dysphagia, dysarthria, ataxia, vertigo, crossed deficits (ipsilateral cranial nerve + contralateral limb)"],
        ["Lacunar", "Pure motor hemiplegia, pure sensory stroke, ataxic hemiparesis, clumsy hand-dysarthria syndrome"],
    ],
    [4*cm, 13*cm]))
story.append(br())
story.append(subh("Acute Management"))
story.extend([
    bp(b("CT head (non-contrast):") + " First investigation - exclude hemorrhage before thrombolysis"),
    bp(b("IV tPA (alteplase):") + " Within 4.5 hours of onset, BP <185/110, no contraindications"),
    bp(b("Mechanical thrombectomy:") + " Large vessel occlusion, within 6-24 hours (DAWN/DEFUSE criteria)"),
    bp(b("Aspirin 300mg:") + " If tPA not given; start within 48 hours"),
    bp(b("Target BP:") + " Allow permissive hypertension up to 220/120 in first 24 hrs (unless tPA given → <185/110)"),
])
story.append(subh("Secondary Prevention"))
story.extend([
    bp("Antiplatelet: aspirin + clopidogrel (dual) for 21 days, then single agent"),
    bp("Anticoagulation: if AF (cause of cardioembolic stroke)"),
    bp("Statin: high-intensity (atorvastatin 80mg) regardless of cholesterol level"),
    bp("BP control: start antihypertensives after acute phase (24-72 hrs)"),
])
story.append(br())
story.append(hline())

# ── 3.3 LATERAL MEDULLARY SYNDROME ───────────────────────────────────────
story.append(head("3.3  Lateral Medullary (Wallenberg) Syndrome  ⭐⭐⭐"))
story.append(warn_box("Appeared in BOTH model papers as short note. Very high repeat probability."))
story.append(br())
story.append(info_box(b("Artery: ") + "PICA (posterior inferior cerebellar artery) or vertebral artery occlusion → infarction of lateral medulla", GREY_BG, MID_BLUE))
story.append(br())
story.append(subh("IPSILATERAL (same side as lesion)"))
story.extend([
    bp("Facial pain and temperature loss (V nerve nucleus/tract)"),
    bp("Horner's syndrome: ptosis, miosis, anhidrosis (descending sympathetic tract)"),
    bp("Ataxia, dysdiadochokinesia (inferior cerebellar peduncle)"),
    bp("Dysphagia, dysphonia, hiccups (IX, X nerve nuclei)"),
    bp("Nystagmus, vertigo (vestibular nuclei)"),
])
story.append(subh("CONTRALATERAL (opposite side of lesion)"))
story.extend([
    bp("Limb and trunk pain and temperature loss (spinothalamic tract) - NOT touch/vibration"),
    bp("Note: Motor power is PRESERVED (corticospinal tract is NOT involved)"),
])
story.append(br())
story.append(key_box("Classic cross: Face ipsilateral + Body contralateral loss of pain/temperature. Touch/vibration preserved throughout."))
story.append(br())
story.append(hline())

# ── 3.4 GUILLAIN-BARRE SYNDROME ──────────────────────────────────────────
story.append(head("3.4  Guillain-Barre Syndrome (GBS)  ⭐⭐"))
story.extend([
    bp(b("Definition:") + " Acute inflammatory demyelinating polyradiculoneuropathy (AIDP) - immune-mediated peripheral nerve demyelination"),
    bp(b("Trigger:") + " Campylobacter jejuni (most common), CMV, EBV, Mycoplasma, COVID-19, vaccinations (rarely)"),
    bp(b("Clinical:") + " Ascending symmetrical LMN weakness starting from legs; areflexia; minimal sensory symptoms"),
    bp(b("Autonomic:") + " Arrhythmias, BP fluctuations, urinary retention, facial flushing"),
    bp(b("Respiratory:") + " Diaphragm involvement → respiratory failure (most dangerous complication)"),
    bp(b("CSF:") + " Albuminocytological dissociation - high protein with normal cell count (after 1 week)"),
    bp(b("NCS/EMG:") + " Reduced conduction velocity, conduction block (demyelination)"),
    bp(b("Treatment:") + " IV immunoglobulin (IVIG) 0.4 g/kg x 5 days  OR  plasmapheresis; steroids NOT effective in AIDP"),
    bp(b("Monitor:") + " Regular spirometry (FVC <20 mL/kg → elective intubation)"),
])
story.append(br())
story.append(hline())

# ── 3.5 APHASIA vs DYSARTHRIA ────────────────────────────────────────────
story.append(head("3.5  Aphasia vs Dysarthria  ⭐⭐"))
story.append(warn_box("Appeared as short note in Paper 2. Two-mark setter."))
story.append(br())
story.append(two_col_table(
    ["Language processing disorder", "Dominant (left) hemisphere lesion", "Cortical/subcortical structures (Broca's or Wernicke's area)",
     "Comprehension affected OR expression affected", "Writing and reading also impaired", "Examples: Stroke in MCA territory"],
    ["Motor speech articulation disorder", "Cranial nerve / cerebellar / motor cortex lesion", "Can be bilateral or cerebellar",
     "Language content intact; only pronunciation affected", "Writing and reading NORMAL", "Examples: Cerebellar stroke, bulbar palsy, MND"],
    "Aphasia", "Dysarthria"
))
story.append(br())
story.append(subh("Types of Aphasia"))
story.append(simple_table(
    ["Type", "Fluency", "Comprehension", "Repetition", "Lesion"],
    [
        ["Broca's (Expressive)", "Non-fluent", "Intact", "Impaired", "Inferior frontal gyrus (Broca's area - BA44/45)"],
        ["Wernicke's (Receptive)", "Fluent (but paraphasias)", "Impaired", "Impaired", "Superior temporal gyrus (Wernicke's area - BA22)"],
        ["Global", "Non-fluent", "Impaired", "Impaired", "Large MCA territory infarct"],
        ["Conduction", "Fluent", "Intact", "Impaired", "Arcuate fasciculus"],
    ],
    [3.5*cm, 3*cm, 3.5*cm, 3*cm, 4*cm]))
story.append(br())
story.append(hline())

# ── 3.6 MENINGITIS ───────────────────────────────────────────────────────
story.append(head("3.6  Meningitis - Clinical Features  ⭐⭐"))
story.extend([
    bp(b("Classic triad:") + " Fever + Neck stiffness + Photophobia (± headache, altered consciousness)"),
    bp(b("Kernig's sign:") + " Patient supine, hip flexed 90°, pain/resistance on extending knee"),
    bp(b("Brudzinski's sign:") + " Passive neck flexion causes involuntary knee and hip flexion"),
    bp(b("Jolt accentuation:") + " Horizontal head rotation worsens headache; sensitive screening sign"),
    bp(b("CSF analysis:") + " LP after excluding raised ICP (CT head first if papilledema/focal deficit)"),
])
story.append(br())
story.append(simple_table(
    ["Parameter", "Normal", "Bacterial", "Viral", "TB"],
    [
        ["Appearance",   "Clear",    "Turbid/purulent", "Clear/slightly turbid", "Fibrin web/turbid"],
        ["Cells",        "<5 lymphs", "PMNs (>1000/mm³)", "Lymphocytes (<500)", "Lymphocytes (100-500)"],
        ["Protein",      "15-45 mg/dL", "Very high >100", "Normal/mildly raised", "High (100-500)"],
        ["Glucose",      "60-70% blood", "Very low (<45)", "Normal", "Very low (<45)"],
        ["Gram stain",   "-",        "Often positive", "Negative", "AFB in 20%"],
    ],
    [3*cm, 3*cm, 3.5*cm, 3.5*cm, 4*cm]))
story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# SECTION 4 — GI / HEPATOLOGY
# ════════════════════════════════════════════════════════════════════════════

story.append(chapter_banner("SECTION 4: GI / HEPATOLOGY",
    "Chronic Liver Disease · Jaundice · Ascites · Hepatic Encephalopathy"))
story.append(br())

# ── 4.1 CHRONIC LIVER DISEASE ────────────────────────────────────────────
story.append(head("4.1  Chronic Liver Disease - Clinical Examination  ⭐⭐⭐"))
story.append(warn_box("Appeared in BOTH model papers. Exam favourite. Know head-to-toe signs."))
story.append(br())
story.append(subh("Head-to-Toe Clinical Signs"))
cld_signs = [
    ["Hands", "Leukonychia (white nails), clubbing, palmar erythema (thenar/hypothenar), Dupuytren's contracture, asterixis (flapping tremor)"],
    ["Arms/Chest", "Spider naevi (>5 on upper body = significant; arterial, fills from centre), gynecomastia, sparse axillary hair"],
    ["Face/Eyes", "Jaundice (scleral icterus), parotid enlargement (alcoholic), fetor hepaticus, xanthelasma"],
    ["Abdomen", "Caput medusae (dilated periumbilical veins - portal HTN), splenomegaly, hepatomegaly (or small hard liver in cirrhosis), ascites (shifting dullness, fluid thrill)"],
    ["Genitalia", "Testicular atrophy (in males), gynaecomastia"],
    ["Legs", "Pedal edema (hypoalbuminemia + portal HTN), bruising (coagulopathy)"],
    ["Neurological", "Hepatic encephalopathy (grades 1-4), asterixis"],
]
story.append(simple_table(["Region", "Signs"], cld_signs, [4*cm, 13*cm]))
story.append(br())
story.append(subh("Child-Pugh Score"))
story.append(simple_table(
    ["Parameter", "1 point", "2 points", "3 points"],
    [
        ["Serum Bilirubin (mg/dL)", "<2", "2-3", ">3"],
        ["Serum Albumin (g/dL)", ">3.5", "2.8-3.5", "<2.8"],
        ["PT prolongation (secs)", "<4", "4-6", ">6"],
        ["Ascites", "None", "Mild (controlled)", "Moderate-severe"],
        ["Encephalopathy", "None", "Grade 1-2", "Grade 3-4"],
    ],
    [5*cm, 4*cm, 4*cm, 4*cm]))
story.append(info_box("Class A: 5-6 points (good prognosis)  |  Class B: 7-9 points  |  Class C: 10-15 points (poor prognosis)", LIGHT_GOLD, GOLD))
story.append(br())
story.append(hline())

# ── 4.2 JAUNDICE ─────────────────────────────────────────────────────────
story.append(head("4.2  Jaundice - Evaluation  ⭐⭐⭐"))
story.append(warn_box("Appeared in Paper 2 as short answer. Frequently tested."))
story.append(br())
story.append(simple_table(
    ["Parameter", "Pre-hepatic (Hemolytic)", "Hepatic (Hepatocellular)", "Post-hepatic (Obstructive)"],
    [
        ["Mechanism", "Excess bilirubin production", "Impaired conjugation/excretion", "Obstruction of bile flow"],
        ["Bilirubin type", "Unconjugated (indirect)", "Both (mixed)", "Conjugated (direct)"],
        ["Urine color", "Normal (urobilinogen only)", "Dark (bilirubin + urobilinogen)", "Dark (bilirubin; no urobilinogen)"],
        ["Stool color", "Normal/dark (urobilinogen)", "Pale (reduced)", "Pale/clay-colored"],
        ["Urine bilirubin", "Absent (indirect insoluble)", "Present", "Present"],
        ["Urine urobilinogen", "Increased", "Increased", "Absent"],
        ["LFT", "Normal AST/ALT", "High AST/ALT", "High ALP/GGT"],
        ["Spleen", "Enlarged", "Enlarged (portal HTN)", "Not enlarged"],
        ["Examples", "Malaria, G6PD, thalassemia, sickle cell", "Viral hepatitis, alcoholic hepatitis, drugs", "Gallstones, carcinoma head of pancreas, cholangiocarcinoma"],
    ],
    [4*cm, 4.3*cm, 4.3*cm, 4.4*cm]))
story.append(br())
story.append(hline())

# ── 4.3 ASCITES & SAAG ───────────────────────────────────────────────────
story.append(head("4.3  Ascites & SAAG  ⭐⭐⭐"))
story.append(warn_box("SAAG appeared directly in Paper 1 as short answer."))
story.append(br())
story.append(info_box(
    b("SAAG = Serum Albumin - Ascitic Fluid Albumin") +
    "<br/>SAAG ≥ 1.1 g/dL = Portal Hypertension (97% accuracy)<br/>"
    "SAAG < 1.1 g/dL = Non-portal hypertension cause", LIGHT_GREEN, GREEN))
story.append(br())
story.append(two_col_table(
    ["Cirrhosis (most common)", "CCF (cardiac ascites)", "Budd-Chiari syndrome", "Portal vein thrombosis", "Alcoholic hepatitis"],
    ["Peritoneal TB", "Peritoneal malignancy", "Pancreatitis", "Nephrotic syndrome", "Hypothyroidism"],
    "SAAG ≥ 1.1 (Portal HTN)", "SAAG < 1.1 (Non-portal)"
))
story.append(br())
story.append(subh("Clinical Examination for Ascites"))
story.extend([
    bp(b("Inspection:") + " Fullness of flanks, everted umbilicus, caput medusae, scrotal edema"),
    bp(b("Percussion:") + " Shifting dullness (detects >500 mL) - dull flanks, central resonant"),
    bp(b("Fluid thrill:") + " Large ascites (detects >1000 mL) - one hand on flank, assistant presses midline, tap other flank"),
])
story.append(br())
story.append(hline())

# ── 4.4 HEPATIC ENCEPHALOPATHY ───────────────────────────────────────────
story.append(head("4.4  Hepatic Encephalopathy  ⭐⭐"))
story.append(subh("Grading (West Haven Criteria)"))
story.append(simple_table(
    ["Grade", "Clinical Features"],
    [
        ["Grade 1", "Mild confusion, sleep disturbance, altered mood, impaired calculation"],
        ["Grade 2", "Drowsiness, asterixis (flapping tremor), inappropriate behaviour, disorientation"],
        ["Grade 3", "Somnolent but arousable, marked confusion, asterixis, rigidity"],
        ["Grade 4", "Coma (unresponsive), decorticate/decerebrate posturing"],
    ],
    [3*cm, 14*cm]))
story.append(br())
story.append(subh("Precipitating Factors - Mnemonic: ABCDEFG"))
story.extend([
    bp(b("A") + " - Azotemia (GI bleed, constipation)"),
    bp(b("B") + " - Benzodiazepines / sedatives"),
    bp(b("C") + " - Constipation"),
    bp(b("D") + " - Dietary protein excess"),
    bp(b("E") + " - Electrolyte imbalance (hypokalemia, hyponatremia)"),
    bp(b("F") + " - Fluid/Furosemide overuse (alkalosis)"),
    bp(b("G") + " - GI hemorrhage / infection / TIPS"),
])
story.append(br())
story.append(subh("Management"))
story.extend([
    bp("Identify and treat precipitating cause"),
    bp(b("Lactulose:") + " 30-60 mL 2-3 times daily; target 2-3 soft stools/day; traps ammonia as NH4+ in colon"),
    bp(b("Rifaximin:") + " 550 mg BD; non-absorbable antibiotic; reduces ammonia-producing gut bacteria"),
    bp(b("Dietary:") + " Adequate protein (do NOT restrict severely); branch chain amino acids if needed"),
    bp(b("Zinc supplementation:") + " Cofactor of urea cycle enzymes"),
])
story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# SECTION 5 — ENDOCRINE & RENAL
# ════════════════════════════════════════════════════════════════════════════

story.append(chapter_banner("SECTION 5: ENDOCRINE & RENAL",
    "Hypothyroidism · Diabetic Nephropathy · Nephrotic vs Nephritic · Hypertensive Emergency"))
story.append(br())

# ── 5.1 HYPOTHYROIDISM ────────────────────────────────────────────────────
story.append(head("5.1  Hypothyroidism  ⭐⭐⭐"))
story.append(subh("Clinical Features (System-wise)"))
hypo_features = [
    ["General", "Fatigue, weight gain (despite poor appetite), cold intolerance, dry coarse skin, non-pitting edema (myxedema - due to glycosaminoglycan accumulation)"],
    ["Face", "Puffy face, periorbital edema, coarse facial features, loss of outer 1/3 eyebrow (Hertoghe's sign), macroglossia"],
    ["CVS", "Bradycardia, low BP, pericardial effusion, muffled heart sounds"],
    ["Respiratory", "Pleural effusion, obstructive sleep apnea"],
    ["GI", "Constipation, ileus, ascites (rare)"],
    ["Neurological", "Slow relaxing reflexes (hung-up reflexes - pathognomonic!), carpal tunnel syndrome, cerebellar ataxia, psychosis (myxedema madness), coma"],
    ["Reproductive", "Menorrhagia (early), oligomenorrhea (late), infertility, galactorrhea (if hyperprolactinemia)"],
    ["Hematological", "Macrocytic or normocytic anemia"],
]
story.append(simple_table(["System", "Features"], hypo_features, [3*cm, 14*cm]))
story.append(br())
story.append(subh("Investigations & Management"))
story.extend([
    bp(b("TSH:") + " First line test; elevated in primary hypothyroidism (most common)"),
    bp(b("Free T4:") + " Low in overt hypothyroidism"),
    bp(b("TPO antibodies:") + " Elevated in Hashimoto's thyroiditis (autoimmune - most common cause)"),
    bp(b("Treatment:") + " Levothyroxine (T4) - start 25-50 mcg/day, increase by 25 mcg every 4-6 weeks; monitor TSH 6-8 weeks after each dose change; target TSH 0.5-2.5 mU/L"),
    bp(b("Myxedema coma:") + " IV T3 + IV hydrocortisone (may have coexisting adrenal insufficiency)"),
])
story.append(br())
story.append(hline())

# ── 5.2 DIABETIC NEPHROPATHY ─────────────────────────────────────────────
story.append(head("5.2  Diabetic Nephropathy  ⭐⭐"))
story.append(subh("Stages (Mogensen's Classification)"))
story.append(simple_table(
    ["Stage", "Description", "Urine Albumin", "GFR"],
    [
        ["Stage 1", "Hyperfiltration", "Normal", "Increased"],
        ["Stage 2", "Silent (normal urine)", "Normal", "Normal"],
        ["Stage 3", "Incipient DN (microalbuminuria)", "30-300 mg/day (ACR 30-300 mg/g)", "Normal/slightly reduced"],
        ["Stage 4", "Overt DN (macroalbuminuria)", ">300 mg/day", "Declining"],
        ["Stage 5", "ESRD", "Nephrotic range / declining", "<15 mL/min"],
    ],
    [2.5*cm, 5*cm, 5*cm, 4.5*cm]))
story.append(br())
story.append(subh("Management"))
story.extend([
    bp(b("Glycemic control:") + " HbA1c < 7% (individualize in elderly)"),
    bp(b("BP control:") + " Target <130/80 mmHg"),
    bp(b("ACE inhibitor/ARB:") + " First choice even without hypertension (reduce proteinuria, slow progression)"),
    bp(b("SGLT2 inhibitors:") + " Empagliflozin, dapagliflozin - reduce renal progression + CV mortality (now first-line with ACEi/ARB)"),
    bp(b("GLP-1 receptor agonists:") + " Semaglutide - additional renoprotection"),
    bp(b("Diet:") + " Protein restriction 0.8 g/kg/day"),
    bp(b("Renal replacement therapy:") + " Dialysis or transplant when eGFR <15"),
])
story.append(br())
story.append(hline())

# ── 5.3 NEPHROTIC vs NEPHRITIC ────────────────────────────────────────────
story.append(head("5.3  Nephrotic vs Nephritic Syndrome  ⭐⭐⭐"))
story.append(two_col_table(
    ["Proteinuria > 3.5 g/day", "Hypoalbuminemia < 3 g/dL", "Generalized edema (periorbital, ascites, pleural effusion)", "Hyperlipidemia + Lipiduria (fatty casts)", "BP usually normal initially",
     "Causes: MCD (children), FSGS (adults), membranous nephropathy (adults), diabetic nephropathy"],
    ["Hematuria (RBC casts - pathognomonic)", "Mild proteinuria (<3.5 g/day)", "Oliguria, hypertension, edema", "Azotemia (raised creatinine, urea)", "Hypertension prominent",
     "Causes: Post-strep GN (most common in children), IgA nephropathy, lupus nephritis, anti-GBM disease"],
    "Nephrotic Syndrome", "Nephritic Syndrome"
))
story.append(br())
story.append(key_box("Nephrotic = Protein loss. Nephritic = Blood (hematuria) + HTN. RBC casts = nephritic (GN)."))
story.append(br())
story.append(hline())

# ── 5.4 HYPERTENSIVE EMERGENCY ────────────────────────────────────────────
story.append(head("5.4  Hypertensive Emergency vs Urgency  ⭐⭐"))
story.append(two_col_table(
    ["BP >180/120 mmHg WITH end-organ damage", "Hypertensive encephalopathy", "Acute aortic dissection", "Acute pulmonary edema", "ACS (NSTEMI/unstable angina)", "Eclampsia / HELLP", "Acute kidney injury"],
    ["BP >180/120 mmHg WITHOUT end-organ damage", "Headache, anxiety only", "No neurological deficit", "No chest pain or pulmonary edema", "Stable patient", "Not pregnant / no complications", "Normal renal function"],
    "Hypertensive Emergency", "Hypertensive Urgency"
))
story.append(br())
story.append(subh("Management of Emergency"))
story.extend([
    bp(b("Rule:") + " Reduce MAP by no more than 25% in the first hour; then gradually to 160/100 over next 2-6 hrs"),
    bp(b("Exception:") + " Aortic dissection → reduce SBP to <120 mmHg within 20 minutes"),
    bp(b("Agents:") + " IV Labetalol (drug of choice, except asthma), IV Nicardipine, IV Sodium nitroprusside (most potent), IV Hydralazine (in eclampsia), IV GTN (if ACS/pulmonary edema)"),
    bp(b("Keith-Wagener-Barker Fundoscopic Grading:") + " Grade 1: Silver wiring | Grade 2: AV nipping | Grade 3: Flame hemorrhages + cotton wool spots | Grade 4: Papilledema"),
])
story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# SECTION 6 — CLINICAL SIGNS (SHORT ANSWERS)
# ════════════════════════════════════════════════════════════════════════════

story.append(chapter_banner("SECTION 6: CLINICAL SIGNS",
    "Short Answer Favourites - 2 Marks Each"))
story.append(br())

signs_data = [
    ("JVP - Normal Waveform",
     ["Waves: 'a' wave (atrial contraction), 'c' wave (tricuspid valve closure - often absent), 'x' descent (atrial relaxation + downward TV displacement), 'v' wave (venous filling while TV closed), 'y' descent (TV opens, blood drains into RV)",
      "Normal JVP: 1-8 cm above sternal angle; measured at 45° position",
      "Absent 'a' wave = Atrial fibrillation",
      "Giant 'a' wave = Tricuspid stenosis, pulmonary stenosis, pulmonary HTN",
      "Giant 'v' wave = Tricuspid regurgitation",
      "Kussmaul's sign: JVP rises on inspiration (constrictive pericarditis, RV infarction)"]),
    ("Third Heart Sound (S3)",
     ["Timing: Early diastole (after S2), low-pitched",
      "Best heard: Apex with bell, left lateral decubitus position",
      "Mechanism: Rapid ventricular filling causing vibration of ventricular walls",
      "Pathological S3: Heart failure (most important), MR, VSD, volume overload",
      "Physiological S3: Normal in children, young adults, pregnancy",
      "Together with S1 and S2: 'Kentucky' gallop rhythm"]),
    ("SAAG",
     ["SAAG = Serum Albumin minus Ascitic fluid Albumin",
      "SAAG ≥ 1.1: Portal hypertension (cirrhosis, CCF, Budd-Chiari, portal vein thrombosis)",
      "SAAG < 1.1: Non-portal hypertension (TB peritonitis, peritoneal malignancy, pancreatitis, nephrotic syndrome)",
      "Accuracy 97% in distinguishing cause of ascites"]),
    ("Babinski Sign / Plantar Response",
     ["Method: Stroke the lateral aspect of the sole from heel to ball of foot with an orange stick",
      "Normal (flexor): Plantar flexion of hallux + fanning of toes",
      "Abnormal (extensor/Babinski positive): Dorsiflexion of hallux + fanning of toes",
      "Significance: Positive Babinski = UMN lesion (pyramidal tract damage)",
      "Normal in infants up to 18 months (corticospinal tracts not yet myelinated)",
      "Other extensor plantar signs: Oppenheim, Gordon, Chaddock, Schaefer"]),
    ("Flapping Tremor (Asterixis)",
     ["Mechanism: NOT a true tremor; inability to maintain a sustained posture due to brief lapses in muscle contraction",
      "How to elicit: Wrists extended, fingers spread, arms outstretched → irregular flapping movements",
      "Causes: Hepatic encephalopathy (classic), CO2 narcosis (COPD type 2 failure), uremia, drug toxicity",
      "Bilateral = metabolic encephalopathy; Unilateral = contralateral thalamic lesion"]),
    ("Clubbing - Grading",
     ["Grade 1: Fluctuation/sponginess of nail bed (Schamroth sign - obliteration of diamond window)",
      "Grade 2: Loss/obliteration of nail fold angle (> 180°)",
      "Grade 3: Drumstick/parrot-beak appearance of fingertips",
      "Grade 4: Hypertrophic pulmonary osteoarthropathy (HPOA) - periosteal new bone formation",
      "Causes: Respiratory (lung carcinoma, bronchiectasis, lung abscess, ILD, TB, cystic fibrosis), Cardiac (cyanotic CHD, SBE), GI (IBD, cirrhosis, celiac disease)"]),
    ("Pulsus Paradoxus",
     ["Definition: Exaggerated fall in systolic BP >10 mmHg during inspiration",
      "Mechanism: On inspiration, negative intrathoracic pressure → increased RV filling → septum bows into LV → reduced LV output",
      "Causes: Cardiac tamponade (most important), severe asthma, COPD, tension pneumothorax, constrictive pericarditis (occasionally)",
      "Measurement: Inflate BP cuff above systolic, slowly deflate - first Korotkoff sounds heard only in expiration; continue deflating until heard throughout - difference = paradox"]),
    ("Osler's Nodes vs Janeway Lesions",
     ["Osler's Nodes: PAINFUL, raised, tender nodules on finger pads and toes; immune-complex mediated; transient (last days)",
      "Janeway Lesions: PAINLESS, flat, erythematous macules on palms and soles; septic emboli; persistent",
      "Both: Features of Infective Endocarditis (minor Duke criteria)",
      "Memory: Osler = Ouch (painful); Janeway = Just passing through (embolic, painless)"]),
    ("Glasgow Coma Scale (GCS)",
     ["Eyes: Spontaneous (4), To voice (3), To pain (2), None (1)",
      "Verbal: Oriented (5), Confused (4), Inappropriate words (3), Sounds (2), None (1)",
      "Motor: Obeys commands (6), Localizes (5), Withdraws (4), Flexion/decorticate (3), Extension/decerebrate (2), None (1)",
      "Maximum = 15; Minimum = 3",
      "GCS ≤ 8 = severe TBI, consider intubation",
      "GCS 9-12 = moderate; GCS 13-15 = mild TBI"]),
    ("Kernig's and Brudzinski's Signs",
     ["Kernig's: Patient supine, hip and knee flexed to 90°; attempt to extend the knee → pain and resistance = positive; (due to meningeal irritation of L3/L4 nerve roots)",
      "Brudzinski's neck sign: Passive flexion of neck → involuntary flexion of hips and knees",
      "Brudzinski's leg sign: Flexion of one hip → contralateral hip involuntarily flexes",
      "Significance: Meningitis (bacterial/viral/TB), subarachnoid hemorrhage",
      "Specificity > sensitivity - negative signs do NOT rule out meningitis"]),
    ("Cheyne-Stokes Respiration",
     ["Pattern: Cyclical waxing-waning depth of breathing with periods of apnea",
      "Mechanism: Hypersensitivity of respiratory centre to CO2; apnea → CO2 rises → hyperventilation → CO2 falls → apnea",
      "Causes: Severe CCF (most common), bilateral cerebral hemispheric disease, stroke, uremia, narcotic overdose, high altitude (Cheyne-Stokes of altitude is normal)",
      "Significance in CCF: Prolonged circulation time → delayed CO2 feedback to respiratory centre"]),
    ("Trousseau's and Chvostek's Signs",
     ["Trousseau's: Inflate BP cuff above systolic pressure for 3 minutes → carpal spasm (main d'accoucheur) = positive",
      "Chvostek's: Tap facial nerve just anterior to ear → ipsilateral facial muscle twitch = positive",
      "Both indicate: Hypocalcemia (latent tetany)",
      "Causes of hypocalcemia: Hypoparathyroidism (post-thyroidectomy most common), pseudohypoparathyroidism, vitamin D deficiency, acute pancreatitis, renal failure",
      "Trousseau's more specific; Chvostek's can be positive in 10-25% of normal individuals"]),
    ("Cyanosis - Central vs Peripheral",
     ["Central cyanosis: Bluish discolouration of lips, tongue, oral mucosa; SaO2 < 85%; WARM periphery",
      "Causes of central: Cardiac (R→L shunt - TOF, Eisenmenger), Respiratory (COPD, severe pneumonia, ARDS), High altitude, Methaemoglobinaemia",
      "Peripheral cyanosis: Bluish fingers/toes only; tongue pink; COLD periphery; normal SaO2",
      "Causes of peripheral: Cold exposure, shock, CCF (low CO), Raynaud's phenomenon, DVT",
      "Differential cyanosis: Lower limbs cyanosed, upper normal = PDA with reversal (Eisenmenger via PDA)"]),
    ("Virchow's Triad",
     ["Three components predisposing to venous thrombosis (DVT/PE):",
      "1. Stasis - immobility, CCF, prolonged travel, obesity",
      "2. Hypercoagulability - malignancy, factor V Leiden, protein C/S deficiency, antiphospholipid syndrome, OCP, pregnancy",
      "3. Endothelial injury - trauma, surgery, vasculitis, central venous catheters",
      "Clinical relevance: DVT → PE; Prophylaxis with LMWH in at-risk surgical/medical patients"]),
]

for sign_title, points in signs_data:
    content = [Paragraph(b(sign_title), section_head)]
    for pt in points:
        content.append(bp(pt))
    content.append(br())
    content.append(hline())
    story.extend(content)

story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════════
# FINAL PAGE — EXAM STRATEGY
# ════════════════════════════════════════════════════════════════════════════

story.append(chapter_banner("EXAM STRATEGY & QUICK REVISION", "Last-minute tips and priority topics"))
story.append(br())

story.append(head("Priority Matrix"))
story.append(simple_table(
    ["Priority", "Topic", "Format", "Marks"],
    [
        ["⭐⭐⭐ MUST",  "Mitral Stenosis / Aortic Regurgitation",     "Essay",       "10"],
        ["⭐⭐⭐ MUST",  "Chronic Liver Disease - clinical signs",       "Short Essay",  "6"],
        ["⭐⭐⭐ MUST",  "Rheumatic Fever - Jones Criteria",            "Short Essay",  "6"],
        ["⭐⭐⭐ MUST",  "Cor Pulmonale",                               "Short Essay",  "6"],
        ["⭐⭐⭐ MUST",  "Consolidation vs Collapse",                    "Short Essay",  "6"],
        ["⭐⭐⭐ MUST",  "UMN vs LMN comparison",                       "Short Essay",  "6"],
        ["⭐⭐⭐ MUST",  "Ischemic stroke management",                  "Short Essay",  "6"],
        ["⭐⭐⭐ MUST",  "JVP waveform (draw and label)",               "Short Answer", "2"],
        ["⭐⭐⭐ MUST",  "SAAG interpretation",                         "Short Answer", "2"],
        ["⭐⭐⭐ MUST",  "Lateral Medullary Syndrome",                  "Short Answer", "2"],
        ["⭐⭐   HIGH",  "CCF - left vs right features",                "Short Essay",  "6"],
        ["⭐⭐   HIGH",  "Infective Endocarditis - Duke criteria",      "Short Essay",  "6"],
        ["⭐⭐   HIGH",  "COPD - management",                           "Short Essay",  "6"],
        ["⭐⭐   HIGH",  "GBS - clinical + CSF + treatment",            "Short Essay",  "6"],
        ["⭐⭐   HIGH",  "Babinski sign / plantar response",            "Short Answer", "2"],
        ["⭐⭐   HIGH",  "Aphasia vs dysarthria",                       "Short Answer", "2"],
        ["⭐⭐   HIGH",  "Flapping tremor / asterixis",                 "Short Answer", "2"],
        ["⭐⭐   HIGH",  "Jaundice - types comparison",                 "Short Answer", "2"],
    ],
    [2.5*cm, 7*cm, 3.5*cm, 2*cm]
))
story.append(br())

story.append(head("Essay Answer Framework"))
story.append(info_box(
    b("For ANY cardiac case vignette, answer subparts in this order:<br/>")
    + "a) Diagnosis: Name the condition + supporting evidence from vignette + 2-3 differentials<br/>"
    + "b) CVS exam: Inspection → Palpation → Auscultation (use named signs)<br/>"
    + "c) Investigations: ECG findings + CXR findings + Echo findings (be specific)<br/>"
    + "d) Complications/Worsening: Name the most common complication first (usually AF in MS)",
    LIGHT_BLUE, MID_BLUE
))
story.append(br())

story.append(head("Marks-Scoring Tips"))
story.extend([
    bp("Use named eponyms: examiners love named signs (Corrigan's, De Musset's, Duroziez's, etc.)"),
    bp("For short notes: Write in structured format - Definition / Causes / Clinical features / Investigations / Management"),
    bp("For comparison questions (consolidation vs collapse, UMN vs LMN): Use a table format"),
    bp("For Jones criteria, always mention: 2 major OR 1 major + 2 minor + STREP evidence"),
    bp("Draw JVP waveform clearly with labeled a, c, x, v, y components"),
    bp("SAAG formula: Write it out first, then interpret ≥1.1 and <1.1"),
    bp("In neurology cases: State which side is ipsilateral vs contralateral to lesion"),
])
story.append(br())
story.append(key_box("Good luck with your exam! Focus on Cardiology first (40% of exam), then Respiratory and Neurology."))

# ── BUILD ────────────────────────────────────────────────────────────────────

def add_page_number(canvas, doc):
    canvas.saveState()
    canvas.setFont("Helvetica", 8)
    canvas.setFillColor(colors.HexColor("#64748b"))
    canvas.drawString(2*cm, 1.2*cm, "General Medicine End Posting Study Guide  |  2023 Batch Phase 3 Part 1  |  Govt. Medical College, Manjeri")
    canvas.drawRightString(19*cm, 1.2*cm, f"Page {doc.page}")
    canvas.restoreState()

doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
print(f"PDF saved to: {OUTPUT}")
Running Command

cd /home/daytona/workspace/medicine-study-guide && python generate_pdf.py

Running Command

ls -lh /home/daytona/workspace/medicine-study-guide/Medicine_EndPosting_StudyGuide.pdf

Your study guide PDF is ready! Here's the download link:

Medicine EndPosting StudyGuide

PDF Document · PDF


Here's what's inside the 68KB, fully formatted study guide:
SectionTopics Covered
Section 1 - CardiologyMitral Stenosis, Aortic Regurgitation (all named eponyms), Aortic Stenosis, CCF (LHF vs RHF table), Infective Endocarditis (Duke criteria), Cor Pulmonale, Rheumatic Fever (Jones criteria)
Section 2 - RespiratoryPulmonary TB (NTEP regimen), COPD (Pink puffer vs Blue bloater), Pleural Effusion + Light's criteria, Consolidation vs Collapse comparison table, Pneumothorax
Section 3 - NeurologyUMN vs LMN table, Ischemic Stroke (vascular territories + management), Lateral Medullary Syndrome, GBS, Aphasia types table, Meningitis CSF table
Section 4 - GI/HepatologyCLD head-to-toe signs + Child-Pugh score, Jaundice 3-type comparison table, Ascites + SAAG, Hepatic Encephalopathy grading
Section 5 - Endocrine/RenalHypothyroidism, Diabetic Nephropathy stages, Nephrotic vs Nephritic, Hypertensive Emergency
Section 6 - Clinical Signs14 short-answer topics: JVP, S3, SAAG, Babinski, Flapping tremor, Clubbing, Pulsus paradoxus, Osler's vs Janeway, GCS, Kernig's & Brudzinski's, Cheyne-Stokes, Trousseau's & Chvostek's, Cyanosis types, Virchow's triad
Exam StrategyPriority matrix, essay answer framework, marks-scoring tips

Can you give pdf here

The PDF is already available for download via the link I provided. Click this link to download it directly:

Medicine EndPosting StudyGuide

PDF Document · PDF

If the link isn't working for you, let me know and I can try an alternative format or resend it!
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Can you make and compile answers for these questions along with probable questions than can be asked in end posting exams in kuhs

Hi I didn't get any update

Got error

Running Command

mkdir -p /home/daytona/workspace/kuhs-study-guide && echo "ready"

Did get the answer

Error

Have you prepared

Running Command

mkdir -p /home/daytona/workspace/kuhs-study-guide && python3 -c "from reportlab.lib.pagesizes import A4; print('reportlab ok')"

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