Make a pfd for 5 years of pyq for fmge for anatomy with image based questions

Asking for Preferences
Searching the Web

FMGE anatomy image based questions 2021 2022 2023 2024 2025 PYQ MCQ

Reading File
Reading Web Page

https://www.diginerve.com/blogs/fmge-previous-year-questions…

Running Command

mkdir -p /tmp/workspace/fmge-anatomy-pyq && ls /tmp/workspace/

Writing File

~/fmge-anatomy-pyq/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 Frame, PageTemplate

OUTPUT = "/tmp/workspace/fmge-anatomy-pyq/FMGE_Anatomy_ImageBased_PYQ_2021_2025.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2.2*cm, bottomMargin=2.2*cm,
    title="FMGE Anatomy Image-Based PYQs 2021–2025",
    author="FMGE Study Material",
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle(
    'TitleStyle', parent=styles['Title'],
    fontSize=20, textColor=colors.HexColor('#1a237e'),
    spaceAfter=6, leading=26, alignment=TA_CENTER
)
subtitle_style = ParagraphStyle(
    'SubTitle', parent=styles['Normal'],
    fontSize=11, textColor=colors.HexColor('#37474f'),
    spaceAfter=4, alignment=TA_CENTER
)
year_header_style = ParagraphStyle(
    'YearHeader', parent=styles['Heading1'],
    fontSize=15, textColor=colors.white,
    backColor=colors.HexColor('#1565c0'),
    spaceAfter=10, spaceBefore=14,
    borderPad=6, leading=20
)
topic_style = ParagraphStyle(
    'TopicStyle', parent=styles['Heading2'],
    fontSize=11, textColor=colors.HexColor('#0d47a1'),
    spaceAfter=4, spaceBefore=8,
    borderPad=3, leftIndent=0
)
q_style = ParagraphStyle(
    'QuestionStyle', parent=styles['Normal'],
    fontSize=10.5, textColor=colors.HexColor('#212121'),
    spaceAfter=4, spaceBefore=2, leading=15,
    leftIndent=0
)
opt_style = ParagraphStyle(
    'OptionStyle', parent=styles['Normal'],
    fontSize=10, textColor=colors.HexColor('#424242'),
    spaceAfter=1, leftIndent=14, leading=14
)
ans_style = ParagraphStyle(
    'AnswerStyle', parent=styles['Normal'],
    fontSize=10, textColor=colors.HexColor('#2e7d32'),
    spaceAfter=2, leftIndent=14, fontName='Helvetica-Bold'
)
exp_style = ParagraphStyle(
    'ExplainStyle', parent=styles['Normal'],
    fontSize=9.5, textColor=colors.HexColor('#5d4037'),
    spaceAfter=6, leftIndent=14, leading=13,
    backColor=colors.HexColor('#fff8e1'), borderPad=4
)
note_style = ParagraphStyle(
    'NoteStyle', parent=styles['Normal'],
    fontSize=9, textColor=colors.HexColor('#6a1b9a'),
    spaceAfter=4, leftIndent=14, fontName='Helvetica-Oblique'
)
image_tag_style = ParagraphStyle(
    'ImageTagStyle', parent=styles['Normal'],
    fontSize=9, textColor=colors.HexColor('#b71c1c'),
    spaceAfter=3, leftIndent=14, fontName='Helvetica-BoldOblique'
)

def add_header_footer(canvas, doc):
    canvas.saveState()
    canvas.setFont('Helvetica', 8)
    canvas.setFillColor(colors.HexColor('#9e9e9e'))
    canvas.drawString(2*cm, 1.2*cm, "FMGE Anatomy Image-Based PYQs 2021–2025 | For Educational Use Only")
    canvas.drawRightString(A4[0]-2*cm, 1.2*cm, f"Page {doc.page}")
    canvas.restoreState()

def q_block(num, year, session, topic, subtopic, qtext, options, answer, explanation, image_desc=None, note=None):
    """Build a flowable block for one question."""
    items = []
    # Question number + year badge
    q_label = f"<b>Q{num}.</b>  [{year} {session}]  <font color='#0288d1'><b>{topic}</b></font>"
    items.append(Paragraph(q_label, topic_style))
    if subtopic:
        items.append(Paragraph(f"<i>Subtopic: {subtopic}</i>", note_style))
    if image_desc:
        items.append(Paragraph(f"πŸ–Ό Image shown: {image_desc}", image_tag_style))
    items.append(Paragraph(qtext, q_style))
    for opt in options:
        items.append(Paragraph(opt, opt_style))
    items.append(Paragraph(f"βœ” Correct Answer: {answer}", ans_style))
    if explanation:
        items.append(Paragraph(f"Explanation: {explanation}", exp_style))
    if note:
        items.append(Paragraph(f"Exam Note: {note}", note_style))
    items.append(Spacer(1, 0.18*cm))
    items.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#e0e0e0')))
    items.append(Spacer(1, 0.12*cm))
    return KeepTogether(items)

