attachment
attachment
attachment
attachment

Arrange neet pg style question clinical

analyse_media
analyse_media
I can see both topic lists clearly. Since there are 37 topics across OBG, General Surgery, and General Medicine, let me clarify scope before building questions.
Asking for Preferences
I can see both topic lists clearly. Since there are 37 topics across OBG, General Surgery, and General Medicine, let me clarify scope before building questions.I'll proceed with a focused, high-value set: one NEET PG-style clinical vignette MCQ for each of the highest-yield (red/orange tier) topics from your list, across OBG, General Surgery, and General Medicine. Let me verify key facts against the medical library first.
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Since the clarification prompt was interrupted, I went ahead and built a focused set: one NEET PG-style clinical vignette MCQ for each high-yield (red/orange tier) topic from your list — 15 questions across OBG, General Surgery, and General Medicine, verified against standard texts (Berek & Novak's Gynecology, Sabiston/Schwartz Surgery, S. Das Manual of Clinical Surgery, Robbins Pathology, Harrison's).

OBSTETRICS & GYNAECOLOGY

Q1. (Breech manoeuvres) A primigravida delivers a breech baby vaginally up to the umbilicus. The trunk is delivered but the after-coming head fails to flex despite gentle traction and neck extension is noted. The best next step is: A. Burns-Marshall traction B. Piper forceps ✅ C. Lovset's maneuver D. Zavanelli maneuver Piper forceps controls and flexes an extended after-coming head. Burns-Marshall (hold ankles, swing through 180° arc) is used when the head is well flexed and descending normally; Lovset's is for extended/nuchal arms.
Q2. (Cervical cancer screening) A 35-year-old woman has post-coital bleeding. Pap smear is normal. Next best step? A. Repeat Pap in 6 months B. HPV DNA testing alone C. Colposcopy-directed biopsy ✅ D. Reassure, routine annual screening Post-coital bleeding mandates direct visualization/biopsy regardless of a normal Pap - cytology can miss invasive cancer or a cervical polyp.
Q3. (PTU vs Carbimazole in pregnancy) A 26-year-old at 6 weeks' gestation is newly diagnosed with Graves' disease. Drug of choice now? A. Carbimazole B. Propylthiouracil (PTU) ✅ C. Methimazole D. Radioactive iodine ablation PTU is preferred in the first trimester (carbimazole/methimazole carry teratogenic risk - aplasia cutis, choanal/esophageal atresia). Switch to carbimazole after the first trimester due to PTU hepatotoxicity risk.
Q4. (Carboprost contraindication) A postpartum woman with atonic PPH has a background of bronchial asthma. Which uterotonic must be avoided? A. Oxytocin B. Misoprostol C. Carboprost (15-methyl PGF2α) ✅ D. Methylergometrine (also caution - avoid if hypertensive/cardiac disease, a good distractor) Carboprost is a bronchoconstrictor - contraindicated in asthma.
Q5. (Fertility-sparing prolapse surgery) A 32-year-old with one child has 2nd-degree uterine prolapse and desires future fertility. Best procedure? A. Vaginal hysterectomy B. Fothergill's (Manchester) repair ✅ C. Le Fort's colpocleisis D. Sacrospinous fixation with hysterectomy Manchester-Fothergill repair (cervical amputation + cardinal ligament plication + colporrhaphy) preserves the uterus.
Q6. (Imperforate hymen) A 14-year-old with normal secondary sexual characters has cyclical abdominal pain but no menstruation. A bulging bluish membrane is seen at the introitus. Karyotype? A. 46XY B. 45X0 C. 46XX ✅ D. 47XXY Imperforate hymen causing cryptomenorrhoea/hematocolpos occurs in phenotypically and genotypically normal females; treated by cruciate hymenal incision.
Q7. (Fertilisation to implantation) If fertilization occurs on day 14 of a cycle, blastocyst implantation typically occurs approximately how many days later? A. 1-2 days B. 3-4 days C. 6-8 days ✅ D. 12-14 days

GENERAL SURGERY

