Make the list of topic asked in paper 2 chapter wise
cd /home/daytona/workspace && pandoc --track-changes=all "/home/daytona/workspace/attachments/b23365d8-d6e1-41d4-bfcb-dbb7c20e4817/Compilation of 5 year question Paper-1.docx" -o output.md 2>&1 && wc -l output.md
cd /home/daytona/workspace && python3 -c " import re with open('output.md', 'r') as f: content = f.read() # Find all table rows and extract year, paper no, q no, question # Let's just print the raw lines to understand structure better lines = content.split('\n') # Find lines that contain 'Paper' or paper number references for i, line in enumerate(lines[:50]): print(f'{i}: {line}') "
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() # Let's extract all table rows - each row is between +---+ separators # Parse using a different approach: split by row separators lines = content.split('\n') # Let's collect all cell data from the table # Each row block: starts with +---+ line, then has | cell | cell | ... lines # We need to stitch multi-line cells together def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: # Split by | parts = line.split('|') # parts[0] is empty, parts[1..4] are cells, parts[5] is empty if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) # Print first 20 rows to understand structure for i, row in enumerate(rows[:25]): print(f"Row {i}: Year='{row[0].strip()}' | Paper='{row[1].strip()}' | Q='{row[2].strip()}' | Q_text='{row[3].strip()[:80]}'") EOF
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) # Extract Paper 2 rows paper2_rows = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() # Clean up year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '2' and q_text and q_text != '**Question**': # Clean question text q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper2_rows.append({ 'year': year, 'q_num': q_num_clean, 'text': q_clean }) print(f"Total Paper 2 questions: {len(paper2_rows)}") print() for r in paper2_rows: print(f"[{r['year']} Q{r['q_num']}] {r['text'][:120]}") print() EOF
cd /home/daytona/workspace && python3 << 'EOF' import re, json with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) paper2_questions = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '2' and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper2_questions.append({ 'year': year, 'q_num': q_num_clean, 'text': q_clean }) # Now organize chapter-wise (Obstetrics Paper 2 chapters) # Based on standard MD/MS Obstetrics & Gynecology curriculum chapter_map = { "Antepartum Fetal Surveillance & Fetal Wellbeing": [ "fetal movement", "fetal surveillance", "non-stress", "biophysical", "cardiotocograph", "CTG", "doppler", "fetal wellbeing", "antepartum fetal", "intrapartum fetal", "intrauterine fetal demise", "IUFD", "stillbirth", "fetal heart", "reduced fetal movement", "decreased fetal" ], "Normal & Abnormal Labour": [ "labour care guide", "labour", "labor", "induction", "augmentation", "partograph", "Bishop", "active management of third stage", "AMTSL", "third stage", "deep transverse arrest", "DTA", "shoulder dystocia", "trial labour", "VBAC", "previous caesarean", "scar", "breech", "after-coming head", "compound presentation", "shoulder presentation", "neglected", "rupture of membrane", "PROM", "rupture of uterus", "uterine rupture" ], "Caesarean Section": [ "caesarean section", "LSCS", "robson", "caesarean scar", "reduce caesarean", "caesarean rate" ], "Postpartum Haemorrhage & Third Stage Complications": [ "postpartum haemorrhage", "PPH", "atonic", "uterine inversion", "inversion of uterus", "cervical tear", "perineal", "postpartum", "puerperal" ], "Hypertensive Disorders of Pregnancy": [ "hypertensive disorder", "pre-eclampsia", "preeclampsia", "eclampsia", "antihypertensive", "hypertension in pregnancy", "PIH", "HELLP" ], "Antepartum Haemorrhage": [ "abruptio", "abruption", "placenta previa", "placenta praevia", "placenta accreta", "PAS", "placenta accrete", "Nitabuch", "accreta spectrum", "couvelaire", "antepartum haemorrhage", "APH" ], "Preterm Labour & Prematurity": [ "preterm", "prematurity", "corticosteroid", "antenatal corticosteroid", "tocolysis", "cervical cerclage", "incompetent cervix", "cervical incompetence", "premature rupture" ], "Twin & Multiple Pregnancy": [ "twin", "multiple pregnancy", "chorionicity", "monochorionic", "twin-twin transfusion", "TTTS", "triplet", "fetal hydrops", "hydrops foetalis" ], "Fetal Growth Restriction & SGA": [ "small for gestation", "SGA", "fetal growth restriction", "FGR", "IUGR", "growth restriction" ], "Medical Disorders in Pregnancy": [ "diabetes", "gestational diabetes", "GDM", "overt diabet", "cardiac", "heart disease", "cardiovascular", "cardiomyopathy", "breathlessness", "thyroid", "hypothyroidism", "hyperthyroidism", "epilepsy", "seizure", "anticonvulsant", "asthma", "respiratory", "SLE", "lupus", "APLA", "antiphospholipid", "anaemia", "anemia", "iron deficiency", "parenteral iron", "thrombocytopenia", "thromboprophylaxis", "thromboembolism", "DVT", "malaria", "fever in pregnancy", "obesity", "BMI", "HIV", "PMTCT", "vertical transmission", "hepatitis", "jaundice in pregnancy", "viral hepatitis", "cholestasis", "intrahepatic cholestasis", "obstetric cholestasis", "acute fatty liver", "AFLP", "pyelonephritis", "urinary tract", "UTI", "COVID", "pandemic", "imaging modalities", "safety guidelines for imaging", "skin changes during pregnancy", "pruritis in pregnancy", "maternal collapse" ], "Rh Isoimmunization": [ "Rh isoimmun", "isoimmunization", "Rh negative", "anti-D", "erythroblastosis" ], "Gestational Trophoblastic Disease": [ "GTD", "trophoblastic", "molar", "hydatidiform", "choriocarcinoma" ], "Ectopic Pregnancy": [ "ectopic pregnancy", "caesarean scar pregnancy", "scar pregnancy", "heterotopic" ], "Prenatal Diagnosis & Screening": [ "prenatal diagnosis", "antepartum fetal screening", "antenatal screening", "gestational age", "dating pregnancy", "fetal maturity", "down syndrome", "chromosomal", "amniocentesis", "chorionic villus" ], "Neonatology": [ "neonatal", "neonate", "newborn", "neonatal sepsis", "APGAR", "apgar", "neonatal resuscitation", "Kangaroo", "essential newborn care", "neonatal jaundice", "hyperbilirubin", "phototherapy", "respiratory distress syndrome", "RDS", "surfactant", "hypoxic ischemic", "HIE", "birth asphyxia", "early neonatal death", "congenital malformations", "surgical emergencies", "cephalhematoma", "caput", "subgaleal", "infant of diabetic mother" ], "Abortion & MTP": [ "abortion", "MTP", "MTP act", "septic abortion", "recurrent pregnancy loss", "medical management of abortion" ], "Contraception & Family Planning": [ "contraception", "contraceptive", "family planning", "postpartum contraception", "IUD", "oral contraceptive", "transdermal", "ulipristal" ], "Preconception Counselling & Antenatal Care": [ "preconception", "pre-conception", "pre conceptional", "antenatal care", "booking visit", "optimize antenatal" ], "Community Obstetrics & Public Health": [ "ASHA", "national rural health", "NRHM", "maternal mortality", "infant mortality", "indicators of maternal", "maternal health", "community" ], "Puerperal Complications": [ "puerperal sepsis", "puerperal pyrexia", "puerperal infection", "sepsis after delivery", "sepsis", "postpartum sepsis" ], "External Cephalic Version": [ "external cephalic version", "ECV" ], } # Classify each question classified = {ch: [] for ch in chapter_map} unclassified = [] for q in paper2_questions: text_lower = q['text'].lower() matched = False for chapter, keywords in chapter_map.items(): for kw in keywords: if kw.lower() in text_lower: classified[chapter].append(q) matched = True break if matched: break if not matched: unclassified.append(q) print("=== CHAPTER-WISE CLASSIFICATION ===\n") for ch, qs in classified.items(): if qs: print(f"\n{'='*60}") print(f" {ch} ({len(qs)} questions)") print(f"{'='*60}") for q in qs: print(f" [{q['year']} Q{q['q_num']}] {q['text'][:100]}...") if unclassified: print(f"\n{'='*60}") print(f" UNCLASSIFIED ({len(unclassified)} questions)") print(f"{'='*60}") for q in unclassified: print(f" [{q['year']} Q{q['q_num']}] {q['text'][:120]}") # Save to JSON for document creation with open('paper2_classified.json', 'w') as f: json.dump({'classified': {ch: qs for ch, qs in classified.items() if qs}, 'unclassified': unclassified}, f, indent=2) print(f"\n\nTotal classified: {sum(len(v) for v in classified.values())}") print(f"Total unclassified: {len(unclassified)}") EOF
ls /home/daytona/workspace/attachments/b23365d8-d6e1-41d4-bfcb-dbb7c20e4817/ && ls /home/daytona/skills/docx/scripts/office/ 2>/dev/null || echo "no scripts dir"
mkdir -p /home/daytona/workspace/paper2-topics && cat > /home/daytona/workspace/paper2-topics/create_doc.js << 'JSEOF' const { Document, Packer, Paragraph, TextRun, HeadingLevel, AlignmentType, BorderStyle, Table, TableRow, TableCell, WidthType, ShadingType } = require('docx'); const fs = require('fs'); const data = JSON.parse(fs.readFileSync('/home/daytona/workspace/paper2_classified.json', 'utf8')); // Fix classification issues - manually add missing items // Dec2022 Q4 -> Heart disease (WHO risk classification) // June2018 Q1 -> Twin & Multiple (hydrops) // June2018 Q10 -> IUFD/Fetal wellbeing const manualClassify = { 'Medical Disorders in Pregnancy': [ {year: 'Dec2022', q_num: '4', text: "What is the basis of WHO risk classification of heart disease in pregnancy? Discuss management of a 23 years old primigravida at 24 weeks gestation who comes with worsening dyspnoea and is found to have mitral valve stenosis. [10]"} ], 'Twin & Multiple Pregnancy': [ {year: 'June2018', q_num: '1', text: "a) Etiopathogenesis of Non-Immune Hydrops in fetus. [5] b) How will you manage a case of Non-Immune Hydrops at 26 weeks of gestation and what is the prognosis? [5]"} ], 'Antepartum Fetal Surveillance & Fetal Wellbeing': [ {year: 'June2018', q_num: '10', text: "An unbooked primigravida patient at 32 weeks pregnancy reports to the outpatient department with intra uterine fetal demise (IUFD): a) Enumerate the causes of IUFD. [4] b) Discuss the management and counselling of the case. [6]"} ] }; // Merge manual into classified for (const [ch, qs] of Object.entries(manualClassify)) { if (!data.classified[ch]) data.classified[ch] = []; data.classified[ch].push(...qs); } // Chapter order (logical Obstetrics curriculum order) const chapterOrder = [ "Antepartum Fetal Surveillance & Fetal Wellbeing", "Prenatal Diagnosis & Screening", "Preterm Labour & Prematurity", "Hypertensive Disorders of Pregnancy", "Antepartum Haemorrhage", "Medical Disorders in Pregnancy", "Rh Isoimmunization", "Twin & Multiple Pregnancy", "Fetal Growth Restriction & SGA", "Normal & Abnormal Labour", "Caesarean Section", "Postpartum Haemorrhage & Third Stage Complications", "Puerperal Complications", "Neonatology", "Gestational Trophoblastic Disease", "Ectopic Pregnancy", "Abortion & MTP", "External Cephalic Version", "Contraception & Family Planning", "Preconception Counselling & Antenatal Care", "Community Obstetrics & Public Health" ]; const children = []; // Title children.push( new Paragraph({ children: [new TextRun({ text: "Compilation of 5-Year Question Paper β Paper 2", bold: true, size: 32, color: "1F3864" })], heading: HeadingLevel.TITLE, alignment: AlignmentType.CENTER, spacing: { after: 200 } }), new Paragraph({ children: [new TextRun({ text: "Chapter-wise Topic List", bold: true, size: 26, color: "2E74B5" })], alignment: AlignmentType.CENTER, spacing: { after: 100 } }), new Paragraph({ children: [new TextRun({ text: "(Dec 2018 β Dec 2022 | 100 Questions)", italics: true, size: 22, color: "666666" })], alignment: AlignmentType.CENTER, spacing: { after: 400 } }) ); let chapterNum = 0; for (const chapterName of chapterOrder) { const questions = data.classified[chapterName]; if (!questions || questions.length === 0) continue; chapterNum++; // Chapter heading children.push( new Paragraph({ children: [ new TextRun({ text: `Chapter ${chapterNum}: `, bold: true, size: 26, color: "1F3864" }), new TextRun({ text: chapterName, bold: true, size: 26, color: "1F3864" }) ], heading: HeadingLevel.HEADING_1, spacing: { before: 400, after: 160 }, border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: "2E74B5" } } }) ); // Count badge children.push( new Paragraph({ children: [new TextRun({ text: `Total questions: ${questions.length}`, bold: false, size: 20, color: "888888", italics: true })], spacing: { after: 160 } }) ); // Sort by year questions.sort((a, b) => a.year.localeCompare(b.year)); // Questions let qCounter = 1; for (const q of questions) { // Question header row children.push( new Paragraph({ children: [ new TextRun({ text: `Q${qCounter}. `, bold: true, size: 22, color: "C00000" }), new TextRun({ text: `[${q.year} β Q${q.q_num}]`, bold: true, size: 20, color: "2E74B5" }) ], spacing: { before: 120, after: 60 } }) ); // Question text const cleanText = q.text .replace(/\\\)/g, ')') .replace(/\\\[/g, '[') .replace(/\\\]/g, ']') .replace(/\\\\./g, '.') .trim(); children.push( new Paragraph({ children: [new TextRun({ text: cleanText, size: 20, color: "333333" })], indent: { left: 360 }, spacing: { after: 200 } }) ); qCounter++; } } // Summary table children.push( new Paragraph({ children: [new TextRun({ text: "Summary: Chapter-wise Question Count", bold: true, size: 26, color: "1F3864" })], heading: HeadingLevel.HEADING_1, spacing: { before: 600, after: 200 } }) ); const tableRows = [ new TableRow({ children: [ new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "Chapter", bold: true, size: 20 })] })], shading: { type: ShadingType.SOLID, color: "2E74B5", fill: "2E74B5" }, width: { size: 4500, type: WidthType.DXA } }), new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "No. of Questions", bold: true, size: 20, color: "FFFFFF" })] })], shading: { type: ShadingType.SOLID, color: "2E74B5", fill: "2E74B5" }, width: { size: 1500, type: WidthType.DXA } }) ], tableHeader: true }) ]; let totalQ = 0; let rowNum = 0; for (const chapterName of chapterOrder) { const questions = data.classified[chapterName]; if (!questions || questions.length === 0) continue; const count = questions.length; totalQ += count; rowNum++; const shade = rowNum % 2 === 0 ? "E8F0FE" : "FFFFFF"; tableRows.push( new TableRow({ children: [ new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: chapterName, size: 20 })] })], shading: { type: ShadingType.SOLID, color: shade, fill: shade } }), new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: String(count), size: 20, bold: true })] , alignment: AlignmentType.CENTER })], shading: { type: ShadingType.SOLID, color: shade, fill: shade } }) ] }) ); } // Total row tableRows.push( new TableRow({ children: [ new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: "TOTAL", bold: true, size: 20 })] })], shading: { type: ShadingType.SOLID, color: "1F3864", fill: "1F3864" } }), new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: String(totalQ), bold: true, size: 20, color: "FFFFFF" })] , alignment: AlignmentType.CENTER })], shading: { type: ShadingType.SOLID, color: "1F3864", fill: "1F3864" } }) ] }) ); children.push(new Table({ rows: tableRows, width: { size: 6000, type: WidthType.DXA } })); const doc = new Document({ sections: [{ properties: {}, children }], styles: { default: { document: { run: { font: "Calibri" } } } } }); Packer.toBuffer(doc).then(buffer => { fs.writeFileSync('/home/daytona/workspace/paper2-topics/Paper2_Chapterwise_Topics.docx', buffer); console.log('Document created successfully!'); }); JSEOF echo "Script written"
cd /home/daytona/workspace/paper2-topics && node create_doc.js 2>&1
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/paper2-topics/Paper2_Chapterwise_Topics.docx 2>&1
# Basic validation - check file size and unzip it to verify ls -lh /home/daytona/workspace/paper2-topics/Paper2_Chapterwise_Topics.docx && python3 -c "import zipfile; z=zipfile.ZipFile('/home/daytona/workspace/paper2-topics/Paper2_Chapterwise_Topics.docx'); print('Files in docx:', z.namelist()[:8]); print('Valid ZIP/DOCX!')"
Paper2 Chapterwise Topics
Word Document Β· DOCX
| # | Chapter | Questions |
|---|---|---|
| 1 | Antepartum Fetal Surveillance & Fetal Wellbeing | 6 |
| 2 | Prenatal Diagnosis & Screening | 1 |
| 3 | Preterm Labour & Prematurity | 5 |
| 4 | Hypertensive Disorders of Pregnancy | 2 |
| 5 | Antepartum Haemorrhage (Placenta Previa, Abruption, PAS) | 6 |
| 6 | Medical Disorders in Pregnancy | 23 |
| 7 | Rh Isoimmunization | 1 |
| 8 | Twin & Multiple Pregnancy | 11 |
| 9 | Fetal Growth Restriction & SGA | 2 |
| 10 | Normal & Abnormal Labour | 18 |
| 11 | Caesarean Section | 5 |
| 12 | Postpartum Haemorrhage & Third Stage Complications | 6 |
| 13 | Puerperal Complications | 1 |
| 14 | Neonatology | 6 |
| 15 | Gestational Trophoblastic Disease | 1 |
| 16 | Ectopic Pregnancy | 1 |
| 17 | Abortion & MTP | 2 |
| 18 | External Cephalic Version | 1 |
| 19 | Contraception & Family Planning | 1 |
| 20 | Preconception Counselling & Antenatal Care | 1 |
| 21 | Community Obstetrics & Public Health | 1 |
| TOTAL | 100 |
What the these questions? I canβt download
Write the answer of questions 1 answer 1 in detail so that i can write in exam
| Parameter | Normal (score 2) |
|---|---|
| Fetal breathing movements | β₯1 episode β₯30 sec in 30 min |
| Gross body movements | β₯3 discrete movements in 30 min |
| Fetal tone | β₯1 episode of extension + return to flexion |
| Amniotic fluid volume | Deepest vertical pocket (DVP) β₯2 cm |
| NST | Reactive |
| Target | Detection Rate | False Positive Rate |
|---|---|---|
| Trisomy 21 (Down syndrome) | ~99.7% | ~0.13% |
| Trisomy 18 (Edwards) | ~97.9% | 0.13% |
| Trisomy 13 (Patau) | ~99.0% | 0.13% |
| Monosomy X (Turner) | ~90% | β |
| Sex chromosome aneuploidies | Variable | β |
| Microdeletions (22q11, 15q) | Emerging | β |
| Marker | Trisomy 21 | Trisomy 18 | Neural Tube Defect |
|---|---|---|---|
| AFP | β | β | ββ |
| hCG | β | β | Normal |
| uE3 | β | β | Normal |
| Inhibin A | β | Normal | Normal |
| Technique | Timing | What it Detects |
|---|---|---|
| NT + nasal bone USS | 11β13+6 wks | Aneuploidy, structural defects |
| Combined screen (PAPP-A + Ξ²-hCG + NT) | 11β13+6 wks | Aneuploidy risk |
| Quad screen | 15β20 wks | Aneuploidy, NTD |
| cfDNA / NIPT | β₯10 wks | Trisomies, sex chromosome aneuploidies |
| Anomaly scan | 18β20 wks | Structural anomalies |
| Fetal echo | 20β24 wks | Congenital heart defects |
| 3D/4D USS | 2nd/3rd trimester | Facial/skeletal anomalies |
| Fetal MRI | 2nd/3rd trimester | CNS anomalies |
Key exam point: cfDNA/NIPT has the highest sensitivity and lowest false-positive rate of all Down syndrome screening tests, but it remains a screening β not diagnostic β tool. All screen-positive results must be confirmed by invasive testing (amniocentesis/CVS). (Creasy & Resnik's Maternal-Fetal Medicine)
Make a pdf of all the answers
Make the list of questions asked chapter wise from paper 4
cd /home/daytona/workspace && python3 -c " import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) # Find all unique paper numbers papers = set() for row in rows: paper = re.sub(r'\s+', '', row[1].strip()) if paper and '**' not in paper: papers.add(paper) print('Papers found in file:', sorted(papers)) # Count questions per paper from collections import Counter counter = Counter() for row in rows: paper = re.sub(r'\s+', '', row[1].strip()) q_text = row[3].strip() if paper and '**' not in paper and q_text and '**Question**' not in q_text: counter[paper] += 1 for p, c in sorted(counter.items()): print(f'Paper {p}: {c} questions') "
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) paper4_questions = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '4' and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper4_questions.append({'year': year, 'q_num': q_num_clean, 'text': q_clean}) print(f"Total Paper 4 questions: {len(paper4_questions)}\n") for q in paper4_questions: print(f"[{q['year']} Q{q['q_num']}] {q['text'][:130]}") print() EOF
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) paper4_questions = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '4' and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper4_questions.append({'year': year, 'q_num': q_num_clean, 'text': q_clean}) # Chapter classification for Paper 4 (Advanced Obstetrics & Gynaecology / Recent Advances) chapter_map = { "Prenatal Diagnosis & Genetics": [ "NIPT", "cell free DNA", "cell-free DNA", "cfDNA", "non-invasive prenatal", "aneuploidy screening", "chorionic villus", "CVS", "chromosome microarray", "preimplantation genetic", "PGT", "trisomy", "soft signs", "trisomy 21", "pedigree chart", "genetic counselling", "genetic counseling", "GeneXpert", "fetal aneuploid", "prenatal screening" ], "Assisted Reproductive Technology (ART) & Infertility": [ "ART", "IVF", "ICSI", "oocyte cryopreservation", "embryo cryopreservation", "cryopreservation", "ovarian reserve", "IVF cycle", "assisted reproductive", "ovarian hyperstimulation", "OHSS", "ovulation trigger", "LH surge", "unexplained infertility", "laparohysteroscopy", "tubal infertility", "semen report", "azoospermia", "sperm retrieval", "single embryo transfer", "eSET", "ART complication", "children born after assisted", "luteal phase defect", "PCOS", "inositol", "GnRH analogue", "ovarian tissue cryopreservation", "fertility preservation", "uterotubal", "hysteroscopic surgery in infertility" ], "Fetal Therapy & Invasive Procedures": [ "fetal therapy", "fetal blood sampling", "FBS", "EXIT surgery", "in-utero", "intrafetal therapy", "fetal treatment", "umbilical cord blood", "cord banking" ], "Endometriosis": [ "endometriosis", "endometrioma", "adenomyosis", "dinogest", "GnRH agonist", "GnRH antagonist" ], "Minimally Invasive Surgery & Endoscopy": [ "minimally invasive surgery", "MIS", "laparoscopic", "hysteroscop", "endoscopic surgery", "ergonomics in endoscop", "electrosurgical", "thermal ablation", "endometrial ablation", "NOTES", "Natural Orifice", "sentinel node", "sentinel lymph node", "radical trachelectomy" ], "Gynaecological Oncology": [ "ovarian cancer", "vaginal intraepithelial neoplasia", "VaIN", "cervical cancer screening", "precancerous lesion", "cervix", "tumour marker", "ovarian tumour marker", "PET-CT", "molecular biology of ovarian", "genetic counseling ovarian" ], "Reproductive Genetics & Epigenetics": [ "epigenetics", "epigenetic", "stem cell", "stem cells", "chromosome microarray", "microarray" ], "Uterine & Structural Anomalies": [ "uterine anomal", "congenital uterine", "hysteroscopic septal", "uterine transplant", "uterus transplant", "leiomyoma", "fibroid", "endometrium in menstrual", "uterine biophysical", "selective progesterone receptor modulator", "SPRM", "SERM" ], "Surrogacy, Ethics & Legal Issues": [ "surrogacy", "Surrogacy Act", "commercial surrogacy", "publication ethics", "plagiarism", "ethical issues", "MTP Amendment", "MTP Act", "gender dysphoria", "transgender" ], "Maternal Near Miss & Obstetric Emergencies": [ "maternal near miss", "severe acute maternal morbidity", "maternal collapse", "massive blood loss", "golden hour", "blood transfusion", "estimate blood loss" ], "Anaemia & Nutrition in Pregnancy": [ "anemia", "anaemia", "iron deficiency", "ferric carboxymaltose", "Anaemia Mukt Bharat", "National Nutrition Mission", "government schemes", "prevention of anemia" ], "HIV & Infectious Diseases in Pregnancy": [ "HIV", "PMTCT", "vertical transmission", "prevention of HIV", "HBsAg", "hepatitis B", "COVID", "Covid vaccination", "COVID-19 vaccination" ], "Hypertensive Disorders & Prediction": [ "pre-eclampsia", "preeclampsia", "prediction", "biomarkers in prediction", "hypertensive disorder", "antibiotic prophylaxis" ], "Newborn Care & Paediatrics": [ "baby friendly hospital", "Kangaroo mother care", "kangaroo", "cystic hygroma", "fetal liver calcification", "lethal fetal anomaly" ], "Obstetric Doppler & Ultrasound": [ "Doppler ultrasound", "umbilical coiling index", "cord insertion", "MRI in obstetrics", "sonography augment aneuploidy", "color Doppler", "role of imaging in adenomyosis" ], "Contraception & Family Planning": [ "long acting reversible contraceptive", "LARC", "Family Planning Indemnity Scheme", "FPIS", "contraceptive" ], "Community Health & National Programmes": [ "Rastriya Kishore Swasthya", "RKSK", "gynaecologist in promoting", "Anaemia Mukt", "National Nutrition Mission", "maternal near miss", "indicators", "obstetric service" ], "Wound Healing & Surgical Principles": [ "wound healing", "topical negative pressure", "wound" ], "Obesity & Bariatric Surgery": [ "obesity", "obese", "bariatric", "morbidly obese", "BMI", "pathophysiology of obesity" ], "Ectopic Pregnancy": [ "tubal ectopic", "ectopic pregnancy", "caesarean scar pregnancy" ], "Urological Gynaecology": [ "urinary incontinence", "overactive bladder", "pathophysiology of urinary" ], "Premature Ovarian Insufficiency & Menopause": [ "POI", "premature ovarian", "menopausal hormone therapy", "hormone therapy", "menopause" ], "Labour & Partogram": [ "partogram", "WHO labour care", "labour care guidelines" ], } classified = {ch: [] for ch in chapter_map} unclassified = [] for q in paper4_questions: text_lower = q['text'].lower() matched = False for chapter, keywords in chapter_map.items(): for kw in keywords: if kw.lower() in text_lower: classified[chapter].append(q) matched = True break if matched: break if not matched: unclassified.append(q) print("=== PAPER 4 β CHAPTER-WISE CLASSIFICATION ===\n") total = 0 for ch, qs in classified.items(): if qs: total += len(qs) print(f"\n{'='*60}") print(f" {ch} ({len(qs)} Qs)") print(f"{'='*60}") for q in qs: print(f" [{q['year']} Q{q['q_num']}] {q['text'][:110]}") if unclassified: print(f"\n{'='*60}") print(f" UNCLASSIFIED ({len(unclassified)} Qs)") print(f"{'='*60}") for q in unclassified: print(f" [{q['year']} Q{q['q_num']}] {q['text'][:120]}") print(f"\nClassified: {total} | Unclassified: {len(unclassified)}") EOF
| Chapter | Topic | Qs |
|---|---|---|
| 1 | Prenatal Diagnosis & Genetics | 11 |
| 2 | ART & Infertility | 22 |
| 3 | Fetal Therapy & Invasive Procedures | 6 |
| 4 | Endometriosis | 5 |
| 5 | Minimally Invasive Surgery & Endoscopy | 8 |
| 6 | Gynaecological Oncology | 4 |
| 7 | Stem Cells, Epigenetics & Genetics | 3 |
| 8 | Uterine Anomalies, Fibroid & Endometrium | 4 |
| 9 | Surrogacy, Ethics & Legal Issues | 6 |
| 10 | Obstetric Doppler, Ultrasound & Imaging | 3 |
| 11 | Maternal Near Miss & Obstetric Emergencies | 3 |
| 12 | HIV & Infectious Diseases | 5 |
| 13 | Anaemia & Nutrition | 2 |
| 14 | Hypertensive Disorders & Prediction | 1 |
| 15 | Newborn Care & Paediatric Conditions | 3 |
| 16 | Contraception & Family Planning | 2 |
| 17 | Community Health & National Programmes | 1 |
| 18 | Premature Ovarian Insufficiency & Menopause | 1 |
| 19 | Obesity & Bariatric Surgery | 2 |
| 20 | Ectopic Pregnancy | 1 |
| 21 | Urological Gynaecology | 1 |
| 22 | Wound Healing & Surgical Principles | 1 |
| 23 | Selective Progesterone Receptor Modulators | 1 |
| 24 | Atypical Genital Appearance / DSD | 1 |
| 25 | Labour Analgesia & Alternative Birth | 1 |
| TOTAL | 100 |
Create comparison table of similar topics across all 4 papers
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) all_questions = {} for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper in ['1','2','3','4'] and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() if paper not in all_questions: all_questions[paper] = [] all_questions[paper].append({'year': year, 'q_num': q_num_clean, 'text': q_clean}) for p in ['1','2','3','4']: print(f"Paper {p}: {len(all_questions.get(p,[]))} questions") EOF
Similarly make chapter wise list of topic asked in paper 3
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) paper3_questions = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '3' and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper3_questions.append({'year': year, 'q_num': q_num_clean, 'text': q_clean}) print(f"Total Paper 3 questions: {len(paper3_questions)}\n") for q in paper3_questions: print(f"[{q['year']} Q{q['q_num']}] {q['text'][:130]}") print() EOF
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) paper3_questions = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '3' and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper3_questions.append({'year': year, 'q_num': q_num_clean, 'text': q_clean}) # Paper 3 = Gynaecology (clinical + surgical) chapter_map = { "Abnormal Uterine Bleeding (AUB) & Menstrual Disorders": [ "PALM COEIN", "abnormal uterine bleeding", "AUB", "heavy menstrual bleeding", "HMB", "dysmenorrhea", "amenorrhea", "primary amenorrhea", "secondary amenorrhea", "irregular vaginal bleeding", "menorrhagia", "oligomenorrhea", "polymenorrhea", "missed pills", "anovulatory" ], "Fibroids (Leiomyoma) & Uterine Conditions": [ "fibroid", "leiomyoma", "myoma", "myomectomy", "fibroid uterus", "uterine artery embolization", "UAE", "embolization" ], "Endometrial Pathology": [ "endometrial hyperplasia", "endometrial cancer", "endometrial carcinoma", "endometrial intraepithelial neoplasia", "EIN", "FIGO staging of endometrial", "endometrial cancer", "prognostic factors", "molecular markers", "molar pregnancy", "GTD", "trophoblastic disease" ], "Endometriosis": [ "endometriosis", "endometrioma", "endometriotic", "adenomyosis" ], "Polycystic Ovary Syndrome (PCOS)": [ "PCOS", "polycystic ovary", "polycystic ovaries", "polycystic ovarian", "hirsutism", "induction of ovulation", "ovulation induction", "ovarian hyperstimulation", "OHSS", "GnRH", "clomiphene", "anovulatory" ], "Infertility": [ "infertility", "tubal infertility", "male factor infertility", "secondary infertility", "unexplained infertility", "causes of infertility", "couple infertility", "fertility workup", "laparohysteroscopy" ], "Gynaecological Infections & Vulvovaginal Conditions": [ "pelvic inflammatory disease", "PID", "genital tuberculosis", "pelvic tuberculosis", "vulvovaginal candidiasis", "recurrent vulvovaginal", "vaginal microbial flora", "bacterial vaginosis", "sexually transmitted", "vulval ulcer", "pruritus vulvae", "pruritus vulva", "vulvodynia", "white patch", "defense mechanisms of genital tract", "galactorrhoea", "vaginal discharge" ], "Pelvic Organ Prolapse & Urological Gynaecology": [ "pelvic organ prolapse", "POP-Q", "POP Q", "vault prolapse", "utero vaginal prolapse", "uterovaginal prolapse", "cystocele", "rectocele", "pelvic floor", "stress urinary incontinence", "SUI", "urinary incontinence", "overactive bladder", "vesicovaginal fistula", "VVF", "ureterovaginal fistula", "ureteric injur", "extra-urethral", "urethral syndrome", "atrophic vaginitis", "genitourinary syndrome" ], "Menopause & Postmenopausal Conditions": [ "menopause", "postmenopaus", "post-menopaus", "menopausal", "osteoporosis", "postmenopausal bleeding", "primary ovarian insufficiency", "genitourinary syndrome of menopause", "hormone therapy" ], "Chronic Pelvic Pain": [ "chronic pelvic pain", "pelvic pain", "vulvodynia", "ovarian remnant", "residual ovary" ], "Cervical Pathology & Oncology": [ "cervical carcinoma", "carcinoma cervix", "CA cervix", "cervical cancer", "cervical intraepithelial neoplasia", "CIN", "colposcopy", "colposcopic", "cervical screening", "liquid based cytology", "HPV vaccine", "HPV", "FIGO staging of cervical", "staging cervical" ], "Ovarian Tumours & Oncology": [ "ovarian cancer", "ovarian carcinoma", "carcinoma ovary", "FIGO classification of ovarian", "FIGO staging of ovarian", "ovarian tumour", "benign ovarian", "dermoid cyst", "benign cystic teratoma", "epithelial ovarian", "hereditary breast", "BRCA", "hormonally active ovarian", "estrogenising tumour", "solid tumour in the ovary", "ovarian screening" ], "Vulval Conditions & VIN": [ "vulval intra", "vulval intraepithelial", "VIN", "vulval ulcer", "vulval carcinoma", "radical vulvectomy", "lymph nodes in radical vulvectomy", "vulvodynia", "pruritus vulvae", "pruritus vulva", "white patch on labia" ], "Contraception & Family Planning": [ "contraceptive", "contraception", "oral contraceptive", "COC", "COCS", "intrauterine contraceptive device", "IUCD", "CuT", "Cu-T", "IUD", "levonorgestrel", "LNG-IUS", "Mirena", "barrier contraceptive", "condom", "injectable contraceptive", "DMPA", "medroxyprogesterone", "emergency contraception", "postpartum contraception", "long acting reversible contraceptive", "LARC", "Antra", "missed pills", "national family planning", "WHO medical eligibility", "progesterone only pill", "POP", "Family Planning Indemnity" ], "Sterilization": [ "female sterilization", "tubal ligation", "sterilization", "vasectomy", "NSV", "male sterilization" ], "MTP & Abortion": [ "MTP", "medical termination", "second trimester termination", "Mifepristone", "misoprostol", "septic abortion", "PCPNDT", "PGD" ], "Mullerian Anomalies & Congenital Conditions": [ "Mullerian duct", "mullerian anomaly", "androgen insensitivity", "congenital uterine", "uterine anomaly" ], "Gynaecological Surgery & Anatomy": [ "anatomy of anterior abdominal wall", "abdominal wall", "types of incision", "incision", "hysterectomy", "laparoscopy in gynaecology", "laser in gynaecology", "endoscopic surgery", "ureteric injur" ], "Ectopic Pregnancy": [ "ectopic pregnancy", "tubal ectopic" ], "Tumour Markers": [ "tumor maker", "tumour marker", "CA-125", "AFP", "HCG" ], "Adolescent Gynaecology": [ "adolescent", "PCOS in adolescent", "contraceptive advice", "sexually active girl" ], "Gynaecological Infections (Pyelonephritis/Urinary)": [ "pyelonephritis", "urinary tract infection" ], "Ovulation & Reproductive Endocrinology": [ "endocrinology of ovulation", "assess ovulation", "ovulation", "blood supply of reproductive", "blood supply" ], } classified = {ch: [] for ch in chapter_map} unclassified = [] for q in paper3_questions: text_lower = q['text'].lower() matched = False for chapter, keywords in chapter_map.items(): for kw in keywords: if kw.lower() in text_lower: classified[chapter].append(q) matched = True break if matched: break if not matched: unclassified.append(q) print("=== PAPER 3 β CHAPTER-WISE CLASSIFICATION ===\n") total = 0 for ch, qs in classified.items(): if qs: total += len(qs) print(f"\n{'='*60}") print(f" {ch} ({len(qs)} Qs)") print(f"{'='*60}") for q in qs: print(f" [{q['year']} Q{q['q_num']}] {q['text'][:115]}") if unclassified: print(f"\n{'='*60}") print(f" UNCLASSIFIED ({len(unclassified)} Qs)") print(f"{'='*60}") for q in unclassified: print(f" [{q['year']} Q{q['q_num']}] {q['text'][:120]}") print(f"\nClassified: {total} | Unclassified: {len(unclassified)}") EOF
| # | Chapter | Questions |
|---|---|---|
| 1 | AUB & Menstrual Disorders | 11 |
| 2 | Fibroids & UAE | 1 |
| 3 | Endometrial Pathology | 7 |
| 4 | Endometriosis | 2 |
| 5 | PCOS & Ovulation Induction | 8 |
| 6 | Infertility | 3 |
| 7 | Gynaecological Infections & Vulvovaginal Conditions | 9 |
| 8 | Pelvic Organ Prolapse & Urological Gynaecology | 13 |
| 9 | Menopause & Postmenopausal Conditions | 3 |
| 10 | Chronic Pelvic Pain | 4 |
| 11 | Cervical Pathology & Oncology | 7 |
| 12 | Ovarian Tumours & Oncology | 4 |
| 13 | Vulval Conditions & VIN | 1 |
| 14 | Contraception & Family Planning | 13 |
| 15 | Sterilization | 5 |
| 16 | MTP & Abortion | 2 |
| 17 | Gynaecological Surgery & Anatomy | 2 |
| 18 | Ectopic Pregnancy | 1 |
| 19 | Tumour Markers | 1 |
| 20 | Ovulation & Reproductive Endocrinology | 2 |
| 21 | Pyelonephritis in Pregnancy | 1 |
| TOTAL | 100 |
Make chapter wise list of topic asked from the paper 2
Dont weite thw whole question make the chapter wise list of topic written in short
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) paper2_questions = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '2' and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper2_questions.append({'year': year, 'q_num': q_num_clean, 'text': q_clean}) print(f"Total: {len(paper2_questions)}") for q in paper2_questions: print(f"[{q['year']} P2 Q{q['q_num']}] {q['text'][:100]}") EOF
| Year | Topic |
|---|---|
| Dec2022 | Antepartum fetal screening methods; Non-invasive prenatal diagnosis |
| Dec2022 | Post-dates pregnancy management (41+2 weeks) |
| June2022 | Decreased fetal movements β causes, investigations, management |
| Aug2021 | Decreased fetal movements β causes & management |
| June2018 | Intrapartum fetal surveillance modalities; Intrauterine resuscitation |
| June2018 | IUFD β causes, management, counselling |
| Year | Topic |
|---|---|
| June2019 | Assessment of gestational age; Indices of fetal maturity |
| Year | Topic |
|---|---|
| Dec2022 | Incompetent cervix β etiopathology, diagnosis, cerclage types |
| June2022 | Antenatal corticosteroids β advantages, disadvantages; Tocolytic drugs |
| Aug2021 | Preterm neonate β causes of early neonatal death; management |
| Dec2020 | Apgar score; Antenatal corticosteroids |
| June2020 | PPROM β diagnosis; management at 30 weeks |
| June2018 | Risk factors for prematurity; Complications; Interventions |
| Year | Topic |
|---|---|
| Dec2022 | WHO risk classification of heart disease in pregnancy; Mitral stenosis management |
| June2022 | Antihypertensive drugs in pregnancy (dosage, side effects); Postpartum hypertension |
| Dec2020 | Preeclampsia β definition; Eclampsia management at 34 weeks |
| Dec2019 | Classification of hypertensive disorders; Role of antihypertensives in pre-eclampsia |
| Aug2021 | Prediction & prevention of pre-eclampsia |
| Year | Topic |
|---|---|
| Dec2022 | Nitabuch's layer; Placenta Accreta Spectrum (PAS) β diagnosis & management |
| Dec2021 | Placenta previa β etiology, classification, management |
| June2020 | Abruptio placentae β etiology & management |
| June2020 | Placenta Accreta Syndrome (PAS) β definition, risk factors, diagnosis, management |
| June2019 | Abruptio placentae β predisposing factors, Couvelaire uterus, management |
| Dec2019 | Placenta accreta β imaging diagnosis; Management with previous CS |
| Dec2018 | Anterior type 3 placenta praevia with previous LSCS β antenatal, delivery, intraoperative |
| Year | Topic |
|---|---|
| Dec2022 | Physiological skin changes in pregnancy; Pruritus in pregnancy |
| Dec2022 | Maternal collapse β causes & approach |
| Dec2022 | Fever in pregnancy & puerperium; Malaria in pregnancy |
| June2022 | Thrombocytopenia in pregnancy β classification & management of ITP |
| Dec2021 | Hypothyroidism in pregnancy β preconception to postnatal management |
| Dec2021 | Imaging safety in pregnancy; Goals of NRHM |
| Dec2021 | HIV in pregnancy β management & PMTCT |
| Aug2021 | Neonate of HIV positive mother; Early onset neonatal sepsis |
| Aug2021 | Obstetric cholestasis β definition, diagnosis, management |
| Dec2020 | Carbohydrate metabolism in pregnancy; Overt diabetes management |
| June2020 | Epilepsy in pregnancy β course & drugs used |
| June2020 | COVID-19 in pregnancy β antenatal care optimization & management |
| June2020 | Acute fatty liver of pregnancy β etiopathology & management |
| Dec2019 | Acute fatty liver of pregnancy; Differentiation from viral hepatitis |
| Dec2019 | GDM screening methods; Neonatal complications of diabetic mother |
| June2019 | SLE in pregnancy; APLA syndrome β diagnosis & management |
| June2019 | Jaundice in pregnancy; Viral hepatitis in pregnancy |
| Dec2018 | HIV prevention β vertical transmission; Labour management in HIV |
| Dec2018 | Peripartum cardiomyopathy β differential diagnosis & management |
| Dec2018 | Type 2 diabetes in pregnancy β preconception, antenatal, intrapartum |
| Dec2018 | Obesity in pregnancy (BMI 38) β risks, antenatal, intrapartum management |
| June2018 | Cardiovascular changes in pregnancy; Clinical indicators of heart disease; Mitral stenosis |
| Year | Topic |
|---|---|
| June2022 | Rh isoimmunized pregnancy β definition & management with hydrops at 26 weeks |
| Year | Topic |
|---|---|
| Dec2022 | Fetal hydrops β causes; Immune hydrops at 22 weeks |
| June2022 | TTTS β genesis, diagnosis, management |
| Aug2021 | Non-immune hydrops foetalis (NIHF) β management at 26 weeks |
| Aug2021 | Twin gestation genesis; Monochorionic twin complications |
| June2020 | TTTS β Quintero staging; Latest management |
| June2020 | Chorionicity β assessment methods; Implications on outcome |
| Dec2019 | Chorionicity β assessment methods; Implications |
| Dec2018 | Antenatal tests for Down syndrome; MCDA twin management |
| Dec2018 | Twin pregnancy complications; Management after delivery of first twin; Locked twins |
| June2018 | Non-immune hydrops β etiopathogenesis & management |
| June2018 | Triplet pregnancy β counselling, fetal reduction, antenatal management |
| Year | Topic |
|---|---|
| June2022 | SGA β definition, etiologies, workup, management at 32 weeks |
| June2018 | FGR β definition, causes, diagnosis, management at 34 weeks |
| Year | Topic |
|---|---|
| Dec2021 | WHO Labour Care Guide; CTG/Cardiotocography |
| Dec2021 | Complications of induction of labour; Strategies to reduce LSCS rate |
| Dec2021 | VBAC β prerequisites, intrapartum monitoring, scar dehiscence |
| Dec2020 | Shoulder dystocia; Induction of labour |
| Dec2020 | After-coming head in breech; Neglected shoulder presentation |
| June2019 | Shoulder dystocia β diagnosis, complications, management |
| June2019 | Trial labour β definition, contraindications, favourable/unfavourable factors |
| June2019 | Rupture of uterus β diagnosis & management |
| June2022 | Deep transverse arrest (DTA) β etiologies, management, complications |
| June2018 | Augmentation vs induction; Prerequisites; Methods of induction |
| June2018 | Pregnancy dating; Management of post-dates pregnancy |
| June2022 | Caesarean scar pregnancy β diagnosis, risk factors, management |
| Dec2020 | Medical management of ectopic pregnancy; Caesarean scar pregnancy |
| Dec2021 | Medical methods of abortion β indications, contraindications, limitations |
| Year | Topic |
|---|---|
| Dec2021 | Strategies to reduce CS rate; Parenteral iron therapy; Partograph |
| Aug2021 | Strategies to reduce CS rates; Indicators of maternal & neonatal health |
| Dec2018 | Robson classification; Causes of rising CS rates; Methods to reduce |
| Year | Topic |
|---|---|
| Aug2021 | Uterine inversion β classification & management |
| Dec2020 | Acute uterine inversion; PPH management |
| Dec2019 | Active management of third stage; Surgical management of atonic PPH |
| June2018 | Cervical tear β causes, diagnosis, management |
| Year | Topic |
|---|---|
| June2022 | Puerperal sepsis β organisms, management principles |
| Dec2020 | Puerperal pyrexia β definition, causes; Puerperal sepsis management |
| June2019 | Puerperal sepsis β definition, predisposing factors, management |
| Year | Topic |
|---|---|
| Dec2020 | Kangaroo mother care; Neonatal resuscitation |
| Dec2020 | Neonatal sepsis β classification & management |
| June2020 | Caput succedaneum vs subgaleal haematoma vs cephalhematoma |
| June2020 | Essential newborn care; Neonatal jaundice; HIE |
| June2019 | Congenital malformations as surgical emergencies; TOF |
| Dec2019 | Respiratory distress syndrome; Differential diagnosis; Management |
| Dec2018 | Neonatal jaundice β causes; Phototherapy rationale |
| Aug2021 | Neonate of HIV positive mother; Early onset neonatal sepsis |
| Year | Topic |
|---|---|
| Dec2022 | GTD classification & pathogenesis; Persistent trophoblastic disease management |
| Year | Topic |
|---|---|
| Dec2018 | Types of ectopic; Emergency assessment; Medical management |
| Year | Topic |
|---|---|
| Dec2019 | Recurrent pregnancy loss β causes; Role of LMWH |
| June2019 | MTP Act; Management of septic abortion |
| Year | Topic |
|---|---|
| Aug2021 | ECV β definition, prerequisites, complications |
| Year | Topic |
|---|---|
| Dec2021 | Transdermal contraceptive patch; Postpartum contraception; Ulipristal acetate |
| Year | Topic |
|---|---|
| Aug2021 | Preconception counselling in PCOS |
| Year | Topic |
|---|---|
| Dec2019 | ASHA worker β role & responsibilities |
| # | Chapter | No. of Topics |
|---|---|---|
| 1 | Antepartum Fetal Surveillance | 6 |
| 2 | Prenatal Diagnosis / Gestational Age | 1 |
| 3 | Preterm Labour, PPROM, Cerclage | 6 |
| 4 | Hypertensive Disorders | 5 |
| 5 | Antepartum Haemorrhage | 7 |
| 6 | Medical Disorders in Pregnancy | 23 |
| 7 | Rh Isoimmunization | 1 |
| 8 | Twin & Multiple Pregnancy | 11 |
| 9 | FGR & SGA | 2 |
| 10 | Normal & Abnormal Labour | 14 |
| 11 | Caesarean Section | 3 |
| 12 | PPH & Third Stage | 4 |
| 13 | Puerperal Complications | 3 |
| 14 | Neonatology | 8 |
| 15 | GTD | 1 |
| 16 | Ectopic Pregnancy | 1 |
| 17 | Abortion & RPL | 2 |
| 18 | ECV | 1 |
| 19 | Contraception | 1 |
| 20 | Preconception Counselling | 1 |
| 21 | Community Obstetrics | 1 |
| TOTAL | 100 |
Make the list of questions asked from paper 1
cd /home/daytona/workspace && python3 << 'EOF' import re with open('output.md', 'r') as f: content = f.read() lines = content.split('\n') def parse_table_rows(lines): rows = [] current_row = None for line in lines: if re.match(r'^\+[-=]+\+', line): if current_row is not None: rows.append(current_row) current_row = ['', '', '', ''] elif line.startswith('|') and current_row is not None: parts = line.split('|') if len(parts) >= 5: for i in range(4): if i+1 < len(parts): current_row[i] += ' ' + parts[i+1].strip() if current_row is not None: rows.append(current_row) return rows rows = parse_table_rows(lines) paper1_questions = [] for row in rows: year_raw = row[0].strip() paper_raw = row[1].strip() q_num = row[2].strip() q_text = row[3].strip() year = re.sub(r'\s+', '', year_raw) paper = re.sub(r'\s+', '', paper_raw) q_num_clean = re.sub(r'\s+', '', q_num) if paper == '1' and q_text and '**Question**' not in q_text: q_clean = re.sub(r'\\\)', ')', q_text) q_clean = re.sub(r'\\\[', '[', q_clean) q_clean = re.sub(r'\\\]', ']', q_clean) q_clean = re.sub(r'\\\.', '.', q_clean) q_clean = re.sub(r'\s+', ' ', q_clean).strip() paper1_questions.append({'year': year, 'q_num': q_num_clean, 'text': q_clean}) print(f"Total Paper 1 questions: {len(paper1_questions)}\n") for q in paper1_questions: print(f"[{q['year']} Q{q['q_num']}] {q['text'][:130]}") print() EOF
| Year | Topic |
|---|---|
| Dec2022 | Types of female pelvis; Occipito-posterior in anthropoid pelvis |
| Dec2021 | Anatomy of pelvic floor; OASIS β risk factors & management |
| Dec2021 | Nerve supply of pelvis; Pain in 1st & 2nd stage of labour; Epidural analgesia |
| Dec2020 | Anatomical types of female pelvis; Obstetrical significance |
| Dec2019 | Superficial perineal pouch; Pudendal nerve & pudendal block |
| June2019 | Anatomy of perineum; Obstetric anal sphincter injury (OASI) β classification & management |
| Aug2021 | Anal sphincter complex (with diagram); OASIS β classification, prevention, treatment |
| Dec2018 | Anatomy of pelvic diaphragm; POP-Q classification |
| June2022 | Anatomy of ureter in relation to female genital tract; Sites of ureteric injury |
| Year | Topic |
|---|---|
| Dec2022 | Lymphatic drainage of vulva; Carcinoma vulva β staging & management |
| June2022 | Lymphatic drainage of cervix; Sentinel lymph node sampling in cervical cancer |
| Dec2020 | Lymphatic drainage of female genital tract; Role of lymphadenectomy in malignancies |
| Aug2021 | Internal iliac artery β course & branches; Internal iliac artery ligation |
| Dec2019 | Internal iliac artery β anatomy & clinical significance |
| June2020 | Internal iliac artery β branches; Procedure & indications for ligation |
| June2018 | Blood supply of female genital tract; UAE in obstetrics & gynaecology |
| Year | Topic |
|---|---|
| June2022 | Ureter anatomy in relation to genital tract; Sites of ureteric injury |
| June2020 | Course of ureter; Sites of injury during pelvic surgery |
| Aug2021 | Mechanism of bladder continence; Pharmacological management of overactive bladder |
| Dec2020 | Changes in urinary tract in pregnancy; Asymptomatic bacteriuria; Acute renal failure in pregnancy |
| Dec2019 | Physiology of female urinary continence; Urinary retention in 1st trimester |
| June2018 | Surgical anatomy of urinary bladder; Prevention of bladder injury |
| Dec2018 | Urodynamic study; Management of genuine stress incontinence |
| Year | Topic |
|---|---|
| Dec2021 | Anatomy of anterior abdominal wall; Advantages & disadvantages of abdominal incisions |
| June2020 | Wound healing; Steps to minimize risk of caesarean scar dehiscence |
| Year | Topic |
|---|---|
| Dec2022 | Development of Mullerian duct; Unicornuate uterus (U4) β diagnosis & management |
| Dec2021 | Anti-Mullerian hormone β clinical significance; Unicornuate uterus |
| Dec2019 | Development of Mullerian duct; Importance of AMH |
| June2020 | Embryological development of female reproductive tract; Bicornuate uterus |
| June2018 | Development of Mullerian duct; Classification & diagnosis of Mullerian anomalies |
| Dec2018 | Embryological development of vagina; Anatomical abnormalities causing primary amenorrhoea |
| Year | Topic |
|---|---|
| Dec2022 | Normal placentation; Impact of abnormal placentation |
| June2022 | Placental circulation; Doppler velocimetry in assessment of placental circulation |
| June2020 | Implantation of pregnancy; Placental abnormalities in abnormal placentation |
| June2019 | Placental circulation; Placental circulatory disturbances |
| Dec2018 | Development of placenta; Fetal circulation (with diagram) |
| Year | Topic |
|---|---|
| Dec2022 | Physiology of amniotic fluid volume regulation; Polyhydramnios β complications & management |
| Dec2020 | Physiology of AF formation; Functions; Clinical implications of AF abnormalities |
| Year | Topic |
|---|---|
| Dec2022 | Physiological changes in coagulation during pregnancy; Thromboprophylaxis β risk factors & methods |
| Aug2021 | Hypercoagulable state in pregnancy; VTE risk factors; Thromboprophylaxis |
| Dec2020 | Pregnancy as thrombogenic condition; Thromboprophylaxis postnatal |
| Dec2018 | Pathogenesis of DIC; Management of DIC |
| June2018 | Risk factors for VTE in Obs & Gynae; Prevention of VTE |
| Year | Topic |
|---|---|
| Aug2021 | Renal physiology in pregnancy; Pathogenesis of AKI |
| Aug2021 | Fetomaternal haemorrhage β causes, measurement, management (Kleihauer-Betke) |
| Year | Topic |
|---|---|
| June2022 | Ovarian reserve tests; Premature ovarian failure causes; POF management |
| Dec2021 | Endocrinology of menstruation; Adolescent HMB with severe anaemia |
| Aug2021 | Corpus luteum β function; Corpus luteum dysfunction |
| Dec2019 | Physiology of ovulation; Development of corpus luteum |
| June2019 | Maturation of Graafian follicle & ovulation; Corpus luteum significance & management |
| June2020 | Hypothalamo-pituitary-ovarian axis; Hypogonadotrophic hypooestrogenic infertility |
| June2018 | Physiological changes in vagina during menstrual cycle; Bacterial vaginosis |
| Dec2018 | Endocrinology of climacteric & menopause; Hormone therapy in postmenopause |
| Year | Topic |
|---|---|
| Dec2022 | Stages of pubertal development; Precocious puberty management |
| Aug2021 | Precocious puberty β definition, causes, management |
| Dec2020 | Physiology of puberty; Delayed puberty β causes & management |
| June2019 | Primary amenorrhoea β definition, causes; Turner's syndrome |
| June2018 | Hormonal & physical changes in puberty; Precocious puberty β causes & management |
| Year | Topic |
|---|---|
| June2022 | Primary amenorrhoea β definition, etiologies, workup |
| June2019 | Primary amenorrhoea β definition, causes; Turner's syndrome |
| Dec2018 | Vaginal developmental abnormalities causing primary amenorrhoea |
| Year | Topic |
|---|---|
| Dec2019 | Causes of hyperprolactinaemia; Management |
| Year | Topic |
|---|---|
| June2019 | Menopause β definition, symptoms; Non-hormonal treatment |
| Dec2018 | Endocrinology of climacteric & menopause; Role of HRT |
| Year | Topic |
|---|---|
| June2022 | Pathophysiology of preeclampsia; Systemic complications |
| Dec2018 | Pathogenesis of preeclampsia; Complications & prevention |
| Year | Topic |
|---|---|
| Dec2022 | Physiology of lactation; Management of inability to initiate lactation |
| Dec2018 | Physiology of milk let-down; Early initiation of breastfeeding; Promotion of breastfeeding |
| June2019 | Breast changes in pregnancy; Common breast complications & management |
| Year | Topic |
|---|---|
| Dec2022 | Spermatogenesis; Oligoasthenozoospermia management |
| Dec2018 | WHO criteria for normal semen analysis; Evaluation of azoospermia |
| Year | Topic |
|---|---|
| Dec2019 | Teratogens in pregnancy; Viral teratogens |
| June2019 | FDA fetal risk categories; Maternal & fetal side effects of antibiotics |
| June2018 | Physiological changes in thyroid function in pregnancy; Hypothyroidism complications |
| Year | Topic |
|---|---|
| Dec2021 | Phases of labour; Role of placenta in initiation of labour; Partograph |
| June2022 | Retained placenta β causes & management |
| June2022 | Breech presentation β causes; Management of multigravida with breech at 36 weeks |
| Dec2021 | Umbilical cord β development & structure; Cord prolapse β clinical features & management |
| Dec2021 | Heart disease in pregnancy β haemodynamic changes; Intrapartum & postpartum management |
| Aug2021 | Massive blood transfusion β indications, protocols, adverse reactions |
| Year | Topic |
|---|---|
| Dec2019 | Haematological changes in pregnancy; Physiological anaemia correlation |
| Year | Topic |
|---|---|
| June2019 | Immune adaptation of pregnancy; Maternal immunization for different pathogens |
| June2018 | Vertical transmission β definition, risk factors, prevention of HIV |
| Year | Topic |
|---|---|
| June2018 | Pathological skin changes in pregnancy; Causes of pruritus in pregnancy |
| June2020 | Cholestasis of pregnancy β etiopathogenesis, complications; Jaundice in pregnancy |
| Year | Topic |
|---|---|
| Dec2020 | Tests for diagnosis of ovulation; OHSS β diagnosis, management & prevention |
| June2022 | Ovarian reserve tests; Premature ovarian failure |
| Year | Topic |
|---|---|
| Aug2021 | FIGO classification of endometrial carcinoma; Evaluation of premalignant & malignant conditions |
| Dec2018 | Cervical intraepithelial neoplasia (CIN); Cervical cancer screening methodology |
| June2018 | Liquid Based Cytology β advantages; Pathogenesis of HPV infection; HPV vaccine |
| June2018 | Bacterial vaginosis β diagnosis & treatment |
| Year | Topic |
|---|---|
| Dec2020 | Pre-conceptional counselling; Counselling for previous baby with chromosomal abnormality |
| Year | Topic |
|---|---|
| June2019 | Postpartum blues; Postpartum depression β risk factors & treatment |
| Year | Topic |
|---|---|
| Dec2020 | Forensic evidence in sexual assault; POCSO Act; Counselling of survivor |
| Year | Topic |
|---|---|
| June2020 | Doppler principle; Use of Doppler in gynaecological cases |
| Year | Topic |
|---|---|
| June2022 | Case-control study; Levels of evidence in research |
| Dec2021 | Cohort study; Sampling techniques; Review of literature |
| Dec2021 | Structure of research proposal; Study design for COVID vaccination evaluation |
| Dec2020 | Types of analytic studies; Principles of RCT; CONSORT checklist |
| Dec2019 | Applied research; Methods of sampling |
| June2020 | Types of research; Framing a research question |
| June2020 | Types of research studies; Study plan for drug evaluation |
| June2020 | Randomization; Random sampling techniques; Bias types |
| June2019 | How to form a hypothesis; Factors for strong scientific research; Types of research |
| # | Chapter | No. of Topics |
|---|---|---|
| 1 | Anatomy β Pelvis & Pelvic Floor | 9 |
| 2 | Anatomy β Vasculature & Lymphatics | 7 |
| 3 | Anatomy β Ureter, Bladder & Urinary Tract | 7 |
| 4 | Anatomy β Abdominal Wall & Incisions | 2 |
| 5 | Embryology & Development (Mullerian) | 6 |
| 6 | Placenta & Implantation | 5 |
| 7 | Amniotic Fluid | 2 |
| 8 | Coagulation & VTE in Pregnancy | 5 |
| 9 | Renal Physiology & Fetomaternal Haemorrhage | 2 |
| 10 | Reproductive Endocrinology & Menstrual Cycle | 8 |
| 11 | Puberty β Normal & Abnormal | 5 |
| 12 | Primary Amenorrhoea | 3 |
| 13 | Hyperprolactinaemia | 1 |
| 14 | Menopause | 2 |
| 15 | Preeclampsia & Hypertensive Disorders | 2 |
| 16 | Lactation & Breast | 3 |
| 17 | Spermatogenesis & Male Infertility | 2 |
| 18 | Drugs in Pregnancy & Teratology | 3 |
| 19 | Labour Physiology & Complications | 6 |
| 20 | Haematological Changes in Pregnancy | 1 |
| 21 | Infections & Immunology | 2 |
| 22 | Skin Changes & Cholestasis | 2 |
| 23 | Ovulation & Infertility | 2 |
| 24 | Oncology β Cervix & Endometrium | 4 |
| 25 | Preconception Counselling | 1 |
| 26 | Postpartum Mental Health | 1 |
| 27 | Forensic & Legal Issues | 1 |
| 28 | Doppler in Obs & Gynae | 1 |
| 29 | Research Methodology & Biostatistics | 9 |
| TOTAL | 100 |