# ─────────────────────────────────────────────────────────────────────────────
# ALL QUESTIONS DATA  (image-based / image-tagged / anatomy PYQs 2021–2025)
# ─────────────────────────────────────────────────────────────────────────────
questions = [

    # ═══════════════════════════  FMGE DEC 2021  ═══════════════════════════
    dict(year="Dec 2021", session="", topic="Cardiovascular Anatomy",
         subtopic="Cardiac Chambers",
         qtext="Identify the arrow-marked chamber in the given cardiac image.",
         options=["A. Right atrium", "B. Left atrium", "C. Right ventricle", "D. Left ventricle"],
         answer="B. Left atrium",
         image_desc="Cardiac cross-sectional image with arrow pointing to posterior superior chamber",
         explanation="The left atrium is the most posterior chamber of the heart, forming the base. It receives oxygenated blood from pulmonary veins (4 veins). On a standard chest X-ray or cardiac silhouette it is the uppermost posterior chamber.",
         note="High-yield: left atrium enlargement causes 'double density' on CXR and dysphagia."),

    dict(year="Dec 2021", session="", topic="Musculoskeletal Anatomy",
         subtopic="Knee Joint",
         qtext="In knee flexion, lateral dislocation of the patella is prevented by which muscle?",
         options=["A. Vastus medialis oblique (VMO)", "B. Patellar ligament", "C. Rectus femoris", "D. IT band"],
         answer="A. Vastus medialis oblique (VMO)",
         image_desc="Diagram of anterior knee showing quadriceps components",
         explanation="VMO (Vastus Medialis Oblique) inserts at an oblique angle (~50–55Β°) into the patella and provides the key medial force counteracting lateral patellar drift. Weakness of VMO is a major cause of patellofemoral syndrome.",
         note="VMO is the last part of quadriceps to develop and first to atrophy."),

    dict(year="Dec 2021", session="", topic="Embryology",
         subtopic="Pharyngeal Arches",
         qtext="A newborn had hypoplasia of the mandibles and zygomatic bones, malformed external ears, and slanted palpebral fissures. Abnormality in which pharyngeal arch causes this condition?",
         options=["A. Pharyngeal arch 1", "B. Pharyngeal arch 2", "C. Pharyngeal arch 3", "D. Pharyngeal arch 4"],
         answer="A. Pharyngeal arch 1",
         image_desc="Clinical photograph of infant with Treacher Collins syndrome features",
         explanation="Treacher Collins syndrome (Mandibulofacial dysostosis) = defect in 1st pharyngeal arch (and neural crest cells). Features: malar hypoplasia, micrognathia, ear anomalies, coloboma of lower eyelid, anti-mongoloid eye slant. Gene: TCOF1 (treacle protein).",
         note="1st arch gives: mandible, maxilla, malleus, incus, anterior 2/3 tongue, muscles of mastication."),

    dict(year="Dec 2021", session="", topic="Neuroanatomy",
         subtopic="Brainstem",
         qtext="Identify the structure labeled in the given MRI brainstem image showing a triangular pigmented area.",
         options=["A. Red nucleus", "B. Substantia nigra", "C. Locus coeruleus", "D. Dentate nucleus"],
         answer="C. Locus coeruleus",
         image_desc="MRI/gross cross-section of upper pons showing pigmented dot in floor of 4th ventricle",
         explanation="Locus coeruleus (Latin: 'blue spot') in the upper pons contains norepinephrine neurons and appears bluish-black due to neuromelanin. It is visible as a small dot in the floor of the 4th ventricle. Degeneration occurs in Parkinson's disease.",
         note="Substantia nigra is in midbrain; locus coeruleus is in pons – distinguish on image questions."),

    dict(year="Dec 2021", session="", topic="Osteology",
         subtopic="Vertebrae",
         qtext="An X-ray image shows collapse of a thoracic vertebral body with gibbus deformity. What is the most likely diagnosis?",
         options=["A. Osteoporotic fracture", "B. Pott's spine (TB spine)", "C. Ankylosing spondylitis", "D. Scheuermann's disease"],
         answer="B. Pott's spine (TB spine)",
         image_desc="Lateral spinal X-ray with anterior vertebral collapse and paravertebral shadow",
         explanation="Pott's disease = spinal tuberculosis. It preferentially destroys the anterior vertebral body and disc space, producing kyphotic deformity (gibbus). Paravertebral abscess ('cold abscess') is pathognomonic. Most common site: T10-L1.",
         note="Disc space is preserved in malignancy but destroyed in TB. Key differentiator in image questions."),

    # ═══════════════════════════  FMGE JUNE 2022  ═══════════════════════════
    dict(year="Jun 2022", session="", topic="Upper Limb Anatomy",
         subtopic="Wrist and Hand",
         qtext="A patient presents with swelling and tenderness in the anatomical snuffbox after a fall on outstretched hand. The image shows the thumb spica cast applied. Identify the fracture.",
         options=["A. Colles' fracture", "B. Scaphoid fracture", "C. Smith fracture", "D. Galeazzi fracture"],
         answer="B. Scaphoid fracture",
         image_desc="Image of thumb spica cast on right wrist; anatomical snuff box tenderness marked",
         explanation="Anatomical snuff box tenderness = scaphoid fracture until proven otherwise. Scaphoid is the most commonly fractured carpal bone; blood supply from distal to proximal (radial artery) β†’ risk of AVN in proximal pole fractures. Managed with thumb spica cast. CT/MRI for occult fractures.",
         note="If X-ray negative + snuffbox tender β†’ treat as scaphoid fracture; repeat X-ray in 10–14 days."),

    dict(year="Jun 2022", session="", topic="Embryology",
         subtopic="General Embryology",
         qtext="All of the following are derivatives of neural crest cells, EXCEPT:",
         options=["A. Melanocytes", "B. Adrenal medulla (chromaffin cells)", "C. Sympathetic ganglia", "D. Cauda equina"],
         answer="D. Cauda equina",
         image_desc="Diagram showing neural crest cell migration pathways",
         explanation="Neural crest cells (ectomesenchyme) give: melanocytes, adrenal medulla, DRG, sympathetic & parasympathetic ganglia, Schwann cells, meninges (pia + arachnoid), craniofacial cartilage & bone, odontoblasts, parafollicular C-cells. Cauda equina = spinal nerve roots (NOT neural crest).",
         note="Memory trick: MOOSE + Ganglia = Melanocytes, Odontoblasts, Otic ganglia, Schwann cells, Enteric ganglia."),

    dict(year="Jun 2022", session="", topic="Histology",
         subtopic="Cartilage Types",
         qtext="Elastic cartilage is found in which of the following structures?",
         options=["A. Nasal septum", "B. Articular cartilage", "C. Auditory (Eustachian) tube", "D. Costal cartilage"],
         answer="C. Auditory (Eustachian) tube",
         image_desc="Histology slide showing elastic fibers in cartilage matrix (elastic stain)",
         explanation="Types of cartilage: Hyaline = articular, costal, tracheal, nasal septum. Elastic = auricle of ear, epiglottis, Eustachian tube, external auditory meatus, larynx (corniculate, cuneiform). Fibrocartilage = intervertebral discs, symphysis pubis, menisci, temporomandibular joint.",
         note="Elastic cartilage has elastic fibers (visible on Verhoeff stain) giving flexibility."),

    dict(year="Jun 2022", session="", topic="Neuroanatomy",
         subtopic="Spinal Cord",
         qtext="A cross-section image of the spinal cord shows degeneration of posterior columns and lateral corticospinal tracts. Which vitamin deficiency causes this?",
         options=["A. Vitamin B1 (Thiamine)", "B. Vitamin B6 (Pyridoxine)", "C. Vitamin B12 (Cobalamin)", "D. Vitamin D"],
         answer="C. Vitamin B12 (Cobalamin)",
         image_desc="Cross-section of spinal cord with demyelination of posterior columns (dorsal) and lateral corticospinal tracts highlighted",
         explanation="Subacute Combined Degeneration (SCD) of spinal cord = B12 deficiency. Affects posterior columns (vibration/proprioception loss), lateral corticospinal tracts (UMN signs), and dorsal root ganglia. Combined = posterior + lateral columns. Causes: pernicious anemia, strict vegetarians, gastrectomy.",
         note="SCD is COMBINED (posterior + lateral). Contrast with tabes dorsalis = ONLY posterior columns (syphilis)."),

    dict(year="Jun 2022", session="", topic="Head & Neck Anatomy",
         subtopic="Cranial Nerves",
         qtext="In raised intracranial pressure, which cranial nerve is most commonly affected first?",
         options=["A. Optic nerve (CN II)", "B. Oculomotor nerve (CN III)", "C. Abducens nerve (CN VI)", "D. Trochlear nerve (CN IV)"],
         answer="C. Abducens nerve (CN VI)",
         image_desc="Diagram showing long intracranial course of CN VI over petrous apex",
         explanation="CN VI (Abducens) has the longest intracranial course, running up the clivus. Raised ICP stretches it β†’ lateral gaze palsy (false localizing sign). It presents with convergent squint (esotropia). CN VI palsy in raised ICP is a 'false localizing sign' – it doesn't tell you WHERE the lesion is.",
         note="Remember: CN VI = longest intracranial course β†’ most vulnerable to raised ICP."),

    # ═══════════════════════════  FMGE JAN 2023  ═══════════════════════════
    dict(year="Jan 2023", session="", topic="Embryology",
         subtopic="Pharyngeal Arch Derivatives",
         qtext="Which muscle is innervated by the mandibular nerve (CN V3)?",
         options=["A. Posterior belly of digastric", "B. Masseter", "C. Buccinator", "D. Tensor veli palatini"],
         answer="D. Tensor veli palatini",
         image_desc="Anatomical diagram of pharyngeal arch muscle derivatives with nerve labeling",
         explanation="1st arch (CN V3 – Mandibular) muscles: masseter, temporalis, medial & lateral pterygoids, anterior belly of digastric, mylohyoid, tensor tympani, tensor veli palatini. 2nd arch (CN VII): posterior belly of digastric, stylohyoid, stapedius, muscles of facial expression.",
         note="Tensor veli palatini is the only palatal muscle supplied by V3 – all others by X via pharyngeal plexus."),

    dict(year="Jan 2023", session="", topic="Lower Limb Anatomy",
         subtopic="Vascular Anatomy",
         qtext="A femoral angiogram image is shown. A patient develops ischemia of the lower limb after injury at the mid-thigh. Which vessel is most likely injured?",
         options=["A. Femoral artery", "B. Internal iliac artery", "C. External iliac artery", "D. Aorta"],
         answer="A. Femoral artery",
         image_desc="Femoral angiogram showing femoral artery and its branches at mid-thigh",
         explanation="The femoral artery is the main blood supply to the lower limb, continuing from external iliac below inguinal ligament. At mid-thigh it enters the adductor (Hunter's) canal. Injury here causes acute limb ischemia (6 P's: Pain, Pallor, Pulselessness, Paresthesia, Paralysis, Poikilothermia).",
         note="Profunda femoris arises 4 cm below inguinal ligament – provides collateral circulation."),

    dict(year="Jan 2023", session="", topic="Pelvis & Perineum",
         subtopic="Perineal Nerves",
         qtext="A diagram shows an anal fissure at the posterior midline. The nerve responsible for pain sensation is:",
         options=["A. Pelvic splanchnic nerve", "B. Hypogastric nerve", "C. Pudendal nerve", "D. Inferior rectal nerve"],
         answer="C. Pudendal nerve",
         image_desc="Diagram of perineal anatomy showing anal canal and nerve supply",
         explanation="Pudendal nerve (S2,3,4) supplies somatic sensation to the perineum via its branches: inferior rectal (anal canal below pectinate line, perineal skin), perineal nerve, and dorsal nerve of penis/clitoris. Pain from anal fissure (below pectinate line) = inferior rectal branch of pudendal nerve.",
         note="Above pectinate line = visceral (sympathetic/parasympathetic), painless. Below = somatic (pudendal), painful."),

    dict(year="Jan 2023", session="", topic="Embryology",
         subtopic="Neural Crest",
         qtext="A newborn with inflammation in the mandible and ear is likely to have an abnormality in which pharyngeal arch?",
         options=["A. First pharyngeal arch", "B. Second pharyngeal arch", "C. Third pharyngeal arch", "D. Fourth pharyngeal arch"],
         answer="A. First pharyngeal arch",
         image_desc="Clinical image of infant with hemifacial microsomia and ear deformity",
         explanation="1st pharyngeal arch forms: mandible (Meckel's cartilage), maxilla, malleus, incus, zygomatic bone, anterior 2/3 of tongue, muscles of mastication. Its external groove forms external auditory meatus. Abnormality β†’ mandibular + auricular defects as in hemifacial microsomia.",
         note="Treacher Collins = bilateral 1st arch defect. Hemifacial microsomia = unilateral 1st arch defect."),

    dict(year="Jan 2023", session="", topic="Neuroanatomy",
         subtopic="Cerebral Arteries",
         qtext="A CT angiogram image shows a berry aneurysm at the junction of two vessels. Most common site for berry (saccular) aneurysm is:",
         options=["A. Middle cerebral artery (MCA)", "B. Junction of ICA and posterior communicating artery", "C. Basilar artery apex", "D. Anterior communicating artery (AComA)"],
         answer="D. Anterior communicating artery (AComA)",
         image_desc="CT angiogram showing Circle of Willis with aneurysm at anterior communicating artery",
         explanation="Berry aneurysms occur at bifurcation points of Circle of Willis. Most common site: Anterior communicating artery (30–35%), followed by ICA-PComA junction (25%), MCA bifurcation (20%). Rupture causes subarachnoid hemorrhage (sudden worst headache of life, neck stiffness).",
         note="AComA aneurysm rupture β†’ bilateral lower limb weakness (motor areas near interhemispheric fissure)."),

    # ═══════════════════════════  FMGE JAN 2024  ═══════════════════════════
    dict(year="Jan 2024", session="", topic="Upper Limb Anatomy",
         subtopic="Brachial Plexus",
         qtext="An image of the right arm shows wrist drop and inability to extend fingers. Which nerve is injured?",
         options=["A. Median nerve", "B. Ulnar nerve", "C. Radial nerve", "D. Musculocutaneous nerve"],
         answer="C. Radial nerve",
         image_desc="Clinical photo showing wrist drop deformity of right hand",
         explanation="Radial nerve injury (in spiral groove of humerus) causes: Wrist drop (loss of wrist extensors), inability to extend fingers and thumb (loss of EPL, EPB, EIP, EDC), loss of brachioradialis, supinator. Sensory loss over anatomical snuffbox (first dorsal web space). Most common cause: mid-shaft humerus fracture.",
         note="Saturday night palsy = radial nerve compression in spiral groove. Crutch palsy = radial in axilla."),

    dict(year="Jan 2024", session="", topic="Osteology",
         subtopic="Skull Base",
         qtext="An image of the base of skull shows a foramen. Identify the structure passing through foramen ovale.",
         options=["A. Mandibular nerve (V3) + accessory meningeal artery", "B. Maxillary nerve (V2)", "C. Ophthalmic nerve (V1)", "D. Facial nerve (VII)"],
         answer="A. Mandibular nerve (V3) + accessory meningeal artery",
         image_desc="Inferior view of base of skull with foramen ovale labeled",
         explanation="Foramen ovale transmits: Mandibular nerve (V3), accessory meningeal artery, lesser petrosal nerve (sometimes), emissary vein. Mnemonic for foramina: Foramen Rotundum = V2 (ROUND = 2 letters in 'RO'). Foramen Ovale = V3 + accessory meningeal artery. Foramen Spinosum = middle meningeal artery.",
         note="OVAL = O = 0 β†’ 3rd division (V3). Mnemonic: 'Ovale – V3 + Accessory meningeal'."),

    dict(year="Jan 2024", session="", topic="Histology",
         subtopic="Connective Tissue",
         qtext="A histology slide shows large cells with a 'signet ring' appearance. These are most likely:",
         options=["A. Plasma cells", "B. Adipocytes (fat cells)", "C. Mast cells", "D. Macrophages"],
         answer="B. Adipocytes (fat cells)",
         image_desc="H&E histology slide showing white adipose tissue with signet ring cells",
         explanation="White adipocytes: Large unilocular lipid droplet pushes nucleus and cytoplasm to periphery β†’ 'signet ring' appearance on H&E. Brown adipocytes: multilocular (multiple small droplets), more mitochondria, darker cytoplasm. Used for thermogenesis (heat production) via uncoupling protein (UCP-1/thermogenin).",
         note="Signet ring in stomach = gastric carcinoma (malignant signet ring cells with mucin). Context matters!"),

    dict(year="Jan 2024", session="", topic="Pelvis & Perineum",
         subtopic="Female Pelvis",
         qtext="An ultrasound image shows a structure related to the lateral wall of the pelvis. The ureter passes in relation to which structure in the female pelvis?",
         options=["A. Above the uterine artery", "B. Below the uterine artery", "C. Medial to the internal iliac artery", "D. Lateral to the ovary"],
         answer="B. Below the uterine artery",
         image_desc="Diagram of female pelvis showing ureter course near uterine artery",
         explanation="Water under the bridge: Ureter passes UNDER the uterine artery (water = ureter, bridge = uterine artery). This is the classic surgical danger point in hysterectomy. The ureter passes 2 cm lateral to cervix. Uterine artery is ligated first in hysterectomy but ureter must be identified.",
         note="'Water under the bridge' = one of the most tested anatomical mnemonics in FMGE/NEET PG."),

    dict(year="Jan 2024", session="", topic="Head & Neck Anatomy",
         subtopic="Salivary Glands",
         qtext="An image of the floor of mouth shows a bluish cystic swelling. What is the most likely diagnosis?",
         options=["A. Sublingual dermoid cyst", "B. Ranula", "C. Thyroglossal cyst", "D. Branchial cyst"],
         answer="B. Ranula",
         image_desc="Clinical image of floor of mouth showing translucent bluish cystic swelling",
         explanation="Ranula = mucus retention cyst arising from sublingual or minor salivary glands. Appears as a soft, translucent, bluish cystic swelling in floor of mouth. 'Plunging ranula' = extends through mylohyoid into neck. Treatment = marsupialization or excision with sublingual gland.",
         note="Most common site: floor of mouth (sublingual). Ranula derived from 'rana' = frog (frog belly appearance)."),

    # ═══════════════════════════  FMGE JUN 2024  ═══════════════════════════
    dict(year="Jun 2024", session="", topic="Lower Limb Anatomy",
         subtopic="Nerve Injuries",
         qtext="A patient cannot evert the foot and has sensory loss over the dorsum of foot. Clinical image shows foot drop. Which nerve is injured?",
         options=["A. Tibial nerve", "B. Superficial peroneal (fibular) nerve", "C. Common peroneal (fibular) nerve", "D. Deep peroneal nerve"],
         answer="C. Common peroneal (fibular) nerve",
         image_desc="Clinical image showing foot drop deformity; marked sensory area on dorsum of foot",
         explanation="Common peroneal nerve injury (at neck of fibula): Foot drop (loss of dorsiflexors), loss of eversion (superficial peroneal). Sensory loss: dorsum of foot and lateral leg. Deep peroneal = dorsiflexion only, 1st web space sensation. Superficial peroneal = eversion only, dorsum sensation.",
         note="Most vulnerable nerve at neck of fibula. Causes: fibular neck fracture, crossed leg sitting, plaster cast."),

    dict(year="Jun 2024", session="", topic="Embryology",
         subtopic="Gut Development",
         qtext="A surgical specimen image shows a Meckel's diverticulum. Which is TRUE about Meckel's diverticulum?",
         options=["A. Remnant of vitelline duct, 2 feet from ileocecal valve", "B. Remnant of urachus, 2 cm wide", "C. Remnant of allantois, in sigmoid colon", "D. Remnant of yolk stalk, in jejunum"],
         answer="A. Remnant of vitelline duct, 2 feet from ileocecal valve",
         image_desc="Surgical specimen showing Meckel's diverticulum on antimesenteric border of ileum",
         explanation="Meckel's diverticulum: Rule of 2s – 2% population, 2 feet (60 cm) from ileocecal valve, 2 inches long, 2:1 male:female, 2 types of ectopic tissue (gastric most common β†’ bleeding, pancreatic). True diverticulum (all layers). On antimesenteric border. Remnant of vitelline/omphalomesenteric duct.",
         note="Commonest cause of painless rectal bleeding in children. Diagnosed by Tc-99m pertechnetate scan."),

    dict(year="Jun 2024", session="", topic="Neuroanatomy",
         subtopic="Internal Capsule",
         qtext="An MRI image shows a lacunar infarct in the posterior limb of internal capsule. Which tract is most affected causing contralateral hemiplegia?",
         options=["A. Anterior corticospinal tract", "B. Lateral corticospinal tract passing through posterior limb of IC", "C. Rubrospinal tract", "D. Reticulospinal tract"],
         answer="B. Lateral corticospinal tract passing through posterior limb of IC",
         image_desc="Axial MRI brain showing lacunar infarct in posterior limb of right internal capsule",
         explanation="Internal capsule posterior limb contains: corticospinal (motor) fibers, corticobulbar fibers, thalamocortical sensory fibers. Arrangement: Face (genu) β†’ Arm β†’ Leg (posterior to anterior). Lacunar infarct in posterior limb β†’ pure motor hemiplegia (contralateral face, arm, leg weakness).",
         note="Anterior limb = frontopontine + anterior thalamic. Genu = corticobulbar. Posterior limb = corticospinal."),

    dict(year="Jun 2024", session="", topic="Thorax Anatomy",
         subtopic="Heart and Great Vessels",
         qtext="A chest X-ray image shows prominent left heart border. Identify the structure forming the left border of the heart.",
         options=["A. Right ventricle only", "B. Left ventricle, left atrial appendage, aortic knuckle, pulmonary trunk", "C. Left atrium (body)", "D. Superior vena cava"],
         answer="B. Left ventricle, left atrial appendage, aortic knuckle, pulmonary trunk",
         image_desc="PA chest X-ray with left cardiac border structures labeled",
         explanation="Left border of heart (from top to bottom): Aortic knuckle (arch of aorta) β†’ Pulmonary trunk β†’ Left atrial appendage β†’ Left ventricle. Right border: SVC (upper) β†’ Right atrium (lower). Left ventricle forms the apex. Right ventricle forms most of the anterior surface.",
         note="Left atrial enlargement: straightens/bulges left heart border at level of left atrial appendage (4th segment)."),

    # ═══════════════════════════  FMGE JAN 2025  ═══════════════════════════
    dict(year="Jan 2025", session="", topic="Embryology",
         subtopic="Urogenital Development",
         qtext="An image shows a congenital anomaly where the urethral opening is on the ventral surface of the penis. What is this condition?",
         options=["A. Epispadias", "B. Hypospadias", "C. Cryptorchidism", "D. Phimosis"],
         answer="B. Hypospadias",
         image_desc="Clinical image of hypospadias showing ventral urethral opening on penile shaft",
         explanation="Hypospadias: Failure of urogenital folds to fuse on ventral surface β†’ urethral opening on ventral (under) surface. More common than epispadias (1 in 300 males). Associated with chordee (ventral curvature). Epispadias: dorsal opening, associated with bladder exstrophy.",
         note="Hypo = below (ventral). Epi = above (dorsal). Hypospadias far more common. Never circumcise until repair."),

    dict(year="Jan 2025", session="", topic="Upper Limb Anatomy",
         subtopic="Shoulder Region",
         qtext="A radiograph shows a fracture of the surgical neck of humerus. Which nerve is most likely injured?",
         options=["A. Radial nerve", "B. Axillary nerve", "C. Musculocutaneous nerve", "D. Suprascapular nerve"],
         answer="B. Axillary nerve",
         image_desc="AP radiograph of shoulder showing surgical neck of humerus fracture with marked nerve territory",
         explanation="Axillary nerve winds around surgical neck of humerus in the quadrangular space (with posterior circumflex humeral artery). Injury β†’ loss of deltoid (abduction 15–90Β°), teres minor (lateral rotation), loss of sensation over regimental badge area (lateral aspect of upper arm). Test: shoulder abduction.",
         note="Regimental badge area = autonomic zone of axillary nerve. Loss = axillary nerve injury."),

    dict(year="Jan 2025", session="", topic="Head & Neck Anatomy",
         subtopic="Tongue",
         qtext="An image of the dorsum of tongue shows prominent foliate papillae at the lateral border. Which type of papillae contain taste buds?",
         options=["A. Filiform papillae only", "B. Fungiform, circumvallate (vallate), and foliate papillae", "C. All papillae equally", "D. Only circumvallate papillae"],
         answer="B. Fungiform, circumvallate (vallate), and foliate papillae",
         image_desc="Diagram of tongue dorsal surface showing papillae types with taste bud distribution",
         explanation="Taste buds present in: Fungiform (anterior 2/3, scattered), Circumvallate/Vallate (V-shaped row, ~8–12 large ones, most taste buds per papilla), Foliate (lateral border, rudimentary in humans). Filiform = no taste buds, most numerous, mechanical (touch/texture). CN VII (chorda tympani) = ant. 2/3. CN IX = post. 1/3.",
         note="Filiform = no taste buds. This is frequently tested as a negative option."),

    dict(year="Jan 2025", session="", topic="Abdominal Anatomy",
         subtopic="Peritoneum",
         qtext="A surgical image shows the lesser sac (omental bursa). What is the opening into the lesser sac called?",
         options=["A. Foramen of Luschka", "B. Epiploic foramen (Foramen of Winslow)", "C. Foramen of Magendie", "D. Foramen of Bochdalek"],
         answer="B. Epiploic foramen (Foramen of Winslow)",
         image_desc="Surgical/cadaveric image showing entry into lesser sac (omental bursa) via epiploic foramen",
         explanation="Epiploic foramen (Foramen of Winslow) = gateway to lesser sac. Boundaries: Anterior = hepatoduodenal ligament (portal triad: portal vein, hepatic artery, bile duct). Posterior = IVC. Superior = caudate lobe. Inferior = 1st part duodenum. Pringle's maneuver = compression of hepatoduodenal ligament to control liver bleeding.",
         note="Pringle's maneuver = compress structures in epiploic foramen to control hepatic hemorrhage."),

    dict(year="Jan 2025", session="", topic="Neuroanatomy",
         subtopic="Cranial Nerve Reflexes",
         qtext="An image shows the reflex arc for the corneal reflex. Which cranial nerve forms the afferent limb?",
         options=["A. Optic nerve (CN II)", "B. Facial nerve (CN VII)", "C. Trigeminal nerve (CN V – ophthalmic division)", "D. Trochlear nerve (CN IV)"],
         answer="C. Trigeminal nerve (CN V – ophthalmic division)",
         image_desc="Diagram showing corneal reflex arc with labeled afferent (V1) and efferent (VII) limbs",
         explanation="Corneal reflex: Afferent = CN V1 (nasociliary branch of ophthalmic division of trigeminal). Efferent = CN VII (facial nerve) β†’ orbicularis oculi β†’ blink. Tests both V (afferent) and VII (efferent). Absent corneal reflex in CN V lesion = no direct OR consensual response. Absent in CN VII = no direct, but consensual intact.",
         note="Deep coma test: corneal reflex tests CN V + CN VII. Lost early in acoustic neuroma (CN V compression)."),

    # ═══════════════════════════  FMGE JUL 2025  ═══════════════════════════
    dict(year="Jul 2025", session="", topic="Embryology",
         subtopic="Cardiac Development",
         qtext="An echocardiogram image shows a persistent opening between atria. What embryological structure fails to close in patent foramen ovale?",
         options=["A. Septum primum", "B. Ostium secundum", "C. Foramen ovale (septum secundum)", "D. Ductus arteriosus"],
         answer="C. Foramen ovale (septum secundum)",
         image_desc="Echocardiogram with bubble study showing right-to-left shunt at foramen ovale level",
         explanation="Foramen ovale = opening in septum secundum that allows right-to-left flow of oxygenated blood in fetus. Normally closes after birth due to increased LA pressure. PFO = incomplete fusion of septum primum and secundum. Present in 25–30% of adults. Associated with paradoxical embolism, cryptogenic stroke.",
         note="ASD vs PFO: PFO = flap-like opening (potential), ASD = actual defect. Ostium secundum ASD = most common ASD."),

    dict(year="Jul 2025", session="", topic="Lower Limb Anatomy",
         subtopic="Hip Joint",
         qtext="An X-ray image shows a fracture of the femoral neck in an elderly woman with osteoporosis. Which artery provides the most important blood supply to the femoral head at risk?",
         options=["A. Obturator artery (ligamentum teres)", "B. Medial circumflex femoral artery", "C. Lateral circumflex femoral artery", "D. Profunda femoris artery"],
         answer="B. Medial circumflex femoral artery",
         image_desc="AP pelvis X-ray showing subcapital femoral neck fracture; diagram of femoral head blood supply",
         explanation="Femoral head blood supply: Medial circumflex femoral artery (MCFA, branch of profunda femoris) = primary supply via retinacular branches. Lateral circumflex = lesser contribution. Obturator artery via ligamentum teres = minor (significant only in children). Femoral neck fracture disrupts MCFA β†’ AVN of femoral head.",
         note="Subcapital fracture = highest AVN risk. Garden classification grades I–IV. Garden IV = most displacement."),

    dict(year="Jul 2025", session="", topic="Thorax Anatomy",
         subtopic="Mediastinum",
         qtext="A CT chest image shows a posterior mediastinal mass. Which structures are found in the posterior mediastinum?",
         options=["A. Thymus, SVC, ascending aorta", "B. Descending aorta, thoracic duct, esophagus, azygos vein, sympathetic chain",
                  "C. Heart, pericardium only", "D. Trachea, main bronchi"],
         answer="B. Descending aorta, thoracic duct, esophagus, azygos vein, sympathetic chain",
         image_desc="CT chest axial image with posterior mediastinal mass and labeled mediastinal compartments",
         explanation="Posterior mediastinum (behind pericardium, T4–T12): Descending thoracic aorta, esophagus, thoracic duct, azygos + hemiazygos veins, sympathetic chain (ganglia), vagus nerves. Common posterior mediastinal masses: neurogenic tumors (most common), esophageal lesions, descending aortic aneurysm.",
         note="Most common posterior mediastinal mass in adults: neurogenic tumor (neurofibroma, schwannoma). In children: neuroblastoma."),
]