Q8. (GCS calculation) Post-RTA patient: opens eyes only to pain (E2), makes incomprehensible sounds (V2), withdraws from painful stimulus (M4). GCS = ? A. 6 B. 8 ✅ C. 10 D. 12
Q9. (CEAP classification) A 55-year-old has an active, open venous leg ulcer with surrounding hyperpigmentation. CEAP clinical class? A. C3 (edema) B. C4a (pigmentation/eczema) C. C5 (healed ulcer) D. C6 (active ulcer)C4a = pigmentation/eczema without ulcer; C5 = healed ulcer; C6 = active ulcer - the most severe class.
Q10. (SDH vs EDH on CT) Elderly patient on anticoagulants, fall 2 days ago, now with gradually worsening confusion. CT shows a crescent-shaped hyperdensity crossing suture lines. Diagnosis? A. Epidural hematoma B. Subdural hematoma ✅ C. Subarachnoid hemorrhage D. Intraparenchymal hemorrhage SDH: crescentic/concave, crosses sutures (bridging vein tear). EDH: biconvex/lentiform, limited by sutures (middle meningeal artery tear).
Q11. (Ulcer differentiation) A diabetic with peripheral neuropathy has a painless, punched-out ulcer over the metatarsal head with palpable pedal pulses. Diagnosis? A. Arterial ulcer B. Venous ulcer C. Trophic (neuropathic) ulcer ✅ D. Marjolin's ulcer Trophic ulcer: painless, punched-out, at pressure points, pulses intact. Arterial ulcer: painful, punched-out, with absent pulses. Venous ulcer: gaiter area, sloping edges, associated varicosities.
Q12. (Keloid) A young patient develops a raised, itchy scar after ear piercing that extends beyond the original wound margins and keeps enlarging after a year. Diagnosis? A. Hypertrophic scar B. Keloid ✅ C. Dermatofibroma D. Marjolin's ulcer Keloid extends beyond the original wound margins and does not regress; hypertrophic scar stays within the wound margin and may regress with time.
Q13. (Barrett's oesophagus) Endoscopy in a chronic GERD patient shows salmon-colored mucosa in the distal esophagus. Biopsy confirms Barrett's esophagus by demonstrating: A. Foveolar (gastric-type) columnar cells B. Goblet cells (intestinal metaplasia) ✅ C. Paneth cells alone D. Parietal cells Goblet cells confirming intestinal metaplasia are required for diagnosis - gastric-type columnar epithelium alone is not sufficient.

GENERAL MEDICINE

Q14. (Hyperkalaemia ECG) A CKD patient presents with weakness. ECG shows tall, tented T waves and loss of P waves. Likely serum K+? A. 3.0 mEq/L B. 4.5 mEq/L C. 6.5 mEq/L ✅ D. 2.0 mEq/L
Q15. (Hypokalaemia ECG) A patient on chronic diuretic therapy has muscle weakness. ECG shows flattened T waves, prominent U waves, and mild ST depression. Underlying abnormality? A. Hyperkalemia B. Hypokalemia ✅ D. Hypercalcemia D. Hypocalcemia

These are all stable, foundational exam facts (classifications, anatomy, drug contraindications) rather than areas where recent trials would change the answer, so I did not pull additional PubMed evidence for this set.
Want me to continue with the yellow-tier topics from these three sections too (MgSO4/Pritchard criteria, partogram, ventouse flexion point, AAA threshold, thyroid nodule workup, etc.), or move to a different section from your 180-topic list?

Extend to yellow-tier topics (MgSO₄, partogram, ventouse, AAA)

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Here are NEET PG-style clinical vignette MCQs for the remaining yellow-tier topics from your list (22 questions - 11 from OBG, 11 from General Surgery).

OBSTETRICS & GYNAECOLOGY

Q1. (MgSO₄/Pritchard - discontinuation criteria) A patient with severe preeclampsia is on IV MgSO₄ (Pritchard regimen). Before the next dose: RR 14/min, knee jerk absent, urine output 25 mL/hr over 4 hours. Next step? A. Continue the next dose B. Withhold magnesium sulfate ✅ C. Increase the dose D. Switch to diazepam Continue only if RR ≥16/min, knee jerk present, and urine output ≥30 mL/hr (>100 mL/4h). Absent knee jerk is the earliest sign of toxicity and mandates withholding the dose.
Q2. (Partogram - action line) A primigravida's cervicograph crosses the action line on the WHO partogram despite adequate oxytocin augmentation and good contractions. Best next step? A. Increase oxytocin further B. Wait another 4 hours C. Caesarean section ✅ D. Amniotomy Crossing the action line despite adequate augmentation = failure to progress/CPD → caesarean.
Q3. (Postpartum IUCD timing) A woman wants a copper IUCD after vaginal delivery. Appropriate insertion timing? A. Between 48 hours and 4 weeks postpartum B. Within 48 hours, or after 6 weeks ✅ C. Only immediately after placental delivery D. Anytime between day 3 and day 42 The 48h-6week window carries higher expulsion/perforation risk and is avoided.
Q4. (Ventouse flexion point) During vacuum delivery, the cup is placed over the "flexion point" of the fetal head, located: A. Over the anterior fontanelle B. 3 cm anterior to the posterior fontanelle, over the sagittal suture ✅ C. Directly over the posterior fontanelle D. 3 cm posterior to the anterior fontanelle Correct placement promotes flexion/descent and reduces cup pop-off.
Q5. (Perineal tear degrees) After vaginal delivery, a tear extends through perineal skin, muscles, and the external anal sphincter with intact anal mucosa. Grade? A. First-degree B. Second-degree C. Third-degree ✅ D. Fourth-degree 3rd degree = anal sphincter complex involved (3a <50% EAS, 3b >50% EAS, 3c internal sphincter); 4th degree additionally breaches anorectal mucosa.
Q6. (ECV contraindications) At 37 weeks with breech presentation, which is NOT a contraindication to external cephalic version (ECV)? A. Placenta previa B. Multiple pregnancy C. Primigravida status ✅ D. Oligohydramnios Primigravidity does not preclude ECV. True contraindications: placenta previa, ruptured membranes, multiple gestation, severe oligohydramnios, non-reassuring fetal status.
Q7. (Methotrexate eligibility for ectopic) A hemodynamically stable woman has an unruptured tubal ectopic. Which finding favors medical (methotrexate) management? A. Beta-hCG >5000 mIU/mL B. Fetal cardiac activity present C. Mass <3.5 cm, no cardiac activity, beta-hCG <5000 mIU/mL ✅ D. Hemoperitoneum on imaging Standard eligibility: stable, unruptured, mass <3.5-4 cm, no cardiac activity, beta-hCG <5000 mIU/mL (verified against Berek & Novak's Gynecology).
Q8. (Cervical Ca with parametrial involvement) Cervical cancer with parametrial extension to the pelvic sidewall (FIGO Stage IIIB). Best management? A. Radical hysterectomy B. Chemoradiation ✅ C. Simple hysterectomy D. Fertility-sparing trachelectomy Once parametrial/sidewall disease is present, concurrent cisplatin-based chemoradiation is standard - surgery alone isn't curative.
Q9. (Thyroid function in pregnancy) At 12 weeks gestation, TFTs show elevated total T3/T4 but normal free T4 and TSH. Best explanation? A. Subclinical hyperthyroidism B. Increased TBG due to estrogen ✅ C. Gestational transient thyrotoxicosis D. Graves' disease Estrogen raises thyroxine-binding globulin, raising total hormone levels while free hormone/TSH stay normal - a physiological change.
Q10. (OHSS after hMG) Five days post-hCG trigger during hMG ovulation induction, a woman develops abdominal distension, bilateral enlarged ovaries, and ascites. Diagnosis? A. Pelvic inflammatory disease B. Ovarian hyperstimulation syndrome (OHSS) ✅ C. Ovarian torsion D. Ruptured ectopic OHSS: enlarged multicystic ovaries + third-space fluid shift (ascites/pleural effusion) + hemoconcentration after gonadotropin stimulation.
Q11. (PCPNDT Act) A pregnant woman requests fetal sex disclosure during a routine antenatal scan. As per the PCPNDT Act, 1994: A. Disclose if she already has two daughters B. Refuse under any circumstance ✅ C. Disclose only to the husband D. Disclose after written consent Disclosure of fetal sex is strictly prohibited to prevent sex-selective abortion; violation is a criminal offense.

GENERAL SURGERY

Q12. (AAA repair threshold) Asymptomatic 68-year-old man, infrarenal AAA = 5.6 cm on ultrasound. Best management? A. Repeat ultrasound in 6 months B. Elective aneurysm repair ✅ C. Repeat CT in 1 year D. Beta-blockers and reassess in 2 years Repair indicated at >5.5 cm (male) / >5.0 cm (female), rapid expansion, or symptomatic aneurysm regardless of size.
Q13. (Pancreatic carcinoma - tissue diagnosis) 62-year-old with painless jaundice; CT shows a 2.5 cm pancreatic head mass. Best method for tissue diagnosis? A. Percutaneous CT-guided biopsy B. ERCP brush cytology alone C. EUS-guided FNAC ✅ D. Open surgical biopsy EUS-FNAC is preferred - most accurate, avoids peritoneal seeding risk of percutaneous biopsy.
Q14. (Thyroid nodule workup) 40-year-old woman with a solitary thyroid nodule. First investigation? A. FNAC B. Serum TSH (± T4) ✅ C. Radionuclide scan D. Ultrasound alone Start with TSH/T4 - if low (hot nodule), scan next; if euthyroid/high TSH, proceed to FNAC (per Cummings Otolaryngology and Scott-Brown's).
Q15. (Chronic pancreatitis - Puestow) Chronic calcific pancreatitis with a dilated main duct (>7 mm), "chain of lakes" pattern, intractable pain. Best surgery? A. Whipple's procedure B. Distal pancreatectomy C. Puestow procedure (lateral pancreaticojejunostomy) ✅ D. Frey's procedure Puestow decompresses a dilated duct with chain-of-lakes morphology; Frey's is preferred when the head is also enlarged/inflamed.
Q16. (Liver abscess management) Single amoebic liver abscess, 4 cm, no rupture/secondary infection. Best initial management? A. Percutaneous catheter drainage B. Open surgical drainage C. Medical therapy (metronidazole) ✅ D. Percutaneous needle aspiration Abscesses <5 cm typically respond to medical therapy alone; drainage reserved for >5 cm, left-lobe abscess (pericardial rupture risk), or failed medical therapy at 72 hours.
Q17. (Aortic dissection) 60-year-old hypertensive with sudden tearing chest/back pain and inter-arm BP discrepancy. Best imaging and initial medical step? A. TTE; start diuretics B. CT angiography; IV beta-blocker then vasodilator ✅ C. MRI aorta; start anticoagulation D. Chest X-ray only CT angiography is diagnostic of choice in a stable patient. Beta-blocker first (prevents reflex tachycardia from vasodilator), then vasodilator to control BP.
Q18. (ICD insertion) Chest tube inserted in the triangle of safety for pneumothorax. It should pass just above which structure to avoid the neurovascular bundle? A. Lower border of the rib above B. Upper border of the rib below ✅ C. Midpoint between two ribs D. Directly below the rib above The neurovascular bundle runs in the costal groove along the inferior border of each rib; insert just above the upper border of the lower rib.
Q19. (Chromic catgut absorption) Chromic catgut suture used for an intra-abdominal ligature is absorbed primarily by: A. Hydrolysis B. Proteolytic (enzymatic) degradation ✅ C. Oxidation D. Photodegradation Natural absorbable sutures (catgut) degrade via enzymatic proteolysis; synthetic ones (Vicryl, PDS) degrade by hydrolysis.
Q20. (Skin graft take) Sequence by which a split-thickness skin graft establishes blood supply after application? A. Neovascularisation → Inosculation → Imbibition B. Imbibition → Inosculation → Neovascularisation ✅ C. Inosculation → Imbibition → Neovascularisation D. Neovascularisation → Imbibition → Inosculation Imbibition (plasmatic nutrition, 24-48h) → Inosculation (vessel anastomosis, day 2-3) → Neovascularisation (capillary ingrowth, day 4-7).
Q21. (Frey's syndrome) After parotidectomy, a patient develops gustatory facial sweating while eating. This aberrant reinnervation involves which nerve? A. Facial nerve B. Great auricular nerve C. Auriculotemporal nerve ✅ D. Lingual nerve Severed parasympathetic secretomotor fibers of the auriculotemporal nerve misdirect into cutaneous sympathetic fibers supplying sweat glands.
Q22. (Van Nuys Prognostic Index) The Van Nuys Prognostic Index for DCIS is based on size, margin width, and nuclear grade/necrosis. Which parameter is NOT included? A. Tumor size B. Margin width C. Nuclear grade D. Hormone receptor statusThe index (and its later age-inclusive revision) does not incorporate ER/PR status.

That covers all yellow-tier OBG and General Surgery topics from your images. Let's continue with General Medicine's remaining topics (beyond 36-37, which the screenshot cuts off), or move to a different section of the 180-topic list - let me know which.

Generate a PDF quick-reference guide of all 22 yellow-tier MCQs for revision

Reading File
Browsing Directory

/tmp/workspace

Running Command

mkdir -p /tmp/workspace/neet-pg-mcq/output && ls -la /tmp/workspace/neet-pg-mcq

Now let me build the PDF generation script.
Writing File

~/neet-pg-mcq/build_pdf.py

# -*- coding: utf-8 -*-
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
                                 HRFlowable, PageBreak)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus.flowables import KeepTogether

OUT = "/tmp/workspace/neet-pg-mcq/output/NEET_PG_Yellow_Tier_MCQ_Quick_Reference.pdf"

styles = getSampleStyleSheet()

title_style = ParagraphStyle('TitleStyle', parent=styles['Title'], fontSize=20,
                              textColor=colors.HexColor('#1a1a2e'), spaceAfter=4, alignment=TA_CENTER)
subtitle_style = ParagraphStyle('SubtitleStyle', parent=styles['Normal'], fontSize=11,
                                 textColor=colors.HexColor('#555555'), alignment=TA_CENTER, spaceAfter=14)
section_style = ParagraphStyle('SectionStyle', parent=styles['Heading1'], fontSize=15,
                                textColor=colors.white, spaceBefore=0, spaceAfter=0,
                                leftIndent=6, leading=20)
qnum_style = ParagraphStyle('QNumStyle', parent=styles['Normal'], fontSize=11,
                             textColor=colors.HexColor('#b8860b'), fontName='Helvetica-Bold', spaceAfter=2)
question_style = ParagraphStyle('QuestionStyle', parent=styles['Normal'], fontSize=10.5,
                                 leading=14, spaceAfter=6, fontName='Helvetica')
option_style = ParagraphStyle('OptionStyle', parent=styles['Normal'], fontSize=10,
                               leading=13, leftIndent=10, spaceAfter=1.5)
option_correct_style = ParagraphStyle('OptionCorrectStyle', parent=option_style,
                                       textColor=colors.HexColor('#0a7d32'), fontName='Helvetica-Bold')
answer_style = ParagraphStyle('AnswerStyle', parent=styles['Normal'], fontSize=10,
                               leading=13, spaceBefore=4, textColor=colors.HexColor('#0a7d32'),
                               fontName='Helvetica-Bold')
explain_style = ParagraphStyle('ExplainStyle', parent=styles['Normal'], fontSize=9.3,
                                leading=12.5, spaceBefore=2, spaceAfter=10,
                                textColor=colors.HexColor('#333333'), fontName='Helvetica-Oblique',
                                leftIndent=4, borderColor=colors.HexColor('#f2c14e'),
                                borderWidth=0, backColor=colors.HexColor('#fff9e6'))
topic_tag_style = ParagraphStyle('TopicTag', parent=styles['Normal'], fontSize=9,
                                  textColor=colors.HexColor('#8a6d00'), fontName='Helvetica-Bold')

def section_header(text, color="#f2c14e"):
    t = Table([[Paragraph(text, section_style)]], colWidths=[17*cm], rowHeights=[26])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0, 0), (-1, -1), colors.HexColor(color)),
        ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'),
        ('LEFTPADDING', (0, 0), (-1, -1), 8),
    ]))
    return t

def build_question(idx, topic, vignette, options, correct_idx, explanation):
    flow = []
    flow.append(Paragraph(f"Q{idx}. <font color='#8a6d00'>({topic})</font>", qnum_style))
    flow.append(Paragraph(vignette, question_style))
    letters = ['A', 'B', 'C', 'D']
    for i, opt in enumerate(options):
        style = option_correct_style if i == correct_idx else option_style
        marker = "\u2705 " if i == correct_idx else ""
        flow.append(Paragraph(f"{letters[i]}. {opt} {marker}", style))
    flow.append(Paragraph(f"Answer: {letters[correct_idx]}", answer_style))
    flow.append(Paragraph(f"<b>Explanation:</b> {explanation}", explain_style))
    flow.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#dddddd'),
                            spaceBefore=2, spaceAfter=10))
    return KeepTogether(flow)

