attachment
attachment

Make me a structured concise exam ready format answer of all the questions attached in the picture above, designed to be written in 15minutes each , covering all key scoring points for answering my MS General Surgery exam from Bailey and love textbook of general surgery.Give the ans in pdf form

Reading File
Finding Sources
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/surgery-exam && ls /home/daytona/workspace/surgery-exam

attachment
attachment

Make me a structured concise exam ready format answer of all the questions attached in the picture above, designed to be written in 15minutes each , covering all key scoring points for answering my MS General Surgery exam from Bailey and love textbook of general surgery.

Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Writing File

~/surgery-exam/generate_exam_pdf.py

#!/usr/bin/env python3
"""
MS General Surgery Exam - Structured Answers Q62-Q81
Bailey & Love 28th Edition | 15-minute exam format
"""

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_LEFT, TA_CENTER, TA_JUSTIFY

OUTPUT_PATH = "/home/daytona/workspace/surgery-exam/MS_Surgery_Exam_Q62_Q81.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a3a5c")
MED_BLUE    = colors.HexColor("#2563a8")
LIGHT_BLUE  = colors.HexColor("#dbeafe")
ACCENT_RED  = colors.HexColor("#c0392b")
GOLD        = colors.HexColor("#d4a017")
LIGHT_GREY  = colors.HexColor("#f5f5f5")
MID_GREY    = colors.HexColor("#888888")
BLACK       = colors.black

def build_styles():
    base = getSampleStyleSheet()

    styles = {
        "cover_title": ParagraphStyle("cover_title",
            fontSize=26, leading=32, textColor=DARK_BLUE,
            fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=8),
        "cover_sub": ParagraphStyle("cover_sub",
            fontSize=13, leading=18, textColor=MED_BLUE,
            fontName="Helvetica", alignment=TA_CENTER, spaceAfter=6),
        "cover_note": ParagraphStyle("cover_note",
            fontSize=10, leading=14, textColor=MID_GREY,
            fontName="Helvetica-Oblique", alignment=TA_CENTER),

        "q_header": ParagraphStyle("q_header",
            fontSize=13, leading=17, textColor=colors.white,
            fontName="Helvetica-Bold", leftIndent=8, rightIndent=8,
            spaceBefore=4, spaceAfter=4),

        "section_label": ParagraphStyle("section_label",
            fontSize=9, leading=12, textColor=MED_BLUE,
            fontName="Helvetica-Bold", spaceBefore=6, spaceAfter=2,
            leftIndent=2),

        "body": ParagraphStyle("body",
            fontSize=9.5, leading=13.5, textColor=BLACK,
            fontName="Helvetica", leftIndent=6, rightIndent=4,
            spaceAfter=2, alignment=TA_JUSTIFY),

        "bullet": ParagraphStyle("bullet",
            fontSize=9.5, leading=13, textColor=BLACK,
            fontName="Helvetica", leftIndent=16, firstLineIndent=-10,
            spaceAfter=1),

        "sub_bullet": ParagraphStyle("sub_bullet",
            fontSize=9, leading=12.5, textColor=colors.HexColor("#333333"),
            fontName="Helvetica", leftIndent=28, firstLineIndent=-10,
            spaceAfter=1),

        "key_point": ParagraphStyle("key_point",
            fontSize=9.5, leading=13, textColor=ACCENT_RED,
            fontName="Helvetica-Bold", leftIndent=6, spaceAfter=1),

        "mnemonic": ParagraphStyle("mnemonic",
            fontSize=10, leading=14, textColor=DARK_BLUE,
            fontName="Helvetica-Bold", leftIndent=10, spaceAfter=2),

        "footer_note": ParagraphStyle("footer_note",
            fontSize=8, leading=11, textColor=MID_GREY,
            fontName="Helvetica-Oblique", alignment=TA_CENTER),
    }
    return styles

S = build_styles()

