Ashok

Hey Ashok! How can I help you today?

Yes

It looks like you might have more to say! What's on your mind? Feel free to ask me anything.

How goes preparation for fmge

Ha, I'm an AI so I don't study or prepare for exams! But I can definitely help you prep for FMGE (Foreign Medical Graduate Examination).
Here's how I can assist:
  • Subject-wise Q&A - Quiz you on any topic (Anatomy, Physiology, Pharmacology, Pathology, Medicine, Surgery, etc.)
  • High-yield summaries - Quick revision notes on important topics
  • Concept explanations - Break down tough concepts with clarity
  • Previous year question patterns - Discuss commonly tested topics
  • Weak area focus - Tell me which subjects you find tough and we'll work on them
FMGE covers 19 subjects with 300 MCQs in a single session, so strategic preparation matters a lot.
Where are you in your prep right now? Which subjects do you want to tackle first?

Create a study guide for high-yield FMGE topics

Asking for Preferences
Reading File
Running Command

mkdir -p /home/daytona/workspace/fmge-study-guide

Writing File

~/fmge-study-guide/generate_guide.py

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

OUTPUT = "/home/daytona/workspace/fmge-study-guide/FMGE_High_Yield_Study_Guide.pdf"

# ── colour palette ──────────────────────────────────────────────────────────
NAVY    = colors.HexColor("#1a3a5c")
TEAL    = colors.HexColor("#0e7490")
AMBER   = colors.HexColor("#b45309")
LIGHT   = colors.HexColor("#e0f2fe")
WHITE   = colors.white
GREY    = colors.HexColor("#f1f5f9")

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

TITLE_STYLE = ParagraphStyle("title_s", fontSize=26, textColor=WHITE,
                              alignment=TA_CENTER, fontName="Helvetica-Bold",
                              spaceAfter=6)
SUB_STYLE   = ParagraphStyle("sub_s",   fontSize=13, textColor=LIGHT,
                              alignment=TA_CENTER, fontName="Helvetica",
                              spaceAfter=4)
DATE_STYLE  = ParagraphStyle("date_s",  fontSize=10, textColor=LIGHT,
                              alignment=TA_CENTER, fontName="Helvetica-Oblique")

SEC_STYLE   = ParagraphStyle("sec_s",   fontSize=14, textColor=WHITE,
                              fontName="Helvetica-Bold", spaceAfter=2,
                              spaceBefore=4)
TOPIC_STYLE = ParagraphStyle("top_s",   fontSize=11, textColor=NAVY,
                              fontName="Helvetica-Bold", spaceAfter=2,
                              spaceBefore=6)
BULLET_STYLE= ParagraphStyle("bul_s",   fontSize=9.5, textColor=colors.HexColor("#1e293b"),
                              fontName="Helvetica", leftIndent=14,
                              spaceAfter=1, leading=13)
NOTE_STYLE  = ParagraphStyle("note_s",  fontSize=8.5, textColor=AMBER,
                              fontName="Helvetica-Bold", leftIndent=14,
                              spaceAfter=2, leading=12)