# ---------------- DATA: OBG Yellow Tier ----------------
obg_questions = [
    dict(topic="MgSO4 / Pritchard - discontinuation criteria",
         vignette="A patient with severe preeclampsia is on IV MgSO&#8324; (Pritchard regimen). Before the next dose: RR 14/min, knee jerk absent, urine output 25 mL/hr over the last 4 hours. What should you do?",
         options=["Continue the next dose as scheduled", "Withhold magnesium sulfate", "Increase the dose", "Switch to diazepam"],
         correct=1,
         explanation="Continue MgSO&#8324; only if RR &ge;16/min, knee jerk present, and urine output &ge;30 mL/hr (>100 mL/4h). Absent knee jerk is the earliest sign of toxicity and mandates withholding the dose regardless of the other two parameters."),
    dict(topic="Partogram - action line",
         vignette="A primigravida's cervicograph on the WHO partogram crosses the action line despite adequate oxytocin augmentation and good uterine contractions. Best next step?",
         options=["Increase oxytocin further", "Wait another 4 hours", "Caesarean section", "Amniotomy"],
         correct=2,
         explanation="Crossing the action line despite adequate augmentation indicates failure to progress / cephalopelvic disproportion - caesarean delivery is indicated."),
    dict(topic="Postpartum IUCD insertion timing",
         vignette="A woman wants a copper IUCD inserted after a vaginal delivery. Which of the following is an appropriate insertion timing?",
         options=["Between 48 hours and 4 weeks postpartum", "Within 48 hours of delivery, or after 6 weeks", "Only immediately after placental delivery", "Anytime between day 3 and day 42"],
         correct=1,
         explanation="PPIUCD is inserted either within 48 hours (immediate postpartum/post-placental) or delayed until after 6 weeks. The interval between 48 hours and 6 weeks carries a higher risk of expulsion/perforation and is avoided."),
    dict(topic="Ventouse flexion point",
         vignette="During instrumental delivery with a ventouse (vacuum) cup, the cup must be correctly placed over the 'flexion point' of the fetal head. This point is located:",
         options=["Over the anterior fontanelle", "3 cm anterior to the posterior fontanelle, over the sagittal suture", "Directly over the posterior fontanelle", "3 cm posterior to the anterior fontanelle"],
         correct=1,
         explanation="Correct placement over the flexion point promotes flexion and descent of the head and reduces the risk of cup detachment ('pop-off')."),
    dict(topic="Perineal tear degrees",
         vignette="Following a vaginal delivery, examination reveals a tear extending through the perineal skin, muscles, and the external anal sphincter, with intact anal mucosa. This is classified as:",
         options=["First-degree tear", "Second-degree tear", "Third-degree tear", "Fourth-degree tear"],
         correct=2,
         explanation="Third-degree tears involve the anal sphincter complex (3a <50% EAS thickness torn, 3b >50% EAS, 3c internal sphincter also torn). Fourth-degree tears additionally breach the anorectal mucosa."),
    dict(topic="ECV contraindications",
         vignette="At 37 weeks gestation with a breech presentation, which of the following is NOT a contraindication to external cephalic version (ECV)?",
         options=["Placenta previa", "Multiple pregnancy", "Primigravida status", "Oligohydramnios"],
         correct=2,
         explanation="Primigravidity is not a contraindication to ECV and can be attempted safely. True contraindications include placenta previa, ruptured membranes, multiple gestation, severe oligohydramnios, and non-reassuring fetal status."),
    dict(topic="Methotrexate eligibility for ectopic pregnancy",
         vignette="A hemodynamically stable woman has an unruptured tubal ectopic pregnancy. Which finding favors medical management with methotrexate over surgery?",
         options=["Serum beta-hCG >5000 mIU/mL", "Fetal cardiac activity present", "Mass <3.5 cm, no cardiac activity, beta-hCG <5000 mIU/mL", "Hemoperitoneum on imaging"],
         correct=2,
         explanation="Ideal candidates for methotrexate: hemodynamically stable, unruptured adnexal mass <3.5-4 cm, no fetal cardiac activity, and beta-hCG <5000 mIU/mL, with no contraindications to MTX."),
    dict(topic="Cervical Ca with parametrial involvement",
         vignette="A woman with cervical cancer has parametrial involvement extending to the pelvic sidewall (FIGO Stage IIIB). Best management?",
         options=["Radical hysterectomy", "Chemoradiation", "Simple hysterectomy", "Fertility-sparing trachelectomy"],
         correct=1,
         explanation="Once parametrial/pelvic sidewall involvement is present, surgery alone is not curative - concurrent cisplatin-based chemoradiation is the standard of care."),
    dict(topic="Thyroid function in pregnancy",
         vignette="A pregnant woman at 12 weeks gestation has thyroid function tests showing elevated total T3 and T4, but normal free T4 and TSH. This is best explained by:",
         options=["Subclinical hyperthyroidism", "Increased thyroxine-binding globulin (TBG) due to estrogen", "Gestational transient thyrotoxicosis", "Graves' disease"],
         correct=1,
         explanation="Pregnancy raises TBG (estrogen-driven), increasing total T3/T4 levels, while free hormone levels and TSH remain normal - this is a physiological change, not thyroid dysfunction."),
    dict(topic="OHSS after hMG",
         vignette="A woman undergoing ovulation induction with hMG develops abdominal distension, bilateral enlarged ovaries on ultrasound, and ascites five days after the hCG trigger. Diagnosis?",
         options=["Pelvic inflammatory disease", "Ovarian hyperstimulation syndrome (OHSS)", "Ovarian torsion", "Ruptured ectopic pregnancy"],
         correct=1,
         explanation="OHSS follows gonadotropin stimulation (hMG/hCG): enlarged multicystic ovaries, third-space fluid shift causing ascites/pleural effusion, and hemoconcentration."),
    dict(topic="PCPNDT Act",
         vignette="A pregnant woman requests to know the sex of her fetus during a routine antenatal ultrasound. As per the PCPNDT Act, 1994, the appropriate response is:",
         options=["Disclose if she already has two daughters", "Refuse to disclose fetal sex under any circumstance", "Disclose only to the husband", "Disclose after written consent"],
         correct=1,
         explanation="The Preconception and Prenatal Diagnostic Techniques Act strictly prohibits disclosure of fetal sex to prevent sex-selective abortion; violation attracts criminal penalties."),
]

# ---------------- DATA: General Surgery Yellow Tier ----------------
surgery_questions = [
    dict(topic="AAA repair threshold",
         vignette="An asymptomatic 68-year-old man is found to have an infrarenal abdominal aortic aneurysm measuring 5.6 cm on ultrasound. Best management?",
         options=["Repeat ultrasound in 6 months", "Elective aneurysm repair", "Repeat CT in 1 year", "Start beta-blockers and reassess in 2 years"],
         correct=1,
         explanation="Elective repair is indicated for AAA >5.5 cm in men (>5.0 cm in women), rapid expansion (>0.5 cm/6 months or >1 cm/year), or symptomatic aneurysms regardless of size."),
    dict(topic="Pancreatic carcinoma - tissue diagnosis",
         vignette="A 62-year-old presents with painless jaundice and weight loss. CT shows a 2.5 cm mass in the head of the pancreas. Best method to obtain a tissue diagnosis?",
         options=["Percutaneous CT-guided biopsy", "ERCP with brush cytology only", "EUS-guided FNAC", "Open surgical biopsy"],
         correct=2,
         explanation="Endoscopic ultrasound-guided fine needle aspiration cytology (EUS-FNAC) is preferred - most accurate and safest for pancreatic head masses, and avoids the peritoneal seeding risk of percutaneous biopsy."),
    dict(topic="Thyroid nodule workup",
         vignette="A 40-year-old woman presents with a solitary thyroid nodule. What is the first investigation to be ordered?",
         options=["FNAC", "Serum TSH (and T4)", "Radionuclide thyroid scan", "Thyroid ultrasound only"],
         correct=1,
         explanation="Initial evaluation begins with TSH/T4 to assess functional status; if TSH is low (suggesting a 'hot' nodule), a radionuclide scan follows. If euthyroid/high TSH, proceed directly to FNAC."),
    dict(topic="Chronic pancreatitis - Puestow procedure",
         vignette="A patient with chronic calcific pancreatitis has a dilated main pancreatic duct (>7 mm) with multiple strictures ('chain of lakes' pattern) and intractable pain. Best surgical option?",
         options=["Whipple's procedure", "Distal pancreatectomy", "Puestow procedure (lateral pancreaticojejunostomy)", "Frey's procedure"],
         correct=2,
         explanation="Puestow's lateral pancreaticojejunostomy is ideal for a dilated duct with a chain-of-lakes appearance, providing ductal decompression. Frey's procedure (head coring + lateral PJ) is preferred when the pancreatic head is also enlarged/inflamed."),
    dict(topic="Liver abscess management",
         vignette="A patient with an amoebic liver abscess has a single cavity measuring 4 cm on ultrasound, with no signs of rupture or secondary infection. Best initial management?",
         options=["Percutaneous catheter drainage", "Open surgical drainage", "Medical therapy with metronidazole", "Percutaneous needle aspiration"],
         correct=2,
         explanation="Amoebic liver abscesses <5 cm typically respond to medical therapy (metronidazole) alone. Drainage is reserved for abscesses >5 cm, left lobe abscess (pericardial rupture risk), failed medical therapy at 72 hours, or impending rupture."),
    dict(topic="Aortic dissection",
         vignette="A 60-year-old hypertensive man presents with sudden tearing chest pain radiating to the back and a blood pressure discrepancy between the two arms. Best initial imaging and immediate medical management?",
         options=["Transthoracic echo; start diuretics", "CT angiography; IV beta-blocker followed by vasodilator", "MRI aorta; start anticoagulation", "Chest X-ray only; observe"],
         correct=1,
         explanation="CT angiography is the investigation of choice in a hemodynamically stable patient (TEE if unstable). Initial medical management: beta-blocker first (prevents reflex tachycardia), then a vasodilator (e.g., nitroprusside) to control BP."),
    dict(topic="ICD insertion landmark",
         vignette="A patient with a large pneumothorax requires intercostal chest tube drainage. The tube is inserted in the triangle of safety, just above which structure to avoid the neurovascular bundle?",
         options=["Lower border of the rib above", "Upper border of the rib below", "Midpoint between two ribs", "Directly below the rib above"],
         correct=1,
         explanation="The neurovascular bundle runs along the inferior border (costal groove) of each rib. The chest tube should be inserted just above the upper border of the lower rib to avoid injury."),
    dict(topic="Chromic catgut absorption",
         vignette="A surgeon selects chromic catgut suture for an intra-abdominal ligature. Its absorption in tissue primarily occurs by:",
         options=["Hydrolysis", "Proteolytic (enzymatic) degradation", "Oxidation", "Photodegradation"],
         correct=1,
         explanation="Catgut, a natural collagen-based absorbable suture, is broken down by proteolytic enzymes. Synthetic absorbable sutures (Vicryl, PDS) are degraded by hydrolysis instead."),
    dict(topic="Skin graft take - sequence",
         vignette="Immediately after a split-thickness skin graft is applied to a wound bed, what is the sequence of events by which the graft establishes a blood supply?",
         options=["Neovascularisation &rarr; Inosculation &rarr; Imbibition", "Imbibition &rarr; Inosculation &rarr; Neovascularisation", "Inosculation &rarr; Imbibition &rarr; Neovascularisation", "Neovascularisation &rarr; Imbibition &rarr; Inosculation"],
         correct=1,
         explanation="Imbibition (plasmatic nutrition, first 24-48h) &rarr; Inosculation (direct anastomosis of graft and recipient vessels, day 2-3) &rarr; Neovascularisation (new capillary ingrowth, day 4-7)."),
    dict(topic="Frey's syndrome",
         vignette="Following parotidectomy, a patient develops facial sweating and flushing over the cheek while eating (gustatory sweating / Frey's syndrome). This results from aberrant regeneration of which nerve?",
         options=["Facial nerve", "Great auricular nerve", "Auriculotemporal nerve", "Lingual nerve"],
         correct=2,
         explanation="Frey's syndrome results from misdirected regeneration of severed parasympathetic (secretomotor) fibers of the auriculotemporal nerve into the cut sympathetic fibers supplying sweat glands of the overlying skin."),
    dict(topic="Van Nuys Prognostic Index",
         vignette="The Van Nuys Prognostic Index is used to guide management of DCIS (ductal carcinoma in situ) based on tumor size, margin width, and nuclear grade/necrosis. Which of the following is NOT included as a parameter in this index?",
         options=["Tumor size", "Margin width", "Nuclear grade", "Hormone receptor status"],
         correct=3,
         explanation="The Van Nuys Prognostic Index scores DCIS based on size, margin width, and nuclear grade (with/without comedo necrosis) - and in later revisions, age. It does not incorporate ER/PR hormone receptor status."),
]

# ---------------- BUILD DOCUMENT ----------------
doc = SimpleDocTemplate(OUT, pagesize=A4,
                         topMargin=1.4*cm, bottomMargin=1.4*cm,
                         leftMargin=1.5*cm, rightMargin=1.5*cm)

story = []
story.append(Paragraph("NEET PG Quick-Reference Guide", title_style))
story.append(Paragraph("Yellow-Tier High-Frequency Topics - 22 Clinical Vignette MCQs", subtitle_style))
story.append(Paragraph("Obstetrics &amp; Gynaecology (11 Qs)  |  General Surgery (11 Qs)", ParagraphStyle('sub2', parent=subtitle_style, spaceAfter=16, textColor=colors.HexColor('#8a6d00'), fontName='Helvetica-Bold')))
story.append(HRFlowable(width="100%", thickness=1.2, color=colors.HexColor('#f2c14e'), spaceAfter=14))

story.append(section_header("OBSTETRICS &amp; GYNAECOLOGY"))
story.append(Spacer(1, 10))
for i, q in enumerate(obg_questions, start=1):
    story.append(build_question(i, q["topic"], q["vignette"], q["options"], q["correct"], q["explanation"]))

story.append(PageBreak())
story.append(section_header("GENERAL SURGERY"))
story.append(Spacer(1, 10))
for i, q in enumerate(surgery_questions, start=1):
    story.append(build_question(i, q["topic"], q["vignette"], q["options"], q["correct"], q["explanation"]))

footer_style = ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8,
                               textColor=colors.HexColor('#999999'), alignment=TA_CENTER)
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#dddddd')))
story.append(Spacer(1, 4))
story.append(Paragraph("Compiled for NEET PG revision. Answers verified against standard textbooks "
                        "(Berek &amp; Novak's Gynecology, Sabiston/Schwartz Surgery, Cummings Otolaryngology, "
                        "Mulholland &amp; Greenfield's Surgery). Cross-check with current institutional protocols.",
                        footer_style))

doc.build(story)
print("PDF created at:", OUT)
Running Command

cd /tmp/workspace/neet-pg-mcq && python3 build_pdf.py

Running Command