def q_block(num, title, year_tag, content_builder):
    """Returns a KeepTogether block for one question."""
    elements = []

    # Header bar (dark blue background via Table)
    header_text = f"Q{num}. {title}   <font color='#d4a017' size='8'>{year_tag}</font>"
    header_para = Paragraph(header_text, S["q_header"])
    header_table = Table([[header_para]], colWidths=[17.5*cm])
    header_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
        ("TOPPADDING",    (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("RIGHTPADDING",  (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", (0,0), (-1,-1), [4,4,4,4]),
    ]))
    elements.append(header_table)

    # Content
    content_builder(elements)

    elements.append(HRFlowable(width="100%", thickness=0.5,
                               color=colors.HexColor("#c0c0c0"), spaceAfter=10))
    return KeepTogether(elements)

def sec(label):
    return Paragraph(f"▶ {label}", S["section_label"])

def b(text):
    return Paragraph(f"• {text}", S["bullet"])

def sb(text):
    return Paragraph(f"– {text}", S["sub_bullet"])

def bd(text):
    return Paragraph(text, S["body"])

def kp(text):
    return Paragraph(f"★ {text}", S["key_point"])

def mn(text):
    return Paragraph(text, S["mnemonic"])

def sp(h=4):
    return Spacer(1, h)

# ============================================================
# QUESTION DATA
# ============================================================

def build_questions(elements):

    # ── Q62 ─────────────────────────────────────────────────
    def q62(e):
        e.append(sec("DEFINITION"))
        e.append(bd("Post-operative ventilatory support = use of mechanical/assisted ventilation after surgery to maintain adequate oxygenation (PaO2 >8 kPa) and ventilation (PaCO2 4.7-6 kPa) until the patient can sustain independent respiration."))
        e.append(sp())
        e.append(sec("INDICATIONS (Mnemonic: SHARP)"))
        e.append(mn("S-H-A-R-P"))
        for x in ["S – Shock/sepsis, haemodynamic instability",
                  "H – Hypoxaemia (PaO2 <8 kPa on FiO2 >0.4), high FiO2 requirement",
                  "A – Altered consciousness (GCS <9), airway protection",
                  "R – Respiratory failure (RR >35 or <5/min, VT <5 mL/kg)",
                  "P – Prolonged major surgery (>4 h), massive blood transfusion"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MODES OF VENTILATION"))
        tdata = [
            [Paragraph("<b>Mode</b>", S["body"]), Paragraph("<b>Description</b>", S["body"]), Paragraph("<b>Use</b>", S["body"])],
            [Paragraph("CMV/IPPV", S["body"]), Paragraph("Controlled mandatory ventilation", S["body"]), Paragraph("Fully obtunded, post-GA", S["body"])],
            [Paragraph("SIMV", S["body"]), Paragraph("Synchronised intermittent mandatory ventilation", S["body"]), Paragraph("Weaning", S["body"])],
            [Paragraph("PSV", S["body"]), Paragraph("Pressure support ventilation", S["body"]), Paragraph("Weaning, conscious pts", S["body"])],
            [Paragraph("CPAP", S["body"]), Paragraph("Continuous positive airway pressure", S["body"]), Paragraph("Non-invasive, post-op atelectasis", S["body"])],
            [Paragraph("BiPAP", S["body"]), Paragraph("Bilevel positive airway pressure", S["body"]), Paragraph("Non-invasive, COPD/obesity", S["body"])],
        ]
        t = Table(tdata, colWidths=[3*cm, 6.5*cm, 5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("VENTILATOR SETTINGS (Lung-protective)"))
        for x in ["Tidal volume: 6-8 mL/kg ideal body weight",
                  "PEEP: 5-8 cmH2O (recruits atelectatic alveoli)",
                  "FiO2: lowest to maintain SpO2 >94%",
                  "Respiratory rate: 12-16/min",
                  "I:E ratio: 1:2 (prolong expiration in obstructive disease)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("WEANING CRITERIA (SMART)"))
        for x in ["Trigger: able to initiate spontaneous breaths",
                  "SpO2 >95% on FiO2 ≤0.4, PEEP ≤5",
                  "Haemodynamically stable, afebrile",
                  "Alert and co-operative, GCS recovering",
                  "Respiratory parameters: MIP > -25 cmH2O, RR <25, VT >5 mL/kg",
                  "Spontaneous Breathing Trial (SBT) x 30-120 min → if passes → extubate"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("COMPLICATIONS"))
        for x in ["VAP (Ventilator-Associated Pneumonia) - commonest",
                  "Barotrauma / volutrauma → pneumothorax",
                  "Oxygen toxicity (FiO2 >0.6 prolonged)",
                  "Haemodynamic compromise (↑intrathoracic pressure → ↓venous return)",
                  "Diaphragm atrophy, difficult weaning",
                  "Tracheal stenosis from prolonged intubation"]:
            e.append(b(x))
        e.append(kp("Key: Lung-protective ventilation (low VT 6 mL/kg) reduces ARDS mortality - ARDSNet trial"))

    elements.append(q_block(62, "Post-operative Ventilatory Support", "[2010]", q62))
    elements.append(PageBreak())

    # ── Q63 ─────────────────────────────────────────────────
    def q63(e):
        e.append(sec("TRIAGE IN DISASTER"))
        e.append(bd("Triage = process of sorting casualties to maximise benefit for greatest number. Goal: Greatest good for greatest number (utilitarian principle)."))
        e.append(sp())
        e.append(sec("START TRIAGE (Simple Triage and Rapid Treatment)"))
        e.append(bd("Initial 30-second assessment - used in field triage:"))
        tdata = [
            [Paragraph("<b>Category</b>",S["body"]), Paragraph("<b>Colour</b>",S["body"]), Paragraph("<b>Criteria</b>",S["body"]), Paragraph("<b>Action</b>",S["body"])],
            [Paragraph("Immediate",S["body"]), Paragraph("RED",S["body"]), Paragraph("Life-threatening but salvageable; RR >30, cap refill >2s, altered mentation",S["body"]), Paragraph("Treat first",S["body"])],
            [Paragraph("Delayed",S["body"]), Paragraph("YELLOW",S["body"]), Paragraph("Serious but can wait; RR <30, cap refill <2s, follows commands",S["body"]), Paragraph("Treat second",S["body"])],
            [Paragraph("Minor",S["body"]), Paragraph("GREEN",S["body"]), Paragraph("'Walking wounded'; ambulatory",S["body"]), Paragraph("Self-care/defer",S["body"])],
            [Paragraph("Expectant",S["body"]), Paragraph("BLACK",S["body"]), Paragraph("Not breathing after repositioning OR survivable only with resources unavailable",S["body"]), Paragraph("Comfort only",S["body"])],
        ]
        t = Table(tdata, colWidths=[2.5*cm, 2*cm, 8.5*cm, 2.8*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("SALT TRIAGE (Sort-Assess-Lifesaving-Treatment)"))
        e.append(bd("Used in mass casualty events (MCI) - modified for blast/CBRN:"))
        for x in ["Sort: global sorting - walk → wave → still",
                  "Assess: individual assessment for lifesaving interventions",
                  "Lifesaving interventions: haemorrhage control, airway opening, needle decompression, autoinjector antidote",
                  "Treatment/transport: assign category (Immediate/Delayed/Minimal/Expectant/Dead)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("PRINCIPLES OF POLYTRAUMA MANAGEMENT"))
        e.append(mn("Mnemonic: ABCDE (ATLS Primary Survey)"))
        for x in ["A – Airway + C-spine control",
                  "B – Breathing + ventilation",
                  "C – Circulation + haemorrhage control",
                  "D – Disability (neurological: GCS, pupils, motor)",
                  "E – Exposure + Environment (undress, prevent hypothermia)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("DAMAGE CONTROL RESUSCITATION (DCR)"))
        for x in ["Permissive hypotension: SBP 80-90 mmHg (blunt), 50-60 (TBI)",
                  "Haemostatic resuscitation: pRBC:FFP:Platelets = 1:1:1",
                  "TXA (Tranexamic acid): within 3 hours of injury - CRASH-2 trial",
                  "Limit crystalloids (<1.5 L) - avoid dilutional coagulopathy"]:
            e.append(b(x))
        e.append(kp("Key: In MCI, triage priority = RED > YELLOW > GREEN > BLACK"))

    elements.append(q_block(63, "Triage in Disaster & Principles of Polytrauma Patient (START, SALT)", "[2019]", q63))

    # ── Q64 ─────────────────────────────────────────────────
    def q64(e):
        e.append(sec("COAGULOPATHY OF TRAUMA - DEFINITION"))
        e.append(bd("Acute Traumatic Coagulopathy (ATC) / Trauma-Induced Coagulopathy (TIC): Systemic failure of haemostasis occurring within minutes of major trauma, present in ~25-35% of severely injured patients on arrival. Independent predictor of mortality (3-4x increase)."))
        e.append(sp())
        e.append(sec("LETHAL TRIAD / TRIAD OF DEATH"))
        tdata = [
            [Paragraph("<b>Component</b>",S["body"]), Paragraph("<b>Mechanism</b>",S["body"]), Paragraph("<b>Effect on coagulation</b>",S["body"])],
            [Paragraph("Hypothermia (<35°C)",S["body"]), Paragraph("↓Enzymatic activity of clotting factors; platelet dysfunction",S["body"]), Paragraph("Coagulopathy worsens",S["body"])],
            [Paragraph("Acidosis (pH <7.2)",S["body"]), Paragraph("↓Thrombin generation; fibrinogen degradation",S["body"]), Paragraph("All factors impaired",S["body"])],
            [Paragraph("Coagulopathy",S["body"]), Paragraph("Dilution, consumption, fibrinolysis",S["body"]), Paragraph("DIC-like picture",S["body"])],
        ]
        t = Table(tdata, colWidths=[4*cm, 7*cm, 5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#7b2226")),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("PATHOPHYSIOLOGY OF ATC"))
        for x in ["Tissue injury + shock → activates protein C → consumes factors V & VIII",
                  "Endothelial glycocalyx damage → thrombomodulin release → anticoagulation",
                  "Hyperfibrinolysis: tPA released → plasmin generated → clot lysis",
                  "Dilution: aggressive crystalloid resuscitation worsens coagulopathy",
                  "Platelet dysfunction + thrombocytopenia"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("DAMAGE CONTROL RESUSCITATION (DCR) - RATIONALE"))
        e.append(bd("Goal: Break the lethal triad. Applies to civilian trauma (IED blast, MVA, penetrating)."))
        for x in ["1. Permissive hypotension: Target SBP 80-90 mmHg until surgical haemostasis",
                  "2. Haemostatic resuscitation: pRBC:FFP:Platelets = 1:1:1 (massive transfusion protocol)",
                  "3. Tranexamic acid (TXA): 1g IV over 10 min then 1g over 8h - within 3h of injury",
                  "4. Avoid hypothermia: warm IV fluids, blankets, warm OR",
                  "5. Correct acidosis: restore perfusion, limit lactate",
                  "6. Fibrinogen: cryoprecipitate/fibrinogen concentrate if <1.5 g/L",
                  "7. Calcium: 10 mL 10% CaCl2 with each 4 units blood (chelation by citrate)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MONITORING COAGULOPATHY"))
        for x in ["Standard: PT/APTT/fibrinogen/platelet count/TEG",
                  "Viscoelastic: TEG (Thromboelastography) / ROTEM - guides component therapy",
                  "Fibrinogen threshold for FFP: PT >1.5x normal; APTT >1.5x normal"]:
            e.append(b(x))
        e.append(kp("Key: TXA within 3h reduces mortality by 15% (CRASH-2 Trial, Lancet 2010)"))

    elements.append(q_block(64, "Coagulopathy of Trauma & Damage Control Resuscitation in Civilian Trauma", "[2021]", q64))
    elements.append(PageBreak())

    # ── Q65 ─────────────────────────────────────────────────
    def q65(e):
        e.append(sec("INTRODUCTION"))
        e.append(bd("Head trauma = injury to scalp, skull, or brain from external force. Leading cause of trauma death (40%). Glasgow Coma Scale (GCS) = universally used neurological severity score (Teasdale & Jennett, 1974)."))
        e.append(sp())
        e.append(sec("GLASGOW COMA SCALE (GCS)"))
        tdata = [
            [Paragraph("<b>Domain</b>",S["body"]), Paragraph("<b>Response</b>",S["body"]), Paragraph("<b>Score</b>",S["body"])],
            [Paragraph("Eyes (E)",S["body"]), Paragraph("Spontaneous",S["body"]), Paragraph("4",S["body"])],
            [Paragraph("",S["body"]), Paragraph("To voice",S["body"]), Paragraph("3",S["body"])],
            [Paragraph("",S["body"]), Paragraph("To pain",S["body"]), Paragraph("2",S["body"])],
            [Paragraph("",S["body"]), Paragraph("None",S["body"]), Paragraph("1",S["body"])],
            [Paragraph("Verbal (V)",S["body"]), Paragraph("Oriented",S["body"]), Paragraph("5",S["body"])],
            [Paragraph("",S["body"]), Paragraph("Confused",S["body"]), Paragraph("4",S["body"])],
            [Paragraph("",S["body"]), Paragraph("Words only",S["body"]), Paragraph("3",S["body"])],
            [Paragraph("",S["body"]), Paragraph("Sounds only",S["body"]), Paragraph("2",S["body"])],
            [Paragraph("",S["body"]), Paragraph("None",S["body"]), Paragraph("1",S["body"])],
            [Paragraph("Motor (M)",S["body"]), Paragraph("Obeys commands",S["body"]), Paragraph("6",S["body"])],
            [Paragraph("",S["body"]), Paragraph("Localises pain",S["body"]), Paragraph("5",S["body"])],
            [Paragraph("",S["body"]), Paragraph("Withdrawal",S["body"]), Paragraph("4",S["body"])],
            [Paragraph("",S["body"]), Paragraph("Abnormal flexion (decorticate)",S["body"]), Paragraph("3",S["body"])],
            [Paragraph("",S["body"]), Paragraph("Extension (decerebrate)",S["body"]), Paragraph("2",S["body"])],
            [Paragraph("",S["body"]), Paragraph("None",S["body"]), Paragraph("1",S["body"])],
        ]
        t = Table(tdata, colWidths=[3.5*cm, 9*cm, 3*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 2.5),
            ("BOTTOMPADDING", (0,0), (-1,-1), 2.5),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("CLASSIFICATION BY GCS"))
        for x in ["Minor: GCS 15 (no LOC)",
                  "Mild: GCS 14-15 (with LOC)",
                  "Moderate: GCS 9-13",
                  "Severe: GCS 3-8"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("HEAD TRAUMA MANAGEMENT"))
        for x in ["Primary survey ATLS: A-B-C-D-E",
                  "C-spine immobilisation until cleared",
                  "CT brain: within 1h if GCS<13, focal deficit, suspected skull fracture, vomiting >1 episode",
                  "ICP monitoring: EVD/Camino bolt if GCS<8 + CT abnormality",
                  "Target: CPP 60-70 mmHg; ICP <20 mmHg; PaO2 >11 kPa; PaCO2 4.5-5 kPa"]:
            e.append(b(x))
        e.append(kp("Key exam fact: Motor score alone (M component) is the best predictor of outcome"))

    elements.append(q_block(65, "Head Trauma - Glasgow Coma Scale", "[2009]", q65))

    # ── Q66 ─────────────────────────────────────────────────
    def q66(e):
        e.append(sec("GCS IN ADULTS"))
        e.append(bd("Total score: 3-15. As above (E4V5M6 = 15 = normal). Severe TBI = GCS ≤8 (intubate + ventilate)."))
        e.append(sp())
        e.append(sec("GCS IN CHILDREN - PAEDIATRIC GCS (pGCS)"))
        e.append(bd("Verbal and Eye components modified for age:"))
        tdata = [
            [Paragraph("<b>Score</b>",S["body"]), Paragraph("<b>Verbal (adult)</b>",S["body"]), Paragraph("<b>Verbal (child <5y)</b>",S["body"])],
            [Paragraph("5",S["body"]), Paragraph("Oriented",S["body"]), Paragraph("Appropriate words / smiles, fixes, follows",S["body"])],
            [Paragraph("4",S["body"]), Paragraph("Confused",S["body"]), Paragraph("Cries but consolable",S["body"])],
            [Paragraph("3",S["body"]), Paragraph("Words only",S["body"]), Paragraph("Persistent crying / screaming",S["body"])],
            [Paragraph("2",S["body"]), Paragraph("Sounds only",S["body"]), Paragraph("Grunts",S["body"])],
            [Paragraph("1",S["body"]), Paragraph("None",S["body"]), Paragraph("None",S["body"])],
        ]
        t = Table(tdata, colWidths=[2*cm, 5.5*cm, 8*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("SIGNIFICANCE OF GCS"))
        for x in ["Triage: field sorting, ICU criteria (GCS ≤8 → intubate)",
                  "Prognosis: motor score most predictive; GCS 3 at 24h = poor outcome",
                  "Serial monitoring: trend more important than single value",
                  "Surgical planning: neurosurgical intervention threshold",
                  "Medicolegal: documentation of level of consciousness"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("FALLACIES / PITFALLS of GCS"))
        for x in ["Alcohol/drug intoxication falsely lowers score",
                  "Intubated patient: verbal score recorded as 'T' or 1T",
                  "Orbital swelling: eye opening unreliable",
                  "Spinal injury: motor score falsely low",
                  "Children <2 years: verbal not assessable - use paediatric GCS",
                  "Aphasic patients: verbal score invalid",
                  "Sedated/paralysed patients: NOT assessable"]:
            e.append(b(x))
        e.append(kp("Key: GCS ≤8 = severe TBI → airway must be secured (intubate)"))

    elements.append(q_block(66, "GCS in Adults & Children - Significance & Fallacies", "[2021]", q66))
    elements.append(PageBreak())

    # ── Q67 ─────────────────────────────────────────────────
    def q67(e):
        e.append(sec("TRANSIENT LOSS OF CONSCIOUSNESS (TLOC) AFTER RTA"))
        e.append(bd("TLOC = sudden, brief, self-limited loss of consciousness followed by spontaneous complete recovery. In RTA context = concussion / mild TBI."))
        e.append(sp())
        e.append(sec("PATHOPHYSIOLOGY"))
        for x in ["Rotational/shear forces → diffuse axonal injury (DAI)",
                  "Transient neuronal dysfunction without structural damage",
                  "Altered neural transmission in the reticular activating system (RAS)",
                  "Usually seconds-minutes; prolonged TLOC (>5 min) → investigate for structural injury"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("HIGH GCS (HiGCS) - 'Talk and Die'"))
        e.append(bd("Patient initially GCS 14-15 with TLOC → apparent recovery → secondary deterioration."))
        for x in ["Lucid interval: caused by expanding extradural haematoma (EDH)",
                  "Classic: temporal bone fracture → middle meningeal artery rupture",
                  "Patient 'talks' then 'dies' if not treated",
                  "EDH: biconvex (lens-shaped) on CT - temporal/extradural space",
                  "EMERGENCY: immediate surgical evacuation (burr hole / craniotomy)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("INVESTIGATIONS"))
        for x in ["CT brain: immediately if GCS deteriorates, focal signs, skull fracture",
                  "CT C-spine: if mechanism suggests cervical injury",
                  "Blood glucose (exclude hypoglycaemia as cause of TLOC)",
                  "ECG (cardiac cause of TLOC)",
                  "FBC/coagulation screen"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MANAGEMENT"))
        for x in ["A-B-C-D-E resuscitation (ATLS)",
                  "C-spine immobilisation",
                  "Observe 6-12h if GCS returns to 15 and CT normal",
                  "Admit if: persistent symptoms, CT abnormality, social concerns, anticoagulant use",
                  "Neurosurgical referral: GCS deterioration, CT abnormality, focal signs",
                  "EDH: emergency burr hole/craniotomy - aim <4h from injury",
                  "Avoid: NSAIDs, anticoagulants initially"]:
            e.append(b(x))
        e.append(kp("Key: Lucid interval + temporal injury = EDH until proven otherwise"))

    elements.append(q_block(67, "Transient Loss of Consciousness Following RTA (High GCS)", "[2021/2022]", q67))

    # ── Q68 ─────────────────────────────────────────────────
    def q68(e):
        e.append(sec("CHEST TRAUMA - OVERVIEW"))
        e.append(bd("Accounts for 25% of all trauma deaths. 80% managed non-operatively. 10-15% require surgery."))
        e.append(sp())
        e.append(sec("COMPLICATIONS OF CHEST TRAUMA"))
        tdata = [
            [Paragraph("<b>Immediate (0-1h)</b>",S["body"]), Paragraph("<b>Early (1-72h)</b>",S["body"]), Paragraph("<b>Late (>72h)</b>",S["body"])],
            [Paragraph("• Tension pneumothorax\n• Massive haemothorax\n• Open pneumothorax\n• Flail chest\n• Cardiac tamponade\n• Airway obstruction",S["body"]),
             Paragraph("• Haemopneumothorax\n• Pulmonary contusion\n• Myocardial contusion\n• Diaphragm rupture\n• Oesophageal injury\n• Aortic injury",S["body"]),
             Paragraph("• Empyema\n• Missed diaphragm injury\n• ARDS\n• Bronchopleural fistula\n• Thoracic aortic pseudoaneurysm",S["body"])],
        ]
        t = Table(tdata, colWidths=[5.5*cm, 5.5*cm, 5.5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("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.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 4),
            ("BOTTOMPADDING", (0,0), (-1,-1), 4),
            ("VALIGN",     (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("MANAGEMENT OF CHEST TRAUMA"))
        for x in ["Primary survey: A-B-C-D-E (ATLS)",
                  "High-flow O2, SpO2 monitoring, CXR (AP erect)",
                  "IVx2 large-bore + aggressive resuscitation",
                  "Tube thoracostomy (chest drain): 5th ICS, mid-axillary line",
                  "Analgesia: epidural / intercostal nerve block (essential for rib fractures)",
                  "Thoracotomy indications: initial chest drain >1500 mL OR ongoing >200-250 mL/h x3h"]:
            e.append(b(x))
        e.append(kp("Key: 6 immediately life-threatening = Airway obstruction, Tension PTX, Open PTX, Massive haemothorax, Flail chest, Cardiac tamponade (ATOMIC)"))

    elements.append(q_block(68, "Complications & Management of Chest Trauma", "[2010/2020]", q68))
    elements.append(PageBreak())

    # ── Q69 ─────────────────────────────────────────────────
    def q69(e):
        e.append(sec("THE 'DANGEROUS DOZEN' OF THORACIC TRAUMA"))
        e.append(sec("GROUP 1: 6 IMMEDIATELY LIFE-THREATENING (ATOMIC)"))
        tdata = [
            [Paragraph("<b>#</b>",S["body"]), Paragraph("<b>Condition</b>",S["body"]), Paragraph("<b>Signs</b>",S["body"]), Paragraph("<b>Immediate Rx</b>",S["body"])],
            [Paragraph("1",S["body"]), Paragraph("Airway obstruction",S["body"]), Paragraph("Stridor, paradoxical breathing",S["body"]), Paragraph("Intubate/surgical airway",S["body"])],
            [Paragraph("2",S["body"]), Paragraph("Tension pneumothorax",S["body"]), Paragraph("↑JVP, tracheal deviation, absent breath sounds, hypotension",S["body"]), Paragraph("Needle decompression 2nd ICS MCL → chest drain",S["body"])],
            [Paragraph("3",S["body"]), Paragraph("Open ('sucking') pneumothorax",S["body"]), Paragraph("Chest wall defect, air movement through wound",S["body"]), Paragraph("3-sided occlusive dressing → chest drain",S["body"])],
            [Paragraph("4",S["body"]), Paragraph("Massive haemothorax",S["body"]), Paragraph(">1500 mL blood, dull percussion, shock",S["body"]), Paragraph("Chest drain → thoracotomy if ongoing",S["body"])],
            [Paragraph("5",S["body"]), Paragraph("Flail chest",S["body"]), Paragraph("Paradoxical chest movement, crepitus ≥3 consecutive ribs",S["body"]), Paragraph("O2, analgesia, IPPV if severe",S["body"])],
            [Paragraph("6",S["body"]), Paragraph("Cardiac tamponade",S["body"]), Paragraph("Beck's triad: ↓BP + ↑JVP + muffled heart sounds",S["body"]), Paragraph("Pericardiocentesis → thoracotomy",S["body"])],
        ]
        t = Table(tdata, colWidths=[0.7*cm, 3.8*cm, 6.5*cm, 5.5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#7b2226")),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("GROUP 2: 6 POTENTIALLY LIFE-THREATENING"))
        for x in ["7. Pulmonary contusion - CXR may be normal initially; ARDS risk",
                  "8. Myocardial contusion - ECG changes (ST, arrhythmia); troponin rise",
                  "9. Aortic disruption - widened mediastinum on CXR; CT angio diagnostic",
                  "10. Diaphragm rupture - nasogastric tube in chest on CXR",
                  "11. Oesophageal rupture - Hamman's sign, mediastinitis, high mortality",
                  "12. Tracheobronchial injury - persistent air leak despite chest drain"]:
            e.append(b(x))
        e.append(kp("Key: Tension PTX = CLINICAL diagnosis. Do NOT wait for CXR. Treat immediately."))

    elements.append(q_block(69, "The 'Dangerous Dozen' of Thoracic Trauma - Management of Immediately Life-Threatening Conditions", "[2021]", q69))

    # ── Q70 ─────────────────────────────────────────────────
    def q70(e):
        e.append(sec("DEFINITION"))
        e.append(bd("Flail chest = fracture of ≥3 consecutive ribs in ≥2 places creating a free-floating (flail) chest wall segment that moves paradoxically (inward on inspiration, outward on expiration)."))
        e.append(sp())
        e.append(sec("PHYSIOLOGICAL CHANGES"))
        for x in ["Paradoxical movement → ineffective ventilation → hypoxia",
                  "Underlying pulmonary contusion: most important determinant of morbidity",
                  "Pain → splinting → atelectasis → pneumonia",
                  "Pendellüft: air shifts between lungs worsening hypoxia (historical concept)",
                  "Respiratory failure: ↑work of breathing → respiratory muscle fatigue"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("TYPES"))
        for x in ["Anterior flail: involves sternum/parasternal ribs - associated with cardiac injury",
                  "Lateral flail: most common; ribs fractured in lateral/posterior segments",
                  "Posterior flail: rare; muscle splinting reduces paradox"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MANAGEMENT"))
        e.append(mn("Mnemonic: OPAIPE"))
        for x in ["O – Oxygen: high-flow, target SpO2 >95%",
                  "P – Pain control: epidural analgesia (GOLD STANDARD) / intercostal nerve block / IV opioids",
                  "A – Airway + ventilation: IPPV if SpO2 <90% despite O2, or RR >30, or fatigue",
                  "I – ICU admission for monitoring",
                  "P – Physiotherapy: chest physiotherapy, incentive spirometry",
                  "E – Rib fixation (surgical stabilisation): VATS / open for anterior flail chest"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("ANTERIOR FLAIL CHEST - SPECIFIC MANAGEMENT"))
        for x in ["Involves sternum; paradox more severe",
                  "Sternal fracture: evaluate for cardiac contusion (ECG, troponin, echo)",
                  "Surgical rib fixation (ORIF with plates) shown to reduce ICU days and ventilator time",
                  "Indications for surgical fixation: failure to wean from ventilator, open chest trauma, thoracotomy for other reason"]:
            e.append(b(x))
        e.append(kp("Key: Pulmonary contusion (not the flail segment) causes hypoxia. Epidural = best analgesia."))

    elements.append(q_block(70, "Flail Chest - Physiological Changes, Types & Management", "[2009/2015]", q70))
    elements.append(PageBreak())

    # ── Q71 ─────────────────────────────────────────────────
    def q71(e):
        e.append(sec("DEFINITIONS"))
        e.append(bd("Haemopneumothorax = simultaneous presence of blood (haemothorax) AND air (pneumothorax) in the pleural cavity. Common in chest trauma (rib fractures, penetrating injuries)."))
        e.append(sp())
        e.append(sec("HAEMOTHORAX - CLASSIFICATION"))
        for x in ["Small (<300 mL): may resolve spontaneously",
                  "Moderate (300-1500 mL): drain required",
                  "Massive (>1500 mL OR >200 mL/h x3h): thoracotomy"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("SIGNS"))
        for x in ["Dull percussion (haemothorax) + absent breath sounds",
                  "Trachea: deviated away (if tension component)",
                  "Shock: haemorrhagic (massive haemothorax)",
                  "CXR: unilateral opacification + fluid level"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MANAGEMENT"))
        for x in ["Resuscitation: IV access x2, bloods (crossmatch), fluid resuscitation",
                  "Chest drain: large-bore (28-32 Fr) - 5th ICS mid-axillary line",
                  "Water-seal drainage + underwater seal bottle",
                  "Haemothorax VATS evacuation: if clotted haemothorax (within 3-7 days)",
                  "Thoracotomy: initial drain >1500 mL OR ongoing >200-250 mL/h x 3h",
                  "Pneumothorax component: same chest drain manages both",
                  "Empyema prevention: antibiotics + early drainage of clotted blood"]:
            e.append(b(x))
        e.append(kp("Key: Single large-bore chest drain is first-line for haemopneumothorax"))

    elements.append(q_block(71, "Haemopneumothorax", "[2007]", q71))

    # ── Q72 ─────────────────────────────────────────────────
    def q72(e):
        e.append(sec("DEFINITION"))
        e.append(bd("Underwater seal drain (UWSD) / intercostal drainage = tube in pleural space with distal end submerged under water, creating a one-way valve allowing air/fluid out but not back in."))
        e.append(sp())
        e.append(sec("COMPONENTS"))
        for x in ["Chest tube: 20-32 Fr (small = air; large = blood/fluid)",
                  "Underwater seal bottle: water level 2-3 cm submerged",
                  "Collection chamber: measures output",
                  "Suction port: can apply -20 cmH2O suction if needed",
                  "Triple-bottle system or commercial Pleur-evac unit"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("INSERTION TECHNIQUE"))
        for x in ["Position: supine or 45° with arm raised",
                  "Site: 5th ICS, anterior mid-axillary line (safe triangle)",
                  "Anaesthesia: local infiltration down to pleura",
                  "Blunt dissection over upper border of rib (avoid neurovascular bundle below)",
                  "Finger check in pleural space → insert tube directed posterosuperiorly",
                  "Connect to underwater seal, confirm swinging/bubbling"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MONITORING"))
        for x in ["Swinging: respiratory variation confirms correct placement",
                  "Bubbling: air leak present",
                  "Cessation of swinging: lung re-expanded OR tube blocked/kinked",
                  "Output: record hourly; replace blood if >200 mL/h",
                  "CXR: confirm position + lung re-expansion"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("REMOVAL"))
        for x in ["Criteria: lung fully re-expanded on CXR + no air leak x24h + output <100-150 mL/24h",
                  "Method: remove at end-expiration or peak inspiration (Valsalva) → immediate occlusion",
                  "Purse-string suture or direct pressure + sterile dressing"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("COMPLICATIONS"))
        for x in ["Malposition: intraparenchymal, subdiaphragmatic, subcutaneous",
                  "Blocked tube: kinking, clotted blood",
                  "Empyema: from prolonged drainage (prophylactic antibiotics debate)",
                  "Lung laceration, re-expansion pulmonary oedema"]:
            e.append(b(x))
        e.append(kp("Key: Never clamp a bubbling chest drain (risk of tension pneumothorax)"))

    elements.append(q_block(72, "Underwater Seal Drainage", "[2021]", q72))
    elements.append(PageBreak())

    # ── Q73 ─────────────────────────────────────────────────
    def q73(e):
        e.append(sec("DEFINITION"))
        e.append(bd("NOMAT (Non-Operative Management of Abdominal Trauma) = non-surgical approach to manage solid organ injuries in haemodynamically stable blunt trauma patients."))
        e.append(sp())
        e.append(sec("SOLID ORGANS COMMONLY INJURED IN BLUNT TRAUMA"))
        tdata = [
            [Paragraph("<b>Organ</b>",S["body"]), Paragraph("<b>Frequency</b>",S["body"]), Paragraph("<b>NOMAT success rate</b>",S["body"])],
            [Paragraph("Spleen",S["body"]), Paragraph("Most common (40-55%)",S["body"]), Paragraph("~85-95% (children), ~65-75% (adults)",S["body"])],
            [Paragraph("Liver",S["body"]), Paragraph("2nd most common (35-45%)",S["body"]), Paragraph("~85-90%",S["body"])],
            [Paragraph("Kidney",S["body"]), Paragraph("~10%",S["body"]), Paragraph("~95% (Grade I-III)",S["body"])],
            [Paragraph("Pancreas",S["body"]), Paragraph("Rare (3-12%)",S["body"]), Paragraph("~50-80% (depends on duct)",S["body"])],
        ]
        t = Table(tdata, colWidths=[3*cm, 5*cm, 7*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("PRE-HOSPITAL CARE & INITIAL ASSESSMENT"))
        for x in ["Scene: control external haemorrhage (tourniquet/pressure), immobilise spine",
                  "ABCDE, IV access, fluids (restricted crystalloid), monitoring",
                  "Transport to Level 1 trauma centre",
                  "FAST (Focused Assessment with Sonography in Trauma): bedside, detect free fluid",
                  "CT abdomen/pelvis with IV contrast: gold standard for staging (haemodynamically stable)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("CRITERIA FOR NOMAT"))
        for x in ["Haemodynamic stability (systolic >90 mmHg without ongoing pressor/transfusion requirement)",
                  "No peritonism on examination",
                  "CT staging: Grade I-III (low grade) injury",
                  "No associated hollow viscus injury, diaphragm rupture",
                  "Availability of ICU/HDU, OR backup, experienced surgical team"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("NOMAT PROTOCOL"))
        for x in ["ICU/HDU admission, serial abdominal examinations (2-4 hourly)",
                  "Serial Hb, haematocrit q4-6h",
                  "Angioembolisation: if active contrast blush on CT (spleen/liver Grade III-IV)",
                  "Bed rest: 24-48h for lower grade; longer for higher grade",
                  "Conversion to operative management if: haemodynamic deterioration, peritonism, Hb drop >2 g/dL, transfusion >4 units"]:
            e.append(b(x))
        e.append(kp("Key: NOMAT requires haemodynamic STABILITY. Any deterioration = laparotomy."))

    elements.append(q_block(73, "NOMAT - Non-Operative Management of Solid Organ Injuries (Blunt Abdominal Trauma)", "[2021]", q73))

    # ── Q74 ─────────────────────────────────────────────────
    def q74(e):
        e.append(sec("MOST COMMON INTRA-ABDOMINAL ORGAN IN BLUNT TRAUMA"))
        e.append(bd("SPLEEN = most commonly injured solid organ in blunt abdominal trauma (40-55% of solid organ injuries)."))
        e.append(sp())
        e.append(sec("MECHANISM"))
        for x in ["Direct blow to left lower chest/upper abdomen",
                  "Deceleration injury: spleen tears at vascular pedicle",
                  "Associated with left rib fractures (9-11) + left pneumothorax"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("AAST SPLENIC INJURY SCALE"))
        tdata = [
            [Paragraph("<b>Grade</b>",S["body"]), Paragraph("<b>Description</b>",S["body"]), Paragraph("<b>Management</b>",S["body"])],
            [Paragraph("I",S["body"]), Paragraph("Subcapsular haematoma <10%; capsular tear <1 cm deep",S["body"]), Paragraph("NOMAT",S["body"])],
            [Paragraph("II",S["body"]), Paragraph("Subcapsular 10-50%; laceration 1-3 cm",S["body"]), Paragraph("NOMAT",S["body"])],
            [Paragraph("III",S["body"]), Paragraph("Subcapsular >50% / expanding; laceration >3 cm; devascularised <25%",S["body"]), Paragraph("NOMAT ± angioembolisation",S["body"])],
            [Paragraph("IV",S["body"]), Paragraph("Laceration involving segmental/hilar vessels; devascularised >25%",S["body"]), Paragraph("Angioembolisation vs splenectomy",S["body"])],
            [Paragraph("V",S["body"]), Paragraph("Shattered spleen; hilar devascularisation",S["body"]), Paragraph("Splenectomy",S["body"])],
        ]
        t = Table(tdata, colWidths=[1.5*cm, 9*cm, 5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("MANAGEMENT"))
        for x in ["NOMAT: haemodynamically stable + Grade I-III → monitor in ICU",
                  "Angioembolisation: active blush on CT Grade III-IV → TAE (transcatheter arterial embolisation)",
                  "Splenorrhaphy: repair if accessible and controllable (packing, suture, mesh wrap)",
                  "Splenectomy: massive injury, haemodynamic instability, Grade V",
                  "Post-splenectomy: vaccinate (Pneumococcus, Meningococcus, HiB) + daily penicillin prophylaxis x2 years"]:
            e.append(b(x))
        e.append(kp("Key: OPSI (Overwhelming Post-Splenectomy Infection) - lifelong risk, prevent with vaccination"))

    elements.append(q_block(74, "Most Common Intra-Abdominal Surgery - Splenic Injury & Splenic Injury Scale", "[2021]", q74))
    elements.append(PageBreak())

    # ── Q75 ─────────────────────────────────────────────────
    def q75(e):
        e.append(sec("CLINICAL SCENARIO"))
        e.append(bd("Blunt abdominal trauma with haemodynamic shock = surgical emergency. Requires rapid, systematic evaluation and immediate intervention."))
        e.append(sp())
        e.append(sec("IMMEDIATE ASSESSMENT (ATLS Protocol)"))
        for x in ["A: Secure airway (intubate if GCS <8)",
                  "B: Oxygen, ventilate",
                  "C: IV x2 large bore, blood type & crossmatch, MTP (massive transfusion protocol)",
                  "D: Disability - GCS, pupils",
                  "E: Expose - inspect abdomen (bruising, distension, guarding)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("BEDSIDE INVESTIGATIONS (while resuscitating)"))
        for x in ["FAST scan: free fluid in Morrison's pouch, perihepatic, perisplenic, pelvis",
                  "Diagnostic Peritoneal Lavage (DPL): if FAST equivocal, >100,000 RBC/mL = positive",
                  "CXR + Pelvis X-ray: exclude haemothorax, pelvic fracture",
                  "ABG: lactate (perfusion marker), base deficit"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MANAGEMENT ALGORITHM"))
        e.append(mn("Shocked + FAST positive → Emergency Laparotomy"))
        for x in ["Haemodynamic control: 1:1:1 pRBC:FFP:Platelets, TXA",
                  "Damage Control Laparotomy (DCL):",
                  "   → Pack all 4 quadrants to control haemorrhage",
                  "   → Identify and control bleeding source",
                  "   → Temporary abdominal closure (Bogota bag / VAC)",
                  "   → Transfer to ICU: correct hypothermia, acidosis, coagulopathy",
                  "   → Definitive repair: planned relook at 24-48h",
                  "Pelvic fracture: pelvic binder + external fixation + angioembolisation"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("DAMAGE CONTROL SURGERY PRINCIPLES"))
        for x in ["Phase 1: abbreviated laparotomy (control of haemorrhage + contamination only)",
                  "Phase 2: ICU resuscitation (reverse lethal triad)",
                  "Phase 3: definitive surgery when physiology corrected (24-72h)"]:
            e.append(b(x))
        e.append(kp("Key: Shocked patient = don't delay for CT. FAST positive + shock = immediate laparotomy."))

    elements.append(q_block(75, "Management of Blunt Trauma Abdomen in Shock", "[2020]", q75))

    # ── Q76 ─────────────────────────────────────────────────
    def q76(e):
        e.append(sec("DIAGNOSTIC MODALITIES IN BLUNT ABDOMINAL TRAUMA"))
        tdata = [
            [Paragraph("<b>Investigation</b>",S["body"]), Paragraph("<b>Indication</b>",S["body"]), Paragraph("<b>Advantages</b>",S["body"]), Paragraph("<b>Limitations</b>",S["body"])],
            [Paragraph("FAST Ultrasound",S["body"]), Paragraph("Bedside, 1st line, haemodynamically unstable",S["body"]), Paragraph("Fast, portable, no radiation, repeatable",S["body"]), Paragraph("Operator-dependent, misses hollow viscus/retroperitoneal",S["body"])],
            [Paragraph("CT Abdomen (IV contrast)",S["body"]), Paragraph("GOLD STANDARD - haemodynamically stable",S["body"]), Paragraph("Defines organ injury, grade, active blush, retroperitoneal",S["body"]), Paragraph("Radiation, contrast risk, time, transport",S["body"])],
            [Paragraph("DPL (Diagnostic Peritoneal Lavage)",S["body"]), Paragraph("FAST equivocal, no CT available",S["body"]), Paragraph("High sensitivity (98%)",S["body"]), Paragraph("Invasive, non-specific, does not grade injury",S["body"])],
            [Paragraph("X-Ray (CXR + Pelvis)",S["body"]), Paragraph("Primary survey adjunct",S["body"]), Paragraph("Rapid, identifies pneumothorax, pelvis #",S["body"]), Paragraph("Limited abdominal info",S["body"])],
            [Paragraph("Diagnostic Laparoscopy",S["body"]), Paragraph("Equivocal clinical/imaging findings",S["body"]), Paragraph("Therapeutic + diagnostic",S["body"]), Paragraph("Requires GA, misses retroperitoneal",S["body"])],
            [Paragraph("CECT Angiography",S["body"]), Paragraph("Active contrast extravasation seen on CT",S["body"]), Paragraph("Diagnostic + therapeutic (embolisation)",S["body"]), Paragraph("Specialist centre required",S["body"])],
        ]
        t = Table(tdata, colWidths=[3.5*cm, 4*cm, 4.5*cm, 4.5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("DPL CRITERIA (Positive)"))
        for x in [">10 mL blood on initial aspiration",
                  "Lavage fluid in chest drain/Foley (organ perforation)",
                  "RBC >100,000/mL (blunt) or >10,000/mL (penetrating)",
                  "WBC >500/mL",
                  "Bile, bacteria, food fibres"]:
            e.append(b(x))
        e.append(kp("Key: CT abdomen with IV contrast = gold standard if patient is stable"))

    elements.append(q_block(76, "Diagnostic Modalities in Blunt Abdominal Trauma", "[2016]", q76))
    elements.append(PageBreak())

    # ── Q77 ─────────────────────────────────────────────────
    def q77(e):
        e.append(sec("APPROACHES TO LAPAROTOMY IN BLUNT ABDOMINAL TRAUMA"))
        e.append(sec("INCISION"))
        for x in ["Long midline laparotomy: from xiphoid to pubic symphysis",
                  "Allows full access to all abdominal quadrants",
                  "Can be extended into median sternotomy if needed"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("INDICATIONS FOR LAPAROTOMY (MANDATORY)"))
        for x in ["Haemodynamic instability with FAST positive free fluid",
                  "Peritonitis on examination",
                  "Evisceration",
                  "Impalement injury",
                  "Diaphragm rupture on imaging",
                  "Free air on X-ray/CT (hollow viscus injury)",
                  "Gunshot wound traversing peritoneal cavity",
                  "Positive DPL",
                  "Failure of NOMAT (haemodynamic deterioration, peritonism, falling Hb)"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("RELATIVE INDICATIONS (SELECTIVE)"))
        for x in ["Persistent tachycardia without other cause",
                  "Unexplained blood transfusion requirement",
                  "Grade IV-V solid organ injury on CT"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("DAMAGE CONTROL LAPAROTOMY SEQUENCE"))
        for x in ["Enter abdomen: pack all 4 quadrants immediately",
                  "Control haemorrhage: pressure, clamping, ligation, packing",
                  "Control contamination: bowel clamps, not anastomosis",
                  "Assess injury burden: systematic exploration",
                  "Temporary closure: Bogota bag / Opsite sandwich / ABThera VAC",
                  "ICU: correct triad",
                  "Planned relook: 24-48h for definitive repair"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("SPECIFIC ORGAN APPROACHES"))
        for x in ["Liver: Pringle manoeuvre (portal hepatis clamp), packing, argon beam",
                  "Spleen: lienorenal ligament division, medial rotation",
                  "Kidney: Mattox manoeuvre (left-sided retroperitoneal exposure)",
                  "Aorta: supracoeliac aortic control at hiatus",
                  "Bowel: resect + staple ends, no primary anastomosis in damage control"]:
            e.append(b(x))
        e.append(kp("Key: Damage control laparotomy = abbreviated surgery to control haemorrhage + contamination ONLY"))

    elements.append(q_block(77, "Approaches & Indications for Laparotomy in Blunt Abdominal Trauma", "[ ]", q77))

    # ── Q78 ─────────────────────────────────────────────────
    def q78(e):
        e.append(sec("AAST LIVER INJURY SCALE"))
        tdata = [
            [Paragraph("<b>Grade</b>",S["body"]), Paragraph("<b>Description</b>",S["body"]), Paragraph("<b>Management</b>",S["body"])],
            [Paragraph("I",S["body"]), Paragraph("Haematoma <10% surface; Laceration <1 cm",S["body"]), Paragraph("NOMAT",S["body"])],
            [Paragraph("II",S["body"]), Paragraph("Haematoma 10-50%; Laceration 1-3 cm, <10 cm length",S["body"]), Paragraph("NOMAT",S["body"])],
            [Paragraph("III",S["body"]), Paragraph("Haematoma >50%; Laceration >3 cm deep",S["body"]), Paragraph("NOMAT ± angioembolisation",S["body"])],
            [Paragraph("IV",S["body"]), Paragraph("Parenchymal disruption 25-75% of lobe",S["body"]), Paragraph("Angioembolisation vs surgery",S["body"])],
            [Paragraph("V",S["body"]), Paragraph("Parenchymal disruption >75% lobe; juxtahepatic vein injury",S["body"]), Paragraph("Surgery (packing + DCL)",S["body"])],
            [Paragraph("VI",S["body"]), Paragraph("Hepatic avulsion",S["body"]), Paragraph("Lethal; packing/hepatectomy",S["body"])],
        ]
        t = Table(tdata, colWidths=[1.5*cm, 9.5*cm, 4.5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("MANAGEMENT ALGORITHM - LIVER INJURY WITH ACTIVE BLEED"))
        for x in ["Haemodynamically STABLE: CT scan → grade injury → NOMAT ± angioembolisation",
                  "Haemodynamically UNSTABLE: emergency laparotomy",
                  "Intraoperative control: Pringle manoeuvre (clamp hepatoduodenal ligament)",
                  "Surgical techniques: 4P approach - Pressure, Pringle, Plug (balloon), Pack",
                  "Packing: 4 packs per lobe → temporary closure → ICU",
                  "Angioembolisation: IR-guided TAE for active contrast blush (Grade III-IV)",
                  "Biliary complications: bile leak → ERCP + stent or drain",
                  "Definitive repair at relook: suture, fibrin glue, omentoplasty, hepatectomy (rare)"]:
            e.append(b(x))
        e.append(kp("Key: Pringle manoeuvre (hepatoduodenal ligament clamping) = primary intraoperative haemostasis. Can clamp 15-20 min intermittently."))

    elements.append(q_block(78, "Grades of Liver Injury & Management Algorithm with Active Bleeding", "[ ]", q78))
    elements.append(PageBreak())

    # ── Q79 ─────────────────────────────────────────────────
    def q79(e):
        e.append(sec("DUODENAL INJURIES - OVERVIEW"))
        e.append(bd("Rare (3-5% of abdominal trauma). Most from penetrating trauma (70%). Blunt: steering wheel, seatbelt, handlebar injuries. Often associated with pancreatic injury."))
        e.append(sp())
        e.append(sec("AAST DUODENAL INJURY SCALE"))
        tdata = [
            [Paragraph("<b>Grade</b>",S["body"]), Paragraph("<b>Description</b>",S["body"]), Paragraph("<b>Management</b>",S["body"])],
            [Paragraph("I",S["body"]), Paragraph("Haematoma: single portion; Laceration: partial thickness, no perforation",S["body"]), Paragraph("Conservative (NGT, TPN)",S["body"])],
            [Paragraph("II",S["body"]), Paragraph("Haematoma: >1 portion; Laceration: <50% circumference disruption",S["body"]), Paragraph("Primary repair",S["body"])],
            [Paragraph("III",S["body"]), Paragraph("Laceration: D2: 50-75%; D1,D3,D4: 50-100%",S["body"]), Paragraph("Primary repair + pyloric exclusion",S["body"])],
            [Paragraph("IV",S["body"]), Paragraph("Laceration: D2: >75%; involves ampulla/CBD",S["body"]), Paragraph("Complex repair / Whipple's",S["body"])],
            [Paragraph("V",S["body"]), Paragraph("Massive disruption of duodenopancreatic complex; devascularisation",S["body"]), Paragraph("Damage control/Whipple's",S["body"])],
        ]
        t = Table(tdata, colWidths=[1.5*cm, 8.5*cm, 5.5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("MANAGEMENT"))
        for x in ["Grade I: nasogastric decompression, TPN - haematoma resolves in 7-14 days",
                  "Grade II-III: primary repair in 2 layers ± decompression",
                  "Pyloric exclusion: staple pylorus + gastrojejunostomy to divert flow away from repair",
                  "Grade IV-V: pancreaticoduodenectomy (Whipple's) - rarely in acute setting",
                  "Always drain: closed suction drain near repair",
                  "Duodenostomy tube: feeding"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("DIAGNOSIS (KEY POINT - difficult)"))
        for x in ["CT scan: retroperitoneal air, fluid, duodenal wall thickening",
                  "Water-soluble contrast swallow: leak detection",
                  "Often delayed diagnosis → increased mortality"]:
            e.append(b(x))
        e.append(kp("Key: Duodenal haematoma in children - exclude NAI (Non-Accidental Injury)"))

    elements.append(q_block(79, "Duodenal Injuries (Traumatic) - Grades & Management", "[2015/2021/2014]", q79))

    # ── Q80 ─────────────────────────────────────────────────
    def q80(e):
        e.append(sec("TRAUMATIC PANCREATIC INJURY - OVERVIEW"))
        e.append(bd("Uncommon but high mortality (10-30%). Blunt: steering wheel, handlebar (classic), direct blow to epigastrium. Pancreas fixed at L1-L2 against spine = vulnerable to crushing. Most injuries involve body/neck (most common site)."))
        e.append(sp())
        e.append(sec("AAST PANCREATIC INJURY SCALE"))
        tdata = [
            [Paragraph("<b>Grade</b>",S["body"]), Paragraph("<b>Description</b>",S["body"]), Paragraph("<b>Management</b>",S["body"])],
            [Paragraph("I",S["body"]), Paragraph("Minor contusion/laceration, no duct injury",S["body"]), Paragraph("Closed drainage",S["body"])],
            [Paragraph("II",S["body"]), Paragraph("Major contusion/laceration, no duct injury",S["body"]), Paragraph("Closed drainage",S["body"])],
            [Paragraph("III",S["body"]), Paragraph("Distal transection OR parenchymal injury + duct injury",S["body"]), Paragraph("Distal pancreatectomy ± splenectomy",S["body"])],
            [Paragraph("IV",S["body"]), Paragraph("Proximal transection involving ampulla",S["body"]), Paragraph("Drainage ± complex repair",S["body"])],
            [Paragraph("V",S["body"]), Paragraph("Massive disruption of pancreatic head",S["body"]), Paragraph("Damage control → pancreaticoduodenectomy",S["body"])],
        ]
        t = Table(tdata, colWidths=[1.5*cm, 8.5*cm, 5.5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("MANAGEMENT ALGORITHM (2021)"))
        for x in ["Diagnosis: CT with IV contrast (main duct injury), serum amylase/lipase (insensitive early), MRCP/ERCP",
                  "Grade I-II: closed suction drainage alone (most resolve)",
                  "Grade III (distal duct injury): distal pancreatectomy ± splenectomy",
                  "Grade IV-V: damage control (pack + drain) → planned reconstruction at 24-72h",
                  "ERCP + stenting: for ductal disruption if patient stable (Grade III-IV)",
                  "Whipple's (pancreaticoduodenectomy): only for stable patient with irreparable head injury",
                  "KEY PRINCIPLE: Conservative surgery; always drain; avoid Whipple's acutely"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("COMPLICATIONS"))
        for x in ["Pancreatic fistula: most common (Grade A-C, ISGPF criteria)",
                  "Pseudocyst: collection of amylase-rich fluid",
                  "Pancreatitis, abscess, haemorrhage"]:
            e.append(b(x))
        e.append(kp("Key: Duct integrity determines management. CT cannot reliably show duct injury - use MRCP/ERCP."))

    elements.append(q_block(80, "Classify Pancreatic Trauma & Management Algorithm for Traumatic Pancreatic Injury", "[2021]", q80))
    elements.append(PageBreak())

    # ── Q81 ─────────────────────────────────────────────────
    def q81(e):
        e.append(sec("DEFINITION"))
        e.append(bd("Pancreaticoduodenal injury = combined injury to pancreatic head and duodenum (usually Grade IV-V pancreas + Grade III-V duodenum). High mortality (40-60%). Rare but catastrophic."))
        e.append(sp())
        e.append(sec("MECHANISM"))
        for x in ["High-energy blunt: steering wheel, handlebar - crushing pancreatic head against L1-L2 spine",
                  "Penetrating: gunshot wounds through epigastrium",
                  "Associated injuries: IVC, portal vein, superior mesenteric vessels, CBD"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("DIAGNOSIS"))
        for x in ["CT abdomen/pelvis with IV contrast: retroperitoneal air, fluid, duct disruption",
                  "MRCP: duct integrity assessment",
                  "Intraoperative cholangiogram: CBD injury",
                  "Serum amylase: elevated but non-specific"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("MANAGEMENT (Bailey & Love Principles)"))
        e.append(mn("Principles: Damage Control First"))
        for x in ["Damage control: packing + external drainage + temporary closure",
                  "ICU: resuscitate, correct coagulopathy/hypothermia/acidosis",
                  "Planned relook at 24-48h for definitive repair"]:
            e.append(b(x))
        e.append(sp())
        e.append(sec("DEFINITIVE SURGICAL OPTIONS"))
        tdata = [
            [Paragraph("<b>Procedure</b>",S["body"]), Paragraph("<b>Indication</b>",S["body"]), Paragraph("<b>Notes</b>",S["body"])],
            [Paragraph("Primary duodenal repair + drainage",S["body"]), Paragraph("Grade I-II duodenum + Grade I-II pancreas",S["body"]), Paragraph("Simplest; low mortality",S["body"])],
            [Paragraph("Pyloric exclusion + Gastrojejunostomy",S["body"]), Paragraph("Grade II-III duodenum",S["body"]), Paragraph("Diverts bile/pancreatic juice from repair",S["body"])],
            [Paragraph("Triple tube decompression (Berne)",S["body"]), Paragraph("Duodenal repairs",S["body"]), Paragraph("Gastrostomy + duodenostomy + jejunostomy",S["body"])],
            [Paragraph("Pancreaticoduodenectomy (Whipple's)",S["body"]), Paragraph("Irreparable pancreatic head + duodenum (Grade IV-V)",S["body"]), Paragraph("Only in stable patient - high mortality if emergent",S["body"])],
            [Paragraph("Duodenal diverticulisation",S["body"]), Paragraph("Complex duodenal injury",S["body"]), Paragraph("Antrectomy + Billroth II + tube duodenostomy",S["body"])],
        ]
        t = Table(tdata, colWidths=[4.5*cm, 5.5*cm, 5.5*cm])
        t.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
            ("TEXTCOLOR",  (0,0), (-1,0), colors.white),
            ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
            ("FONTSIZE",   (0,0), (-1,-1), 8.5),
            ("ROWBACKGROUNDS", (0,1), (-1,-1), [LIGHT_GREY, colors.white]),
            ("GRID",       (0,0), (-1,-1), 0.3, MID_GREY),
            ("TOPPADDING", (0,0), (-1,-1), 3),
            ("BOTTOMPADDING", (0,0), (-1,-1), 3),
            ("VALIGN", (0,0), (-1,-1), "TOP"),
        ]))
        e.append(t)
        e.append(sp())
        e.append(sec("COMPLICATIONS"))
        for x in ["Duodenal fistula: most feared; >15-20% in complex repairs",
                  "Pancreatic fistula: common",
                  "Intraabdominal abscess, sepsis, haemorrhage",
                  "Delayed gastric emptying after Whipple's",
                  "Jaundice if CBD not repaired"]:
            e.append(b(x))
        e.append(kp("Key: Pyloric exclusion = most widely used procedure for complex duodenal injuries (protects repair site)"))

    elements.append(q_block(81, "Management of Pancreaticoduodenal Injury", "[2007/2025]", q81))


# ============================================================
# COVER PAGE
# ============================================================
def build_cover():
    elems = []
    elems.append(Spacer(1, 2.5*cm))
    elems.append(Paragraph("MS General Surgery", S["cover_title"]))
    elems.append(Paragraph("Structured Exam Answers — Questions 62 to 81", S["cover_sub"]))
    elems.append(Spacer(1, 0.4*cm))
    elems.append(HRFlowable(width="70%", thickness=2, color=GOLD, spaceAfter=16))
    elems.append(Paragraph("TRAUMA SECTION", ParagraphStyle("ts", fontSize=15, fontName="Helvetica-Bold",
                textColor=DARK_BLUE, alignment=TA_CENTER, spaceAfter=8)))
    elems.append(Spacer(1, 0.3*cm))

    topics = [
        ("Q62", "Post-operative Ventilatory Support"),
        ("Q63", "Triage in Disaster — START & SALT | Polytrauma"),
        ("Q64", "Coagulopathy of Trauma & Damage Control Resuscitation"),
        ("Q65", "Head Trauma & Glasgow Coma Scale"),
        ("Q66", "GCS in Adults & Children — Significance & Fallacies"),
        ("Q67", "Transient Loss of Consciousness After RTA (High GCS)"),
        ("Q68", "Complications & Management of Chest Trauma"),
        ("Q69", "The 'Dangerous Dozen' of Thoracic Trauma"),
        ("Q70", "Flail Chest — Types, Physiology & Management"),
        ("Q71", "Haemopneumothorax"),
        ("Q72", "Underwater Seal Drainage"),
        ("Q73", "NOMAT — Non-Operative Management of Solid Organ Injuries"),
        ("Q74", "Most Common Intra-Abdominal Injury — Spleen & Grading Scale"),
        ("Q75", "Management of Blunt Abdominal Trauma in Shock"),
        ("Q76", "Diagnostic Modalities in Blunt Abdominal Trauma"),
        ("Q77", "Approaches & Indications for Laparotomy"),
        ("Q78", "Grades of Liver Injury & Management with Active Bleed"),
        ("Q79", "Traumatic Duodenal Injuries — Grades & Management"),
        ("Q80", "Traumatic Pancreatic Injury — Classification & Algorithm"),
        ("Q81", "Management of Pancreaticoduodenal Injury"),
    ]
    tdata = []
    for q, t in topics:
        tdata.append([Paragraph(q, ParagraphStyle("ql", fontSize=9, fontName="Helvetica-Bold",
                      textColor=DARK_BLUE)),
                      Paragraph(t, ParagraphStyle("tl", fontSize=9, fontName="Helvetica",
                      textColor=BLACK))])
    t = Table(tdata, colWidths=[2*cm, 13*cm])
    t.setStyle(TableStyle([
        ("ROWBACKGROUNDS", (0,0), (-1,-1), [LIGHT_BLUE, colors.white]),
        ("TOPPADDING",    (0,0), (-1,-1), 4),
        ("BOTTOMPADDING", (0,0), (-1,-1), 4),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("GRID",          (0,0), (-1,-1), 0.3, colors.HexColor("#c0c0c0")),
    ]))
    elems.append(t)
    elems.append(Spacer(1, 1*cm))
    elems.append(HRFlowable(width="70%", thickness=1, color=GOLD, spaceAfter=8))
    elems.append(Paragraph("Source: Bailey & Love's Short Practice of Surgery, 28th Edition",
                            S["cover_note"]))
    elems.append(Paragraph("Designed for 15-minute exam answers | Key scoring points highlighted",
                            S["cover_note"]))
    elems.append(Paragraph("MS General Surgery Examination Format", S["cover_note"]))
    elems.append(PageBreak())
    return elems


# ============================================================
# PAGE TEMPLATES
# ============================================================
def add_page_number(canvas, doc):
    canvas.saveState()
    canvas.setFont("Helvetica", 8)
    canvas.setFillColor(MID_GREY)
    page_num = canvas.getPageNumber()
    canvas.drawCentredString(A4[0]/2, 1.2*cm,
        f"MS Surgery Exam — Q62-Q81 | Bailey & Love 28e    |    Page {page_num}")
    canvas.setStrokeColor(colors.HexColor("#d4a017"))
    canvas.setLineWidth(0.5)
    canvas.line(2*cm, 1.5*cm, A4[0]-2*cm, 1.5*cm)
    canvas.restoreState()


# ============================================================
# MAIN
# ============================================================
def main():
    doc = SimpleDocTemplate(
        OUTPUT_PATH,
        pagesize=A4,
        rightMargin=1.8*cm,
        leftMargin=1.8*cm,
        topMargin=1.8*cm,
        bottomMargin=2*cm,
        title="MS Surgery Exam Answers Q62-Q81",
        author="Bailey & Love 28e",
    )

    story = []
    story.extend(build_cover())

    build_questions(story)

    doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
    print(f"PDF generated: {OUTPUT_PATH}")

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

cd /home/daytona/workspace/surgery-exam && python3 generate_exam_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/surgery-exam/MS_Surgery_Exam_Q62_Q81.pdf

Your PDF is ready! Here's your download link:

MS Surgery Exam Q62 Q81

PDF Document · PDF


What's Inside (All 20 Questions)

The PDF contains a colour-coded, exam-ready structured answer for every question, each designed to be written in 15 minutes. Here's the breakdown:
Q#TopicYear
Q62Post-operative Ventilatory Support - modes, settings, weaning, complications2010
Q63Triage in Disaster - START/SALT tables, polytrauma principles, DCR2019
Q64Coagulopathy of Trauma - Lethal Triad, ATC pathophysiology, DCR rationale2021
Q65Head Trauma + full GCS table with classification2009
Q66GCS in Adults & Children - paediatric modifications + 7 fallacies2021
Q67Transient LOC after RTA - lucid interval, EDH, High GCS management2021/22
Q68Chest Trauma complications - immediate/early/late table2010/2020
Q69Dangerous Dozen - full table of all 12 with signs + immediate Rx2021
Q70Flail Chest - physiology, types, OPAIPE mnemonic, anterior flail2009/2015
Q71Haemopneumothorax - classification + management2007
Q72Underwater Seal Drainage - technique, monitoring, removal, complications2021
Q73NOMAT - solid organ injury, pre-hospital, criteria, protocol2021
Q74Splenic injury - AAST Grade I-V table + OPSI2021
Q75Blunt abdominal trauma in shock - FAST, damage control laparotomy2020
Q76Diagnostic modalities - FAST/CT/DPL/CXR comparison table2016
Q77Approaches & indications for laparotomy - mandatory vs selective-
Q78Liver injury grades I-VI (AAST) + Pringle manoeuvre + 4P approach-
Q79Duodenal injuries - AAST grades + pyloric exclusion2015/2021/2014
Q80Pancreatic trauma - AAST grades + management algorithm2021
Q81Pancreaticoduodenal injury - repair options table including Whipple's2007/2025
Format features: Dark blue question headers, colour tables, red ★ key scoring points, mnemonics highlighted, cover page with index. All sourced from Bailey & Love 28th Edition.
This is a shared conversation. Sign in to Orris to start your own chat.