# ── data ─────────────────────────────────────────────────────────────────────
SUBJECTS = [
    {
        "name": "1. Anatomy",
        "topics": [
            ("Brachial Plexus", [
                "Roots C5-T1; trunks -> divisions -> cords -> branches",
                "Erb's palsy: C5-C6 (waiter's tip); Klumpke's: C8-T1 (claw hand)",
                "Axillary nerve: surgical neck # -> deltoid paralysis, loss sensation regimental badge area",
                "Radial nerve: spiral groove # -> wrist drop; long thoracic: winged scapula",
            ]),
            ("Triangles of Neck", [
                "Anterior triangle: carotid, muscular, submandibular, submental",
                "Posterior triangle: occipital, supraclavicular (subclavian)",
                "Carotid bifurcation at upper border of thyroid cartilage (C3-C4)",
                "Danger space of neck: between alar & prevertebral fascia -> mediastinum",
            ]),
            ("Heart & Great Vessels", [
                "SA node: right atrium, junction of SVC; supplied by RCA (60%) or LCx (40%)",
                "AV node: triangle of Koch; bundle of His -> LBB + RBB",
                "Coronary dominance: RCA dominant in 85%; LCA supplies most of LV",
                "Ventricular septal defect: most common CHD (membranous VSD commonest type)",
            ]),
            ("Peritoneum & Gut", [
                "Lesser sac (omental bursa) accessed via epiploic foramen of Winslow",
                "Meckel's diverticulum: 2 feet from ileocaecal valve, 2 inches long, 2% population",
                "Portal-systemic anastomoses: oesophageal, rectal, paraumbilical, retroperitoneal",
                "Femoral canal: contains fat & lymph node of Cloquet; medial to femoral vein",
            ]),
            ("Embryology High-Yield", [
                "Derivatives of pharyngeal arches: 1st -> mandible/muscles of mastication; 2nd -> stapedius/stylohyoid",
                "Branchial cyst: remnant of 2nd pharyngeal cleft (most common); anterior to SCM",
                "Neural tube defects: folic acid deficiency; spina bifida occulta vs cystica",
                "Thyroglossal cyst: moves with swallowing AND tongue protrusion (embryological attachment)",
            ]),
        ]
    },
    {
        "name": "2. Physiology",
        "topics": [
            ("Cardiac Physiology", [
                "Starling's law: stroke volume increases with end-diastolic volume (preload)",
                "Normal cardiac output: 5 L/min; CI = CO/BSA (normal 2.5-4.0 L/min/m2)",
                "Pressure-volume loop: isovolumetric contraction -> ejection -> isovolumetric relaxation -> filling",
                "Autonomic: sympathetic increases HR & contractility; vagus slows SA/AV node",
            ]),
            ("Respiratory Physiology", [
                "Dead space (Bohr equation): VD/VT = (PaCO2 - PECO2) / PaCO2",
                "FRC = ERV + RV; cannot be measured by spirometry (needs helium dilution/body plethysmography)",
                "Oxyhemoglobin curve shifts RIGHT: fever, acidosis, high 2,3-DPG, high pCO2",
                "Hypoxic pulmonary vasoconstriction (HPV): unique to lungs; Euler-Liljestrand reflex",
                "A-a gradient = PAO2 - PaO2; normal < 15 mmHg; increases in V/Q mismatch, diffusion defect, shunt",
            ]),
            ("Renal Physiology", [
                "GFR ~125 mL/min; RBF ~1200 mL/min; filtration fraction = GFR/RPF = 20%",
                "Tm for glucose: 375 mg/min; threshold ~180 mg/dL (glucosuria above this)",
                "Aldosterone: acts on principal cells (Na+ reabsorption, K+ secretion) in collecting duct",
                "ADH: V2 receptors -> aquaporin-2 insertion -> water reabsorption in collecting duct",
            ]),
            ("Nerve & Muscle", [
                "Resting membrane potential: -70 mV (neurons), -90 mV (muscle)",
                "Absolute refractory period: Na+ channels inactivated; no AP possible",
                "Neuromuscular junction: ACh -> nicotinic receptors -> end-plate potential",
                "Rigor mortis: ATP depletion -> permanent actin-myosin cross-bridge (onset 2-6 h, resolves 24-48 h)",
            ]),
        ]
    },
    {
        "name": "3. Biochemistry",
        "topics": [
            ("Enzyme & Metabolism", [
                "Km = substrate concentration at half Vmax; low Km = high affinity",
                "Competitive inhibition: increases Km, Vmax unchanged; non-competitive: Vmax decreases, Km unchanged",
                "Rate-limiting step: glycolysis = PFK-1; TCA = isocitrate DH; fatty acid synthesis = ACC",
                "Gluconeogenesis: liver + kidney cortex; substrates: lactate, alanine, glycerol, odd-chain FAs",
            ]),
            ("Vitamins", [
                "B1 (Thiamine): Wernicke's encephalopathy (ophthalmoplegia, ataxia, confusion), beriberi",
                "B3 (Niacin): pellagra (3Ds: dermatitis, diarrhoea, dementia); deficiency in Hartnup disease",
                "B12: subacute combined degeneration of cord; Schilling test; intrinsic factor from parietal cells",
                "Vit D: 7-dehydrocholesterol -> skin (UV) -> 25-OH (liver) -> 1,25-OH2 (kidney); rickets/osteomalacia",
                "Vit K: gamma-carboxylation of factors II, VII, IX, X, Protein C & S",
            ]),
            ("Genetic Disorders", [
                "PKU: phenylalanine hydroxylase deficiency; musty odour, fair skin, intellectual disability",
                "Alkaptonuria: homogentisate oxidase deficiency; dark urine, ochronosis, arthritis",
                "Maple syrup urine disease: BCAA dehydrogenase; sweet urine, neurodegeneration",
                "Gaucher's disease: glucocerebrosidase deficiency; Gaucher cells (crumpled tissue paper); most common LSD",
            ]),
        ]
    },
    {
        "name": "4. Pathology",
        "topics": [
            ("Cell Injury & Death", [
                "Coagulative necrosis: most tissues (heart, kidney); architecture preserved",
                "Liquefactive necrosis: brain infarct & bacterial abscesses",
                "Caseous necrosis: TB (cheese-like); combination coagulative + liquefactive",
                "Apoptosis: caspase activation; cell shrinkage, nuclear condensation; no inflammation",
                "Free radical injury: reperfusion injury, CCl4 toxicity; neutralised by SOD, catalase, glutathione peroxidase",
            ]),
            ("Inflammation", [
                "Acute: neutrophils; chemical mediators: histamine (mast cells), bradykinin, PGs, leukotrienes",
                "Chronic: macrophages + lymphocytes; IL-1, TNF-alpha, IL-6 -> systemic effects (fever, acute phase proteins)",
                "Granuloma: TB, sarcoidosis, Crohn's, fungal, foreign body; Langhans giant cells (TB) vs foreign body giant cells",
                "CRP: sensitive marker of inflammation; elevated in bacterial infection, MI, autoimmune disease",
            ]),
            ("Tumour Pathology", [
                "Benign: well-differentiated, encapsulated, no invasion/metastasis",
                "Malignant features: anaplasia, pleomorphism, high mitotic index, necrosis, invasion",
                "Oncogenes: ras (most common point mutation in human cancers), c-myc (Burkitt's), HER2/neu (breast)",
                "Tumour suppressors: p53 (guardian of genome), Rb (retinoblastoma), BRCA1/2",
                "Paraneoplastic syndromes: SIADH (small cell lung Ca), PTHrP (squamous cell lung Ca, renal Ca)",
            ]),
            ("Haematology Pathology", [
                "Iron deficiency anaemia: microcytic hypochromic; low serum iron, high TIBC, low ferritin",
                "B12/folate deficiency: macrocytic megaloblastic; hypersegmented neutrophils",
                "Sickle cell: HbS (Glu->Val at position 6 of beta chain); crisis precipitated by hypoxia, cold, dehydration",
                "CML: BCR-ABL (t9;22 Philadelphia chromosome); treated with imatinib",
                "Hodgkin's lymphoma: Reed-Sternberg cells (owl-eye nuclei); bimodal age distribution",
            ]),
        ]
    },
    {
        "name": "5. Pharmacology",
        "topics": [
            ("Autonomic Pharmacology", [
                "Atropine: muscarinic antagonist; increases HR, decreases secretions, mydriasis",
                "Neostigmine: anticholinesterase (reversible); used in myasthenia gravis, reversal of NMB",
                "Propranolol: non-selective beta-blocker; avoid in asthma, COPD, DM (masks hypoglycaemia)",
                "Adrenaline: alpha + beta agonist; DOC for anaphylaxis (IM into anterolateral thigh)",
            ]),
            ("Antimicrobials", [
                "Penicillins: inhibit cell wall synthesis (transpeptidase/PBP); bactericidal; beta-lactam ring",
                "Aminoglycosides: inhibit 30S ribosome; ototoxic + nephrotoxic; monitor trough levels",
                "Fluoroquinolones: inhibit DNA gyrase (topoisomerase II); avoid in children (cartilage toxicity)",
                "Metronidazole: anaerobes + protozoa; disulfiram-like reaction with alcohol",
                "Chloramphenicol: inhibits 50S (peptidyl transferase); grey baby syndrome; aplastic anaemia",
            ]),
            ("CNS Drugs", [
                "Phenytoin: Na+ channel blocker; zero-order kinetics; gingival hyperplasia, hirsutism, teratogen",
                "Lithium: mood stabiliser; narrow TI; nephrotoxic; monitor levels; avoid NSAIDs (increase levels)",
                "Haloperidol: D2 antagonist; extrapyramidal SE (acute dystonia, akathisia, tardive dyskinesia, parkinsonism)",
                "SSRIs: first-line for depression/OCD/panic; serotonin syndrome with MAOIs",
            ]),
            ("Cardiovascular Drugs", [
                "Digoxin: inhibits Na/K ATPase; narrow TI; toxicity: yellow vision, arrhythmias, nausea",
                "ACE inhibitors: dry cough (bradykinin); avoid in pregnancy (teratogen); hyperkalemia",
                "Heparin: activates antithrombin III; LMWH preferred; reversed by protamine sulphate",
                "Warfarin: inhibits Vit K reductase (factors II, VII, IX, X); reversed by Vit K/FFP",
            ]),
        ]
    },
    {
        "name": "6. Microbiology",
        "topics": [
            ("Bacteriology", [
                "Staphylococcus aureus: coagulase +ve; TSST-1 (toxic shock), exfoliatin (scalded skin), PVL (necrotising pneumonia)",
                "Streptococcus pyogenes (Group A): M protein; post-streptococcal: rheumatic fever, PSGN",
                "Mycobacterium tuberculosis: acid-fast bacillus; Ghon focus (primary TB); PPD/Mantoux test",
                "Clostridium difficile: pseudomembranous colitis; treat with vancomycin (oral) or fidaxomicin; metronidazole (mild)",
                "Gram negative: outer membrane (LPS/endotoxin); E.coli O157:H7 -> HUS; Salmonella typhi -> typhoid",
            ]),
            ("Virology", [
                "Hepatitis B: DNA virus (Hepadnavirus); HBsAg (surface), HBeAg (infectivity); anti-HBs (recovery/vaccination)",
                "HIV: RNA retrovirus; CCR5 co-receptor (R5 tropic); CD4+ T cells; window period: NAT < Ab tests",
                "Herpes simplex: HSV-1 (oral/encephalitis), HSV-2 (genital); latency in dorsal root ganglia",
                "Rabies: bullet-shaped rhabdovirus; Negri bodies (hippocampus); retrograde axonal transport",
                "Dengue: flavivirus; Aedes aegypti; NS1 antigen early; IgM ELISA day 4-5; dengue shock syndrome",
            ]),
            ("Parasitology", [
                "Plasmodium falciparum: most severe malaria; quotidian/irregular fever; cerebral malaria, blackwater fever",
                "Entamoeba histolytica: flask-shaped ulcers; amoebic liver abscess (chocolate sauce pus, anchovy paste)",
                "Wuchereria bancrofti: lymphatic filariasis; nocturnal periodicity; DEC is DOC",
                "Taenia solium: cysticercosis (humans = dead-end host); neurocysticercosis -> seizures",
                "Giardia lamblia: mountaineers' diarrhoea; steatorrhoea; trophozoites (falling-leaf motility); treat with metronidazole",
            ]),
        ]
    },
    {
        "name": "7. Medicine (Internal)",
        "topics": [
            ("Cardiology", [
                "STEMI: ST elevation > 1mm (limb), > 2mm (chest) in 2+ contiguous leads; treat within 90 min (PCI)",
                "Heart failure: BNP elevated; ESC criteria; HFrEF (EF <40%) vs HFpEF (EF ≥50%); ACEi + beta-blocker + MRA",
                "Hypertension: JNC 8 / ISH 2020: target <130/80 (general); first-line: ACEi/ARB, CCB, thiazide",
                "Atrial fibrillation: irregularly irregular pulse; AF score CHA2DS2-VASc for anticoagulation",
            ]),
            ("Respiratory Medicine", [
                "COPD: FEV1/FVC < 0.7; pink puffer (emphysema) vs blue bloater (chronic bronchitis)",
                "Bronchial asthma: reversible obstruction; peak flow monitoring; ICS mainstay of treatment",
                "Pulmonary embolism: Wells score; D-dimer; CTPA gold standard; anticoagulate (LMWH -> warfarin/DOAC)",
                "TB: 2HRZE / 4HR; directly observed therapy; MDR-TB = resistant to INH + rifampicin",
            ]),
            ("Gastroenterology", [
                "Peptic ulcer: H. pylori (80-90% duodenal, 70% gastric); triple therapy: PPI + amoxicillin + clarithromycin",
                "Cirrhosis: Child-Pugh / MELD score; complications: variceal bleed (terlipressin + banding), SBP, HE, HRS",
                "IBD: UC (mucosal, rectum -> proximal, pseudopolyps) vs Crohn's (transmural, skip lesions, fistulae)",
                "Pancreatitis: Ranson's criteria; amylase (rises fast, falls fast); lipase more specific; ERCP for gallstone pancreatitis",
            ]),
            ("Endocrinology", [
                "DM Type 2: HbA1c target < 7% (53 mmol/mol); metformin first-line; SGLT2i/GLP-1 have CV/renal benefits",
                "Hypothyroidism: TSH elevated, fT4 low; treat with levothyroxine; myxoedema coma -> IV T3/T4 + steroids",
                "Cushing's syndrome: high cortisol; overnight DST; 24h UFC; MRI pituitary (Cushing's disease) or CT adrenal",
                "Addison's disease: primary adrenal insufficiency; hyponatraemia + hyperkalaemia; short Synacthen test",
            ]),
        ]
    },
    {
        "name": "8. Surgery",
        "topics": [
            ("Acute Abdomen", [
                "Appendicitis: McBurney's point tenderness, Rovsing's sign; alvarado score; laproscopic appendicectomy",
                "Intestinal obstruction: SBO (adhesions #1 cause) vs LBO (colorectal cancer #1 in adults)",
                "Peritonitis: board-like rigidity; absent bowel sounds; erect CXR -> free air under diaphragm",
                "Gallstones: Courvoisier's law: palpable GB + jaundice = NOT gallstones (likely periampullary Ca)",
            ]),
            ("Hernias", [
                "Indirect inguinal: most common; congenital; lateral to inferior epigastric vessels",
                "Direct inguinal: medial to inferior epigastric; Hesselbach's triangle; weakness of transversalis fascia",
                "Femoral hernia: more common in women; below & lateral to pubic tubercle; HIGH risk of strangulation",
                "Richter's hernia: only part of bowel wall trapped (no obstruction); Maydl's hernia: W-loop",
            ]),
            ("Thyroid & Parathyroid", [
                "Papillary thyroid Ca: most common (80%); psammoma bodies; lymphatic spread; excellent prognosis",
                "Follicular thyroid Ca: haematogenous spread (bone, lung); radioiodine uptake positive",
                "Medullary thyroid Ca: calcitonin secreting; C-cells; MEN2A/2B association; RET mutation",
                "Hyperparathyroidism: stones, bones, groans, moans; elevated PTH + Ca; USS + sestamibi scan",
            ]),
            ("Orthopaedics", [
                "Colles' fracture: distal radius; dinner fork deformity; FOOSH; elderly females (osteoporosis)",
                "Compartment syndrome: 6 Ps (pain on passive stretch, pallor, pulselessness, paraesthesia, paralysis, pressure); fasciotomy",
                "Fracture neck of femur: Garden classification I-IV; intracapsular (I/II -> fixation; III/IV -> arthroplasty)",
                "Avascular necrosis: femoral head most common; risk: steroids, SCD, diving, alcohol, trauma",
            ]),
        ]
    },
    {
        "name": "9. Obstetrics & Gynaecology",
        "topics": [
            ("Obstetrics", [
                "Pre-eclampsia: hypertension (>140/90) + proteinuria after 20 weeks; treat with labetalol/nifedipine; MgSO4 for eclampsia",
                "Placenta praevia: low-lying placenta; painless antepartum haemorrhage; DO NOT do VE",
                "Placenta abruptio: painful APH; concealed or revealed; Couvelaire uterus; risk: HTN, trauma, cocaine",
                "Gestational diabetes: OGTT at 24-28 weeks; target FBS <95, 1h <140, 2h <120 mg/dL",
                "PPH: uterine atony = most common cause (80%); 4 Ts (tone, tissue, trauma, thrombin); oxytocin first-line",
            ]),
            ("Gynaecology", [
                "Ovarian cysts: dermoid (teratoma) = most common benign; CA-125 marker for epithelial ovarian Ca",
                "Ectopic pregnancy: ampullary part of fallopian tube (most common); serum hCG + TVS",
                "Cervical cancer: HPV 16/18 (squamous); Pap smear screening; colposcopy + biopsy for diagnosis",
                "PCOS: Rotterdam criteria (2/3): oligo-anovulation, hyperandrogenism, polycystic ovaries; metformin + OCP",
                "Endometriosis: chocolate cysts (endometriomas); CA-125 elevated; laparoscopy for diagnosis",
            ]),
        ]
    },
    {
        "name": "10. Paediatrics",
        "topics": [
            ("Neonatology", [
                "APGAR score: appearance, pulse, grimace, activity, respiration; scored at 1 & 5 min; 7-10 = normal",
                "Respiratory distress syndrome: surfactant deficiency; premature infants; ground-glass appearance on CXR",
                "Neonatal jaundice: physiological (day 2-3, resolves by day 10); pathological: day 1 jaundice = haemolytic",
                "Necrotising enterocolitis: premature, formula-fed; pneumatosis intestinalis on AXR; surgical emergency",
            ]),
            ("Common Paediatric Conditions", [
                "Febrile seizures: age 6 months - 5 years; simple (< 15 min, generalised) vs complex; reassure parents",
                "Intussusception: 3 months - 3 years; currant jelly stools; dance's sign; air enema reduction",
                "Kawasaki disease: fever > 5 days + 4/5 criteria (rash, conjunctivitis, lip changes, lymphadenopathy, extremity changes); IVIG + aspirin",
                "Congenital hypothyroidism: most common preventable cause of intellectual disability; heel prick TSH screening",
                "Croup (laryngotracheobronchitis): parainfluenza virus; steeple sign on X-ray; treat with nebulised adrenaline + dexamethasone",
            ]),
            ("Childhood Vaccinations (India - NIS)", [
                "BCG: at birth; left deltoid; Mantoux test positive after 6 weeks",
                "OPV: birth, 6, 10, 14 weeks, 9 & 18 months; also IPV at 6 & 14 weeks",
                "Pentavalent (DTP + Hep B + Hib): 6, 10, 14 weeks; booster DTP at 18 months & 5 years",
                "MMR: 9 months + 15-18 months; also Vitamin A at 9 months",
                "Typhoid conjugate vaccine (TCV): 9-12 months (new addition to NIS)",
            ]),
        ]
    },
    {
        "name": "11. Community Medicine (PSM)",
        "topics": [
            ("Epidemiology", [
                "Incidence: new cases in a period / population at risk; measures risk",
                "Prevalence = Incidence x Duration of disease; useful for planning health services",
                "Sensitivity: true positive rate (rules OUT disease when negative - SNOUT)",
                "Specificity: true negative rate (rules IN disease when positive - SPIN)",
                "NNT = 1 / Absolute Risk Reduction; NNH = 1 / Absolute Risk Increase",
            ]),
            ("Disease Control Programs", [
                "RNTCP/NTEP: DOTS; 2HRZE/4HR; bedaquiline for MDR-TB; notification mandatory",
                "NVBDCP: malaria, dengue, filariasis, kala-azar, JE, chikungunya",
                "NPCDCS: non-communicable diseases; screening for DM, HTN, oral/cervical/breast Ca",
                "Pulse Polio: OPV; last case of wild poliovirus in India: January 2011; India polio-free since March 2014",
                "ASHA: Accredited Social Health Activist; village level; incentive-based; link between community and health system",
            ]),
            ("Nutrition", [
                "PEM: kwashiorkor (protein deficiency: oedema, fatty liver, moon face) vs marasmus (total calorie: wasted look)",
                "SAM criteria: W/H < -3 SD, MUAC < 115 mm, bilateral pitting oedema, or W/A < 60%",
                "Iodine deficiency: endemic goitre, cretinism; iodised salt programme; Hetzel classification",
                "Vitamin A deficiency: Bitot's spots, xerophthalmia, night blindness; supplementation at 9 months, 16, 24 months",
            ]),
        ]
    },
    {
        "name": "12. Ophthalmology",
        "topics": [
            ("Glaucoma", [
                "POAG: open angle; insidious; elevated IOP; optic disc cupping; C:D ratio > 0.6 suspicious",
                "PACG: angle closure; acute: painful red eye, corneal oedema, fixed mid-dilated pupil; treat with pilocarpine + acetazolamide",
                "Normal IOP: 10-21 mmHg; measured by Goldmann applanation tonometry (gold standard)",
                "DOC for POAG: prostaglandin analogues (latanoprost); beta-blockers (timolol) also used",
            ]),
            ("Retinal Disorders", [
                "Diabetic retinopathy: background (microaneurysms, dot-blot haemorrhages, hard exudates) -> pre-proliferative -> proliferative",
                "CRVO: disc oedema, dilated tortuous veins, flame haemorrhages in all 4 quadrants; blood & thunder fundus",
                "CRAO: sudden painless loss of vision; pale retina, cherry red spot at fovea; emergency (massage, AC tap, O2)",
                "Retinal detachment: photopsia, floaters, shadow; rhegmatogenous most common; treat with laser/cryotherapy/surgery",
            ]),
            ("Common Eye Conditions", [
                "Pterygium: fibrovascular growth; nasal side; treat if approaching visual axis (surgery)",
                "Cataract: nuclear sclerosis (myopic shift); ECCE + IOL; most common cause of blindness in India (and world)",
                "Trachoma: C. trachomatis serovars A-C; SAFE strategy; leading infectious cause of blindness",
                "Horner's syndrome: ptosis, miosis, anhidrosis; interrupted sympathetic pathway",
            ]),
        ]
    },
    {
        "name": "13. ENT",
        "topics": [
            ("Ear", [
                "Otitis media with effusion (glue ear): conductive HL; type B tympanogram; grommet insertion",
                "Cholesteatoma: retraction pocket or perforation; keratin accumulation; erodes ossicles; complication: meningitis, facial palsy",
                "Otosclerosis: stapes fixation; Schwartz sign (flamingo pink blush); Carhart's notch at 2kHz; treat with stapedectomy",
                "BPPV: posterior semicircular canal; Dix-Hallpike test positive; Epley manoeuvre treatment",
            ]),
            ("Nose & Paranasal Sinuses", [
                "Deviated nasal septum: Killian's incision for SMR; functional septoplasty for FESS",
                "Epistaxis: anterior = Kiesselbach's plexus (Little's area); posterior = sphenopalatine artery (older, severe)",
                "Sinusitis: maxillary most common; CT is gold standard; treat with antibiotics + nasal decongestants",
                "Angiofibroma: adolescent males; nasal blockage + epistaxis; highly vascular; preop angioembolisation",
            ]),
            ("Throat & Larynx", [
                "Quinsy (peritonsillar abscess): medial displacement of tonsil; uvular deviation; treat with drainage + antibiotics",
                "Carcinoma larynx: glottic (best prognosis, early hoarseness); supraglottic (late presentation)",
                "Vocal cord polyp: unilateral; mucosal wave reduced; microlaryngoscopy; commonly in singers/smokers",
                "Recurrent laryngeal nerve: injury -> hoarseness; bilateral -> stridor; during thyroidectomy at risk",
            ]),
        ]
    },
    {
        "name": "14. Dermatology",
        "topics": [
            ("Infections", [
                "Tinea versicolor: Malassezia furfur; hypo/hyperpigmented patches; KOH: spaghetti & meatballs; treat with topical azoles",
                "Leprosy: M. leprae; AFB non-cultivable; Ridley-Jopling classification; MDT: PB (6 months) vs MB (12 months)",
                "Scabies: Sarcoptes scabiei; burrows in web spaces; treat with permethrin 5%; benzyl benzoate also used",
                "SSSS (Scalded Skin Syndrome): S. aureus exfoliatin toxin; cleavage in granular layer; Nikolsky sign +ve",
            ]),
            ("Inflammatory Conditions", [
                "Psoriasis: Koebner phenomenon; Auspitz sign (bleeding pinpoint when scale removed); plaque type most common",
                "Pemphigus vulgaris: intraepidermal (suprabasal) blister; anti-desmoglein 3 (& 1) antibodies; IIF fishnet pattern",
                "Bullous pemphigoid: subepidermal blister; anti-BP180/BP230; elderly; treat with steroids",
                "SLE skin: butterfly rash; photosensitive; discoid lesions; anti-dsDNA & anti-Sm specific",
                "Lichen planus: 6 Ps (pruritic, purple, polygonal, planar, papules, plaques); Wickham's striae",
            ]),
        ]
    },
    {
        "name": "15. Psychiatry",
        "topics": [
            ("Major Psychiatric Disorders", [
                "Schizophrenia: positive (hallucinations, delusions) + negative (flat affect, alogia, avolition) symptoms; onset 2nd-3rd decade",
                "MDD: DSM-5: 5+ symptoms for 2 weeks including depressed mood or anhedonia; first-line: SSRIs",
                "Bipolar disorder: mania (elevated mood, decreased sleep, grandiosity, flight of ideas) + depressive episodes",
                "OCD: ego-dystonic obsessions + compulsions; Y-BOCS scale; first-line: SSRIs + CBT; clomipramine second-line",
            ]),
            ("Psychopharmacology", [
                "Clozapine: most effective antipsychotic; agranulocytosis (monitor WBC weekly); metabolic syndrome",
                "ECT: severe depression, catatonia, suicidal ideation; modified with succinylcholine + anaesthesia",
                "Disulfiram: alcohol deterrent; inhibits aldehyde dehydrogenase; causes acetaldehyde accumulation -> flushing",
                "SSRI side effects: GI upset, sexual dysfunction, SIADH, serotonin syndrome with MAOIs",
            ]),
        ]
    },
    {
        "name": "16. Orthopaedics",
        "topics": [
            ("Bone Tumours", [
                "Osteosarcoma: most common primary bone malignancy; distal femur/proximal tibia; Codman's triangle, sunburst pattern",
                "Ewing's sarcoma: children; diaphysis; onion-peel periosteal reaction; t(11;22); chemotherapy + surgery",
                "Giant cell tumour: epiphysis; soap bubble appearance; eccentric lytic lesion; young adults",
                "Osteoid osteoma: < 2 cm; interlocking nidus; night pain relieved by aspirin; radiofrequency ablation",
            ]),
            ("Spine", [
                "PIVD: L4-L5 most common level; L5 nerve root compression (weakness of EHL, loss sensation dorsum foot)",
                "Spinal cord injury: Brown-Sequard syndrome (ipsilateral motor + proprioception loss, contralateral pain/temp loss)",
                "Pott's disease (spinal TB): anterior vertebral body; gibbus deformity; paraplegia; antitubercular therapy",
                "Cauda equina syndrome: saddle anaesthesia, bladder/bowel dysfunction; SURGICAL EMERGENCY",
            ]),
        ]
    },
    {
        "name": "17. Anaesthesia",
        "topics": [
            ("General Anaesthesia", [
                "Stages of anaesthesia (Guedel): I analgesia, II delirium/excitement, III surgical, IV medullary depression",
                "Thiopentone: ultra-short acting barbiturate; decreases ICP; avoid in porphyria; recovery by redistribution",
                "Propofol: TIVA; egg allergy? debated; PRIS (propofol infusion syndrome) with prolonged high-dose",
                "Succinylcholine: depolarising NMB; onset 60 sec; contraindicated in burns, crush injury, hyperkalaemia (phase 2 block at high doses)",
            ]),
            ("Regional Anaesthesia", [
                "Spinal anaesthesia: subarachnoid space; T10 for LSCS; hyperbaric bupivacaine; max level T4 safe",
                "Epidural: epidural space; useful for labour analgesia; loss of resistance technique",
                "Brachial plexus block: interscalene (shoulder), supraclavicular (arm), infraclavicular, axillary",
                "Complications of spinal: post-dural puncture headache (PDPH); treat with bed rest, caffeine, blood patch",
            ]),
        ]
    },
    {
        "name": "18. Forensic Medicine",
        "topics": [
            ("Thanatology (Death)", [
                "Post-mortem changes: livor mortis (1-2 h, fixed 6-12 h), rigor mortis (onset 2-6 h, full 12 h, resolves 24-48 h)",
                "Adipocere: saponification of body fat; moist soil; preservation of body",
                "Mummification: dry, hot conditions; preservation; loss of moisture",
                "Time since death estimation: rectal temp, lividity, rigor, stomach contents, putrefaction",
            ]),
            ("Medico-Legal", [
                "IPC 302: murder; IPC 304: culpable homicide not amounting to murder; IPC 304A: death by negligence",
                "MLC (Medico-Legal Case): mandatory in: assault, poisoning, rape, unnatural death, road traffic accident",
                "Dying declaration: statement by dying person; admissible even if death does not occur; no oath needed",
                "Age estimation radiologically: epiphyseal fusion; Gustafson's method (dental, histological)",
            ]),
            ("Toxicology", [
                "Organophosphate poisoning: SLUD (salivation, lacrimation, urination, defaecation); miosis; treat with atropine + pralidoxime (< 24 h)",
                "Cyanide poisoning: bright red blood; bitter almond smell; treat with sodium thiosulphate + hydroxycobalamin",
                "Carbon monoxide: cherry red colour; carboxyhaemoglobin; 100% O2; hyperbaric O2 in severe cases",
                "Arsenic poisoning: chronic: Mees' lines on nails, Aldrich-Mees lines, rain-drop pigmentation, Mees' nails",
            ]),
        ]
    },
    {
        "name": "19. Radiology",
        "topics": [
            ("Plain Radiographs", [
                "PA chest X-ray: right hilum lower than left; right hemidiaphragm higher (liver); cardiac shadow < 50% of thoracic width",
                "Causes of mediastinal widening: aortic aneurysm, lymphoma, thymoma, goitre, oesophageal Ca",
                "Pneumothorax: absent lung markings; tension PTX: mediastinal shift away from side of PTX",
                "Air bronchogram: bronchi visible against opacified alveoli; consolidation (pneumonia, pulmonary oedema)",
            ]),
            ("CT & MRI", [
                "CT head: hyperdense = acute blood; hypodense = oedema/infarct; isodense = subacute SDH",
                "CT pulmonary angiography (CTPA): gold standard for PE; saddle embolus; Hampton's hump (pleural-based opacity)",
                "MRI brain: T1 bright = fat, subacute blood; T2 bright = oedema, fluid, CSF; DWI bright = acute infarct",
                "Bone scan (Tc-99m): hot spots = metastases, infection, fracture; cold lesion = avascular necrosis, myeloma",
            ]),
            ("Interventional Radiology", [
                "ERCP: biliary stones, strictures, stenting; complication = pancreatitis (most common)",
                "FNAC vs core biopsy: FNAC = cytology; core = histology (preferred for lymphoma, soft tissue tumours)",
                "IVC filter: inserted for PE with contraindication to anticoagulation or recurrent PE on anticoagulation",
                "Angioplasty & stenting: balloon angioplasty + stent; restenosis less with drug-eluting stents",
            ]),
        ]
    },
]