ls -la /tmp/workspace/neet-pg-mcq/output/ && python3 -c " import pdfplumber with pdfplumber.open('/tmp/workspace/neet-pg-mcq/output/NEET_PG_Yellow_Tier_MCQ_Quick_Reference.pdf') as pdf: print('Pages:', len(pdf.pages)) print(pdf.pages[0].extract_text()[:300]) "

The quick-reference PDF is ready with all 22 yellow-tier MCQs (11 OBG + 11 General Surgery), each with the vignette, options, bolded correct answer, and a concise explanation, organized by section with color-coded headers.

NEET PG Yellow Tier MCQ Quick Reference

PDF Document · PDF

6 pages total - OBG section first, General Surgery on a fresh page for easy printing/flipping during revision. Let me know if you'd like me to also generate PDFs for the red/orange-tier set already covered, or continue building out more sections from your 180-topic list.

Generate PDF for red/orange-tier MCQs (15 questions already built)

Writing File

~/neet-pg-mcq/build_pdf_red_orange.py

# -*- coding: utf-8 -*-
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
                                 HRFlowable, PageBreak)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.platypus.flowables import KeepTogether

OUT = "/tmp/workspace/neet-pg-mcq/output/NEET_PG_RedOrange_Tier_MCQ_Quick_Reference.pdf"

RED = "#e03c31"
ORANGE = "#f0793c"
DARK = "#1a1a2e"

styles = getSampleStyleSheet()

title_style = ParagraphStyle('TitleStyle', parent=styles['Title'], fontSize=20,
                              textColor=colors.HexColor(DARK), spaceAfter=4, alignment=TA_CENTER)
subtitle_style = ParagraphStyle('SubtitleStyle', parent=styles['Normal'], fontSize=11,
                                 textColor=colors.HexColor('#555555'), alignment=TA_CENTER, spaceAfter=14)
sub2_style = ParagraphStyle('sub2', parent=subtitle_style, spaceAfter=16,
                             textColor=colors.HexColor('#a12a1f'), fontName='Helvetica-Bold')
section_style = ParagraphStyle('SectionStyle', parent=styles['Heading1'], fontSize=15,
                                textColor=colors.white, spaceBefore=0, spaceAfter=0,
                                leftIndent=6, leading=20)
qnum_style = ParagraphStyle('QNumStyle', parent=styles['Normal'], fontSize=11,
                             textColor=colors.HexColor('#a12a1f'), fontName='Helvetica-Bold', spaceAfter=2)
question_style = ParagraphStyle('QuestionStyle', parent=styles['Normal'], fontSize=10.5,
                                 leading=14, spaceAfter=6, fontName='Helvetica')
option_style = ParagraphStyle('OptionStyle', parent=styles['Normal'], fontSize=10,
                               leading=13, leftIndent=10, spaceAfter=1.5)
option_correct_style = ParagraphStyle('OptionCorrectStyle', parent=option_style,
                                       textColor=colors.HexColor('#0a7d32'), fontName='Helvetica-Bold')
answer_style = ParagraphStyle('AnswerStyle', parent=styles['Normal'], fontSize=10,
                               leading=13, spaceBefore=4, textColor=colors.HexColor('#0a7d32'),
                               fontName='Helvetica-Bold')
explain_style = ParagraphStyle('ExplainStyle', parent=styles['Normal'], fontSize=9.3,
                                leading=12.5, spaceBefore=2, spaceAfter=6,
                                textColor=colors.HexColor('#333333'), fontName='Helvetica-Oblique',
                                leftIndent=4, backColor=colors.HexColor('#fdeceb'))
tier_tag_style_red = ParagraphStyle('TierRed', parent=styles['Normal'], fontSize=7.5,
                                     textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER)
tier_tag_style_orange = ParagraphStyle('TierOrange', parent=tier_tag_style_red)

def section_header(text, color=RED):
    t = Table([[Paragraph(text, section_style)]], colWidths=[17*cm], rowHeights=[26])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0, 0), (-1, -1), colors.HexColor(color)),
        ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'),
        ('LEFTPADDING', (0, 0), (-1, -1), 8),
    ]))
    return t

def tier_tag(tier):
    color = RED if tier == "RED" else ORANGE
    style = ParagraphStyle('tag_%s' % tier, parent=(tier_tag_style_red if tier == "RED" else tier_tag_style_orange))
    t = Table([[Paragraph(tier, style)]], colWidths=[1.4*cm], rowHeights=[13])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0, 0), (-1, -1), colors.HexColor(color)),
        ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'),
        ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
    ]))
    return t

def build_question(idx, topic, tier, vignette, options, correct_idx, explanation):
    flow = []
    header_row = Table(
        [[Paragraph(f"Q{idx}. <font color='#a12a1f'>({topic})</font>", qnum_style), tier_tag(tier)]],
        colWidths=[15.3*cm, 1.7*cm]
    )
    header_row.setStyle(TableStyle([
        ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'),
        ('ALIGN', (1, 0), (1, 0), 'RIGHT'),
        ('LEFTPADDING', (0, 0), (0, 0), 0),
        ('RIGHTPADDING', (1, 0), (1, 0), 0),
    ]))
    flow.append(header_row)
    flow.append(Paragraph(vignette, question_style))
    letters = ['A', 'B', 'C', 'D']
    for i, opt in enumerate(options):
        style = option_correct_style if i == correct_idx else option_style
        marker = "\u2705 " if i == correct_idx else ""
        flow.append(Paragraph(f"{letters[i]}. {opt} {marker}", style))
    flow.append(Paragraph(f"Answer: {letters[correct_idx]}", answer_style))
    flow.append(Paragraph(f"<b>Explanation:</b> {explanation}", explain_style))
    flow.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#dddddd'),
                            spaceBefore=2, spaceAfter=10))
    return KeepTogether(flow)

# ---------------- DATA: OBG Red/Orange Tier (7) ----------------
obg_questions = [
    dict(topic="Breech manoeuvres", tier="RED",
         vignette="A primigravida delivers a breech baby vaginally up to the umbilicus. The trunk is delivered but the after-coming head fails to flex despite gentle traction, and neck extension is noted. The best next step is:",
         options=["Burns-Marshall traction", "Piper forceps", "Lovset's maneuver", "Zavanelli maneuver"],
         correct=1,
         explanation="Piper forceps controls and flexes an extended after-coming head. Burns-Marshall (hold ankles, swing through a 180&deg; arc) is used when the head is well flexed and descending normally; Lovset's manoeuvre is for extended/nuchal arms."),
    dict(topic="Cervical cancer screening", tier="RED",
         vignette="A 35-year-old woman has post-coital bleeding. Her Pap smear is normal. Next best step?",
         options=["Repeat Pap smear in 6 months", "HPV DNA testing alone", "Colposcopy-directed biopsy", "Reassure, routine annual screening"],
         correct=2,
         explanation="Post-coital bleeding mandates direct visualization/biopsy regardless of a normal Pap smear - cytology can miss invasive cancer or a cervical polyp."),
    dict(topic="PTU vs Carbimazole in pregnancy", tier="RED",
         vignette="A 26-year-old woman at 6 weeks gestation is newly diagnosed with Graves' disease. Drug of choice at this gestational age?",
         options=["Carbimazole", "Propylthiouracil (PTU)", "Methimazole", "Radioactive iodine ablation"],
         correct=1,
         explanation="PTU is preferred in the first trimester (carbimazole/methimazole carry teratogenic risk - aplasia cutis, choanal/esophageal atresia). Switch to carbimazole after the first trimester due to PTU hepatotoxicity risk."),
    dict(topic="Carboprost contraindication", tier="RED",
         vignette="A postpartum woman with atonic PPH has a background of bronchial asthma. Which uterotonic must be avoided?",
         options=["Oxytocin", "Misoprostol", "Carboprost (15-methyl PGF2&alpha;)", "Methylergometrine"],
         correct=2,
         explanation="Carboprost is a bronchoconstrictor and is contraindicated in asthma. (Methylergometrine is a caution/relative contraindication in hypertension or cardiac disease - a good distractor.)"),
    dict(topic="Fertility-sparing prolapse surgery", tier="RED",
         vignette="A 32-year-old with one child has 2nd-degree uterine prolapse and desires future fertility. Best procedure?",
         options=["Vaginal hysterectomy", "Fothergill's (Manchester) repair", "Le Fort's colpocleisis", "Sacrospinous fixation with hysterectomy"],
         correct=1,
         explanation="Manchester-Fothergill repair (cervical amputation + cardinal ligament plication + colporrhaphy) preserves the uterus, making it fertility-sparing."),
    dict(topic="Imperforate hymen", tier="RED",
         vignette="A 14-year-old with normal secondary sexual characters has cyclical abdominal pain but no menstruation. A bulging bluish membrane is seen at the introitus. Karyotype?",
         options=["46XY", "45X0", "46XX", "47XXY"],
         correct=2,
         explanation="Imperforate hymen causing cryptomenorrhoea/hematocolpos occurs in phenotypically and genotypically normal females (46XX); treated by cruciate hymenal incision."),
    dict(topic="Fertilisation to implantation", tier="RED",
         vignette="If fertilization occurs on day 14 of a cycle, blastocyst implantation typically occurs approximately how many days later?",
         options=["1-2 days", "3-4 days", "6-8 days", "12-14 days"],
         correct=2,
         explanation="Implantation of the blastocyst occurs approximately 6-8 days after fertilization (around day 20-22 of the cycle)."),
]

# ---------------- DATA: General Surgery Red/Orange Tier (6) ----------------
surgery_questions = [
    dict(topic="GCS calculation", tier="RED",
         vignette="A patient post-RTA opens eyes only to pain (E2), makes incomprehensible sounds (V2), and withdraws from painful stimulus (M4). GCS = ?",
         options=["6", "8", "10", "12"],
         correct=1,
         explanation="E2 + V2 + M4 = 8. GCS ranges from 3 (deep coma) to 15 (fully alert); GCS &le;8 generally indicates the need for airway protection/intubation."),
    dict(topic="CEAP classification", tier="RED",
         vignette="A 55-year-old has an active, open venous leg ulcer with surrounding hyperpigmentation. What CEAP clinical class is this?",
         options=["C3 (edema)", "C4a (pigmentation/eczema)", "C5 (healed ulcer)", "C6 (active ulcer)"],
         correct=3,
         explanation="C4a = pigmentation/eczema without ulcer; C5 = healed ulcer; C6 = active ulcer - the most severe class in the CEAP clinical classification of chronic venous disease."),
    dict(topic="SDH vs EDH on CT", tier="RED",
         vignette="An elderly patient on anticoagulants had a fall 2 days ago and now has gradually worsening confusion. CT shows a crescent-shaped hyperdensity crossing suture lines. Diagnosis?",
         options=["Epidural hematoma", "Subdural hematoma", "Subarachnoid hemorrhage", "Intraparenchymal hemorrhage"],
         correct=1,
         explanation="SDH is crescentic/concave and crosses suture lines (bridging vein tear - venous bleed). EDH is biconvex/lentiform and limited by suture lines (middle meningeal artery tear - arterial bleed)."),
    dict(topic="Ulcer differentiation", tier="ORANGE",
         vignette="A diabetic with peripheral neuropathy has a painless, punched-out ulcer over the metatarsal head with palpable pedal pulses. Diagnosis?",
         options=["Arterial ulcer", "Venous ulcer", "Trophic (neuropathic) ulcer", "Marjolin's ulcer"],
         correct=2,
         explanation="Trophic ulcer: painless, punched-out, over pressure points, with intact pulses. Arterial ulcer: painful, punched-out, with absent pulses. Venous ulcer: gaiter area, sloping edges, with associated varicosities."),
    dict(topic="Keloid", tier="ORANGE",
         vignette="A young patient develops a raised, itchy scar after ear piercing that extends beyond the original wound margins and keeps enlarging after a year. Diagnosis?",
         options=["Hypertrophic scar", "Keloid", "Dermatofibroma", "Marjolin's ulcer"],
         correct=1,
         explanation="Keloid extends beyond the original wound margins and does not regress; a hypertrophic scar stays within the wound margin and may regress with time."),
    dict(topic="Barrett's oesophagus", tier="ORANGE",
         vignette="Endoscopy in a chronic GERD patient shows salmon-colored mucosa in the distal esophagus. Biopsy confirms Barrett's esophagus by demonstrating:",
         options=["Foveolar (gastric-type) columnar cells", "Goblet cells (intestinal metaplasia)", "Paneth cells alone", "Parietal cells"],
         correct=1,
         explanation="Goblet cells confirming intestinal metaplasia are required for the diagnosis of Barrett's esophagus - gastric-type (foveolar) columnar epithelium alone is not sufficient (per Robbins Pathology)."),
]

