Help me prepare questions for GDM,APH,PPH,PROM,PPROM,preterm labour,FGR,Abnormal presentation,obstetrics emergencies
python3 -c " import pdfplumber with pdfplumber.open('/tmp/workspace/attachments/803a05a8-8b14-4654-a3e1-2790cc244b67/Eop MEQ_260612_112714.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text: print(f'--- PAGE {i+1} ---') print(text[:3000]) "
python3 -c " import pdfplumber with pdfplumber.open('/tmp/workspace/attachments/803a05a8-8b14-4654-a3e1-2790cc244b67/Eop MEQ_260612_112714.pdf') as pdf: for i, page in enumerate(pdf.pages): text = page.extract_text() if text: print(f'--- PAGE {i+1} ---') print(text) "
python3 << 'EOF' import pdfplumber pdf_path = '/tmp/workspace/attachments/803a05a8-8b14-4654-a3e1-2790cc244b67/Eop MEQ_260612_112714.pdf' with pdfplumber.open(pdf_path) as pdf: print(f"Total pages: {len(pdf.pages)}") for i, page in enumerate(pdf.pages): print(f"\n===== PAGE {i+1} =====") # Try extracting words words = page.extract_words() print(f"Words count: {len(words)}") # Try text with different settings text = page.extract_text(x_tolerance=3, y_tolerance=3) if text: print("TEXT:") print(text) else: print("No text extracted") # Try getting all text objects chars = page.chars print(f"Chars count: {len(chars)}") if chars: # Reconstruct text from chars text2 = ''.join([c['text'] for c in chars]) print("CHARS TEXT (first 2000):") print(text2[:2000]) EOF
python3 << 'EOF' from pypdf import PdfReader import base64 pdf_path = '/tmp/workspace/attachments/803a05a8-8b14-4654-a3e1-2790cc244b67/Eop MEQ_260612_112714.pdf' reader = PdfReader(pdf_path) print(f"Pages: {len(reader.pages)}") print(f"Metadata: {reader.metadata}") # Check if there are images embedded for i, page in enumerate(reader.pages): print(f"\nPage {i+1}:") print(f" Resources: {list(page.get('/Resources', {}).keys()) if page.get('/Resources') else 'None'}") resources = page.get('/Resources') if resources: xobj = resources.get('/XObject') if xobj: print(f" XObjects: {list(xobj.keys())}") for key in xobj.keys(): obj = xobj[key] print(f" {key}: subtype={obj.get('/Subtype')}, width={obj.get('/Width')}, height={obj.get('/Height')}") EOF
python3 << 'EOF' # Try to render PDF pages as images using PIL/Pillow with pdf2image or pypdfium2 import subprocess result = subprocess.run(['pip', 'show', 'pypdfium2'], capture_output=True, text=True) print("pypdfium2:", result.stdout[:200] if result.stdout else "not found") result2 = subprocess.run(['pip', 'show', 'pdf2image'], capture_output=True, text=True) print("pdf2image:", result2.stdout[:200] if result2.stdout else "not found") result3 = subprocess.run(['pip', 'show', 'pymupdf'], capture_output=True, text=True) print("pymupdf:", result3.stdout[:200] if result3.stdout else "not found") result4 = subprocess.run(['pip', 'show', 'fitz'], capture_output=True, text=True) print("fitz:", result4.stdout[:200] if result4.stdout else "not found") EOF
python3 << 'EOF' import pypdfium2 as pdfium from PIL import Image import os os.makedirs('/tmp/workspace/pdf_pages', exist_ok=True) pdf_path = '/tmp/workspace/attachments/803a05a8-8b14-4654-a3e1-2790cc244b67/Eop MEQ_260612_112714.pdf' pdf = pdfium.PdfDocument(pdf_path) print(f"Pages: {len(pdf)}") for i in range(len(pdf)): page = pdf[i] bitmap = page.render(scale=2) # 2x scale for better quality pil_image = bitmap.to_pil() out_path = f'/tmp/workspace/pdf_pages/page_{i+1}.png' pil_image.save(out_path) print(f"Saved page {i+1}: {pil_image.size}") pdf.close() print("Done!") EOF
python3 << 'EOF' # Try OCR-like text extraction using pypdfium2's text page import pypdfium2 as pdfium pdf_path = '/tmp/workspace/attachments/803a05a8-8b14-4654-a3e1-2790cc244b67/Eop MEQ_260612_112714.pdf' pdf = pdfium.PdfDocument(pdf_path) for i in range(len(pdf)): page = pdf[i] textpage = page.get_textpage() text = textpage.get_text_range() print(f"\n===== PAGE {i+1} =====") print(repr(text[:500]) if text else "NO TEXT") print(text[:2000] if text else "") pdf.close() EOF
Note on uploaded PDF: The file "Eop MEQ_260612_112714.pdf" is a scanned image-based PDF with no text layer - standard extraction and OCR tools were unable to retrieve its content. The questions below are compiled independently from obstetric textbook knowledge (Creasy & Resnik's Maternal-Fetal Medicine, Clinical Anesthesiology, Barash) and follow the MEQ format standard to such exam papers.
| # | Topic | Clinical Vignette Focus | Marks |
|---|---|---|---|
| 1 | GDM | Screening, OGTT diagnosis, risk factors | 10 |
| 2 | GDM | Complications, intrapartum glycaemia, postnatal follow-up | 12 |
| 3 | APH | Placenta praevia - diagnosis, classification, management | 13 |
| 4 | APH | Placental abruption - features, types, DIC | 12 |
| 5 | PPH | Primary PPH - 4T's, stepwise management, uterotonics | 13 |
| 6 | PPH | Secondary PPH - causes, risk factors, management | 10 |
| 7 | PROM | PROM at term - diagnosis, risks, chorioamnionitis | 11 |
| 8 | PPROM | Preterm PPROM - management, antibiotics, MgSO₄ | 13 |
| 9 | Preterm Labour | Tocolytics, fFN, cervical length, corticosteroids | 13 |
| 10 | FGR | Doppler interpretation, causes, timing of delivery | 14 |
| 11 | Abnormal Presentation | Breech - types, ECV, mode of delivery | 13 |
| 12 | Abnormal Presentation | Transverse lie, cord prolapse risk, management | 10 |
| 13 | Obstetric Emergency | Shoulder dystocia - HELPERR, McRoberts, complications | 13 |
| 14 | Obstetric Emergency | Eclampsia - MgSO₄ regime, delivery, monitoring | 14 |
| 15 | Obstetric Emergency | Cord prolapse - emergency steps, category 1 CS | 10 |
| 16 | Obstetric Emergency | Uterine rupture - recognition, management, surgical options | 12 |
Make a quick reference sheet of obstetric drugs, doses, and contraindications
mkdir -p /tmp/workspace/obstetric-drugs && ls /tmp/workspace/obstetric-drugs/
python3 << 'PYEOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm, mm from reportlab.platypus import (SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer, HRFlowable, KeepTogether) from reportlab.lib.enums import TA_CENTER, TA_LEFT from reportlab.platypus import PageBreak OUTPUT = '/tmp/workspace/obstetric-drugs/Obstetric_Drug_Reference.pdf' doc = SimpleDocTemplate( OUTPUT, pagesize=A4, leftMargin=1.2*cm, rightMargin=1.2*cm, topMargin=1.5*cm, bottomMargin=1.5*cm, title="Obstetric Drug Quick Reference", author="Orris Medical" ) # ── Colours ────────────────────────────────────────────────────────────────── DARK_TEAL = colors.HexColor('#1a5276') MID_TEAL = colors.HexColor('#2e86c1') LIGHT_TEAL = colors.HexColor('#d6eaf8') HEADER_BG = colors.HexColor('#1a5276') HEADER_FG = colors.white ROW_ALT = colors.HexColor('#eaf4fb') ROW_WARN = colors.HexColor('#fdf2f8') ACCENT_PINK = colors.HexColor('#a93226') # ── Styles ──────────────────────────────────────────────────────────────────── base = getSampleStyleSheet() title_style = ParagraphStyle('Title', parent=base['Normal'], fontSize=18, textColor=colors.white, leading=22, alignment=TA_CENTER, fontName='Helvetica-Bold') subtitle_style = ParagraphStyle('Subtitle', parent=base['Normal'], fontSize=9, textColor=colors.HexColor('#d6eaf8'), leading=12, alignment=TA_CENTER, fontName='Helvetica') sec_style = ParagraphStyle('Section', parent=base['Normal'], fontSize=10, textColor=colors.white, leading=13, fontName='Helvetica-Bold', alignment=TA_LEFT) cell_style = ParagraphStyle('Cell', parent=base['Normal'], fontSize=7.2, leading=10, fontName='Helvetica', textColor=colors.black) cell_bold = ParagraphStyle('CellBold', parent=base['Normal'], fontSize=7.5, leading=10.5, fontName='Helvetica-Bold', textColor=DARK_TEAL) warn_style = ParagraphStyle('Warn', parent=base['Normal'], fontSize=7, leading=9.5, fontName='Helvetica', textColor=ACCENT_PINK) note_style = ParagraphStyle('Note', parent=base['Normal'], fontSize=6.8, leading=9, fontName='Helvetica-Oblique', textColor=colors.HexColor('#555555')) def P(txt, style=None): return Paragraph(txt if txt else '', style or cell_style) def Pb(txt): return Paragraph(txt if txt else '', cell_bold) def Pw(txt): return Paragraph(txt if txt else '', warn_style) # ══════════════════════════════════════════════════════════════════════════════ # DATA – (Drug, Route/Dose, Mechanism, Contraindications, Key Notes) # ══════════════════════════════════════════════════════════════════════════════ SECTIONS = [] # ───────────────────────────────────────────────── # 1. UTEROTONICS / PPH # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '1. UTEROTONICS (PPH Management)', 'cols': ['Drug', 'Route & Dose', 'Mechanism', 'Contraindications', 'Key Notes'], 'widths': [3.0*cm, 4.2*cm, 3.2*cm, 3.8*cm, 4.3*cm], 'rows': [ ['Oxytocin\n(1st line)', '10 IU slow IV bolus OR\n20–40 IU in 1 L NS\nat 200–500 mL/hr\n(IM 10 IU if no IV)', 'Oxytocin receptor\nagonist → uterine\ncontraction', 'Do NOT give rapid\nIV bolus (severe\nhypotension)', 'First-line; active\nmanagement of 3rd\nstage: 10 IU IM;\nshelf-life sensitive\nto heat'], ['Ergometrine /\nMethylergometrine', '0.2–0.5 mg IM/IV\nRepeat q 2–4 h\n(max 5 doses)', 'Ergot alkaloid →\ntonic uterine\ncontraction', 'HYPERTENSION,\npreeclampsia,\neclampsia, cardiac\ndisease, peripheral\nvascular disease', 'Onset: IM 2–5 min,\nIV 1 min; causes\nnausea/vomiting;\navoid IV route if\npossible'], ['Syntometrine', '1 ampoule IM\n(oxytocin 5 IU +\nergometrine 0.5 mg)', 'Combined oxytocin\n+ ergot effect', 'Same as ergometrine\n(hypertension,\npreeclampsia)', 'Used for active\n3rd-stage mgmt;\ndo NOT use in\nhypertension'], ['Carboprost\n(15-methyl PGF2α)', '0.25 mg IM q 15–90 min\nMax 2 mg (8 doses)', 'Prostaglandin F2α\nanalogue → strong\nuterine contraction', 'ASTHMA (bronchospasm),\nactive cardiac/\npulmonary/hepatic/\nrenal disease', 'Give antiemetic\n+antidiarrhoeal\nconcurrently; monitor\nO₂ sat; 3rd/4th line\nafter oxytocin/ergot'], ['Misoprostol\n(PGE1 analogue)', '800–1000 µg PR/SL/oral\n(single dose)', 'Prostaglandin E1\nanalogue → uterine\ncontraction', 'Known allergy;\ncaution in\nasthma (preferred\nover carboprost)', 'WHO-endorsed for\nresource-limited\nsettings; causes\npyrexia/shivering;\noral/SL for PPH\nprevention 600 µg'], ['Tranexamic Acid', '1 g IV over 10 min\n(repeat 1 g if\nbleeding >30 min\nor restarts)', 'Antifibrinolytic:\ninhibits plasminogen\nactivation', 'Active\nthromboembolic\ndisease; history\nof seizures\n(high doses)', 'WOMAN trial:\nreduces PPH\nmortality; give\nWITHIN 3 hours of\nbirth; NOT a\nuterotonic'], ] }) # ───────────────────────────────────────────────── # 2. ANTIHYPERTENSIVES IN PREGNANCY # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '2. ANTIHYPERTENSIVES IN PREGNANCY', 'cols': ['Drug', 'Route & Dose', 'Mechanism', 'Contraindications', 'Key Notes'], 'widths': [3.0*cm, 4.2*cm, 3.2*cm, 3.8*cm, 4.3*cm], 'rows': [ ['Labetalol\n(1st-line acute)', 'IV: 20 mg bolus; repeat\n20–80 mg q 10–30 min\n(max 300 mg)\nOral: 200–800 mg BD', 'α + β blocker;\ndecreases SVR;\npreserves\nplacental flow', 'Asthma/COPD,\nheart block,\nbradycardia,\nuncontrolled\nheart failure', 'ACOG 1st-line IV;\nonset 5 min;\nfetal bradycardia\npossible; do NOT\nuse in asthma'], ['Hydralazine\n(1st-line acute)', 'IV: 5 mg, then 5–10 mg\nq 20–40 min\n(max 20 mg)', 'Arteriolar\nvasodilator;\nincreases uterine\n& renal blood flow', 'SLE, coronary\nartery disease,\ndissecting\naortic aneurysm', 'Unpredictable\nduration; reflex\ntachycardia;\nneonatal\nthrombocytopenia\nreported'], ['Nifedipine\n(oral acute/chronic)', 'Acute: 10–20 mg oral;\nrepeat in 20 min if needed\nChronic: 30–90 mg SR\nonce daily', 'Calcium channel\nblocker → arterial\nvasodilation', 'Haemodynamic\ninstability,\nsevere aortic\nstenosis', 'ACOG endorsed;\nmay cause\nheadache; caution\nwith MgSO₄\n(enhanced\nhypotension);\nDO NOT use\nsublingual'], ['Methyldopa\n(chronic)', 'Oral: 250–500 mg TDS\n(max 3 g/day)', 'Central α₂ agonist\n→ reduces\nsympathetic tone', 'Depression,\nactive liver\ndisease,\nphaeochromocytoma', 'Safest for\nlong-term use;\nfetal safety\nwell established;\ncauses sedation,\ndry mouth'], ['Sodium Nitroprusside\n(refractory/ICU)', 'IV infusion: 0.3 µg/kg/min\n(max 10 µg/kg/min)', 'Direct NO donor\n→ arterial +\nvenous dilation', 'Avoid prolonged\nuse in pregnancy\n(cyanide toxicity\nto fetus)', 'Last resort; needs\narterial line;\ncyanide toxicity\nat high/prolonged\ndoses'], ['Atenolol /\nACE inhibitors /\nARBs', '— AVOID —', '—', 'CONTRAINDICATED\nin pregnancy', 'Atenolol → FGR;\nACEi/ARBs →\nneonatal AKI,\nskull hypoplasia,\noliguria, death'], ] }) # ───────────────────────────────────────────────── # 3. ANTICONVULSANTS (ECLAMPSIA) # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '3. ANTICONVULSANTS (Eclampsia / Preeclampsia)', 'cols': ['Drug', 'Route & Dose', 'Mechanism', 'Contraindications', 'Key Notes / Toxicity'], 'widths': [3.0*cm, 4.5*cm, 3.0*cm, 3.5*cm, 4.5*cm], 'rows': [ ['Magnesium Sulphate\n(DRUG OF CHOICE)', 'Pritchard: Load 4 g IV\nover 5 min + 5 g IM\neach buttock;\nMaintain 5 g IM q 4 h\n\nZuspan: Load 4 g IV\nover 20 min;\nMaintain 1–2 g/hr IV\nfor 24 h post-last fit', 'NMDA receptor\nantagonist;\ncerebral\nvasodilation;\nneuromuscular\nblockade', 'Myasthenia\ngravis; renal\nfailure (reduce\ndose); pre-existing\nheart block', 'TOXICITY (monitor):\n• Loss of patellar\n reflex: 7–10 mmol/L\n• Resp depression:\n >12 mmol/L\n• Cardiac arrest:\n >15 mmol/L\nANTIDOTE:\nCalcium gluconate\n1 g IV (10 mL of 10%)\nMonitor: reflexes,\nRR >16, UO >25 mL/h'], ['Diazepam\n(2nd line only)', 'IV: 10 mg over 2 min\n(repeat to max 30 mg)', 'GABA-A receptor\nagonist →\nsedation,\nanticonvulsant', 'Respiratory\ndepression;\navoid if\npossible in\npregnancy', 'Less effective\nthan MgSO₄;\nneonatal\nrespiratory\ndepression &\nhypothermia;\nuse only if\nMgSO₄ unavailable'], ['Phenytoin\n(rarely used)', 'IV: 15–18 mg/kg at\n<50 mg/min', 'Na+ channel\nblocker', 'Bradycardia,\nheart block,\nhypotension,\nneonatal\ncoagulopathy', 'MgSO₄ SUPERIOR\n(Collaborative\nEclampsia Trial);\nteratogenic\n(fetal hydantoin\nsyndrome)'], ] }) # ───────────────────────────────────────────────── # 4. TOCOLYTICS (Preterm Labour) # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '4. TOCOLYTICS (Preterm Labour – delay delivery to allow steroids / transfer)', 'cols': ['Drug', 'Route & Dose', 'Mechanism', 'Contraindications', 'Key Notes'], 'widths': [3.0*cm, 4.2*cm, 3.2*cm, 3.8*cm, 4.3*cm], 'rows': [ ['Atosiban\n(NICE preferred)', 'Bolus: 6.75 mg IV over\n1 min; then 18 mg/hr\nx 3 h; then 6 mg/hr\nup to 45 h', 'Oxytocin +\nvasopressin\nreceptor antagonist', '<24 weeks or\n≥34 weeks; PROM\nwith infection;\nfetal distress;\nAPH; lethal\nanomaly', 'Fewest maternal\nside effects;\ncostly; not\nassociated with\nneonatal harm;\n1st-line in UK'], ['Nifedipine\n(widely used)', 'Loading: 20 mg oral;\nthen 10–20 mg q\n4–6 h (or 30–60 mg\nSR once daily)', 'L-type Ca²⁺ channel\nblocker → uterine\nrelaxation', 'Hypotension,\nhaemodynamic\ninstability;\ncaution with\nMgSO₄', 'Cheap & effective;\nheadache common;\nFetal: case reports\nof placental\ninsufficiency;\nmay potentiate\nMgSO₄ hypotension'], ['Indometacin\n(NSAIDs)', '50–100 mg PR/oral\nloading, then 25 mg\nq 6 h (max 48 h)', 'COX inhibitor\n→ reduces\nprostaglandin\nsynthesis', '<24 weeks or\n>32 weeks (NEC,\npremature DA\nclosure); renal\nimpairment;\nulcer disease', 'Ductal constriction\n/closure if >32 wks;\noligohydramnios;\nNEC; limit to\n48 h & <32 wks;\ndo NOT repeat course'], ['Ritodrine /\nSalbutamol\n(β₂ agonists)', 'IV infusion:\nRitodrine 50–350 µg/min\nSalbutamol 10–45 µg/min', 'β₂ receptor\nagonist →\nuterine smooth\nmuscle relaxation', 'Cardiac disease,\nhypertension,\nthyrotoxicosis,\nDM (hyperglycaemia)', 'MANY side effects:\ntachycardia,\nhyperglycaemia,\nhypokalaemia,\npulmonary oedema;\nlargely replaced\nby atosiban/nifedipine'], ['Magnesium Sulphate\n(neuroprotection,\nnot tocolysis)', '4 g IV loading over\n20–30 min; then\n1 g/hr for ≤24 h\n(if <32 weeks)', 'Ca²⁺ antagonist;\ncerebral\nneuroprotection', 'Myasthenia\ngravis; renal\nfailure', 'Reduces cerebral\npalsy by ~30%\n(BEAM/MagNET);\nNOT a tocolytic;\ngive with steroids\nbefore preterm\nbirth <32 weeks'], ] }) # ───────────────────────────────────────────────── # 5. CORTICOSTEROIDS (Fetal Lung Maturity) # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '5. CORTICOSTEROIDS (Fetal Lung Maturity / Neuroprotection)', 'cols': ['Drug', 'Route & Dose', 'Indication', 'Contraindications', 'Key Notes'], 'widths': [3.0*cm, 4.2*cm, 3.2*cm, 3.8*cm, 4.3*cm], 'rows': [ ['Betamethasone\n(PREFERRED)', '12 mg IM x 2 doses,\n24 hours apart', 'Fetal lung\nmaturity:\n24–34+6 weeks;\nconsider up to\n36+6 wks', 'Active systemic\ninfection (relative);\nknown allergy', 'Reduces RDS, IVH,\nNEC, neonatal\nmortality; full\nbenefit after\n24 h; active for\n~7 days; single\nrescue course\nif >7 days since\nfirst & <34 wks'], ['Dexamethasone\n(alternative)', '6 mg IM q 12 h x\n4 doses (total 24 mg)', 'Same as\nbetamethasone\n(when unavailable)', 'Same as\nbetamethasone', 'Equivalent efficacy;\nsome prefer\nbetamethasone\n(benzyl alcohol\nfree); associated\nwith slightly\nhigher NEC\nrates in some studies'], ] }) # ───────────────────────────────────────────────── # 6. ANTIBIOTICS IN OBSTETRICS # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '6. ANTIBIOTICS IN OBSTETRICS', 'cols': ['Drug', 'Indication', 'Route & Dose', 'Contraindications', 'Key Notes'], 'widths': [3.2*cm, 3.2*cm, 3.8*cm, 3.5*cm, 4.8*cm], 'rows': [ ['Erythromycin', 'PPROM\n(<37 weeks)', '250 mg oral QDS\nx 10 days', 'Hepatic disease;\ncaution:\nQT prolongation', 'ORACLE I trial;\nDO NOT use\nco-amoxiclav\n(↑ NEC risk)'], ['Benzylpenicillin\n(Penicillin G)', 'GBS prophylaxis\nin labour', '3 g IV loading, then\n1.5 g IV q 4 h\nuntil delivery', 'Penicillin\nallergy → use\nclindamycin or\nvancomycin', 'Give ≥4 h before\ndelivery for\nfull neonatal\nprotection'], ['Ampicillin +\nGentamicin', 'Chorioamnionitis;\nendometritis', 'Ampicillin 2 g IV q 6 h\n+ Gentamicin\n1.5 mg/kg q 8 h\n(or 5 mg/kg q 24 h)', 'Gentamicin:\nnephrotoxicity,\nototoxicity;\nmonitor levels\nif prolonged', 'Add metronidazole\n500 mg IV q 8 h\nif post-CS\n(anaerobic cover);\ncheck gentamicin\ntroughs'], ['Metronidazole', 'Bacterial\nvaginosis;\nendometritis;\nretained products', '400–500 mg\noral/IV TDS\nx 5–7 days', '1st trimester\n(theoretical\nteratogenicity\n- controversial)', 'Avoid alcohol;\ndisulfiram-like\nreaction;\nwidely used after\n1st trimester'], ['Co-amoxiclav', 'Post-CS wound\ninfection; UTI\n(NOT PPROM)', '625 mg oral TDS or\n1.2 g IV TDS', 'Penicillin allergy;\nAVOID in PPROM\n(NEC risk)', 'ORACLE I: ↑ NEC\nwhen given for PPROM;\nstill safe\npost-CS for\nwound/endometritis'], ['Cefazolin', 'CS prophylaxis', '2 g IV single dose\n30–60 min pre-op\n(3 g if BMI >35)', 'Cephalosporin\nallergy; severe\npenicillin allergy\n(10% cross-react)', 'Reduces\nendomyometritis\n& wound infection\npost-CS;\nsingle dose\nsufficient'], ] }) # ───────────────────────────────────────────────── # 7. INDUCTION OF LABOUR # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '7. INDUCTION OF LABOUR', 'cols': ['Drug/Method', 'Route & Dose', 'Mechanism', 'Contraindications', 'Key Notes'], 'widths': [3.0*cm, 4.2*cm, 3.2*cm, 3.8*cm, 4.3*cm], 'rows': [ ['Dinoprostone\n(PGE2)', 'Vaginal gel: 1–2 mg\n(q 6 h, max 3 doses)\nPessary: 10 mg\n(controlled release\n24 h)', 'Prostaglandin E2\n→ cervical\nripening &\nuterine contraction', 'Previous uterine\nscar (relative);\nprior CS;\nfetal distress;\nalready in labour;\nGrand multipara', 'Continuous CTG\nfor 30 min after;\nremove pessary\nif hyperstimulation;\nRESCIND if\nuterine hyperstimulation'], ['Misoprostol\n(PGE1 - off-label)', 'Oral: 25 µg q 2 h\nor 50 µg q 4 h\nVaginal: 25–50 µg\nq 4–6 h', 'Prostaglandin E1\nanalogue', 'Previous uterine\nscar (AVOID in\nprior CS – risk\nof rupture);\nfetal distress', 'Cheap; effective;\nuterine\nhyperstimulation\nrisk; WHO-\nendorsed for IOL\nin resource-\nlimited settings'], ['Oxytocin\n(Syntocinon)', 'IV infusion: start\n1–2 mIU/min;\ntitrate q 30 min\n(max 20–40 mIU/min)\nper protocol', 'Oxytocin receptor\nagonist → uterine\ncontractions', 'Obstructed labour;\nfetal distress;\nprevious CS\n(use with caution);\ncephalopelvic\ndisproportion', 'Only after\ncervical ripening;\nnever bolus IV;\nmonitor CTG\ncontinuously;\nstop for\nhyperstimulation\nor FHR abnormality'], ['Mifepristone', 'Oral: 200–600 mg\n(24–48 h before\nprostaglandin)', 'Progesterone +\nglucocorticoid\nreceptor antagonist\n→ cervical ripening', 'Adrenal\ninsufficiency;\nlong-term\nsteroids;\ncoagulopathy', 'Used for\ntermination of\npregnancy &\nfetal death;\nprimes cervix\nbefore misoprostol;\nnot routine IOL'], ] }) # ───────────────────────────────────────────────── # 8. DIABETES IN PREGNANCY # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '8. DIABETES IN PREGNANCY (GDM & Pre-existing DM)', 'cols': ['Drug', 'Route & Dose', 'Mechanism', 'Contraindications', 'Key Notes'], 'widths': [3.0*cm, 4.2*cm, 3.2*cm, 3.8*cm, 4.3*cm], 'rows': [ ['Metformin', 'Oral: 500 mg OD/BD;\ntitrate to\n2500 mg/day', 'Biguanide;\ndecreases hepatic\ngluconeogenesis;\nimproves insulin\nsensitivity', 'eGFR <30;\nhepatic failure;\ncontrast media\nprocedures', 'May cross placenta;\nno teratogenicity;\nMiG trial:\nnon-inferior\nto insulin;\n2nd-line oral after\ndiet failure'], ['Glibenclamide\n(Glyburide)', 'Oral: 2.5–10 mg BD', 'Sulfonylurea;\nstimulates\npancreatic insulin\nsecretion', 'Renal failure;\nhepatic failure;\nG6PD deficiency', 'Crosses placenta;\n↑ neonatal\nhypoglycaemia;\nnot recommended\nas 1st-line in\nmost guidelines;\nprefer metformin\nor insulin'], ['Insulin\n(various types)', 'SC: Dose individualised;\nTarget:\nFasting <5.3 mmol/L;\n1-h post <7.8;\n2-h post <6.4 mmol/L', 'Exogenous insulin;\nbinds IR → glucose\nuptake', 'Hypoglycaemia\n(adjust dose);\nno absolute CI\nin pregnancy', 'Safe – does NOT\ncross placenta;\nIntrapartum:\nGIK infusion;\ntarget glucose\n4–7 mmol/L\nduring labour;\nstop post-delivery'], ] }) # ───────────────────────────────────────────────── # 9. RHESUS PROPHYLAXIS & HAEMATINICS # ───────────────────────────────────────────────── SECTIONS.append({ 'title': '9. RHESUS PROPHYLAXIS & HAEMATINICS', 'cols': ['Drug', 'Route & Dose', 'Indication', 'Contraindications', 'Key Notes'], 'widths': [3.0*cm, 4.2*cm, 3.2*cm, 3.8*cm, 4.3*cm], 'rows': [ ['Anti-D\n(Rh immunoglobulin)', 'RAADP:\n500 IU IM at 28 wks\n(+34 wks some centres)\nPost-sensitising event:\n250 IU IM (<20 wks)\n500 IU IM (≥20 wks)', 'Passive anti-D\nantibody →\nclears D+ fetal\nRBCs before\nmaternal\nsensitisation', 'Known sensitisation\n(alloimmunised);\nRhD-positive\nmother', 'Give within 72 h\nof sensitising event;\nKleihauer test if\nlarge FMH;\nadditional doses\nif FMH >4 mL fetal\nRBCs'], ['Ferrous Sulphate', '200 mg oral TDS\n(equiv. 65 mg\nelemental Fe)', 'Iron deficiency\nanaemia in\npregnancy;\npostpartum\nanaemia', 'Haemochromatosis;\nhaemolytic\nanaemia;\nthalassaemia\n(check first)', 'Take on empty\nstomach; ↑\nabsorption with\nvitamin C; causes\nconstipation,\nnausea; avoid\nwith antacids,\ntetracyclines'], ['IV Iron\n(Ferric carboxymaltose)', '500–1000 mg IV\nin 15 min\n(single dose,\nmax 1000 mg)', 'Iron replacement\n(when oral\nintolerant or\ninadequate\nresponse)', '1st trimester;\nknown iron\noverload; allergy\nto parenteral iron', 'Preferred for\nsevere IDA or\npoor oral tolerance;\ngive BEFORE\nCs rather than\npostpartum if\nHb <100 g/L;\nanaphylaxis risk'], ['Folic Acid', '400 µg oral daily\n(pre-conception\n+ 1st trimester)\n5 mg daily (high\nrisk: epilepsy, DM,\nobesity, prior NTD)', 'Required for\nDNA synthesis\n& neural tube\nclosure', 'Undiagnosed\nvitamin B12\ndeficiency\n(may mask\nanaemia)', 'Start ≥1 month\nbefore conception;\ncontinue to\n12 weeks; 5 mg\nfor epileptics\non enzyme\ninducers'], ] }) # ══════════════════════════════════════════════════════════════════════════════ # BUILD THE PDF # ══════════════════════════════════════════════════════════════════════════════ elements = [] # ── Title banner ────────────────────────────────────────────────────────────── title_data = [ [Paragraph('<b>OBSTETRIC DRUG QUICK REFERENCE</b>', title_style)], [Paragraph('Doses · Mechanisms · Contraindications · Key Notes | Based on ACOG, NICE, WHO & Creasy-Resnik MFM', subtitle_style)], ] title_tbl = Table(title_data, colWidths=[18.6*cm]) title_tbl.setStyle(TableStyle([ ('BACKGROUND', (0, 0), (-1, -1), DARK_TEAL), ('TOPPADDING', (0, 0), (-1, 0), 10), ('BOTTOMPADDING', (0, 1), (-1, -1), 8), ('LEFTPADDING', (0, 0), (-1, -1), 8), ('RIGHTPADDING', (0, 0), (-1, -1), 8), ('ROUNDEDCORNERS', [4, 4, 4, 4]), ])) elements.append(title_tbl) elements.append(Spacer(1, 0.4*cm)) WARN_DRUGS = {'AVOID', 'CONTRAINDICATED', 'DO NOT', 'AVOID in', 'TOXIC', 'ANTIDOTE'} def make_section_table(sec): col_widths = sec['widths'] # Header row header_row = [Paragraph(f'<b>{c}</b>', ParagraphStyle('H', parent=base['Normal'], fontSize=7.5, textColor=colors.white, fontName='Helvetica-Bold', leading=10)) for c in sec['cols']] rows_data = [header_row] for r in sec['rows']: row = [] for i, cell in enumerate(r): # Detect warning cells if any(w in str(cell) for w in WARN_DRUGS) and i in (3, 4): row.append(Pw(str(cell).replace('\n', '<br/>'))) elif i == 0: row.append(Pb(str(cell).replace('\n', '<br/>'))) else: row.append(P(str(cell).replace('\n', '<br/>'))) rows_data.append(row) tbl = Table(rows_data, colWidths=col_widths, repeatRows=1) style_cmds = [ # Header ('BACKGROUND', (0, 0), (-1, 0), MID_TEAL), ('TEXTCOLOR', (0, 0), (-1, 0), colors.white), ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'), ('FONTSIZE', (0, 0), (-1, 0), 7.5), ('BOTTOMPADDING', (0, 0), (-1, 0), 5), ('TOPPADDING', (0, 0), (-1, 0), 5), # Grid ('GRID', (0, 0), (-1, -1), 0.3, colors.HexColor('#b0c4de')), ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.white, ROW_ALT]), ('VALIGN', (0, 0), (-1, -1), 'TOP'), ('TOPPADDING', (0, 1), (-1, -1), 4), ('BOTTOMPADDING', (0, 1), (-1, -1), 4), ('LEFTPADDING', (0, 0), (-1, -1), 4), ('RIGHTPADDING', (0, 0), (-1, -1), 4), ] tbl.setStyle(TableStyle(style_cmds)) return tbl for sec in SECTIONS: # Section header bar sec_banner = Table([[Paragraph(sec['title'], sec_style)]], colWidths=[18.6*cm]) sec_banner.setStyle(TableStyle([ ('BACKGROUND', (0, 0), (-1, -1), DARK_TEAL), ('TOPPADDING', (0, 0), (-1, -1), 4), ('BOTTOMPADDING', (0, 0), (-1, -1), 4), ('LEFTPADDING', (0, 0), (-1, -1), 6), ])) elements.append(KeepTogether([sec_banner, Spacer(1, 1*mm), make_section_table(sec)])) elements.append(Spacer(1, 0.35*cm)) # Footer note elements.append(HRFlowable(width='100%', thickness=0.5, color=MID_TEAL)) elements.append(Spacer(1, 1*mm)) footer_txt = ( '<b>Important:</b> Always verify doses against current local formulary and guidelines. ' 'This sheet is a revision aid only and does not replace clinical judgment. ' 'Sources: Creasy & Resnik MFM (9780323828499), Roberts & Hedges Emergency Medicine, ' 'ACOG Practice Bulletins, NICE NG25/NG133/NG201, WHO Recommendations, WOMAN Trial, ORACLE I Trial.' ) elements.append(Paragraph(footer_txt, note_style)) doc.build(elements) print("PDF created:", OUTPUT) PYEOF
Obstetric Drug Reference
PDF Document · PDF
| Drug | Route & Dose | Mechanism | Contraindications | Key Notes |
|---|---|---|---|---|
| Oxytocin (1st line) | 10 IU slow IV bolus OR 20-40 IU in 1 L NS at 200-500 mL/hr; IM 10 IU if no IV | Oxytocin receptor agonist | No rapid IV bolus (severe hypotension) | First-line; active 3rd-stage: 10 IU IM; heat-sensitive |
| Ergometrine / Methylergometrine | 0.2-0.5 mg IM/IV; repeat q 2-4 h (max 5 doses) | Ergot alkaloid - tonic uterine contraction | HYPERTENSION, preeclampsia, eclampsia, cardiac disease, PVD | Onset IM 2-5 min; causes N&V; avoid IV route |
| Syntometrine | 1 ampoule IM (oxytocin 5 IU + ergometrine 0.5 mg) | Combined oxytocin + ergot | Same as ergometrine | Active 3rd-stage only; avoid in any hypertension |
| Carboprost (15-methyl PGF2α) | 0.25 mg IM q 15-90 min; max 2 mg (8 doses) | PGF2α analogue - strong uterine contraction | ASTHMA (bronchospasm), cardiac/pulmonary/hepatic/renal disease | Give antiemetic + antidiarrhoeal; 3rd/4th line agent |
| Misoprostol (PGE1) | 800-1000 µg PR/SL/oral (single dose) | PGE1 analogue | Known allergy; caution asthma | WHO-endorsed in resource-limited settings; causes pyrexia/shivering |
| Tranexamic Acid | 1 g IV over 10 min; repeat 1 g if bleeding >30 min | Antifibrinolytic - inhibits plasminogen activation | Active thromboembolic disease; seizure history | WOMAN trial: reduces PPH mortality; give within 3 hours of birth |
| Drug | Dose | Contraindications | Key Notes |
|---|---|---|---|
| Labetalol (1st-line acute) | IV: 20 mg bolus; repeat 20-80 mg q 10-30 min (max 300 mg). Oral: 200-800 mg BD | Asthma/COPD, heart block, bradycardia, heart failure | ACOG 1st-line IV; fetal bradycardia possible |
| Hydralazine (1st-line acute) | IV: 5 mg, then 5-10 mg q 20-40 min (max 20 mg) | SLE, CAD, dissecting aneurysm | Unpredictable duration; reflex tachycardia |
| Nifedipine (oral acute/chronic) | Acute: 10-20 mg oral; repeat in 20 min. Chronic: 30-90 mg SR OD | Haemodynamic instability, severe aortic stenosis | Caution with MgSO₄ (hypotension); never sublingual |
| Methyldopa (chronic) | 250-500 mg TDS (max 3 g/day) | Depression, active liver disease | Safest for long-term; fetal safety well established; causes sedation |
| Sodium Nitroprusside (ICU/refractory) | 0.3 µg/kg/min IV (max 10 µg/kg/min) | Avoid prolonged use - fetal cyanide toxicity | Last resort; needs arterial line |
| ACEi / ARBs / Atenolol | — AVOID — | CONTRAINDICATED in pregnancy | ACEi/ARBs → neonatal AKI, skull hypoplasia, oliguria, death; atenolol → FGR |
| Drug | Dose | Contraindications | Toxicity / Key Notes |
|---|---|---|---|
| Magnesium Sulphate (drug of choice) | Pritchard: Load 4 g IV over 5 min + 5 g IM each buttock; Maintain 5 g IM q 4 h. Zuspan: Load 4 g IV over 20 min; Maintain 1-2 g/hr IV x 24 h post-last fit | Myasthenia gravis; renal failure (reduce dose) | Toxicity: loss of patellar reflex (7-10 mmol/L), resp depression (>12), cardiac arrest (>15). Antidote: Calcium gluconate 1 g IV (10 mL of 10% solution). Monitor: reflexes, RR >16, UO >25 mL/h |
| Diazepam (2nd line only) | 10 mg IV over 2 min (max 30 mg) | Respiratory depression | Less effective than MgSO₄; neonatal resp depression & hypothermia; use only if MgSO₄ unavailable |
| Phenytoin (rarely used) | 15-18 mg/kg IV at <50 mg/min | Bradycardia, heart block, hypotension | MgSO₄ is superior (Collaborative Eclampsia Trial); teratogenic (fetal hydantoin syndrome) |
| Drug | Dose | Contraindications | Key Notes |
|---|---|---|---|
| Atosiban (NICE preferred) | Bolus 6.75 mg IV over 1 min; then 18 mg/hr x 3 h; then 6 mg/hr up to 45 h | <24 or ≥34 weeks; PROM with infection; fetal distress; APH; lethal anomaly | Fewest maternal side effects; 1st-line in UK; costly |
| Nifedipine (widely used) | Loading: 20 mg oral; then 10-20 mg q 4-6 h | Hypotension; caution with MgSO₄ | Cheap and effective; headache common |
| Indometacin | 50-100 mg PR loading; then 25 mg q 6 h (max 48 h) | >32 weeks (ductal closure), renal impairment, peptic ulcer | Ductal constriction/NEC/oligohydramnios if >32 weeks; limit to 48 h only |
| Salbutamol/Ritodrine (β₂ agonists) | IV infusion (titrated per protocol) | Cardiac disease, hypertension, thyrotoxicosis, DM | Many side effects (tachycardia, hyperglycaemia, pulmonary oedema); largely superseded |
| MgSO₄ (neuroprotection, NOT tocolysis) | 4 g IV over 20-30 min; then 1 g/hr ≤24 h (if <32 weeks) | Myasthenia gravis; renal failure | Reduces cerebral palsy by ~30% (BEAM/MagNET trials) |
| Drug | Dose | Indication | Key Notes |
|---|---|---|---|
| Betamethasone (preferred) | 12 mg IM x 2 doses, 24 h apart | 24-34+6 weeks (consider to 36+6) | Reduces RDS, IVH, NEC, neonatal mortality; full benefit after 24 h; single rescue course if >7 days since first course |
| Dexamethasone (alternative) | 6 mg IM q 12 h x 4 doses (total 24 mg) | Same as betamethasone | Equivalent efficacy; use when betamethasone unavailable |
| Drug | Indication | Dose | Key Notes |
|---|---|---|---|
| Erythromycin | PPROM (<37 weeks) | 250 mg oral QDS x 10 days | ORACLE I trial; DO NOT use co-amoxiclav (↑ NEC) |
| Benzylpenicillin | GBS prophylaxis in labour | 3 g IV loading, then 1.5 g IV q 4 h | Give ≥4 h before delivery for full neonatal protection |
| Ampicillin + Gentamicin | Chorioamnionitis/endometritis | Ampicillin 2 g IV q 6 h + Gentamicin 5 mg/kg q 24 h | Add metronidazole 500 mg IV q 8 h for post-CS anaerobic cover |
| Cefazolin | CS prophylaxis | 2 g IV single dose 30-60 min pre-op (3 g if BMI >35) | Single dose sufficient; reduces endometritis and wound infection |
| Co-amoxiclav | Post-CS wound/endometritis (NOT PPROM) | 625 mg oral TDS or 1.2 g IV TDS | AVOID in PPROM - ORACLE I showed ↑ NEC |
| Drug | Dose | Contraindications | Key Notes |
|---|---|---|---|
| Dinoprostone (PGE2) | Vaginal gel 1-2 mg q 6 h (max 3); Pessary 10 mg controlled-release x 24 h | Previous CS scar (relative); fetal distress | Remove pessary for hyperstimulation; CTG 30 min after each dose |
| Misoprostol (PGE1 - off-label) | Oral 25 µg q 2 h or vaginal 25-50 µg q 4-6 h | AVOID with prior CS (uterine rupture risk) | WHO-endorsed for resource-limited settings; ↑ hyperstimulation risk |
| Oxytocin (Syntocinon) | Start 1-2 mIU/min IV; titrate q 30 min (max 20-40 mIU/min) | Obstructed labour; fetal distress; CPD | Only after cervical ripening; never bolus IV; continuous CTG required |
| Drug | Dose | Contraindications | Key Notes |
|---|---|---|---|
| Metformin | 500 mg OD, titrate to 2500 mg/day | eGFR <30, hepatic failure | MiG trial: non-inferior to insulin; no teratogenicity; 2nd-line oral after diet failure |
| Insulin | SC, individualised; Target: fasting <5.3, 1-h post <7.8, 2-h post <6.4 mmol/L | Hypoglycaemia (adjust dose) | Does NOT cross placenta; intrapartum GIK infusion; target 4-7 mmol/L in labour |
| Drug | Dose | Indication | Key Notes |
|---|---|---|---|
| Anti-D (Rh immunoglobulin) | RAADP: 500 IU IM at 28 weeks. Post-sensitising event: 250 IU (<20 wks) / 500 IU (≥20 wks) IM | Rh-negative mother - prevent alloimmunisation | Give within 72 h of sensitising event; Kleihauer if large FMH |
| Ferrous Sulphate | 200 mg TDS oral (65 mg elemental Fe) | IDA in pregnancy | Take with Vitamin C; avoid with antacids/tetracyclines; causes constipation |
| IV Ferric Carboxymaltose | 500-1000 mg IV over 15 min (single dose) | IDA - oral intolerant or inadequate response | Preferred for severe IDA; not in 1st trimester; rare anaphylaxis |
| Folic Acid | 400 µg OD (pre-conception + 1st trimester). 5 mg OD for high risk (epilepsy, DM, prior NTD, obesity) | Neural tube defect prevention | Start ≥1 month before conception; continue to 12 weeks |
Critical memory hooks: MgSO₄ antidote = calcium gluconate 1 g IV | Carboprost avoided in asthma | Ergometrine avoided in hypertension | Co-amoxiclav avoided in PPROM (NEC) | ACEi/ARBs always contraindicated in pregnancy | Tranexamic acid within 3 hours of delivery | Indometacin avoid >32 weeks (ductal closure)