def build_pdf():
    doc = SimpleDocTemplate(
        OUTPUT,
        pagesize=A4,
        leftMargin=1.8*cm, rightMargin=1.8*cm,
        topMargin=1.5*cm, bottomMargin=1.5*cm,
    )

    story = []

    # ── Cover page ────────────────────────────────────────────────────────────
    cover_data = [[
        Paragraph("FMGE High-Yield Study Guide", TITLE_STYLE),
    ]]
    cover_table = Table(cover_data, colWidths=[17*cm])
    cover_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), NAVY),
        ("ROUNDEDCORNERS", [8]),
        ("TOPPADDING",    (0,0), (-1,-1), 28),
        ("BOTTOMPADDING", (0,0), (-1,-1), 6),
        ("LEFTPADDING",   (0,0), (-1,-1), 14),
        ("RIGHTPADDING",  (0,0), (-1,-1), 14),
    ]))
    story.append(cover_table)

    sub_data = [[
        Paragraph("All 19 FMGE Subjects • Bullet-Point Format • Key Facts for Exam Day", SUB_STYLE),
    ]]
    sub_table = Table(sub_data, colWidths=[17*cm])
    sub_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), TEAL),
        ("TOPPADDING",    (0,0), (-1,-1), 8),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("LEFTPADDING",   (0,0), (-1,-1), 14),
        ("RIGHTPADDING",  (0,0), (-1,-1), 14),
    ]))
    story.append(sub_table)

    date_data = [[Paragraph("Prepared: June 2026  |  FMGE / NEXT Preparation", DATE_STYLE)]]
    date_table = Table(date_data, colWidths=[17*cm])
    date_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), NAVY),
        ("TOPPADDING",    (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 10),
        ("LEFTPADDING",   (0,0), (-1,-1), 14),
        ("RIGHTPADDING",  (0,0), (-1,-1), 14),
    ]))
    story.append(date_table)
    story.append(Spacer(1, 0.5*cm))

    # quick tip box
    tip_text = (
        "<b>How to use this guide:</b>  Each subject lists its highest-yield topics with concise bullet points. "
        "Focus on bolded items first. Review one subject per session, then cycle back. "
        "FMGE = 300 MCQs in 3.5 hours. Passing mark = 150 (50%). "
        "Prioritise Medicine, Surgery, Obs/Gynae, Paediatrics, and Community Medicine."
    )
    tip_para = Paragraph(tip_text, ParagraphStyle("tip", fontSize=9, textColor=colors.HexColor("#1e293b"),
                                                   fontName="Helvetica", leading=13))
    tip_data = [[tip_para]]
    tip_table = Table(tip_data, colWidths=[17*cm])
    tip_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#fef3c7")),
        ("BOX",        (0,0), (-1,-1), 1, AMBER),
        ("TOPPADDING",    (0,0), (-1,-1), 8),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
        ("RIGHTPADDING",  (0,0), (-1,-1), 10),
    ]))
    story.append(tip_table)
    story.append(Spacer(1, 0.3*cm))
    story.append(PageBreak())

    # ── Subject sections ──────────────────────────────────────────────────────
    for subj in SUBJECTS:
        # Section header
        hdr_data = [[Paragraph(subj["name"], SEC_STYLE)]]
        hdr_table = Table(hdr_data, colWidths=[17*cm])
        hdr_table.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,-1), NAVY),
            ("TOPPADDING",    (0,0), (-1,-1), 7),
            ("BOTTOMPADDING", (0,0), (-1,-1), 7),
            ("LEFTPADDING",   (0,0), (-1,-1), 10),
            ("RIGHTPADDING",  (0,0), (-1,-1), 10),
        ]))

        block = [hdr_table, Spacer(1, 0.15*cm)]

        for i, (topic, bullets) in enumerate(subj["topics"]):
            bg = GREY if i % 2 == 0 else WHITE
            # Build topic + bullets as a single table row
            topic_para = Paragraph(topic, TOPIC_STYLE)
            bullet_paras = [Paragraph(f"• {b}", BULLET_STYLE) for b in bullets]
            cell_content = [topic_para] + bullet_paras

            row_data = [[cell_content]]
            row_table = Table(row_data, colWidths=[16.6*cm])
            row_table.setStyle(TableStyle([
                ("BACKGROUND", (0,0), (-1,-1), bg),
                ("TOPPADDING",    (0,0), (-1,-1), 4),
                ("BOTTOMPADDING", (0,0), (-1,-1), 6),
                ("LEFTPADDING",   (0,0), (-1,-1), 10),
                ("RIGHTPADDING",  (0,0), (-1,-1), 10),
                ("BOX",           (0,0), (-1,-1), 0.5, colors.HexColor("#cbd5e1")),
            ]))
            block.append(row_table)
            block.append(Spacer(1, 0.06*cm))

        block.append(Spacer(1, 0.3*cm))
        story.extend(block)
        story.append(PageBreak())

    # ── Final tips page ───────────────────────────────────────────────────────
    hdr_data = [[Paragraph("Last-Minute FMGE Tips", SEC_STYLE)]]
    hdr_table = Table(hdr_data, colWidths=[17*cm])
    hdr_table.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), TEAL),
        ("TOPPADDING",    (0,0), (-1,-1), 7),
        ("BOTTOMPADDING", (0,0), (-1,-1), 7),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
        ("RIGHTPADDING",  (0,0), (-1,-1), 10),
    ]))
    story.append(hdr_table)
    story.append(Spacer(1, 0.2*cm))

    tips = [
        ("Exam Strategy", [
            "Attempt all questions - no negative marking in FMGE",
            "Flag difficult questions and return to them at the end",
            "Read each option carefully - avoid 'first glance' answers",
            "Keywords in stem: 'MOST common', 'BEST initial', 'NEXT step', 'GOLD STANDARD' - these change the answer",
        ]),
        ("Subject Weightage (approximate)", [
            "Medicine: ~50-55 questions | Surgery: ~50 questions",
            "Obs & Gynae: ~30 questions | Paediatrics: ~20-25 questions",
            "PSM / Community Medicine: ~25 questions",
            "Anatomy + Physiology + Biochemistry: ~35-40 questions combined",
            "Pharmacology + Pathology + Microbiology: ~35-40 questions combined",
            "Ophthal + ENT + Derma + Psychiatry + Forensic + Radio + Anaesthesia: ~30-35 questions",
        ]),
        ("High-Yield Last-Hour Facts", [
            "Most common CHD: VSD | Most common cyanotic CHD: TOF | Acyanotic with Rt->Lt: Eisenmenger's",
            "DOC anaphylaxis: adrenaline (IM) | DOC status epilepticus: IV lorazepam/diazepam",
            "Commonest cause of blindness in India: cataract | World: refractive error (uncorrected)",
            "Commonest cause of maternal mortality in India: haemorrhage",
            "RBC lifespan: 120 days | Platelets: 7-10 days | Neutrophil half-life in blood: 6-8 hours",
        ]),
    ]

    for topic, bullets in tips:
        topic_para = Paragraph(topic, TOPIC_STYLE)
        bullet_paras = [Paragraph(f"• {b}", BULLET_STYLE) for b in bullets]
        cell_content = [topic_para] + bullet_paras
        row_data = [[cell_content]]
        row_table = Table(row_data, colWidths=[16.6*cm])
        row_table.setStyle(TableStyle([
            ("BACKGROUND", (0,0), (-1,-1), LIGHT),
            ("TOPPADDING",    (0,0), (-1,-1), 4),
            ("BOTTOMPADDING", (0,0), (-1,-1), 6),
            ("LEFTPADDING",   (0,0), (-1,-1), 10),
            ("RIGHTPADDING",  (0,0), (-1,-1), 10),
            ("BOX",           (0,0), (-1,-1), 0.5, TEAL),
        ]))
        story.append(row_table)
        story.append(Spacer(1, 0.1*cm))

    story.append(Spacer(1, 0.4*cm))
    footer = Paragraph(
        "Good luck Ashok! You've got this. Stay calm, trust your preparation, and read every question carefully.",
        ParagraphStyle("footer", fontSize=10, textColor=NAVY, alignment=TA_CENTER,
                       fontName="Helvetica-Bold", leading=14)
    )
    story.append(footer)

    doc.build(story)
    print(f"PDF generated: {OUTPUT}")