# ---------------- DATA: General Medicine Red/Orange Tier (2) ----------------
medicine_questions = [
    dict(topic="Hyperkalaemia ECG", tier="RED",
         vignette="A CKD patient presents with weakness. ECG shows tall, tented T waves and loss of P waves. Likely serum potassium?",
         options=["3.0 mEq/L", "4.5 mEq/L", "6.5 mEq/L", "2.0 mEq/L"],
         correct=2,
         explanation="Tall tented T waves and P wave flattening/loss are classic early-to-moderate hyperkalaemia ECG changes, progressing to QRS widening, sine-wave pattern, and ventricular fibrillation if untreated."),
    dict(topic="Hypokalaemia ECG", tier="ORANGE",
         vignette="A patient on chronic diuretic therapy has muscle weakness. ECG shows flattened T waves, prominent U waves, and mild ST depression. Underlying abnormality?",
         options=["Hyperkalemia", "Hypokalemia", "Hypercalcemia", "Hypocalcemia"],
         correct=1,
         explanation="Flat T waves, prominent U waves, and ST depression are classic ECG findings of hypokalaemia, commonly seen with diuretic (especially thiazide/loop) therapy."),
]

# ---------------- BUILD DOCUMENT ----------------
doc = SimpleDocTemplate(OUT, pagesize=A4,
                         topMargin=1.4*cm, bottomMargin=1.4*cm,
                         leftMargin=1.5*cm, rightMargin=1.5*cm)

story = []
story.append(Paragraph("NEET PG Quick-Reference Guide", title_style))
story.append(Paragraph("Red/Orange-Tier High-Yield Topics - 15 Clinical Vignette MCQs", subtitle_style))
story.append(Paragraph("Obstetrics &amp; Gynaecology (7 Qs)  |  General Surgery (6 Qs)  |  General Medicine (2 Qs)", sub2_style))
story.append(HRFlowable(width="100%", thickness=1.2, color=colors.HexColor(RED), spaceAfter=14))

story.append(section_header("OBSTETRICS &amp; GYNAECOLOGY", RED))
story.append(Spacer(1, 10))
for i, q in enumerate(obg_questions, start=1):
    story.append(build_question(i, q["topic"], q["tier"], q["vignette"], q["options"], q["correct"], q["explanation"]))

story.append(PageBreak())
story.append(section_header("GENERAL SURGERY", RED))
story.append(Spacer(1, 10))
for i, q in enumerate(surgery_questions, start=1):
    story.append(build_question(i, q["topic"], q["tier"], q["vignette"], q["options"], q["correct"], q["explanation"]))

story.append(PageBreak())
story.append(section_header("GENERAL MEDICINE", RED))
story.append(Spacer(1, 10))
for i, q in enumerate(medicine_questions, start=1):
    story.append(build_question(i, q["topic"], q["tier"], q["vignette"], q["options"], q["correct"], q["explanation"]))

footer_style = ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8,
                               textColor=colors.HexColor('#999999'), alignment=TA_CENTER)
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#dddddd')))
story.append(Spacer(1, 4))
story.append(Paragraph("Compiled for NEET PG revision. Answers verified against standard textbooks "
                        "(Berek &amp; Novak's Gynecology, Sabiston/Schwartz Surgery, S. Das Manual of Clinical Surgery, "
                        "Robbins Pathology, Harrison's Principles of Internal Medicine). Cross-check with current "
                        "institutional protocols. RED = highest-yield; ORANGE = high-yield.",
                        footer_style))

doc.build(story)
print("PDF created at:", OUT)
Running Command

cd /tmp/workspace/neet-pg-mcq && python3 build_pdf_red_orange.py && ls -la output/

Running Command

python3 -c " import pdfplumber with pdfplumber.open('/tmp/workspace/neet-pg-mcq/output/NEET_PG_RedOrange_Tier_MCQ_Quick_Reference.pdf') as pdf: print('Pages:', len(pdf.pages)) "

The red/orange-tier quick-reference PDF is ready (5 pages, covering all 15 questions):

NEET PG RedOrange Tier MCQ Quick Reference

PDF Document · PDF

It's organized the same way as the yellow-tier guide - OBG (7 Qs), General Surgery (6 Qs), and General Medicine (2 Qs) each on their own page, with a small RED/ORANGE tier tag on each question matching your original topic list, correct answers highlighted in green, and concise explanations.
You now have both revision PDFs:
  • NEET PG Yellow Tier MCQ Quick Reference

    PDF Document · PDF

    (22 Qs)
  • NEET PG RedOrange Tier MCQ Quick Reference

    PDF Document · PDF

    (15 Qs)
Want me to merge these two into a single combined PDF, or continue building out General Medicine's remaining topics (beyond 36-37) and other sections from your 180-topic list?

Search for recent NEET PG guidelines and question patterns

Searching the Web

NEET PG 2026 exam pattern changes NBEMS latest guidelines

Searching the Web

NEET PG question pattern clinical vignette based questions trend 2025 2026

Reading Web Page

https://www.telegraphindia.com/edugraph/news/nbems-releases-…

Here's what I found on the current NEET PG exam pattern and question trends, based on the official NBEMS 2026 information bulletin and recent paper analyses.

Official NEET PG 2026 Exam Pattern Changes (NBEMS Information Bulletin)

  • Question count reduced: 180 MCQs (down from 200 in previous years) - notably, this matches the "180 topics" framework you're using for revision.
  • Exam date: August 30, 2026, single shift, 9:00 AM - 12:30 PM (3.5 hours total).
  • Marking scheme unchanged: +4 for correct, -1 for incorrect, 0 for unattempted.
  • Sectional, locked format: The paper is divided into 5 timed sections of 36 questions each, with ~42 minutes per section. Once a section's time is up, you cannot go back to revisit it - a major shift from the earlier free-navigation format.
  • Test centre selection changed: Candidates now select 3 preferred states (not cities), with the first mandatorily being their correspondence-address state.
You can review the official bulletin details here.

Question Pattern & Style Trends (from NEET PG 2025 recall analyses)

  1. Clinical vignette dominance: 53-70% of questions are clinical vignette-based (a patient stem with history/labs/imaging leading to a "most appropriate" answer) - exactly the format I've been building for your revision MCQs.
  2. Image-based questions rising: ~18-50% of questions include an image (ECG, radiograph, histology slide, clinical photo) requiring visual interpretation, not just recall.
  3. Cross-subject integration: Basic sciences (Anatomy, Physiology, Biochemistry) are rarely tested standalone - they're folded into clinical scenarios (e.g., an anatomical landmark question framed as a post-op nerve injury case).
  4. Reduced verbatim PYQ repeats: Only ~8% word-for-word repeats from past papers, though ~30% share the same core concept. High-yield topic mastery matters more than memorizing old question wording.
  5. "Most appropriate answer" framing: Options are increasingly close/overlapping, testing discrimination between similar entities (e.g., trophic vs arterial vs venous ulcer, SDH vs EDH) rather than simple identification - this matches the differentiation-style questions already in your yellow/red-orange tier PDFs.
  6. Difficulty distribution: roughly 25% easy, 60% moderate, 15% difficult, with core Medicine, Surgery, and OBGYN carrying the heaviest weightage, though shorter subjects (Dermatology, Psychiatry, Radiology, Anesthesia) are increasingly high-yield too.

What this means for your question bank

The 15 red/orange and 22 yellow MCQs I've built already follow this exact style - short clinical stems, four close-option answers, and a "most appropriate next step/diagnosis" framing. Given the new locked-sectional format with no revisiting, it's worth adding timed practice (aim ~70 seconds/question) as you drill through these, and prioritizing image-based versions of ECG/radiology/histology topics (like your Hyperkalaemia ECG and SDH vs EDH questions) since those are a growing share of the paper.
Want me to:
  1. Convert the existing MCQ sets into a timed mock-test format (36-question sections, sectional lock simulation), or
  2. Add image-based question variants for topics where a real image would strengthen recall (ECG strips, CT scans, histology), or
  3. Continue building MCQs for the remaining General Medicine and other sections from your 180-topic list?

Continue building MCQs for General Medicine, Psychiatry, and Radiology sections

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Note: your original screenshots only showed 2 of 17 General Medicine topics (Hyperkalaemia/Hypokalaemia ECG, already covered) and didn't include Psychiatry or Radiology lists at all. I've selected 10 standard high-yield NEET PG topics per section to continue the same format. Here are 30 new clinical vignette MCQs, verified against Harrison's, Kaplan & Sadock's Psychiatry, Robbins Pathology, and related texts.

GENERAL MEDICINE

Q1. (DKA management) A 22-year-old type 1 diabetic presents with DKA. Blood glucose 450 mg/dL, pH 7.15, serum potassium 3.0 mEq/L. Best immediate step? A. Start IV insulin infusion immediately B. Start potassium replacement before/with insulin ✅ C. Give IV bicarbonate D. Start subcutaneous insulin Insulin drives potassium intracellularly and can precipitate life-threatening hypokalemia. If K+ <3.3 mEq/L, replace potassium first before/alongside starting insulin. Bicarbonate is reserved for extreme acidosis only.
Q2. (SIADH vs Diabetes Insipidus) A patient with small cell lung cancer develops hyponatremia with high urine osmolality and euvolemia. Diagnosis? A. Diabetes insipidus B. SIADH ✅ C. Cerebral salt wasting D. Primary polydipsia SIADH: low serum sodium/osmolality with inappropriately concentrated urine (high urine osmolality), euvolemic. Ectopic ADH secretion is classic with small cell lung cancer. DI shows the opposite - dilute urine despite high serum sodium/osmolality.
Q3. (ARDS - Berlin criteria) A patient develops acute bilateral infiltrates on chest X-ray within 5 days of sepsis onset, with PaO2/FiO2 ratio of 150 on PEEP 5 cmH2O, and no evidence of cardiac failure. Diagnosis? A. Cardiogenic pulmonary edema B. Moderate ARDS (Berlin definition) ✅ C. Pneumonia alone D. Pulmonary embolism Berlin criteria: acute onset (within 1 week), bilateral opacities not fully explained by effusion/collapse/nodules, not fully explained by cardiac failure, and PaO2/FiO2 ≤300 on PEEP ≥5. Mild 200-300, Moderate 100-200, Severe ≤100.
Q4. (CURB-65 for pneumonia) A 70-year-old with community-acquired pneumonia has confusion, RR 32/min, BP 88/58, urea 8 mmol/L. What does the CURB-65 score suggest? A. Outpatient treatment B. Short inpatient stay C. Consider ICU-level care ✅ D. No antibiotics needed Confusion + Urea + RR + BP + age ≥65 - this patient scores 4/5 (confusion, urea, RR, BP), indicating severe pneumonia requiring hospitalization, often ICU-level care.
Q5. (Anaphylaxis management) A patient develops hives, wheeze, and hypotension after a bee sting. Best immediate treatment, route, and site? A. IV adrenaline into the anterior thigh B. IM adrenaline into the anterolateral thigh (vastus lateralis) ✅ C. Subcutaneous adrenaline into the deltoid D. IV hydrocortisone as first-line IM adrenaline (0.5 mg of 1:1000, adults) into the anterolateral thigh is first-line and can be repeated every 5-15 minutes. IV adrenaline is reserved for refractory anaphylaxis/cardiac arrest under monitoring due to arrhythmia risk.
Q6. (STEMI vs NSTEMI - troponin timing) A patient presents 2 hours after onset of chest pain with ST elevation in leads II, III, aVF. Troponin drawn immediately is normal. Next step? A. Rule out MI since troponin is normal B. Proceed with emergency reperfusion (primary PCI) regardless of troponin ✅ C. Wait 6 hours to repeat troponin before treatment D. Start anticoagulation only, defer PCI In STEMI, diagnosis and reperfusion decisions are based on ECG and clinical presentation, not troponin (which may not have risen yet within the first few hours). Door-to-balloon time should not be delayed for troponin results.
Q7. (Addisonian crisis) A patient with known Addison's disease presents with hypotension, vomiting, and hyponatremia/hyperkalemia after a febrile illness. Immediate management? A. Oral fludrocortisone B. IV hydrocortisone and aggressive IV fluids ✅ C. IV insulin-dextrose infusion D. Oral hydrocortisone taper Adrenal (Addisonian) crisis requires immediate IV hydrocortisone (100 mg stat) plus IV normal saline resuscitation; do not delay treatment for confirmatory cortisol levels.
Q8. (Tuberculosis diagnosis) A patient with suspected pulmonary TB needs a rapid test that also detects rifampicin resistance. Best initial test? A. Sputum AFB smear B. CBNAAT (Cartridge-Based Nucleic Acid Amplification Test) ✅ C. Sputum culture on Lowenstein-Jensen medium D. Tuberculin skin test CBNAAT (Xpert MTB/RIF) gives rapid results (within 2 hours) and simultaneously detects rifampicin resistance, per RNTCP/NTEP guidelines - the recommended initial diagnostic test.
Q9. (Snake bite - 20WBCT) A patient with a suspected viper bite has persistent bleeding from the bite site. Which bedside test best assesses coagulopathy? A. Prothrombin time B. 20-minute whole blood clotting test (20WBCT) ✅ C. Bleeding time D. D-dimer The 20WBCT is a simple bedside test: if blood in a clean glass tube fails to clot within 20 minutes, it indicates venom-induced consumption coagulopathy (VICC), guiding anti-snake venom (ASV) administration.
Q10. (Guillain-Barre syndrome) A patient develops ascending symmetrical weakness two weeks after a diarrheal illness. CSF analysis shows elevated protein with normal cell count. Diagnosis? A. Multiple sclerosis B. Guillain-Barre syndrome (albuminocytological dissociation) ✅ C. Bacterial meningitis D. Myasthenia gravis Albuminocytological dissociation (raised CSF protein, normal cell count) is characteristic of GBS, often post-infectious (Campylobacter jejuni after diarrhea).