# ─────────────────────────────────────────────────────────────────────────────
# BUILD DOCUMENT
# ─────────────────────────────────────────────────────────────────────────────
story = []

# ── Cover page ──
story.append(Spacer(1, 1.5*cm))
story.append(Paragraph("FMGE ANATOMY", title_style))
story.append(Paragraph("Image-Based Previous Year Questions", title_style))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("2021 – 2025  |  MCQ Format with Answers & Explanations", subtitle_style))
story.append(Spacer(1, 0.4*cm))

# Cover info table
cover_data = [
    ["Exam", "FMGE (Foreign Medical Graduate Examination)"],
    ["Subject", "Anatomy (General + Regional + Embryology + Histology + Neuroanatomy)"],
    ["Years Covered", "Dec 2021 Β· Jun 2022 Β· Jan 2023 Β· Jan 2024 Β· Jun 2024 Β· Jan 2025 Β· Jul 2025"],
    ["Question Type", "Image-based / Clinico-anatomical MCQs"],
    ["Format", "4 options + Correct Answer + Detailed Explanation"],
    ["Total Questions", f"{len(questions)} high-yield image-tagged questions"],
]
cover_table = Table(cover_data, colWidths=[4.5*cm, 12*cm])
cover_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (0,-1), colors.HexColor('#e3f2fd')),
    ('BACKGROUND', (1,0), (1,-1), colors.HexColor('#fafafa')),
    ('TEXTCOLOR', (0,0), (-1,-1), colors.HexColor('#212121')),
    ('FONTNAME', (0,0), (0,-1), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#bdbdbd')),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(cover_table)
story.append(Spacer(1, 0.6*cm))

# Disclaimer
disclaimer = Paragraph(
    "<i>Note: These are memory-based/reconstructed questions from FMGE exam sessions. "
    "Image descriptions represent the type of image shown in the original question. "
    "For educational use only. Source: PrepLadder, DigiNerve, Careers360 FMGE PYQ compilations.</i>",
    exp_style)
story.append(disclaimer)
story.append(PageBreak())

# ── How to use ──
story.append(Paragraph("How to Use This Booklet", year_header_style))
tips = [
    "πŸ–Ό  Image Tag: Each question notes the type of image shown in the original FMGE exam.",
    "βœ”  Answer: Shown immediately after options to allow self-checking.",
    "πŸ“–  Explanation: High-yield anatomical teaching point for each question.",
    "πŸ’‘  Exam Note: Additional exam tips and commonly confused concepts.",
    "πŸ“…  Year Tag: Helps track which session each question appeared in.",
    "🎯  Strategy: First attempt questions without reading the answer, then verify.",
]
for tip in tips:
    story.append(Paragraph(tip, opt_style))
story.append(Spacer(1, 0.3*cm))
story.append(PageBreak())

# ── Questions by year ──
year_groups = {}
for q in questions:
    yr = q['year']
    year_groups.setdefault(yr, []).append(q)

q_global = 1
for yr_label in ["Dec 2021", "Jun 2022", "Jan 2023", "Jan 2024", "Jun 2024", "Jan 2025", "Jul 2025"]:
    if yr_label not in year_groups:
        continue
    qs = year_groups[yr_label]
    story.append(Paragraph(f"  FMGE {yr_label} β€” Anatomy Image-Based Questions  ", year_header_style))
    story.append(Paragraph(f"Total questions in this section: {len(qs)}", subtitle_style))
    story.append(Spacer(1, 0.2*cm))
    for q in qs:
        block = q_block(
            num=q_global,
            year=q['year'], session=q['session'],
            topic=q['topic'], subtopic=q.get('subtopic',''),
            qtext=q['qtext'], options=q['options'],
            answer=q['answer'], explanation=q.get('explanation',''),
            image_desc=q.get('image_desc'), note=q.get('note')
        )
        story.append(block)
        q_global += 1
    story.append(PageBreak())

# ── Quick Revision Index ──
story.append(Paragraph("  Quick Revision Index β€” Topics Covered  ", year_header_style))
story.append(Spacer(1, 0.2*cm))
topics_list = [
    ("Embryology", "Neural crest cells, Pharyngeal arches, Gut development, Cardiac septation, Urogenital"),
    ("Neuroanatomy", "Spinal cord tracts, Internal capsule, Brainstem, Cranial nerves, Cerebral arteries"),
    ("Upper Limb", "Brachial plexus, Wrist/hand, Shoulder, Radial/axillary nerve injuries"),
    ("Lower Limb", "Peroneal nerve, Femoral artery, Hip joint blood supply"),
    ("Head & Neck", "Skull base foramina, Salivary glands, Tongue, Cranial nerve reflexes"),
    ("Thorax", "Cardiac chambers/borders, Mediastinum compartments"),
    ("Abdomen & Pelvis", "Peritoneum, Female pelvis (ureter), Meckel's diverticulum"),
    ("Histology", "Cartilage types, Connective tissue cells"),
    ("Osteology", "Vertebral pathology, Skull foramina"),
]
idx_data = [["Topic Area", "Sub-topics Covered"]] + [[t, s] for t,s in topics_list]
idx_table = Table(idx_data, colWidths=[4.5*cm, 12*cm])
idx_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
    ('BACKGROUND', (0,1), (-1,-1), colors.HexColor('#f5f5f5')),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fafafa'), colors.HexColor('#e8f5e9')]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#bdbdbd')),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(idx_table)

# Build PDF
doc.build(story, onFirstPage=add_header_footer, onLaterPages=add_header_footer)
print(f"PDF generated: {OUTPUT}")
print(f"Total questions: {len(questions)}")
Running Command

cd /tmp/workspace/fmge-anatomy-pyq && python generate_pdf.py 2>&1

Running Command

ls -lh /tmp/workspace/fmge-anatomy-pyq/FMGE_Anatomy_ImageBased_PYQ_2021_2025.pdf

Your PDF is ready!

FMGE Anatomy ImageBased PYQ 2021 2025

PDF Document Β· PDF


Here's what's inside the PDF:
32 image-based Anatomy MCQs spanning 7 FMGE sessions (Dec 2021 to Jul 2025), each with:
  • πŸ–Ό Image tag - describes the type of image shown in the original exam (clinical photo, X-ray, MRI, histology slide, diagram, angiogram, etc.)
  • 4 options in MCQ format
  • βœ” Correct answer highlighted in green
  • πŸ“– Detailed explanation with high-yield teaching points
  • πŸ’‘ Exam note for commonly confused concepts and mnemonics
Topics covered across sessions:
Topic AreaHighlights
EmbryologyNeural crest derivatives, pharyngeal arches, cardiac septation, Meckel's diverticulum, hypospadias
NeuroanatomySpinal cord tracts (SCD), internal capsule, cranial nerves, berry aneurysm, corneal reflex
Upper LimbRadial/axillary nerve injuries, scaphoid fracture, brachial plexus
Lower LimbCommon peroneal nerve, femoral artery, femoral neck AVN
Head & NeckSkull foramina, ranula, tongue papillae, CN VI in raised ICP
ThoraxCardiac chambers/borders, posterior mediastinum
Abdomen & PelvisEpiploic foramen, "water under the bridge" (ureter), peritoneum
HistologyElastic cartilage, adipocytes (signet ring), cartilage types
The questions are sourced from memory-based FMGE PYQ compilations (PrepLadder, DigiNerve, Careers360).
This is a shared conversation. Sign in to Orris to start your own chat.