build_pdf()
Running Command

cd /home/daytona/workspace/fmge-study-guide && python generate_guide.py

Running Command

ls -lh /home/daytona/workspace/fmge-study-guide/FMGE_High_Yield_Study_Guide.pdf

Your FMGE High-Yield Study Guide is ready! Download it here:

FMGE High Yield Study Guide

PDF Document · PDF


Here's what's inside the guide:
SubjectTopics Covered
AnatomyBrachial plexus, neck triangles, heart, peritoneum, embryology
PhysiologyCardiac, respiratory, renal, nerve & muscle
BiochemistryEnzymes, vitamins, genetic disorders
PathologyCell injury, inflammation, tumour pathology, haematology
PharmacologyAutonomic, antimicrobials, CNS, cardiovascular drugs
MicrobiologyBacteriology, virology, parasitology
MedicineCardiology, respiratory, gastroenterology, endocrinology
SurgeryAcute abdomen, hernias, thyroid, orthopaedics
Obs & GynaePre-eclampsia, PPH, ectopic, PCOS, cervical cancer
PaediatricsNeonatology, common conditions, NIS vaccination schedule
PSMEpidemiology, disease control programs, nutrition
OphthalmologyGlaucoma, retinal disorders, common eye conditions
ENTEar, nose, throat & larynx
DermatologyInfections, inflammatory conditions
PsychiatryMajor disorders, psychopharmacology
OrthopaedicsBone tumours, spine
AnaesthesiaGeneral & regional anaesthesia
Forensic MedicineThanatology, medico-legal, toxicology
RadiologyX-rays, CT/MRI, interventional
Plus a final Last-Minute Tips page with exam strategy, subject weightage, and high-yield quick facts.
Good luck with your prep, Ashok! Let me know if you want MCQ drills or a deeper dive on any subject.
This is a shared conversation. Sign in to Orris to start your own chat.