PSYCHIATRY

Q11. (Schizophrenia - first-rank symptoms) A patient reports hearing his own thoughts spoken aloud and believes his actions are being controlled by an external force. These are examples of: A. Negative symptoms B. Schneider's first-rank symptoms of schizophrenia ✅ C. Mood-congruent delusions D. Catatonic symptoms Schneider's first-rank symptoms include thought echo (audible thoughts), thought insertion/withdrawal/broadcasting, delusions of control, and third-person auditory hallucinations - historically considered highly suggestive of schizophrenia, though not pathognomonic.
Q12. (Antidepressant-induced mania) A patient with depression started on an SSRI develops elevated mood, decreased sleep, and grandiosity within 2 weeks. This suggests underlying: A. Anxiety disorder B. Bipolar disorder (unmasked by antidepressant) ✅ C. Normal treatment response D. Serotonin syndrome Antidepressant-induced switch to mania/hypomania should raise suspicion of underlying bipolar disorder; a mood stabilizer is preferred over an antidepressant alone in such patients.
Q13. (Lithium toxicity) A patient on maintenance lithium presents with coarse tremor, ataxia, and confusion. Which of the following commonly precipitates lithium toxicity? A. Increased dietary sodium B. Diuretic use (especially thiazides) causing dehydration ✅ C. Increased fluid intake D. NSAID avoidance Thiazide diuretics reduce lithium clearance (increased proximal sodium/lithium reabsorption), precipitating toxicity. NSAIDs also increase lithium levels by reducing renal clearance.
Q14. (ECT indications) A patient with severe depression, marked psychomotor retardation, and refusal to eat/drink is not responding to medication. Best next step? A. Switch to a different SSRI B. Add an antipsychotic C. Electroconvulsive therapy (ECT) ✅ D. Start psychotherapy alone ECT is indicated for severe depression with catatonic features, psychotic features, high suicide risk, treatment resistance, or when a rapid response is needed (e.g., refusal to eat/drink).
Q15. (Delirium vs Dementia) An elderly hospitalized patient develops acute confusion and fluctuating attention over 2 days, worse at night, with visual hallucinations. Diagnosis? A. Dementia B. Delirium ✅ C. Chronic schizophrenia D. Depression with psychotic features Delirium: acute onset, fluctuating course, impaired attention/consciousness, often with hallucinations - typically caused by an underlying medical illness. Dementia has an insidious onset with preserved consciousness.
Q16. (Defense mechanism identification) A man who is angry at his boss comes home and yells at his spouse instead. This defense mechanism is: A. Projection B. Displacement ✅ C. Reaction formation D. Sublimation Displacement: redirecting an emotion/impulse from the original (threatening) target to a safer substitute target.
Q17. (Suicide risk assessment) Which of the following is the strongest risk factor for completed suicide? A. Female gender B. Previous suicide attempt ✅ C. Married status D. Younger age A prior suicide attempt is the single strongest predictor of future completed suicide. Other high-risk factors: male gender, older age, social isolation, substance use, and a specific lethal plan.
Q18. (Antipsychotic-induced EPS) A patient started on haloperidol develops sudden, painful neck twisting and eye rolling within 48 hours. This acute extrapyramidal reaction is: A. Akathisia B. Tardive dyskinesia C. Acute dystonia ✅ D. Parkinsonism Acute dystonia occurs within hours to days of starting/increasing a high-potency typical antipsychotic; treated with IM/IV anticholinergics (e.g., promethazine, benztropine). Tardive dyskinesia appears after months-years of therapy.
Q19. (Alcohol withdrawal - delirium tremens) A chronic alcoholic stops drinking abruptly. On which day post-cessation is delirium tremens (with confusion, autonomic instability, hallucinations) most likely to peak? A. 6-12 hours B. 24 hours C. 48-96 hours (2-4 days) ✅ D. 10 days Timeline: minor withdrawal/tremors within 6-12h, seizures at 24-48h, delirium tremens typically peaks at 48-96 hours after the last drink - the most severe and potentially fatal stage.
Q20. (Serotonin syndrome vs NMS) A patient on an SSRI who recently started tramadol develops hyperthermia, tremor, hyperreflexia, and clonus with rapid onset over hours. This is most consistent with: A. Neuroleptic malignant syndrome B. Serotonin syndrome ✅ C. Malignant hyperthermia D. Catatonia Serotonin syndrome: rapid onset (hours) after a serotonergic drug combination, with hyperreflexia, clonus, and tremor. NMS develops over days after antipsychotic exposure, with "lead-pipe" rigidity and hyporeflexia/bradyreflexia rather than hyperreflexia.

RADIOLOGY

Q21. (Silhouette sign) A chest X-ray shows loss of the normal right heart border outline adjacent to a consolidation. This "silhouette sign" localizes the pathology to: A. Posterior segment of the right upper lobe B. Left lower lobe C. Right middle lobe (or right lower lobe medial segment) ✅ D. Apex of the right lung The silhouette sign: loss of a normal radiographic border when two structures of similar density are in contact. Loss of the right heart border indicates right middle lobe (or adjacent lower lobe) pathology, since the heart border is normally defined by adjacent aerated lung.
Q22. (Air bronchogram vs silhouette sign) A chest X-ray shows air-filled bronchi outlined by surrounding consolidated, opacified lung parenchyma. This finding is called: A. Silhouette sign B. Air bronchogram ✅ C. Deep sulcus sign D. Meniscus sign Air bronchogram indicates patent airways within consolidated (alveolar-filled) lung, typical of pneumonia, and helps differentiate alveolar from interstitial disease.
Q23. (Stroke imaging - CT vs MRI) A patient presents within 3 hours of acute-onset hemiparesis and slurred speech. Before considering thrombolysis, the single most important imaging goal is to: A. Obtain an MRI with diffusion-weighted imaging B. Perform non-contrast CT head to exclude hemorrhage ✅ C. Obtain a carotid Doppler D. Perform a lumbar puncture Non-contrast CT is fast and highly sensitive for acute hemorrhage - the critical step before thrombolysis, since thrombolytics are contraindicated in hemorrhagic stroke. MRI-DWI is more sensitive for early ischemia but is slower and not required before treatment decisions.
Q24. (Contrast-induced nephropathy) A diabetic patient with baseline creatinine 2.0 mg/dL requires a contrast CT. Best preventive strategy? A. Pre-hydration with IV normal saline and use of minimum contrast volume B. Prophylactic hemodialysis immediately after contrast C. High-osmolar contrast agent for better image quality D. NSAIDs before the scan IV isotonic saline hydration before and after the procedure, along with using the lowest effective volume of a low-/iso-osmolar contrast agent, is the standard strategy to reduce contrast-induced nephropathy risk in high-risk (diabetic, CKD) patients.
Q25. (Intussusception - USG) A 10-month-old presents with colicky abdominal pain, vomiting, and red currant jelly stools. Ultrasound shows concentric alternating hypo- and hyperechoic rings. This finding is called: A. Double bubble sign B. Target/doughnut sign ✅ C. String sign D. Coffee bean sign The target (or doughnut) sign on ultrasound - concentric rings of bowel wall within bowel - is classic for intussusception, the most common cause of intestinal obstruction in infants 6 months to 3 years.
Q26. (Pneumoperitoneum) A patient with sudden severe abdominal pain has an erect chest X-ray showing a curvilinear radiolucent line beneath the diaphragm. This suggests: A. Subphrenic abscess B. Pneumoperitoneum (free air, e.g., from a perforated viscus) ✅ C. Chilaiditi syndrome D. Diaphragmatic hernia Free air under the diaphragm on an erect chest X-ray is the classic sign of pneumoperitoneum, most often from a perforated peptic ulcer or other hollow viscus perforation - a surgical emergency.
Q27. (Ground-glass opacity) A patient with acute hypoxemic respiratory failure has bilateral hazy areas of increased lung attenuation on HRCT that do not obscure underlying vessels. This finding is termed: A. Consolidation B. Ground-glass opacity ✅ C. Honeycombing D. Tree-in-bud pattern Ground-glass opacity: hazy increased attenuation with preserved bronchial and vascular margins (unlike consolidation, which obscures them) - seen in early pneumonia (including viral/COVID), pulmonary edema, and interstitial lung disease.
Q28. (Osteosarcoma - imaging) A 15-year-old presents with knee pain and swelling. X-ray of the distal femur shows a mixed lytic-sclerotic lesion with periosteal elevation and a triangular area of reactive new bone at the margin. This finding is called: A. Onion-peel appearance B. Codman's triangle ✅ C. Soap-bubble appearance D. Rugger-jersey spine Codman's triangle (triangular periosteal reaction where lifted periosteum lays down new bone at the tumor margin) with a "sunburst" pattern is classic for osteosarcoma, typically in the metaphysis of long bones in adolescents.
Q29. (Hydrocephalus - CT) A CT head in an infant with an enlarging head circumference shows dilated lateral and third ventricles with a normal-sized fourth ventricle. This pattern suggests obstruction at the level of: A. Foramen of Monro B. Aqueduct of Sylvius ✅ C. Foramen magnum D. Arachnoid granulations Dilated lateral + third ventricles with a normal fourth ventricle localizes obstruction to the aqueduct of Sylvius (aqueductal stenosis), a common cause of congenital non-communicating hydrocephalus.
Q30. (Renal calculi - imaging) A patient with acute flank pain and hematuria is suspected to have a ureteric stone. Best initial imaging investigation? A. Intravenous urography (IVU) B. Non-contrast CT of the kidneys, ureters, and bladder (NCCT-KUB) ✅ C. Plain X-ray KUB alone D. MRI abdomen NCCT-KUB is the current gold-standard, most sensitive and specific imaging modality for detecting ureteric/renal calculi (including radiolucent stones), and has largely replaced IVU in acute settings.

That's 30 additional MCQs (10 each: General Medicine, Psychiatry, Radiology), all vignette-based in the same NEET PG style as before. Want me to:
  1. Generate a combined PDF quick-reference for these 30 new questions (matching the earlier format), or
  2. Continue with other core sections (Pediatrics, Orthopedics, ENT, Ophthalmology, Anesthesia, PSM), or
  3. Merge everything so far (67 MCQs total) into one master revision PDF?

Generate a combined PDF for all 30 new General Medicine/Psychiatry/Radiology MCQs

Browsing Directory

~/neet-pg-mcq

Writing File

~/neet-pg-mcq/build_pdf_medicine_psych_radio.py

# -*- coding: utf-8 -*-
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
                                 HRFlowable, PageBreak)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.platypus.flowables import KeepTogether

OUT = "/tmp/workspace/neet-pg-mcq/output/NEET_PG_Medicine_Psychiatry_Radiology_MCQ_Quick_Reference.pdf"

TEAL = "#0f7a72"
BLUE = "#1f5fa8"
DARK = "#1a1a2e"

styles = getSampleStyleSheet()

title_style = ParagraphStyle('TitleStyle', parent=styles['Title'], fontSize=20,
                              textColor=colors.HexColor(DARK), spaceAfter=4, alignment=TA_CENTER)
subtitle_style = ParagraphStyle('SubtitleStyle', parent=styles['Normal'], fontSize=11,
                                 textColor=colors.HexColor('#555555'), alignment=TA_CENTER, spaceAfter=14)
sub2_style = ParagraphStyle('sub2', parent=subtitle_style, spaceAfter=16,
                             textColor=colors.HexColor(TEAL), fontName='Helvetica-Bold')
section_style = ParagraphStyle('SectionStyle', parent=styles['Heading1'], fontSize=15,
                                textColor=colors.white, spaceBefore=0, spaceAfter=0,
                                leftIndent=6, leading=20)
qnum_style = ParagraphStyle('QNumStyle', parent=styles['Normal'], fontSize=11,
                             textColor=colors.HexColor(TEAL), fontName='Helvetica-Bold', spaceAfter=2)
question_style = ParagraphStyle('QuestionStyle', parent=styles['Normal'], fontSize=10.5,
                                 leading=14, spaceAfter=6, fontName='Helvetica')
option_style = ParagraphStyle('OptionStyle', parent=styles['Normal'], fontSize=10,
                               leading=13, leftIndent=10, spaceAfter=1.5)
option_correct_style = ParagraphStyle('OptionCorrectStyle', parent=option_style,
                                       textColor=colors.HexColor('#0a7d32'), fontName='Helvetica-Bold')
answer_style = ParagraphStyle('AnswerStyle', parent=styles['Normal'], fontSize=10,
                               leading=13, spaceBefore=4, textColor=colors.HexColor('#0a7d32'),
                               fontName='Helvetica-Bold')
explain_style = ParagraphStyle('ExplainStyle', parent=styles['Normal'], fontSize=9.3,
                                leading=12.5, spaceBefore=2, spaceAfter=10,
                                textColor=colors.HexColor('#333333'), fontName='Helvetica-Oblique',
                                leftIndent=4, backColor=colors.HexColor('#e8f4f2'))

def section_header(text, color=TEAL):
    t = Table([[Paragraph(text, section_style)]], colWidths=[17*cm], rowHeights=[26])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0, 0), (-1, -1), colors.HexColor(color)),
        ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'),
        ('LEFTPADDING', (0, 0), (-1, -1), 8),
    ]))
    return t

def build_question(idx, topic, vignette, options, correct_idx, explanation):
    flow = []
    flow.append(Paragraph(f"Q{idx}. <font color='{TEAL}'>({topic})</font>", qnum_style))
    flow.append(Paragraph(vignette, question_style))
    letters = ['A', 'B', 'C', 'D']
    for i, opt in enumerate(options):
        style = option_correct_style if i == correct_idx else option_style
        marker = "\u2705 " if i == correct_idx else ""
        flow.append(Paragraph(f"{letters[i]}. {opt} {marker}", style))
    flow.append(Paragraph(f"Answer: {letters[correct_idx]}", answer_style))
    flow.append(Paragraph(f"<b>Explanation:</b> {explanation}", explain_style))
    flow.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#dddddd'),
                            spaceBefore=2, spaceAfter=10))
    return KeepTogether(flow)

# ---------------- DATA: General Medicine (10) ----------------
medicine_questions = [
    dict(topic="DKA management - potassium first",
         vignette="A 22-year-old type 1 diabetic presents with DKA. Blood glucose 450 mg/dL, pH 7.15, serum potassium 3.0 mEq/L. Best immediate step?",
         options=["Start IV insulin infusion immediately", "Start potassium replacement before/with insulin", "Give IV bicarbonate", "Start subcutaneous insulin"],
         correct=1,
         explanation="Insulin drives potassium intracellularly and can precipitate life-threatening hypokalemia. If K+ &lt;3.3 mEq/L, replace potassium first before/alongside starting insulin. Bicarbonate is reserved for extreme acidosis only."),
    dict(topic="SIADH vs Diabetes Insipidus",
         vignette="A patient with small cell lung cancer develops hyponatremia with high urine osmolality and euvolemia. Diagnosis?",
         options=["Diabetes insipidus", "SIADH", "Cerebral salt wasting", "Primary polydipsia"],
         correct=1,
         explanation="SIADH: low serum sodium/osmolality with inappropriately concentrated urine (high urine osmolality), euvolemic. Ectopic ADH secretion is classic with small cell lung cancer. DI shows the opposite - dilute urine despite high serum sodium/osmolality."),
    dict(topic="ARDS - Berlin criteria",
         vignette="A patient develops acute bilateral infiltrates on chest X-ray within 5 days of sepsis onset, with PaO2/FiO2 ratio of 150 on PEEP 5 cmH2O, and no evidence of cardiac failure. Diagnosis?",
         options=["Cardiogenic pulmonary edema", "Moderate ARDS (Berlin definition)", "Pneumonia alone", "Pulmonary embolism"],
         correct=1,
         explanation="Berlin criteria: acute onset (within 1 week), bilateral opacities not fully explained by effusion/collapse/nodules, not fully explained by cardiac failure, and PaO2/FiO2 &le;300 on PEEP &ge;5. Mild 200-300, Moderate 100-200, Severe &le;100."),
    dict(topic="CURB-65 for pneumonia",
         vignette="A 70-year-old with community-acquired pneumonia has confusion, RR 32/min, BP 88/58, urea 8 mmol/L. What does the CURB-65 score suggest?",
         options=["Outpatient treatment", "Short inpatient stay", "Consider ICU-level care", "No antibiotics needed"],
         correct=2,
         explanation="Confusion + Urea + RR + BP + age &ge;65 - this patient scores 4/5 (confusion, urea, RR, BP), indicating severe pneumonia requiring hospitalization, often ICU-level care."),
    dict(topic="Anaphylaxis - adrenaline route/site",
         vignette="A patient develops hives, wheeze, and hypotension after a bee sting. Best immediate treatment, route, and site?",
         options=["IV adrenaline into the anterior thigh", "IM adrenaline into the anterolateral thigh (vastus lateralis)", "Subcutaneous adrenaline into the deltoid", "IV hydrocortisone as first-line"],
         correct=1,
         explanation="IM adrenaline (0.5 mg of 1:1000, adults) into the anterolateral thigh is first-line and can be repeated every 5-15 minutes. IV adrenaline is reserved for refractory anaphylaxis/cardiac arrest under monitoring due to arrhythmia risk."),
    dict(topic="STEMI - troponin timing",
         vignette="A patient presents 2 hours after onset of chest pain with ST elevation in leads II, III, aVF. Troponin drawn immediately is normal. Next step?",
         options=["Rule out MI since troponin is normal", "Proceed with emergency reperfusion (primary PCI) regardless of troponin", "Wait 6 hours to repeat troponin before treatment", "Start anticoagulation only, defer PCI"],
         correct=1,
         explanation="In STEMI, diagnosis and reperfusion decisions are based on ECG and clinical presentation, not troponin (which may not have risen yet within the first few hours). Door-to-balloon time should not be delayed for troponin results."),
    dict(topic="Addisonian crisis",
         vignette="A patient with known Addison's disease presents with hypotension, vomiting, and hyponatremia/hyperkalemia after a febrile illness. Immediate management?",
         options=["Oral fludrocortisone", "IV hydrocortisone and aggressive IV fluids", "IV insulin-dextrose infusion", "Oral hydrocortisone taper"],
         correct=1,
         explanation="Adrenal (Addisonian) crisis requires immediate IV hydrocortisone (100 mg stat) plus IV normal saline resuscitation; do not delay treatment for confirmatory cortisol levels."),
    dict(topic="Tuberculosis diagnosis - CBNAAT",
         vignette="A patient with suspected pulmonary TB needs a rapid test that also detects rifampicin resistance. Best initial test?",
         options=["Sputum AFB smear", "CBNAAT (Cartridge-Based Nucleic Acid Amplification Test)", "Sputum culture on Lowenstein-Jensen medium", "Tuberculin skin test"],
         correct=1,
         explanation="CBNAAT (Xpert MTB/RIF) gives rapid results (within 2 hours) and simultaneously detects rifampicin resistance, per RNTCP/NTEP guidelines - the recommended initial diagnostic test."),
    dict(topic="Snake bite - 20WBCT",
         vignette="A patient with a suspected viper bite has persistent bleeding from the bite site. Which bedside test best assesses coagulopathy?",
         options=["Prothrombin time", "20-minute whole blood clotting test (20WBCT)", "Bleeding time", "D-dimer"],
         correct=1,
         explanation="The 20WBCT is a simple bedside test: if blood in a clean glass tube fails to clot within 20 minutes, it indicates venom-induced consumption coagulopathy (VICC), guiding anti-snake venom (ASV) administration."),
    dict(topic="Guillain-Barre syndrome",
         vignette="A patient develops ascending symmetrical weakness two weeks after a diarrheal illness. CSF analysis shows elevated protein with normal cell count. Diagnosis?",
         options=["Multiple sclerosis", "Guillain-Barre syndrome (albuminocytological dissociation)", "Bacterial meningitis", "Myasthenia gravis"],
         correct=1,
         explanation="Albuminocytological dissociation (raised CSF protein, normal cell count) is characteristic of GBS, often post-infectious (Campylobacter jejuni after diarrhea)."),
]

# ---------------- DATA: Psychiatry (10) ----------------
psychiatry_questions = [
    dict(topic="Schizophrenia - first-rank symptoms",
         vignette="A patient reports hearing his own thoughts spoken aloud and believes his actions are being controlled by an external force. These are examples of:",
         options=["Negative symptoms", "Schneider's first-rank symptoms of schizophrenia", "Mood-congruent delusions", "Catatonic symptoms"],
         correct=1,
         explanation="Schneider's first-rank symptoms include thought echo (audible thoughts), thought insertion/withdrawal/broadcasting, delusions of control, and third-person auditory hallucinations - historically considered highly suggestive of schizophrenia, though not pathognomonic."),
    dict(topic="Antidepressant-induced mania",
         vignette="A patient with depression started on an SSRI develops elevated mood, decreased sleep, and grandiosity within 2 weeks. This suggests underlying:",
         options=["Anxiety disorder", "Bipolar disorder (unmasked by antidepressant)", "Normal treatment response", "Serotonin syndrome"],
         correct=1,
         explanation="Antidepressant-induced switch to mania/hypomania should raise suspicion of underlying bipolar disorder; a mood stabilizer is preferred over an antidepressant alone in such patients."),
    dict(topic="Lithium toxicity precipitants",
         vignette="A patient on maintenance lithium presents with coarse tremor, ataxia, and confusion. Which of the following commonly precipitates lithium toxicity?",
         options=["Increased dietary sodium", "Diuretic use (especially thiazides) causing dehydration", "Increased fluid intake", "NSAID avoidance"],
         correct=1,
         explanation="Thiazide diuretics reduce lithium clearance (increased proximal sodium/lithium reabsorption), precipitating toxicity. NSAIDs also increase lithium levels by reducing renal clearance."),
    dict(topic="ECT indications",
         vignette="A patient with severe depression, marked psychomotor retardation, and refusal to eat/drink is not responding to medication. Best next step?",
         options=["Switch to a different SSRI", "Add an antipsychotic", "Electroconvulsive therapy (ECT)", "Start psychotherapy alone"],
         correct=2,
         explanation="ECT is indicated for severe depression with catatonic features, psychotic features, high suicide risk, treatment resistance, or when a rapid response is needed (e.g., refusal to eat/drink)."),
    dict(topic="Delirium vs Dementia",
         vignette="An elderly hospitalized patient develops acute confusion and fluctuating attention over 2 days, worse at night, with visual hallucinations. Diagnosis?",
         options=["Dementia", "Delirium", "Chronic schizophrenia", "Depression with psychotic features"],
         correct=1,
         explanation="Delirium: acute onset, fluctuating course, impaired attention/consciousness, often with hallucinations - typically caused by an underlying medical illness. Dementia has an insidious onset with preserved consciousness."),
    dict(topic="Defense mechanism - displacement",
         vignette="A man who is angry at his boss comes home and yells at his spouse instead. This defense mechanism is:",
         options=["Projection", "Displacement", "Reaction formation", "Sublimation"],
         correct=1,
         explanation="Displacement: redirecting an emotion/impulse from the original (threatening) target to a safer substitute target."),
    dict(topic="Suicide risk assessment",
         vignette="Which of the following is the strongest risk factor for completed suicide?",
         options=["Female gender", "Previous suicide attempt", "Married status", "Younger age"],
         correct=1,
         explanation="A prior suicide attempt is the single strongest predictor of future completed suicide. Other high-risk factors: male gender, older age, social isolation, substance use, and a specific lethal plan."),
    dict(topic="Antipsychotic-induced acute dystonia",
         vignette="A patient started on haloperidol develops sudden, painful neck twisting and eye rolling within 48 hours. This acute extrapyramidal reaction is:",
         options=["Akathisia", "Tardive dyskinesia", "Acute dystonia", "Parkinsonism"],
         correct=2,
         explanation="Acute dystonia occurs within hours to days of starting/increasing a high-potency typical antipsychotic; treated with IM/IV anticholinergics (e.g., promethazine, benztropine). Tardive dyskinesia appears after months-years of therapy."),
    dict(topic="Alcohol withdrawal - delirium tremens timing",
         vignette="A chronic alcoholic stops drinking abruptly. On which day post-cessation is delirium tremens (with confusion, autonomic instability, hallucinations) most likely to peak?",
         options=["6-12 hours", "24 hours", "48-96 hours (2-4 days)", "10 days"],
         correct=2,
         explanation="Timeline: minor withdrawal/tremors within 6-12h, seizures at 24-48h, delirium tremens typically peaks at 48-96 hours after the last drink - the most severe and potentially fatal stage."),
    dict(topic="Serotonin syndrome vs NMS",
         vignette="A patient on an SSRI who recently started tramadol develops hyperthermia, tremor, hyperreflexia, and clonus with rapid onset over hours. This is most consistent with:",
         options=["Neuroleptic malignant syndrome", "Serotonin syndrome", "Malignant hyperthermia", "Catatonia"],
         correct=1,
         explanation="Serotonin syndrome: rapid onset (hours) after a serotonergic drug combination, with hyperreflexia, clonus, and tremor. NMS develops over days after antipsychotic exposure, with 'lead-pipe' rigidity and hyporeflexia/bradyreflexia rather than hyperreflexia."),
]

# ---------------- DATA: Radiology (10) ----------------
radiology_questions = [
    dict(topic="Silhouette sign",
         vignette="A chest X-ray shows loss of the normal right heart border outline adjacent to a consolidation. This 'silhouette sign' localizes the pathology to:",
         options=["Posterior segment of the right upper lobe", "Left lower lobe", "Right middle lobe (or right lower lobe medial segment)", "Apex of the right lung"],
         correct=2,
         explanation="The silhouette sign: loss of a normal radiographic border when two structures of similar density are in contact. Loss of the right heart border indicates right middle lobe (or adjacent lower lobe) pathology, since the heart border is normally defined by adjacent aerated lung."),
    dict(topic="Air bronchogram",
         vignette="A chest X-ray shows air-filled bronchi outlined by surrounding consolidated, opacified lung parenchyma. This finding is called:",
         options=["Silhouette sign", "Air bronchogram", "Deep sulcus sign", "Meniscus sign"],
         correct=1,
         explanation="Air bronchogram indicates patent airways within consolidated (alveolar-filled) lung, typical of pneumonia, and helps differentiate alveolar from interstitial disease."),
    dict(topic="Acute stroke imaging - CT vs MRI",
         vignette="A patient presents within 3 hours of acute-onset hemiparesis and slurred speech. Before considering thrombolysis, the single most important imaging goal is to:",
         options=["Obtain an MRI with diffusion-weighted imaging", "Perform non-contrast CT head to exclude hemorrhage", "Obtain a carotid Doppler", "Perform a lumbar puncture"],
         correct=1,
         explanation="Non-contrast CT is fast and highly sensitive for acute hemorrhage - the critical step before thrombolysis, since thrombolytics are contraindicated in hemorrhagic stroke. MRI-DWI is more sensitive for early ischemia but is slower and not required before treatment decisions."),
    dict(topic="Contrast-induced nephropathy prevention",
         vignette="A diabetic patient with baseline creatinine 2.0 mg/dL requires a contrast CT. Best preventive strategy?",
         options=["Pre-hydration with IV normal saline and use of minimum contrast volume", "Prophylactic hemodialysis immediately after contrast", "High-osmolar contrast agent for better image quality", "NSAIDs before the scan"],
         correct=0,
         explanation="IV isotonic saline hydration before and after the procedure, along with using the lowest effective volume of a low-/iso-osmolar contrast agent, is the standard strategy to reduce contrast-induced nephropathy risk in high-risk (diabetic, CKD) patients."),
    dict(topic="Intussusception - target sign",
         vignette="A 10-month-old presents with colicky abdominal pain, vomiting, and red currant jelly stools. Ultrasound shows concentric alternating hypo- and hyperechoic rings. This finding is called:",
         options=["Double bubble sign", "Target/doughnut sign", "String sign", "Coffee bean sign"],
         correct=1,
         explanation="The target (or doughnut) sign on ultrasound - concentric rings of bowel wall within bowel - is classic for intussusception, the most common cause of intestinal obstruction in infants 6 months to 3 years."),
    dict(topic="Pneumoperitoneum",
         vignette="A patient with sudden severe abdominal pain has an erect chest X-ray showing a curvilinear radiolucent line beneath the diaphragm. This suggests:",
         options=["Subphrenic abscess", "Pneumoperitoneum (free air, e.g., from a perforated viscus)", "Chilaiditi syndrome", "Diaphragmatic hernia"],
         correct=1,
         explanation="Free air under the diaphragm on an erect chest X-ray is the classic sign of pneumoperitoneum, most often from a perforated peptic ulcer or other hollow viscus perforation - a surgical emergency."),
    dict(topic="Ground-glass opacity",
         vignette="A patient with acute hypoxemic respiratory failure has bilateral hazy areas of increased lung attenuation on HRCT that do not obscure underlying vessels. This finding is termed:",
         options=["Consolidation", "Ground-glass opacity", "Honeycombing", "Tree-in-bud pattern"],
         correct=1,
         explanation="Ground-glass opacity: hazy increased attenuation with preserved bronchial and vascular margins (unlike consolidation, which obscures them) - seen in early pneumonia (including viral/COVID), pulmonary edema, and interstitial lung disease."),
    dict(topic="Osteosarcoma - Codman's triangle",
         vignette="A 15-year-old presents with knee pain and swelling. X-ray of the distal femur shows a mixed lytic-sclerotic lesion with periosteal elevation and a triangular area of reactive new bone at the margin. This finding is called:",
         options=["Onion-peel appearance", "Codman's triangle", "Soap-bubble appearance", "Rugger-jersey spine"],
         correct=1,
         explanation="Codman's triangle (triangular periosteal reaction where lifted periosteum lays down new bone at the tumor margin) with a 'sunburst' pattern is classic for osteosarcoma, typically in the metaphysis of long bones in adolescents."),
    dict(topic="Hydrocephalus - level of obstruction",
         vignette="A CT head in an infant with an enlarging head circumference shows dilated lateral and third ventricles with a normal-sized fourth ventricle. This pattern suggests obstruction at the level of:",
         options=["Foramen of Monro", "Aqueduct of Sylvius", "Foramen magnum", "Arachnoid granulations"],
         correct=1,
         explanation="Dilated lateral + third ventricles with a normal fourth ventricle localizes obstruction to the aqueduct of Sylvius (aqueductal stenosis), a common cause of congenital non-communicating hydrocephalus."),
    dict(topic="Renal calculi - imaging of choice",
         vignette="A patient with acute flank pain and hematuria is suspected to have a ureteric stone. Best initial imaging investigation?",
         options=["Intravenous urography (IVU)", "Non-contrast CT of the kidneys, ureters, and bladder (NCCT-KUB)", "Plain X-ray KUB alone", "MRI abdomen"],
         correct=1,
         explanation="NCCT-KUB is the current gold-standard, most sensitive and specific imaging modality for detecting ureteric/renal calculi (including radiolucent stones), and has largely replaced IVU in acute settings."),
]

# ---------------- BUILD DOCUMENT ----------------
doc = SimpleDocTemplate(OUT, pagesize=A4,
                         topMargin=1.4*cm, bottomMargin=1.4*cm,
                         leftMargin=1.5*cm, rightMargin=1.5*cm)

story = []
story.append(Paragraph("NEET PG Quick-Reference Guide", title_style))
story.append(Paragraph("General Medicine, Psychiatry &amp; Radiology - 30 Clinical Vignette MCQs", subtitle_style))
story.append(Paragraph("General Medicine (10 Qs)  |  Psychiatry (10 Qs)  |  Radiology (10 Qs)", sub2_style))
story.append(HRFlowable(width="100%", thickness=1.2, color=colors.HexColor(TEAL), spaceAfter=14))

story.append(section_header("GENERAL MEDICINE", TEAL))
story.append(Spacer(1, 10))
for i, q in enumerate(medicine_questions, start=1):
    story.append(build_question(i, q["topic"], q["vignette"], q["options"], q["correct"], q["explanation"]))

story.append(PageBreak())
story.append(section_header("PSYCHIATRY", BLUE))
story.append(Spacer(1, 10))
for i, q in enumerate(psychiatry_questions, start=1):
    story.append(build_question(i, q["topic"], q["vignette"], q["options"], q["correct"], q["explanation"]))

story.append(PageBreak())
story.append(section_header("RADIOLOGY", TEAL))
story.append(Spacer(1, 10))
for i, q in enumerate(radiology_questions, start=1):
    story.append(build_question(i, q["topic"], q["vignette"], q["options"], q["correct"], q["explanation"]))

footer_style = ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8,
                               textColor=colors.HexColor('#999999'), alignment=TA_CENTER)
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#dddddd')))
story.append(Spacer(1, 4))
story.append(Paragraph("Compiled for NEET PG revision. Answers verified against standard textbooks "
                        "(Harrison's Principles of Internal Medicine, Kaplan &amp; Sadock's Comprehensive Textbook "
                        "of Psychiatry, Robbins Pathology, Fishman's Pulmonary Diseases, Rheumatology 2-Volume Set). "
                        "Cross-check with current institutional protocols.",
                        footer_style))

doc.build(story)
print("PDF created at:", OUT)
Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.