PPROM and PROM theory and clinical notes

Reading File
Now let me search the library for PPROM and PROM content in parallel.
Finding Sources
Finding Sources
Excellent. The best sources are Creasy & Resnik's (MFM bible) and Tintinalli's. Let me read all the key sections in parallel.
Reading File
Reading File
Searching PubMed

"premature rupture of membranes" management

Good data. Now let me read the main MFM sections on PROM pathophysiology, diagnosis, and management.
Reading File
Reading File
I need the definition, pathophysiology, diagnosis, and management sections - let me find them from the start of the PROM chapter.
Finding Sources
Reading File
The block I read was references. Let me find the actual start of the PROM chapter.
Finding Sources
Reading File
Reading File
I need the start of the PROM chapter - let me find the heading with definition and etiology.
Finding Sources
Reading File
Reading File
Excellent - I now have the key content from lines 1700 onwards. Let me read more of this critical section (1700-1840) and also get the full specific intervention section.
Reading File
I now have excellent, comprehensive content. Let me compile the complete clinical notes.# PROM and PPROM: Theory and Clinical Notes
Sources: Creasy & Resnik's Maternal-Fetal Medicine (9th ed.), Tintinalli's Emergency Medicine

1. Definitions

TermDefinition
PROM (Premature / Prelabor Rupture of Membranes)Rupture of fetal membranes before onset of contractions, at any gestational age
PPROM (Preterm Premature Rupture of Membranes)PROM occurring before 37 weeks gestation
Periviable PROMPROM at <23 weeks gestation (before the limit of viability)
Latent periodTime interval from membrane rupture to onset of labor/delivery
PROM complicates ~8% of all pregnancies. At term, delivery usually follows within 24-48 hours; preterm PROM creates a more complex management dilemma.

2. Anatomy of the Fetal Membranes

The fetal membranes consist of two layers:
  • Amnion - lines the amniotic cavity; single cuboidal epithelial layer with compact and spongy connective tissue
  • Chorion - adheres to maternal decidua; thicker, with reticular and trophoblastic layers
The two are initially separate, fusing by end of week 14. Together they form a stronger unit than either layer individually. The weakest point is near the internal cervical os - the typical location of rupture.

3. Pathophysiology and Etiology

Normal Membrane Weakening (at term)

With advancing gestational age, physiologic remodeling occurs through:
  • Changes in collagen content and type
  • Changes in intercellular matrix
  • Progressive cellular apoptosis
This weakening is accelerated by:
  • Thrombin-mediated exposure to matrix metalloproteinases (MMPs)
  • Decreased tissue inhibitors of MMPs (TIMPs)
  • Increased poly(ADP-ribose) polymerase cleavage
  • Uterine contractions raising intraamniotic pressure

Pathologic Weakening in PPROM

Several converging pathways:
  1. Ascending infection - Bacteria secrete collagenases and proteases that directly weaken membranes
  2. Cytokine imbalance - MMP/TIMP imbalance in response to microbial colonization
  3. Amniotic fluid cultures are positive in 25-35% of cases after PROM
  4. Nutritional/biochemical deficiencies - Copper, ascorbic acid (vitamin C), and zinc deficiencies impair collagen formation

Associated Pathogens

  • Neisseria gonorrhoeae
  • Chlamydia trachomatis
  • Trichomonas vaginalis
  • Group B beta-hemolytic Streptococcus (GBS)
  • Bacterial vaginosis-associated organisms

4. Risk Factors

CategorySpecific Factors
Prior obstetric historyPrevious preterm PROM (3x increased risk), prior preterm birth
InfectionSTIs (GBS, gonorrhea, chlamydia, TV), bacterial vaginosis, UTI, pyelonephritis, periodontal disease, pneumonia
Uterine overdistensionMultiple gestation, polyhydramnios
Cervical factorsShort cervix, cervical insufficiency, cerclage
ProceduralAmniocentesis, fetal surgery
PlacentalPlacental abruption, placenta previa
LifestyleSmoking, low BMI, low socioeconomic status
NutritionalVitamin C, copper, zinc deficiency

5. Clinical Presentation

  • Sudden gush of fluid followed by continued leakage - classic presentation
  • Watery vaginal discharge that may be intermittent
  • Pooling of fluid in the posterior fornix
  • Possible loss of fluid with Valsalva or fundal pressure
Important: ~10% of patients with PROM present atypically (slow trickle, scant fluid).

6. Diagnosis

Recommended Approach

  • Avoid digital cervical examination - decreases the latent period and increases infection risk. Use speculum examination only.
  • Visual inspection of cervix for dilation
  • Test vaginal fluid
The combination of history + nitrazine testing + ferning = 90% diagnostic accuracy

Tests

TestBasisNotes
Nitrazine (pH) testAmniotic fluid pH 7.1-7.3 vs vaginal pH 3.8-4.2False positives: blood, semen, BV, antiseptic
Ferning (arborization)Crystallization pattern of amniotic fluid on glass slideDisappears if blood or cervical mucus contamination
PoolingVisual fluid in posterior fornixHigh specificity
UltrasoundAssess amniotic fluid volume (AFI/MVP)Oligohydramnios supports but is NOT diagnostic
AmniSure (PAMG-1)Placental alpha-microglobulin-1 immunoassayHigh sensitivity/specificity; useful in equivocal cases
ActimPROM (IGFBP-1)Insulin-like growth factor binding protein-1Similar to AmniSure
Amnioinfusion + dyeIndigo carmine intraamniotically, look for blue staining on tamponGold standard when others equivocal

7. Complications

Maternal

ComplicationIncidence
Chorioamnionitis (term PROM)~9%
Chorioamnionitis (>24h rupture)Up to 24%
Chorioamnionitis (remote from term)13-35%
Chorioamnionitis (2nd trimester PROM, conservatively managed)25-77%
Endometritis2-13%
Placental abruption4-12%
Maternal sepsis~0.8%
Maternal death~0.14%

Fetal

  • Umbilical cord compression from oligohydramnios (cord patterns on CTG)
  • Umbilical cord prolapse (especially with malpresentation)
  • Fetal death: 1-2% overall; 12-71% (avg ~30%) with PROM before 24 weeks
  • Intrauterine infection

Neonatal

  • RDS - most common acute morbidity
  • Neonatal sepsis (2x more common after PPROM than after preterm labor with intact membranes)
  • IVH, periventricular leukomalacia
  • NEC
  • Pulmonary hypoplasia (with prolonged, severe oligohydramnios, especially <20 weeks)
  • Long-term: cerebral palsy, chronic lung disease, developmental disabilities

8. Management by Gestational Age

A. Term PROM (≥37 weeks)

  • Risk of chorioamnionitis increases significantly after 18-24h
  • Active management (oxytocin induction) is preferred over expectant management
  • GBS prophylaxis if GBS status unknown or positive
  • Most women will labor spontaneously within 24 hours
  • Cesarean section for standard obstetric indications

B. Late Preterm PPROM (34 0/7 - 36 6/7 weeks)

Evidence from PROMEXIL, PROMEXIL-2, and the PPROM trial is somewhat conflicting:
  • Conservative management extends latency by only 3-4 days on average
  • Significantly increases chorioamnionitis risk (2-5-fold)
  • Associated with worse cord pH
  • Active delivery at 34-36 weeks associated with more hypoglycemia and hyperbilirubinemia in neonates, but fewer RDS and ventilation days (PPROM trial)
Current recommendation: Delivery at 34 0/7 weeks is generally recommended; at 34-36 weeks, risks and benefits must be individualized. Consider antenatal corticosteroids (betamethasone) if delivering at 34-36 weeks.

C. Preterm PPROM at 23-33 weeks (Remote from Term)

Goal: Expectant (conservative) management while reducing gestational age-dependent morbidity.
Indications to deliver immediately (despite prematurity):
  • Clinical chorioamnionitis
  • Placental abruption
  • Non-reassuring fetal heart rate
  • Cord prolapse
  • Active labor
Conservative management bundle:
InterventionDetails
HospitalizationBed rest, pelvic rest, regular monitoring
Antenatal corticosteroidsBetamethasone 12 mg IM × 2 doses, 24h apart OR dexamethasone 6 mg IM × 4 doses, 12h apart. Recommended at 24 0/7 - 33 6/7 weeks; may be considered from 22 0/7 weeks
Adjuvant antibioticsReduce chorioamnionitis (RR 0.66), delivery within 48h (RR 0.71), neonatal infection (RR 0.67). Regimen: IV ampicillin 2g q6h + IV erythromycin 250mg q6h × 48h, then amoxicillin 250mg PO q8h + erythromycin 333mg PO q8h × 5 days (ORACLE/ACOG regimen). Avoid amoxicillin-clavulanate (increased NEC risk)
GBS prophylaxisIf GBS positive/unknown, continue intrapartum prophylaxis
TocolysisShort-term (48h) to allow steroid benefit; not for prolonged use; contraindicated with chorioamnionitis, abruption, nonreassuring FHR
Magnesium sulfateNeuroprotection at <32 weeks (4g IV bolus then 1-2g/h maintenance)
MonitoringDaily fetal kick counts, NST/BPP, ultrasound for growth, fluid, cord, and doppler
Temperature/WBC4-hourly maternal temp, daily WBC; rising temp or WBC = suspect chorioamnionitis
Antibiotic regimen summary (ACOG):
  • Ampicillin 2g IV q6h + erythromycin 250mg IV q6h × 48 hours, THEN
  • Amoxicillin 250mg PO q8h + erythromycin 333mg PO q8h × 5 days
  • Total antibiotic course = 7 days

D. Periviable PPROM (<23 weeks)

This is the most ethically and clinically challenging scenario.
  • Fetal death rate averages ~30%
  • Neonatal survival with conservative management at ≤24 weeks: 44% overall (only 14% if PROM before 24 weeks' gestation)
  • Risk of pulmonary hypoplasia from prolonged, severe oligohydramnios - strongest predictor is persistent severe oligohydramnios after PROM before 20 weeks
  • Persistent severe oligohydramnios = AFI <2cm for extended period
Counseling essential:
  • Discuss realistic gestational age-specific outcomes
  • Risks of conservative management: infection, bone demineralization (bed rest), DVT, financial/social burden
  • Options: expectant management OR delivery (vaginal prostaglandin E2, misoprostol, high-dose oxytocin, D&E)
Special considerations:
  • PROM after amniocentesis: often reseals spontaneously, good prognosis
  • PROM with persistent second-trimester bleeding, oligohydramnios, or elevated MSAFP: likely placentation abnormality, poor prognosis
Experimental interventions (limited data):
  • Transabdominal amnioinfusion (AMIPROM trial)
  • Amniopatch - sealing with fibrin/platelet/cryoprecipitate/gelfoam plugs (success rate 36-63% after spontaneous PROM, 12% after iatrogenic)

9. Monitoring During Conservative Management

  • Maternal: temperature q4h, HR, uterine tenderness, WBC, CRP
  • Fetal: daily fetal movement counts, NST q12-24h, BPP, weekly ultrasound (fluid volume, growth)
  • Signs of chorioamnionitis: maternal fever (>38°C), maternal/fetal tachycardia, uterine tenderness, foul-smelling vaginal discharge, elevated WBC/CRP

10. Diagnosis of Chorioamnionitis / IAI

Clinical IAI (at least 1 of):
  • Maternal fever ≥38°C PLUS at least one of:
  • Maternal leukocytosis >15,000
  • Maternal tachycardia >100 bpm
  • Fetal tachycardia >160 bpm
  • Uterine tenderness
  • Purulent amniotic fluid
Management of IAI with PROM: Deliver regardless of gestational age, broad-spectrum IV antibiotics (e.g., ampicillin + gentamicin, add clindamycin for C-section).

11. Key Clinical Pearls

  1. No digital exam until chorioamnionitis or active labor is diagnosed - a speculum exam only.
  2. Nitrazine false positives: blood, semen, BV, antiseptic contamination.
  3. Ferning false negatives: contamination with blood or cervical mucus.
  4. AVOID amoxicillin-clavulanate (Augmentin) - associated with 4.72x increased NEC risk.
  5. Magnesium sulfate for neuroprotection at <32 weeks - reduces cerebral palsy rates.
  6. Antenatal corticosteroids reduce RDS (21.8% vs 31.9%), IVH (4.2% vs 8.6%), and neonatal death (10.4% vs 16.8%) without increasing chorioamnionitis risk.
  7. Cord prolapse risk is highest with fetal malpresentation (more common preterm) - exclude on admission.
  8. Pulmonary hypoplasia becomes clinically relevant only with PROM before ~20 weeks and persistent severe oligohydramnios.
  9. Latency period inversely correlates with gestational age - shorter the earlier in pregnancy.
  10. Term PROM: induction preferred over expectant waiting beyond 12-18 hours due to increasing infection risk.

12. Summary Management Algorithm

PROM Diagnosed
       |
   ≥37 weeks?
  /           \
YES            NO (PPROM)
 |                |
Induce          Immediate delivery indicated?
(oxytocin)    (chorioamnionitis, abruption,
               non-reassuring FHR, cord prolapse)
                /         \
              YES           NO
               |             |
            Deliver      Gestational age?
                        /    |     \
                    <23wk  23-33wk  34-36wk
                      |       |        |
                 Counsel  Conservative  Deliver
                 re: prognosis  mgmt bundle  (individualize)
                 offer options   - Steroids
                               - Antibiotics
                               - MgSO4 if <32wk
                               - Monitor closely
                               - Plan delivery at 34wk

Creasy & Resnik's Maternal-Fetal Medicine, 9th Ed., Chapter on PROM; Tintinalli's Emergency Medicine, Chapter 100 | Recent meta-analysis on periviable PROM (PMID: 38593987) confirms high maternal/neonatal risk at <23 weeks.

Generate a diagnostic flowchart PDF for PROM bedside evaluation

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"

Running Command

mkdir -p /home/daytona/workspace/prom-flowchart && python3 -c "import reportlab; print('reportlab OK')" && python3 -c "from reportlab.lib.pagesizes import A4; print('A4 OK')"

Writing File

~/prom-flowchart/generate_flowchart.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor

# ── Color palette ──────────────────────────────────────────────
C_HEADER     = HexColor("#1A3557")   # dark navy
C_START      = HexColor("#1A3557")
C_DECISION   = HexColor("#2471A3")   # blue
C_ACTION     = HexColor("#117A65")   # teal/green
C_WARN       = HexColor("#C0392B")   # red
C_NEUTRAL    = HexColor("#5D6D7E")   # slate
C_LIGHT_BG   = HexColor("#EAF4FB")   # very light blue
C_WARN_BG    = HexColor("#FDEDEC")
C_ACTION_BG  = HexColor("#E9F7EF")
C_DECISION_BG= HexColor("#EBF5FB")
WHITE        = colors.white
BLACK        = colors.black

PAGE_W, PAGE_H = A4   # 595 x 842 pt

def wrap_text(c, text, x, y, max_width, font, size, line_height, align="center"):
    """Draw wrapped text; returns final y after last line."""
    c.setFont(font, size)
    words = text.split()
    lines = []
    current = ""
    for w in words:
        test = (current + " " + w).strip()
        if c.stringWidth(test, font, size) <= max_width:
            current = test
        else:
            if current:
                lines.append(current)
            current = w
    if current:
        lines.append(current)
    total_h = len(lines) * line_height
    start_y = y + total_h / 2 - line_height / 2
    for i, line in enumerate(lines):
        ly = start_y - i * line_height
        if align == "center":
            c.drawCentredString(x, ly, line)
        elif align == "left":
            c.drawString(x, ly, line)
    return start_y - (len(lines) - 1) * line_height

def rounded_box(c, x, y, w, h, r, fill_color, stroke_color=None, stroke_w=1.2):
    """Draw a rounded rectangle."""
    c.setLineWidth(stroke_w)
    c.setFillColor(fill_color)
    if stroke_color:
        c.setStrokeColor(stroke_color)
    else:
        c.setStrokeColor(fill_color)
    c.roundRect(x - w/2, y - h/2, w, h, r, fill=1, stroke=1)

def diamond(c, x, y, w, h, fill_color, stroke_color):
    """Draw a diamond shape."""
    c.setFillColor(fill_color)
    c.setStrokeColor(stroke_color)
    c.setLineWidth(1.5)
    p = c.beginPath()
    p.moveTo(x, y + h/2)
    p.lineTo(x + w/2, y)
    p.lineTo(x, y - h/2)
    p.lineTo(x - w/2, y)
    p.close()
    c.drawPath(p, fill=1, stroke=1)

def arrow(c, x1, y1, x2, y2, color=None, label=None, label_side="right"):
    """Draw an arrow from (x1,y1) to (x2,y2)."""
    col = color or C_NEUTRAL
    c.setStrokeColor(col)
    c.setFillColor(col)
    c.setLineWidth(1.4)
    c.line(x1, y1, x2, y2)
    # arrowhead
    import math
    angle = math.atan2(y2 - y1, x2 - x1)
    ah = 6
    aw = 4
    c.saveState()
    c.translate(x2, y2)
    c.rotate(math.degrees(angle))
    p = c.beginPath()
    p.moveTo(0, 0)
    p.lineTo(-ah, aw/2)
    p.lineTo(-ah, -aw/2)
    p.close()
    c.drawPath(p, fill=1, stroke=0)
    c.restoreState()
    if label:
        c.setFont("Helvetica-Oblique", 7)
        c.setFillColor(HexColor("#7F8C8D"))
        mx, my = (x1+x2)/2, (y1+y2)/2
        if label_side == "right":
            c.drawString(mx + 3, my, label)
        else:
            c.drawRightString(mx - 3, my, label)

def side_arrow(c, x1, y1, x2, y2, color=None):
    """L-shaped arrow: go horizontal then vertical."""
    col = color or C_NEUTRAL
    c.setStrokeColor(col)
    c.setLineWidth(1.3)
    c.line(x1, y1, x2, y1)
    c.line(x2, y1, x2, y2)
    # arrowhead at x2,y2
    c.setFillColor(col)
    import math
    angle = math.atan2(y2 - y1, 0) if y2 != y1 else 0
    ah, aw = 6, 4
    c.saveState()
    c.translate(x2, y2)
    if y2 < y1:
        c.rotate(-90)
    else:
        c.rotate(90)
    p = c.beginPath()
    p.moveTo(0, 0)
    p.lineTo(-ah, aw/2)
    p.lineTo(-ah, -aw/2)
    p.close()
    c.drawPath(p, fill=1, stroke=0)
    c.restoreState()

# ── Build PDF ──────────────────────────────────────────────────
out = "/home/daytona/workspace/prom-flowchart/PROM_Diagnostic_Flowchart.pdf"
c = canvas.Canvas(out, pagesize=A4)
c.setTitle("PROM Bedside Diagnostic Flowchart")
c.setAuthor("Orris Medical")
c.setSubject("Premature Rupture of Membranes - Bedside Evaluation")

# ── PAGE 1 ──────────────────────────────────────────────────────
CX = PAGE_W / 2   # center x = 297.6

# ── Header banner ──
c.setFillColor(C_HEADER)
c.rect(0, PAGE_H - 52*mm, PAGE_W, 52*mm, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 17)
c.drawCentredString(CX, PAGE_H - 18*mm, "PROM BEDSIDE DIAGNOSTIC FLOWCHART")
c.setFont("Helvetica", 9)
c.drawCentredString(CX, PAGE_H - 27*mm, "Premature (Prelabor) Rupture of Membranes — Stepwise Bedside Evaluation")
c.setFont("Helvetica-Oblique", 7.5)
c.drawCentredString(CX, PAGE_H - 34*mm, "Source: Creasy & Resnik MFM 9e • Tintinalli Emergency Medicine • ACOG Practice Bulletins")

# ── Legend ──
leg_x = PAGE_W - 38*mm
leg_y = PAGE_H - 44*mm
c.setFont("Helvetica-Bold", 7)
c.setFillColor(WHITE)
c.drawString(leg_x, leg_y + 5, "LEGEND")
boxes = [
    (C_START,    WHITE, "Start / End"),
    (C_DECISION_BG, C_DECISION, "Decision"),
    (C_ACTION_BG,   C_ACTION,   "Action / Step"),
    (C_WARN_BG,     C_WARN,     "Caution / Stop"),
]
for i, (bg, fg, lbl) in enumerate(boxes):
    bx = leg_x
    by = leg_y - 5 - i*9
    c.setFillColor(bg)
    c.setStrokeColor(fg)
    c.setLineWidth(0.8)
    c.roundRect(bx, by-3, 22, 7, 2, fill=1, stroke=1)
    c.setFillColor(fg)
    c.setFont("Helvetica", 6.5)
    c.drawString(bx + 24, by, lbl)

# ── START node ──────────────────────────────────────────────────
y = PAGE_H - 65*mm
W_WIDE = 150; H_BOX = 22; R = 10

rounded_box(c, CX, y, W_WIDE, H_BOX, R, C_START, WHITE, 1.5)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 10)
c.drawCentredString(CX, y - 3.5, "PATIENT PRESENTS WITH SUSPECTED")
c.setFont("Helvetica-Bold", 10)
c.drawCentredString(CX, y + 4.5, "FLUID LOSS / RUPTURE OF MEMBRANES")

# ── Arrow down ──
arrow(c, CX, y - H_BOX/2, CX, y - H_BOX/2 - 12)

# ── STEP 1: History ─────────────────────────────────────────────
y1 = y - H_BOX/2 - 12 - 28
W1 = 200; H1 = 42
rounded_box(c, CX, y1, W1, H1, 8, C_ACTION_BG, C_ACTION)
c.setFillColor(C_ACTION)
c.setFont("Helvetica-Bold", 9)
c.drawCentredString(CX, y1 + H1/2 - 9, "STEP 1: HISTORY")
c.setFont("Helvetica", 7.5)
items1 = [
    "• Sudden gush or continuous leaking of watery fluid",
    "• Time of onset, amount, color, odor",
    "• LMP → calculate gestational age accurately",
    "• Contractions? Fetal movements?",
    "• GBS status, prior PROM, cervical procedures",
    "• ⚠ Do NOT perform digital cervical exam",
]
for i, txt in enumerate(items1):
    c.drawString(CX - W1/2 + 8, y1 + H1/2 - 19 - i*8.5, txt)

arrow(c, CX, y1 - H1/2, CX, y1 - H1/2 - 12)

# ── STEP 2: Speculum exam ──────────────────────────────────────
y2 = y1 - H1/2 - 12 - 28
H2 = 36
rounded_box(c, CX, y2, W1, H2, 8, C_ACTION_BG, C_ACTION)
c.setFillColor(C_ACTION)
c.setFont("Helvetica-Bold", 9)
c.drawCentredString(CX, y2 + H2/2 - 9, "STEP 2: SPECULUM EXAMINATION ONLY")
c.setFont("Helvetica", 7.5)
items2 = [
    "• Inspect posterior fornix for pooling of fluid",
    "• Ask patient to cough / Valsalva → observe gush",
    "• Apply fundal pressure if needed",
    "• Assess cervical dilation visually (do NOT use finger)",
]
for i, txt in enumerate(items2):
    c.drawString(CX - W1/2 + 8, y2 + H2/2 - 19 - i*8.5, txt)

arrow(c, CX, y2 - H2/2, CX, y2 - H2/2 - 12)

# ── DECISION: Pooling visible? ──────────────────────────────────
y3 = y2 - H2/2 - 12 - 22
DW = 160; DH = 28
diamond(c, CX, y3, DW, DH, C_DECISION_BG, C_DECISION)
c.setFillColor(C_DECISION)
c.setFont("Helvetica-Bold", 8.5)
c.drawCentredString(CX, y3 + 4, "Fluid pooling clearly visible")
c.drawCentredString(CX, y3 - 5, "in posterior fornix?")

# YES branch (right) → confirmed PROM box
arrow(c, CX + DW/2, y3, CX + DW/2 + 45, y3, C_ACTION)
c.setFont("Helvetica-Bold", 7)
c.setFillColor(C_ACTION)
c.drawString(CX + DW/2 + 4, y3 + 3, "YES")

conf_x = CX + DW/2 + 45 + 50
conf_y = y3
rounded_box(c, conf_x, conf_y, 75, 22, 6, C_ACTION_BG, C_ACTION)
c.setFillColor(C_ACTION)
c.setFont("Helvetica-Bold", 7.5)
c.drawCentredString(conf_x, conf_y + 4, "HIGH SUSPICION PROM")
c.setFont("Helvetica", 7)
c.drawCentredString(conf_x, conf_y - 4, "Proceed to bedside tests")

# NO → continue down
arrow(c, CX, y3 - DH/2, CX, y3 - DH/2 - 12, label="NO")
c.setFont("Helvetica-Bold", 7)
c.setFillColor(C_NEUTRAL)
c.drawString(CX + 3, y3 - DH/2 - 6, "NO")

# ── STEP 3: Bedside Tests ──────────────────────────────────────
y4 = y3 - DH/2 - 12 - 38
H4 = 62
rounded_box(c, CX, y4, W1 + 30, H4, 8, C_ACTION_BG, C_ACTION)
c.setFillColor(C_ACTION)
c.setFont("Helvetica-Bold", 9)
c.drawCentredString(CX, y4 + H4/2 - 9, "STEP 3: BEDSIDE DIAGNOSTIC TESTS")

headers = ["Test", "Technique", "Result", "Pitfalls"]
col_x = [CX - 108, CX - 45, CX + 18, CX + 72]
col_w = [55, 65, 50, 65]
c.setFont("Helvetica-Bold", 7)
c.setFillColor(C_ACTION)
row_y = y4 + H4/2 - 20
for j, h in enumerate(headers):
    c.drawString(col_x[j], row_y, h)

rows = [
    ("Nitrazine pH",  "Apply fluid to paper",   "Blue = alkaline (7.1-7.3) = PROM", "FP: blood, semen, BV, antiseptic"),
    ("Ferning",       "Air-dry smear on slide",  "Crystalline arborization = PROM",  "FN: blood / cervical mucus"),
    ("AmniSure®",     "Vaginal swab; immunoassay","PAMG-1 +ve = PROM",               "High Sn/Sp; useful if equivocal"),
    ("ActimPROM®",    "Vaginal swab",            "IGFBP-1 +ve = PROM",               "Similar accuracy to AmniSure"),
]
c.setFont("Helvetica", 6.8)
for i, row in enumerate(rows):
    ry = row_y - 10 - i * 10
    c.setFillColor(C_DECISION if i % 2 == 0 else C_NEUTRAL)
    for j, cell in enumerate(row):
        c.setFillColor(BLACK)
        txt = cell[:38] + "…" if len(cell) > 38 else cell
        c.drawString(col_x[j], ry, txt)

# bottom note
c.setFont("Helvetica-Oblique", 6.5)
c.setFillColor(C_ACTION)
c.drawCentredString(CX, y4 - H4/2 + 7, "History + Nitrazine + Ferning together = ~90% diagnostic accuracy (Tintinalli)")

arrow(c, CX, y4 - H4/2, CX, y4 - H4/2 - 10)

# ── Footer page 1 ──────────────────────────────────────────────
c.setFillColor(C_HEADER)
c.rect(0, 0, PAGE_W, 12*mm, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica", 7)
c.drawString(10*mm, 4.5*mm, "Orris Medical Reference  |  PROM Bedside Diagnostic Flowchart  |  Page 1 of 2")
c.drawRightString(PAGE_W - 10*mm, 4.5*mm, "For clinical use — always correlate with patient context")

# ── Continue label ──────────────────────────────────────────────
c.setFillColor(C_NEUTRAL)
c.setFont("Helvetica-Bold", 8)
c.drawCentredString(CX, 16*mm, "► Continued on Page 2: Interpretation, Ultrasound & Management Pathway")

c.showPage()

# ══════════════════════════════════════════════════════════════
# PAGE 2
# ══════════════════════════════════════════════════════════════

# ── Header ──
c.setFillColor(C_HEADER)
c.rect(0, PAGE_H - 24*mm, PAGE_W, 24*mm, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 13)
c.drawCentredString(CX, PAGE_H - 10*mm, "PROM FLOWCHART — PAGE 2: INTERPRETATION & MANAGEMENT PATHWAY")
c.setFont("Helvetica", 7.5)
c.drawCentredString(CX, PAGE_H - 17*mm, "Following bedside tests → Interpret results → Stratify by gestational age → Act")

# ── DECISION: Tests positive? ──────────────────────────────────
y = PAGE_H - 38*mm
DW2 = 170; DH2 = 30
diamond(c, CX, y, DW2, DH2, C_DECISION_BG, C_DECISION)
c.setFillColor(C_DECISION)
c.setFont("Helvetica-Bold", 9)
c.drawCentredString(CX, y + 5, "Bedside tests POSITIVE")
c.drawCentredString(CX, y - 5, "(Nitrazine / Ferning / AmniSure)?")

# ── NO branch → equivocal box ──────────────────────────────────
neq_x = 55
neq_y = y
arrow(c, CX - DW2/2, y, neq_x + 42, y, C_WARN)
c.setFont("Helvetica-Bold", 7)
c.setFillColor(C_WARN)
c.drawString(CX - DW2/2 + 3, y + 3, "NO / EQUIVOCAL")
rounded_box(c, neq_x, neq_y, 82, 42, 8, C_WARN_BG, C_WARN)
c.setFillColor(C_WARN)
c.setFont("Helvetica-Bold", 8)
c.drawCentredString(neq_x, neq_y + 13, "EQUIVOCAL /")
c.drawCentredString(neq_x, neq_y + 5, "NEGATIVE RESULT")
c.setFont("Helvetica", 7)
equiv = [
    "• Repeat exam in 1–2h",
    "• USS: AFI/MVP oligohydramnios?",
    "• Consider amnio-dye test",
    "  (indigo carmine + tampon)",
    "• Review: Ureaplasma, BV?",
]
for i, t in enumerate(equiv):
    c.setFillColor(BLACK)
    c.drawString(neq_x - 38, neq_y - 3 - i * 8, t)

# ── YES → USS + confirm ────────────────────────────────────────
arrow(c, CX, y - DH2/2, CX, y - DH2/2 - 12, label="YES")
c.setFont("Helvetica-Bold", 7)
c.setFillColor(C_ACTION)
c.drawString(CX + 3, y - DH2/2 - 6, "YES")

# ── USS assessment ──────────────────────────────────────────────
y5 = y - DH2/2 - 12 - 22
W5 = 200; H5 = 28
rounded_box(c, CX, y5, W5, H5, 8, C_ACTION_BG, C_ACTION)
c.setFillColor(C_ACTION)
c.setFont("Helvetica-Bold", 9)
c.drawCentredString(CX, y5 + H5/2 - 9, "STEP 4: ULTRASOUND ASSESSMENT")
c.setFont("Helvetica", 7.5)
uss = [
    "• Confirm gestational age (BPD, HC, AC, FL)",
    "• AFI < 5 cm OR MVP < 2 cm = oligohydramnios → supports PROM",
    "• Fetal presentation  •  Placental location  •  Cord position",
    "• Exclude cord prolapse / velamentous cord / placenta previa",
]
for i, t in enumerate(uss):
    c.drawString(CX - W5/2 + 8, y5 + H5/2 - 18 - i*8.5, t)

arrow(c, CX, y5 - H5/2, CX, y5 - H5/2 - 10)

# ── CONFIRMED PROM ──────────────────────────────────────────────
y6 = y5 - H5/2 - 10 - 14
rounded_box(c, CX, y6, 160, 18, 8, C_DECISION, WHITE)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 9.5)
c.drawCentredString(CX, y6 - 3, "PROM CONFIRMED → STRATIFY BY GESTATIONAL AGE")

arrow(c, CX, y6 - 9, CX, y6 - 20)

# ── GA stratification: 3 columns ───────────────────────────────
y7 = y6 - 35
bw = 155; bh = 115; gap = 10
# column centers
cx1 = CX - bw - gap
cx2 = CX
cx3 = CX + bw + gap

# ── Column headers ──
for cx, lbl, color in [
    (cx1, "< 34 WEEKS  (PPROM)", C_WARN),
    (cx2, "34⁰/⁷ – 36⁶/⁷ WEEKS", C_DECISION),
    (cx3, "≥ 37 WEEKS  (TERM PROM)", C_ACTION),
]:
    rounded_box(c, cx, y7, bw, 14, 5, color, WHITE, 1.2)
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 8)
    c.drawCentredString(cx, y7 - 2.5, lbl)

# ── Column bodies ──
def col_body(c, cx, y_top, bw, bh, bg, stroke, lines):
    rounded_box(c, cx, y_top - bh/2 - 7, bw, bh, 6, bg, stroke)
    c.setFillColor(stroke)
    c.setFont("Helvetica-Bold", 7.5)
    c.drawCentredString(cx, y_top - 7, lines[0])
    c.setFont("Helvetica", 7)
    c.setFillColor(BLACK)
    for i, ln in enumerate(lines[1:]):
        c.drawString(cx - bw/2 + 7, y_top - 17 - i * 9, ln)

lines1 = [
    "CONSERVATIVE MANAGEMENT",
    "• Admit for monitoring",
    "• Speculum only — no digital exam",
    "• Betamethasone 12mg IM ×2 (24h apart)",
    "  [24⁰/⁷ – 33⁶/⁷ wks; consider ≥22wks]",
    "• IV Ampicillin 2g q6h + Erythromycin",
    "  250mg q6h ×48h → oral ×5 days",
    "• Avoid amoxicillin-clavulanate (↑NEC)",
    "• MgSO₄ neuroprotection if < 32 wks",
    "• GBS prophylaxis if positive/unknown",
    "• CTG, BPP, daily WBC/Temp (q4h)",
    "• Deliver at 34⁰/⁷ wks or if IAI,",
    "  abruption, or non-reassuring FHR",
]
lines2 = [
    "INDIVIDUALIZE DECISION",
    "• Balance: chorioamnionitis risk vs",
    "  prematurity complications",
    "• Conservative mgmt extends latency",
    "  only 3–4 days on average",
    "• Chorioamnionitis risk 2–5× higher",
    "  with conservative management",
    "• Antenatal steroids if not given",
    "• GBS prophylaxis",
    "• Consider delivery at 34–37 wks",
    "• Shared decision-making with patient",
    "• PROMEXIL / PPROM trial evidence:",
    "  lean toward delivery ≥34 wks",
]
lines3 = [
    "ACTIVE MANAGEMENT",
    "• Confirm GBS status",
    "• GBS prophylaxis if +ve or unknown",
    "• Commence oxytocin induction",
    "• Most will labor within 24h",
    "• Do NOT await labor > 18–24h",
    "  (chorioamnionitis risk ↑ greatly)",
    "• Chorioamnionitis at term: 9% overall;",
    "  up to 24% if rupture >24 hours",
    "• Monitor: FHR, maternal temp q4h",
    "• C-section only for obstetric",
    "  indications (malpresentation etc.)",
    "",
]

col_body(c, cx1, y7 - 7, bw, bh, C_WARN_BG,    C_WARN,     lines1)
col_body(c, cx2, y7 - 7, bw, bh, C_DECISION_BG, C_DECISION, lines2)
col_body(c, cx3, y7 - 7, bw, bh, C_ACTION_BG,   C_ACTION,   lines3)

# ── RED FLAGS box at bottom ─────────────────────────────────────
y8 = y7 - bh - 30
W8 = PAGE_W - 24*mm; H8 = 42
rounded_box(c, CX, y8, W8, H8, 8, C_WARN_BG, C_WARN, 1.8)
c.setFillColor(C_WARN)
c.setFont("Helvetica-Bold", 9)
c.drawCentredString(CX, y8 + H8/2 - 10, "⚠  RED FLAGS: DELIVER IMMEDIATELY — REGARDLESS OF GESTATIONAL AGE")
c.setFont("Helvetica", 7.5)
flags = [
    ("Clinical chorioamnionitis", "Maternal fever ≥38°C + ≥1 of: leukocytosis, maternal/fetal tachy, uterine tenderness, purulent fluid"),
    ("Placental abruption",       "Painful bleeding, woody uterus, fetal distress"),
    ("Non-reassuring FHR",        "Persistent decelerations, bradycardia, absent variability"),
    ("Cord prolapse",             "Visible / palpable cord; emergency delivery — do not delay"),
]
for i, (flag, detail) in enumerate(flags):
    fx = CX - W8/2 + 10
    fy = y8 + H8/2 - 20 - i * 9.5
    c.setFillColor(C_WARN)
    c.setFont("Helvetica-Bold", 7.5)
    c.drawString(fx, fy, f"• {flag}:")
    c.setFillColor(BLACK)
    c.setFont("Helvetica", 7.5)
    c.drawString(fx + 110, fy, detail)

# ── Footer page 2 ──────────────────────────────────────────────
c.setFillColor(C_HEADER)
c.rect(0, 0, PAGE_W, 12*mm, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica", 7)
c.drawString(10*mm, 4.5*mm, "Orris Medical Reference  |  PROM Bedside Diagnostic Flowchart  |  Page 2 of 2")
c.drawRightString(PAGE_W - 10*mm, 4.5*mm, "Based on ACOG PB #217, Creasy & Resnik MFM 9e, Tintinalli EM — July 2026")

c.save()
print(f"PDF saved: {out}")
Running Command

cd /home/daytona/workspace/prom-flowchart && python3 generate_flowchart.py 2>&1

Running Command

ls -lh /home/daytona/workspace/prom-flowchart/PROM_Diagnostic_Flowchart.pdf

Your PROM Bedside Diagnostic Flowchart PDF is ready:

PROM Diagnostic Flowchart

PDF Document · PDF


What's inside (2-page A4):
Page 1 - Bedside Evaluation Steps
  • Entry node: Patient with suspected fluid loss
  • Step 1: History checklist (with the "no digital exam" warning baked in)
  • Step 2: Speculum examination technique
  • Decision diamond: Fluid pooling visible?
  • Step 3: Bedside diagnostic tests table - Nitrazine, Ferning, AmniSure (PAMG-1), ActimPROM (IGFBP-1) with technique, expected results, and pitfalls per test
Page 2 - Interpretation & Management Pathway
  • Decision diamond: Tests positive / equivocal / negative
  • Equivocal branch: repeat exam, USS, amnio-dye (indigo carmine) options
  • Step 4: Ultrasound assessment (AFI, MVP, cord, placenta)
  • Confirmed PROM → 3-column gestational age stratification:
    • <34 weeks (PPROM): full conservative management bundle (steroids, antibiotics, MgSO4, GBS prophylaxis, delivery triggers)
    • 34-36 weeks: individualized decision with PROMEXIL/PPROM trial evidence
    • ≥37 weeks (term): active management with oxytocin induction
  • Red flags box: immediate delivery indications regardless of GA (chorioamnionitis, abruption, non-reassuring FHR, cord prolapse)

A flow chart explaining the theory ,clinical investigations and management

Reading File
Running Command

ls /tmp/workspace/ 2>/dev/null || echo "no tmp workspace"; ls /home/daytona/workspace/ 2>/dev/null || echo "no home workspace"; python3 -c "import reportlab; print('reportlab OK')"

Running Command

mkdir -p /tmp/workspace/prom-full && echo "ready"

Now I'll build a comprehensive 3-page PDF flowchart covering theory, investigations, and management.
Writing File

~/prom-full/prom_full_flowchart.py

"""
PROM / PPROM — Comprehensive Flowchart PDF
Theory · Clinical Investigations · Management
3 pages, A4, ReportLab
"""

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas as rl_canvas
from reportlab.lib.colors import HexColor
import math

# ── Palette ────────────────────────────────────────────────────
NAVY    = HexColor("#1B3A5C")
BLUE    = HexColor("#2471A3")
TEAL    = HexColor("#0E7B6C")
RED     = HexColor("#B03A2E")
AMBER   = HexColor("#B7770D")
PURPLE  = HexColor("#6C3483")
SLATE   = HexColor("#5D6D7E")

NAVY_L  = HexColor("#D6E4F0")
BLUE_L  = HexColor("#EBF5FB")
TEAL_L  = HexColor("#E8F8F5")
RED_L   = HexColor("#FDEDEC")
AMBER_L = HexColor("#FEF9E7")
PURPLE_L= HexColor("#F5EEF8")
WHITE   = colors.white
BLACK   = colors.black
LGREY   = HexColor("#F2F3F4")

PW, PH = A4   # 595.3 x 841.9

# ── Drawing helpers ─────────────────────────────────────────────

def rbox(cv, cx, cy, w, h, r=8, bg=BLUE_L, stroke=BLUE, lw=1.4):
    cv.setFillColor(bg);  cv.setStrokeColor(stroke);  cv.setLineWidth(lw)
    cv.roundRect(cx - w/2, cy - h/2, w, h, r, fill=1, stroke=1)

def diamond(cv, cx, cy, w, h, bg, stroke):
    cv.setFillColor(bg);  cv.setStrokeColor(stroke);  cv.setLineWidth(1.6)
    p = cv.beginPath()
    p.moveTo(cx, cy + h/2);  p.lineTo(cx + w/2, cy)
    p.lineTo(cx, cy - h/2);  p.lineTo(cx - w/2, cy);  p.close()
    cv.drawPath(p, fill=1, stroke=1)

def arrowV(cv, x, y1, y2, col=SLATE, label="", lside="right"):
    cv.setStrokeColor(col); cv.setLineWidth(1.3); cv.line(x, y1, x, y2)
    _arrowhead(cv, x, y2, math.pi*1.5 if y2 < y1 else math.pi*0.5, col)
    if label:
        cv.setFont("Helvetica-Oblique", 6.5); cv.setFillColor(SLATE)
        mx = (y1+y2)/2
        if lside == "right": cv.drawString(x+3, mx, label)
        else: cv.drawRightString(x-3, mx, label)

def arrowH(cv, x1, x2, y, col=SLATE, label="", lside="top"):
    cv.setStrokeColor(col); cv.setLineWidth(1.3); cv.line(x1, y, x2, y)
    _arrowhead(cv, x2, y, 0 if x2 > x1 else math.pi, col)
    if label:
        cv.setFont("Helvetica-Oblique", 6.5); cv.setFillColor(SLATE)
        mx = (x1+x2)/2
        if lside == "top": cv.drawCentredString(mx, y+3, label)
        else: cv.drawCentredString(mx, y-8, label)

def arrowL(cv, x1, y1, x2, y2, col=SLATE):
    """Elbow arrow: horizontal then vertical."""
    cv.setStrokeColor(col); cv.setLineWidth(1.3)
    cv.line(x1, y1, x2, y1); cv.line(x2, y1, x2, y2)
    _arrowhead(cv, x2, y2, math.pi*1.5 if y2 < y1 else math.pi*0.5, col)

def _arrowhead(cv, x, y, angle_rad, col):
    cv.setFillColor(col); ah, aw = 7, 4
    cv.saveState(); cv.translate(x, y); cv.rotate(math.degrees(angle_rad)-90)
    p = cv.beginPath()
    p.moveTo(0, 0); p.lineTo(-aw/2, -ah); p.lineTo(aw/2, -ah); p.close()
    cv.drawPath(p, fill=1, stroke=0); cv.restoreState()

def txt(cv, text, x, y, font="Helvetica", size=8, col=BLACK, align="left"):
    cv.setFont(font, size); cv.setFillColor(col)
    if align == "center": cv.drawCentredString(x, y, text)
    elif align == "right": cv.drawRightString(x, y, text)
    else: cv.drawString(x, y, text)

def txt_block(cv, lines, x, y, size=7.5, col=BLACK, leading=9.5):
    """Draw a list of strings stacked downward."""
    for i, line in enumerate(lines):
        cv.setFont("Helvetica", size); cv.setFillColor(col)
        cv.drawString(x, y - i*leading, line)

def hdr(cv, title, sub=""):
    cv.setFillColor(NAVY)
    cv.rect(0, PH-26*mm, PW, 26*mm, fill=1, stroke=0)
    txt(cv, title, PW/2, PH-12*mm, "Helvetica-Bold", 15, WHITE, "center")
    if sub: txt(cv, sub, PW/2, PH-19*mm, "Helvetica", 8, HexColor("#AED6F1"), "center")
    txt(cv, "PROM & PPROM Clinical Reference  |  Creasy & Resnik MFM 9e · ACOG PB#217 · Tintinalli EM",
        PW/2, PH-23.5*mm, "Helvetica-Oblique", 6.5, HexColor("#7FB3D3"), "center")

def footer(cv, page_label):
    cv.setFillColor(NAVY)
    cv.rect(0, 0, PW, 11*mm, fill=1, stroke=0)
    txt(cv, "Orris Medical Reference  |  PROM/PPROM Comprehensive Flowchart", 10*mm, 4*mm,
        "Helvetica", 6.8, WHITE)
    txt(cv, page_label, PW-10*mm, 4*mm, "Helvetica", 6.8, WHITE, "right")

def section_label(cv, label, x, y, color=NAVY):
    cv.setFillColor(color)
    cv.roundRect(x-4, y-3, cv.stringWidth(label,"Helvetica-Bold",8)+8, 12, 3, fill=1, stroke=0)
    txt(cv, label, x, y, "Helvetica-Bold", 8, WHITE)

# ══════════════════════════════════════════════════════════════════
# PAGE 1 — THEORY (Definitions · Pathophysiology · Risk Factors · Complications)
# ══════════════════════════════════════════════════════════════════

OUT = "/tmp/workspace/prom-full/PROM_PPROM_Complete_Flowchart.pdf"
cv = rl_canvas.Canvas(OUT, pagesize=A4)
cv.setTitle("PROM & PPROM — Theory, Investigations & Management")
cv.setAuthor("Orris Medical")

# Header
hdr(cv, "PROM & PPROM — PAGE 1: THEORY",
    "Definitions · Membrane Physiology · Pathophysiology · Risk Factors · Complications")

# ── DEFINITION PANEL ────────────────────────────────────────────
Y = PH - 32*mm
section_label(cv, "DEFINITIONS", 12*mm, Y)
rbox(cv, PW/2, Y-15*mm, PW-20*mm, 22*mm, 8, NAVY_L, NAVY, 1.5)

defs = [
    ("PROM",          "Rupture of membranes BEFORE onset of contractions — at ANY gestational age"),
    ("PPROM",         "PROM occurring BEFORE 37 weeks gestation"),
    ("Previable PROM","PROM before 23 weeks (before limit of viability)"),
    ("Latent period", "Time from membrane rupture to onset of labor / delivery"),
    ("Term PROM",     "PROM at ≥ 37 weeks — delivery usually follows within 24–48 h"),
]
col1_x = 14*mm; col2_x = 55*mm
for i, (term, defn) in enumerate(defs):
    ry = Y - 9*mm - i*8.5
    txt(cv, term, col1_x, ry, "Helvetica-Bold", 7.5, NAVY)
    txt(cv, defn, col2_x, ry, "Helvetica", 7.3, BLACK)

# Incidence badge
rbox(cv, PW - 28*mm, Y - 5*mm, 34*mm, 12*mm, 6, AMBER_L, AMBER)
txt(cv, "INCIDENCE", PW-28*mm, Y-2*mm, "Helvetica-Bold", 7.5, AMBER, "center")
txt(cv, "Complicates ~8% of all pregnancies", PW-28*mm, Y-8*mm, "Helvetica", 6.8, BLACK, "center")

# ── ARROW ──
Y2 = Y - 30*mm
arrowV(cv, PW/2, Y2+5, Y2-2)

# ── MEMBRANE ANATOMY ────────────────────────────────────────────
section_label(cv, "MEMBRANE ANATOMY & NORMAL PHYSIOLOGY", 12*mm, Y2-3*mm)
rbox(cv, PW/2, Y2-17*mm, PW-20*mm, 22*mm, 8, BLUE_L, BLUE, 1.4)

anat = [
    "• AMNION — innermost layer: single cuboidal epithelium + compact & spongy connective tissue",
    "• CHORION — outer layer: reticular & trophoblastic layers; adheres to maternal decidua",
    "• Layers fuse by end of week 14; together they are STRONGER than either alone",
    "• With gestation: ↓collagen content, ↑apoptosis, ↑MMP activity → physiologic weakening near internal os",
    "• Membrane rupture at term = final step of physiologic cervical ripening + uterine contractions",
]
for i, line in enumerate(anat):
    txt(cv, line, 14*mm, Y2-9*mm - i*9, "Helvetica", 7.3, BLACK)

# ── PATHOPHYSIOLOGY ─────────────────────────────────────────────
Y3 = Y2 - 44*mm
arrowV(cv, PW/2, Y2-28.5*mm, Y3+2)
section_label(cv, "PATHOPHYSIOLOGY OF PPROM", 12*mm, Y3+1*mm)

# 4 pathway boxes side by side
pw_boxes = [
    (TEAL,   TEAL_L,   "ASCENDING\nINFECTION",
     ["Bacteria secrete", "collagenases &", "proteases → direct", "membrane weakening",
      "Amniotic cx +ve in", "25–35% of cases"]),
    (BLUE,   BLUE_L,   "MMP / TIMP\nIMBALANCE",
     ["↑ Matrix metallo-", "proteinases (MMPs)", "↓ Tissue inhibitors", "(TIMPs) → collagen",
      "degradation near", "internal cervical os"]),
    (PURPLE, PURPLE_L, "UTERINE\nOVERDISTENSION",
     ["↑ Intraamniotic", "pressure from", "twins / poly-", "hydramnios →", "membrane bursting",
      "threshold exceeded"]),
    (AMBER,  AMBER_L,  "NUTRITIONAL /\nBIOCHEMICAL",
     ["Deficiency of:", "• Vitamin C", "• Copper", "• Zinc", "→ impaired collagen",
      "synthesis & repair"]),
]
bw = (PW - 28*mm) / 4 - 3
bh = 44*mm
bx_start = 12*mm
for i, (sc, bc, title, items) in enumerate(pw_boxes):
    bx = bx_start + i*(bw+3) + bw/2
    by = Y3 - bh/2 - 4*mm
    rbox(cv, bx, by, bw, bh, 7, bc, sc, 1.3)
    lines = title.split("\n")
    txt(cv, lines[0], bx, by+bh/2-8, "Helvetica-Bold", 7.5, sc, "center")
    if len(lines)>1: txt(cv, lines[1], bx, by+bh/2-16, "Helvetica-Bold", 7.5, sc, "center")
    for j, it in enumerate(items):
        txt(cv, it, bx - bw/2 + 5, by+bh/2-26 - j*8.5, "Helvetica", 6.8, BLACK)

# ── RISK FACTORS ────────────────────────────────────────────────
Y4 = Y3 - bh - 14*mm
arrowV(cv, PW/2, Y3-bh/2-4*mm-1, Y4+2)
section_label(cv, "RISK FACTORS", 12*mm, Y4+1*mm)
rbox(cv, PW/2, Y4-14*mm, PW-20*mm, 22*mm, 8, LGREY, SLATE, 1.2)

rfs = [
    ("Prior obstetric", "Previous PPROM (3× risk), preterm birth, cervical surgery (LEEP/cone)"),
    ("Infection",       "GBS, gonorrhoea, chlamydia, TV, bacterial vaginosis, UTI, pyelonephritis"),
    ("Uterine",         "Multiple gestation, polyhydramnios, uterine anomalies, cervical insufficiency"),
    ("Procedural",      "Amniocentesis, fetal surgery, cerclage"),
    ("Placental",       "Abruption, placenta praevia, bleeding in pregnancy"),
    ("Lifestyle",       "Smoking, low BMI, low socioeconomic status, nutritional deficiencies"),
]
col_xs = [14*mm, 52*mm, PW/2 + 2*mm, PW/2 + 40*mm]
for i, (cat, detail) in enumerate(rfs):
    col = 0 if i < 3 else 2
    row = i if i < 3 else i - 3
    ry = Y4 - 7*mm - row * 9
    cx_cat = col_xs[col]; cx_det = col_xs[col+1]
    txt(cv, cat + ":", cx_cat, ry, "Helvetica-Bold", 7.2, NAVY)
    txt(cv, detail, cx_det, ry, "Helvetica", 7, BLACK)

# ── COMPLICATIONS ────────────────────────────────────────────────
Y5 = Y4 - 32*mm
arrowV(cv, PW/2, Y4-26.5*mm, Y5+2)
section_label(cv, "COMPLICATIONS", 12*mm, Y5+1*mm)

comp_data = [
    (RED, RED_L, "MATERNAL",
     ["Chorioamnionitis: 9% (term)", "  → 24% if rupture >24h", "  → 13–35% remote from term",
      "Endometritis: 2–13%", "Placental abruption: 4–12%",
      "Maternal sepsis: 0.8%", "Maternal death: 0.14%"]),
    (AMBER, AMBER_L, "FETAL",
     ["Cord compression (oligohydramnios)", "Cord prolapse (esp. malpresentation)",
      "Fetal death: 1–2% overall", "  → 12–71% if PROM <24wks",
      "Intrauterine infection", "Placental abruption"]),
    (PURPLE, PURPLE_L, "NEONATAL",
     ["RDS — most common acute morbidity", "Neonatal sepsis (2× vs preterm labour)",
      "IVH / periventricular leukomalacia", "Necrotising enterocolitis (NEC)",
      "Pulmonary hypoplasia (<20wk PROM)", "Long-term: cerebral palsy, CLD"]),
]
bh2 = 36*mm; bw2 = (PW-20*mm)/3 - 3
for i, (sc, bc, title, items) in enumerate(comp_data):
    bx = 12*mm + i*(bw2+3) + bw2/2
    by = Y5 - bh2/2 - 3*mm
    rbox(cv, bx, by, bw2, bh2, 7, bc, sc, 1.3)
    txt(cv, title, bx, by+bh2/2-8, "Helvetica-Bold", 8, sc, "center")
    for j, it in enumerate(items):
        txt(cv, it, bx-bw2/2+5, by+bh2/2-18 - j*8.5, "Helvetica", 6.8, BLACK)

footer(cv, "Page 1 of 3  |  Theory")
txt(cv, "▶  Continued on Page 2: Clinical Investigations", PW/2, 14*mm,
    "Helvetica-Bold", 8, NAVY, "center")
cv.showPage()

# ══════════════════════════════════════════════════════════════════
# PAGE 2 — CLINICAL INVESTIGATIONS
# ══════════════════════════════════════════════════════════════════
hdr(cv, "PROM & PPROM — PAGE 2: CLINICAL INVESTIGATIONS",
    "History · Examination · Bedside Tests · Laboratory · Imaging · Interpretation Algorithm")

# ── ENTRY BANNER ────────────────────────────────────────────────
Y = PH - 33*mm
rbox(cv, PW/2, Y, PW-16*mm, 9*mm, 6, NAVY, NAVY, 0)
txt(cv, "PATIENT PRESENTS: Suspected fluid loss / rupture of membranes in pregnancy",
    PW/2, Y-2.5, "Helvetica-Bold", 9, WHITE, "center")

arrowV(cv, PW/2, Y-4.5*mm, Y-10*mm)

# ── STEP 1: HISTORY ─────────────────────────────────────────────
Y1 = Y - 20*mm
section_label(cv, "STEP 1 — HISTORY", 12*mm, Y1+4*mm)
rbox(cv, PW/2, Y1, PW-16*mm, 20*mm, 7, TEAL_L, TEAL, 1.4)

h_cols = [
    ["SYMPTOM HISTORY",
     "• Sudden gush or continuous trickle of watery fluid",
     "• Time of onset, amount, colour, odour",
     "• Ongoing leakage / intermittent?",
     "• Contractions or uterine tightening?",
     "• Fetal movements present?"],
    ["OBSTETRIC HISTORY",
     "• LMP → gestational age calculation",
     "• Gravida / para, prior PPROM",
     "• GBS status from recent swab",
     "• Cervical cerclage in situ?",
     "• Recent amniocentesis / procedure?"],
    ["RED FLAG HISTORY",
     "• Fever / rigors (infection?)",
     "• Abdominal pain / bleeding",
     "• Decreased fetal movement",
     "• Offensive vaginal discharge",
     "⚠ NO digital vaginal exam until term"],
]
col_w = (PW-20*mm)/3
for ci, col in enumerate(h_cols):
    cx = 12*mm + ci*col_w
    txt(cv, col[0], cx, Y1+7*mm, "Helvetica-Bold", 7.5, TEAL)
    for j, line in enumerate(col[1:]):
        c_ = RED if "⚠" in line else BLACK
        txt(cv, line, cx, Y1+7*mm-9-j*8.5, "Helvetica", 7, c_)

arrowV(cv, PW/2, Y1-10*mm, Y1-15*mm)

# ── STEP 2: EXAMINATION ─────────────────────────────────────────
Y2 = Y1 - 27*mm
section_label(cv, "STEP 2 — PHYSICAL EXAMINATION", 12*mm, Y2+4*mm)
rbox(cv, PW/2, Y2, PW-16*mm, 20*mm, 7, BLUE_L, BLUE, 1.4)

exam_cols = [
    ["GENERAL / VITALS",
     "• Temperature (q4h if admitted)",
     "• Pulse, BP, respiratory rate",
     "• Fundal height / uterine size",
     "• Uterine tenderness (IAI sign)",
     "• Abdominal guarding?"],
    ["SPECULUM EXAM ONLY",
     "• Inspect posterior fornix: pooling?",
     "• Cough / Valsalva → observe gush",
     "• Fundal pressure if needed",
     "• Visual cervical OS assessment",
     "• Take swabs: GBS, HVS, STI"],
    ["FETAL ASSESSMENT",
     "• Fetal heart rate auscultation",
     "• Leopold manoeuvres — presentation",
     "• CTG if ≥ 26 weeks",
     "• Rule out cord prolapse",
     "• Amniotic fluid colour (meconium?)"],
]
for ci, col in enumerate(exam_cols):
    cx = 12*mm + ci*col_w
    txt(cv, col[0], cx, Y2+7*mm, "Helvetica-Bold", 7.5, BLUE)
    for j, line in enumerate(col[1:]):
        txt(cv, line, cx, Y2+7*mm-9-j*8.5, "Helvetica", 7, BLACK)

arrowV(cv, PW/2, Y2-10*mm, Y2-15*mm)

# ── STEP 3: BEDSIDE TESTS ───────────────────────────────────────
Y3 = Y2 - 30*mm
section_label(cv, "STEP 3 — BEDSIDE DIAGNOSTIC TESTS", 12*mm, Y3+4*mm)

tests = [
    (TEAL, TEAL_L, "NITRAZINE pH TEST",
     ["Method: apply fluid to pH paper",
      "Normal vaginal pH: 3.8–4.2",
      "Amniotic fluid pH: 7.1–7.3",
      "POSITIVE: paper turns blue/green",
      "False +ve: blood, semen,",
      "  BV, antiseptic solutions",
      "Sensitivity ~90%"]),
    (BLUE, BLUE_L, "FERNING (ARBORIZATION)",
     ["Method: smear on glass slide,",
      "  air-dry, view under microscope",
      "POSITIVE: fern-like crystals",
      "  = NaCl crystallization of AF",
      "False -ve: blood, cervical",
      "  mucus contamination",
      "Spec ~98% if clean sample"]),
    (PURPLE, PURPLE_L, "IMMUNOASSAY TESTS",
     ["AmniSure® — PAMG-1:",
      "  Placental alpha-microglobulin-1",
      "  Very high Sn/Sp (~98%/98%)",
      "ActimPROM® — IGFBP-1:",
      "  Insulin-like GF binding protein",
      "  Useful if nitrazine equivocal",
      "Gold std: amnioinfusion + dye"]),
    (AMBER, AMBER_L, "COMBINED ACCURACY",
     ["History alone: ~70%",
      "Nitrazine alone: ~90%",
      "Ferning alone: ~95%",
      "History + Nitrazine",
      "  + Ferning = ~90–95%",
      "AmniSure: ~97–99%",
      "Dye test: near 100%"]),
]
bw3 = (PW-20*mm)/4 - 3; bh3 = 36*mm
for i, (sc, bc, title, items) in enumerate(tests):
    bx = 12*mm + i*(bw3+3) + bw3/2
    by = Y3 - bh3/2 - 2*mm
    rbox(cv, bx, by, bw3, bh3, 7, bc, sc, 1.3)
    txt(cv, title, bx, by+bh3/2-8, "Helvetica-Bold", 7.2, sc, "center")
    for j, it in enumerate(items):
        txt(cv, it, bx-bw3/2+4, by+bh3/2-18 - j*8.2, "Helvetica", 6.5, BLACK)

arrowV(cv, PW/2, Y3-bh3/2-2*mm-1, Y3-bh3/2-8*mm)

# ── STEP 4: LAB + IMAGING ───────────────────────────────────────
Y4 = Y3 - bh3 - 22*mm
section_label(cv, "STEP 4 — LABORATORY & IMAGING INVESTIGATIONS", 12*mm, Y4+4*mm)

lab_img = [
    (SLATE, LGREY, "LABORATORY TESTS",
     ["• FBC: ↑WBC >15,000 = IAI sign",
      "• CRP: rising = infection marker",
      "• Blood cultures if febrile",
      "• U&E, LFTs (baseline)",
      "• Coagulation (if abruption ?)",
      "• HVS, GBS rectal/vaginal swab",
      "• MSU: exclude UTI / bacteriuria",
      "• STI screen (GC, Chlamydia)"]),
    (TEAL, TEAL_L, "ULTRASOUND SCAN",
     ["• Confirm gestational age",
      "  (BPD, HC, AC, FL biometry)",
      "• AFI <5 cm / MVP <2 cm",
      "  = oligohydramnios → supports PROM",
      "• Fetal presentation",
      "• Placental location / praevia",
      "• Cord position — exclude prolapse",
      "• Fetal weight estimate"]),
    (BLUE, BLUE_L, "CTG / FETAL MONITORING",
     ["• Baseline FHR: 110–160 bpm",
      "• Variable decelerations:",
      "  cord compression from oligo",
      "• Prolonged decelerations:",
      "  cord compression / prolapse",
      "• Reduced variability:",
      "  consider infection / hypoxia",
      "• BPP if CTG equivocal"]),
    (PURPLE, PURPLE_L, "ADVANCED / EQUIVOCAL",
     ["• Amnio-dye test:",
      "  indigo carmine 1mL IA →",
      "  blue staining on tampon",
      "  = definitive PROM",
      "• Serial USS q1–2 wks",
      "  (fluid reaccumulation?)",
      "• Fetal lung maturity if",
      "  34–36 wks borderline"]),
]
bw4 = (PW-20*mm)/4 - 3; bh4 = 40*mm
for i, (sc, bc, title, items) in enumerate(lab_img):
    bx = 12*mm + i*(bw4+3) + bw4/2
    by = Y4 - bh4/2 - 2*mm
    rbox(cv, bx, by, bw4, bh4, 7, bc, sc, 1.3)
    txt(cv, title, bx, by+bh4/2-8, "Helvetica-Bold", 7.2, sc, "center")
    for j, it in enumerate(items):
        txt(cv, it, bx-bw4/2+4, by+bh4/2-18 - j*8.5, "Helvetica", 6.8, BLACK)

arrowV(cv, PW/2, Y4-bh4/2-2*mm-1, Y4-bh4/2-7*mm)

# ── INTERPRETATION ALGORITHM ──────────────────────────────────
Y5 = Y4 - bh4 - 19*mm
rbox(cv, PW/2, Y5, PW-16*mm, 11*mm, 6, NAVY, NAVY, 0)
txt(cv, "INTERPRETATION: Pooling + Nitrazine + Ferning/AmniSure + USS oligohydramnios = PROM CONFIRMED",
    PW/2, Y5-2.5, "Helvetica-Bold", 8.5, WHITE, "center")

# Two outcome boxes
arrowV(cv, PW/3, Y5-5.5*mm, Y5-10.5*mm, TEAL)
arrowV(cv, 2*PW/3, Y5-5.5*mm, Y5-10.5*mm, RED)
Y6 = Y5 - 19*mm
rbox(cv, PW/3, Y6, PW/2-14*mm, 12*mm, 6, TEAL_L, TEAL)
txt(cv, "PROM CONFIRMED", PW/3, Y6+2.5, "Helvetica-Bold", 8.5, TEAL, "center")
txt(cv, "→ Proceed to gestational age stratification (Page 3)", PW/3, Y6-4,
    "Helvetica", 7.5, BLACK, "center")

rbox(cv, 2*PW/3, Y6, PW/2-14*mm, 12*mm, 6, AMBER_L, AMBER)
txt(cv, "EQUIVOCAL / NEGATIVE", 2*PW/3, Y6+2.5, "Helvetica-Bold", 8.5, AMBER, "center")
txt(cv, "→ Repeat in 1–2h; USS; consider dye test; re-evaluate", 2*PW/3, Y6-4,
    "Helvetica", 7.5, BLACK, "center")

footer(cv, "Page 2 of 3  |  Clinical Investigations")
txt(cv, "▶  Continued on Page 3: Management by Gestational Age + Red Flags",
    PW/2, 14*mm, "Helvetica-Bold", 8, NAVY, "center")
cv.showPage()

# ══════════════════════════════════════════════════════════════════
# PAGE 3 — MANAGEMENT
# ══════════════════════════════════════════════════════════════════
hdr(cv, "PROM & PPROM — PAGE 3: MANAGEMENT",
    "Gestational Age Stratification · Conservative Bundle · Delivery Triggers · Red Flags")

Y = PH - 33*mm

# ── GA STRATIFICATION HEADER ────────────────────────────────────
rbox(cv, PW/2, Y, PW-16*mm, 9*mm, 5, NAVY, NAVY, 0)
txt(cv, "PROM CONFIRMED  →  STRATIFY BY GESTATIONAL AGE",
    PW/2, Y-2.5, "Helvetica-Bold", 11, WHITE, "center")

arrowV(cv, PW/2, Y-4.5*mm, Y-8*mm)

# ── 4 COLUMNS for GA bands ──────────────────────────────────────
Y1 = Y - 18*mm
bands = [
    (RED, RED_L, "< 23 WEEKS\nPERIVIABLE PROM",
     ["COUNSELLING ESSENTIAL",
      "• Average fetal loss ~30%",
      "• Neonatal survival ≤24wks: 44%",
      "• Risk pulmonary hypoplasia if",
      "  severe oligo + PROM <20wks",
      "",
      "OPTIONS (shared decision):",
      "• Expectant management",
      "  — inpatient initially",
      "  — pelvic & bed rest",
      "  — temp q4h, WBC daily",
      "  — USS q1–2 wks",
      "  — admit at viability limit",
      "• Termination of pregnancy:",
      "  PGE2 / misoprostol /",
      "  high-dose oxytocin / D&E",
      "",
      "ANTIBIOTICS: consider at",
      "viability (no clear benefit",
      "at diagnosis vs viability)",
      "AMNIOPATCH: experimental",
      "(success 36–63% post-amnio)"]),
    (AMBER, AMBER_L, "23–33⁶/⁷ WEEKS\nPPROM (REMOTE FROM TERM)",
     ["CONSERVATIVE MANAGEMENT",
      "",
      "★ CORTICOSTEROIDS",
      "Betamethasone 12mg IM ×2",
      "(24h apart)  [24⁰/⁷–33⁶/⁷wk]",
      "May start from 22⁰/⁷ wks",
      "",
      "★ ANTIBIOTICS (7-day course)",
      "IV Ampicillin 2g q6h +",
      "IV Erythromycin 250mg q6h",
      "×48h, THEN:",
      "Amoxicillin 250mg PO q8h +",
      "Erythromycin 333mg PO q8h",
      "×5 days",
      "⚠ Avoid amox-clavulanate",
      "  (↑ NEC risk 4.72×)",
      "",
      "★ MgSO₄ NEUROPROTECTION",
      "If <32 wks: 4g IV over 20min",
      "then 1–2g/h maintenance",
      "",
      "★ GBS PROPHYLAXIS",
      "If +ve or unknown status"]),
    (BLUE, BLUE_L, "34⁰/⁷–36⁶/⁷ WEEKS\nLATE PRETERM",
     ["INDIVIDUALISE — balance:",
      "chorioamnionitis risk vs",
      "prematurity complications",
      "",
      "EVIDENCE (PROMEXIL/PPROM):",
      "Conservative management",
      "extends latency only 3–4 days",
      "Chorioamnionitis risk 2–5×",
      "higher with expectant mgmt",
      "",
      "CURRENT RECOMMENDATION:",
      "Deliver at 34⁰/⁷ weeks",
      "(or individualise 34–36wk)",
      "",
      "★ ANTENATAL STEROIDS",
      "Give if not yet administered",
      "(late-preterm steroid trial",
      "supports use at 34–36wks)",
      "",
      "★ GBS PROPHYLAXIS",
      "If +ve or unknown",
      "",
      "★ MONITOR: CTG, temp,",
      "WBC, urine output"]),
    (TEAL, TEAL_L, "≥ 37 WEEKS\nTERM PROM",
     ["ACTIVE MANAGEMENT",
      "",
      "• Oxytocin induction of labour",
      "• Do NOT await spontaneous",
      "  labour beyond 12–18 hours",
      "  → chorioamnionitis risk ↑↑",
      "",
      "CHORIOAMNIONITIS RISK:",
      "• 9% overall at term",
      "• Up to 24% if rupture >24h",
      "",
      "★ GBS PROPHYLAXIS",
      "If GBS +ve or unknown:",
      "IV Penicillin G 5MU then",
      "2.5MU q4h during labour",
      "Alternatives: Ampicillin,",
      "Cefazolin, Clindamycin",
      "",
      "MONITORING:",
      "• FHR monitoring (CTG)",
      "• Maternal temp q4h",
      "• WBC if fever develops",
      "",
      "C-SECTION: only for standard",
      "obstetric indications"]),
]
bw_ga = (PW-20*mm)/4 - 3
bh_ga = 115*mm
for i, (sc, bc, title, items) in enumerate(bands):
    bx = 12*mm + i*(bw_ga+3) + bw_ga/2
    by = Y1 - bh_ga/2 - 4*mm
    rbox(cv, bx, by, bw_ga, bh_ga, 7, bc, sc, 1.5)
    lines = title.split("\n")
    txt(cv, lines[0], bx, by+bh_ga/2-8, "Helvetica-Bold", 7.5, sc, "center")
    txt(cv, lines[1], bx, by+bh_ga/2-17, "Helvetica-Bold", 7.5, sc, "center")
    for j, it in enumerate(items):
        f = "Helvetica-Bold" if it.startswith("★") or it.startswith("OPTIONS") or it.startswith("CURRENT") or it.startswith("EVIDENCE") or it.startswith("CHORIOAMNI") or it.startswith("MONITOR") or it.startswith("C-SECTION") or it.startswith("GBS") else "Helvetica"
        c_ = sc if it.startswith("★") else (RED if "⚠" in it else BLACK)
        txt(cv, it, bx-bw_ga/2+5, by+bh_ga/2-27 - j*8.2, f, 6.7, c_)

# ── MONITORING DURING CONSERVATIVE MANAGEMENT ──────────────────
Y2 = Y1 - bh_ga - 14*mm
section_label(cv, "MONITORING DURING CONSERVATIVE MANAGEMENT", 12*mm, Y2+3*mm)
rbox(cv, PW/2, Y2-9*mm, PW-16*mm, 14*mm, 7, BLUE_L, BLUE, 1.4)

mon = [
    ["MATERNAL (daily / q4h):",
     "Temp q4h · Pulse, BP · WBC + CRP daily",
     "Uterine tenderness · Vaginal discharge"],
    ["FETAL (daily):",
     "Kick count · NST/CTG q12–24h · BPP",
     "USS: fluid, growth, doppler (weekly)"],
    ["INFECTION SCREEN:",
     "Rising temp, WBC, CRP, fetal tachy",
     "→ suspect IAI → deliver"],
]
col_w3 = (PW-20*mm)/3
for ci, col in enumerate(mon):
    cx = 12*mm + ci*col_w3
    txt(cv, col[0], cx, Y2-3.5*mm, "Helvetica-Bold", 7.5, BLUE)
    for j, line in enumerate(col[1:]):
        txt(cv, line, cx, Y2-3.5*mm-9-j*8.5, "Helvetica", 7, BLACK)

# ── DIAGNOSIS OF IAI ───────────────────────────────────────────
Y3 = Y2 - 26*mm
section_label(cv, "DIAGNOSIS OF INTRAAMNIOTIC INFECTION (IAI / CHORIOAMNIONITIS)", 12*mm, Y3+3*mm)
rbox(cv, PW/2, Y3-9*mm, PW-16*mm, 14*mm, 7, AMBER_L, AMBER, 1.5)
iai_1 = "CLINICAL IAI: Maternal fever ≥38°C  PLUS at least ONE of:"
iai_2 = "Maternal leukocytosis >15,000  ·  Maternal tachycardia >100 bpm  ·  Fetal tachycardia >160 bpm  ·  Uterine tenderness  ·  Purulent AF"
iai_3 = "MANAGEMENT OF IAI: Deliver regardless of GA  +  Broad-spectrum IV antibiotics  (Ampicillin + Gentamicin; add Clindamycin for C-section)"
txt(cv, iai_1, 14*mm, Y3-3.5*mm, "Helvetica-Bold", 7.5, AMBER)
txt(cv, iai_2, 14*mm, Y3-11.5*mm, "Helvetica", 7.2, BLACK)
txt(cv, iai_3, 14*mm, Y3-19.5*mm, "Helvetica-Bold", 7.2, RED)

# ── RED FLAGS ──────────────────────────────────────────────────
Y4 = Y3 - 30*mm
rbox(cv, PW/2, Y4, PW-16*mm, 22*mm, 8, RED_L, RED, 2)
txt(cv, "⚠  IMMEDIATE DELIVERY INDICATED — REGARDLESS OF GESTATIONAL AGE",
    PW/2, Y4+8.5*mm, "Helvetica-Bold", 9.5, RED, "center")

flags = [
    ("Clinical IAI",          "Maternal fever ≥38°C + one IAI criterion above → broad-spectrum IV abx + deliver"),
    ("Placental abruption",   "Painful bleeding + woody uterus + fetal distress → emergency delivery"),
    ("Non-reassuring FHR",    "Persistent decelerations / bradycardia / absent variability → deliver"),
    ("Cord prolapse",         "Visible / palpable umbilical cord → Category 1 CS — do NOT delay"),
    ("Active labour",         "Progressive cervical change + contractions → deliver; no active tocolysis"),
]
for i, (flag, detail) in enumerate(flags):
    fy = Y4 + 3*mm - i*9.5
    txt(cv, f"• {flag}:", 14*mm, fy, "Helvetica-Bold", 7.5, RED)
    txt(cv, detail, 62*mm, fy, "Helvetica", 7.3, BLACK)

# ── CLINICAL PEARLS ──────────────────────────────────────────
Y5 = Y4 - 32*mm
rbox(cv, PW/2, Y5, PW-16*mm, 22*mm, 8, LGREY, SLATE, 1.2)
txt(cv, "KEY CLINICAL PEARLS", PW/2, Y5+9*mm, "Helvetica-Bold", 9, SLATE, "center")
pearls = [
    "1.  NO digital cervical exam until labour is confirmed (shortens latency, ↑ infection risk) — speculum only.",
    "2.  Nitrazine FALSE POSITIVES: blood, semen, BV, antiseptic — confirm with ferning or AmniSure.",
    "3.  NEVER use amoxicillin-clavulanate (Augmentin) in PPROM — 4.72× increased NEC risk (ORACLE trial).",
    "4.  Magnesium sulfate neuroprotection at <32 weeks reduces cerebral palsy — do not omit.",
    "5.  Antenatal corticosteroids: ↓ RDS 21.8% vs 31.9%, ↓ IVH 4.2% vs 8.6%, ↓ neonatal death 10.4% vs 16.8%.",
    "6.  Term PROM: induce within 12–18h — chorioamnionitis rises significantly beyond 24h of membrane rupture.",
    "7.  Pulmonary hypoplasia risk: PROM before 20 wks + persistent severe oligohydramnios (AFI <2cm) for >2 wks.",
]
for i, p in enumerate(pearls):
    txt(cv, p, 14*mm, Y5+5*mm - i*9.5, "Helvetica", 7, BLACK)

footer(cv, "Page 3 of 3  |  Management")
cv.save()
print(f"✓ PDF saved: {OUT}")
Running Command

cd /tmp/workspace/prom-full && python3 prom_full_flowchart.py 2>&1

Running Command

ls -lh /tmp/workspace/prom-full/PROM_PPROM_Complete_Flowchart.pdf

Your comprehensive 3-page PDF is ready:

PROM PPROM Complete Flowchart

PDF Document · PDF


Here is what each page contains:
Page 1 — Theory
  • Definitions panel: PROM, PPROM, periviable PROM, latent period, term PROM (with incidence badge)
  • Membrane anatomy: amnion vs chorion structure, fusion at 14 weeks, physiologic weakening
  • Pathophysiology - 4 color-coded pathway boxes: ascending infection, MMP/TIMP imbalance, uterine overdistension, nutritional/biochemical deficiency
  • Risk factors: obstetric history, infection, uterine, procedural, placental, lifestyle
  • Complications: 3 columns - maternal (with %, chorioamnionitis risk table), fetal, neonatal
Page 2 — Clinical Investigations
  • Step 1: History - 3-column checklist (symptoms, obstetric history, red flags)
  • Step 2: Physical examination - vitals/general, speculum exam, fetal assessment
  • Step 3: Bedside tests - Nitrazine, Ferning, immunoassays (AmniSure/ActimPROM), combined accuracy stats
  • Step 4: Laboratory + Imaging - FBC/CRP/swabs, USS (AFI/MVP criteria), CTG interpretation, advanced tests (dye test)
  • Interpretation algorithm: confirmed PROM vs equivocal, branching outcomes
Page 3 — Management
  • 4-column GA stratification: <23 wks (periviable), 23-33 wks (full conservative bundle with steroids/antibiotics/MgSO4), 34-36 wks (individualise with PROMEXIL evidence), ≥37 wks (active management)
  • Monitoring checklist during conservative management
  • IAI/chorioamnionitis diagnostic criteria and treatment
  • Red flags requiring immediate delivery regardless of GA
  • 7 clinical pearls (ORACLE trial warning, MgSO4, steroid NNT data, digital exam rule)

PROM management

Reading File
Finding Sources
Searching PubMed

"premature rupture of membranes" management

Reading File
I have the full management chapter content. Let me read the remaining sections on specific interventions.
Reading File
I now have comprehensive, detailed management content. Let me compile the full structured response.

PROM Management

Source: Creasy & Resnik's Maternal-Fetal Medicine, 9th Ed.

Core Management Principle

Management is driven by a single balance: risks of immediate delivery vs. risks of conservative management to allow fetal maturation. This balance shifts continuously with gestational age, and no single algorithm applies to every case.
Key considerations before deciding:
  • Gestational age (most important factor)
  • Signs of intrauterine infection (IAI/chorioamnionitis)
  • Signs of fetal compromise (non-reassuring CTG)
  • Placental abruption
  • Fetal presentation
  • GBS status
  • Local NICU capabilities

Initial Evaluation (All Cases)

After diagnosis is confirmed:
StepAction
Duration of ruptureEstimate - helps neonatologists plan
Gestational ageConfirm with LMP + USS biometry (note: BPD may be distorted by oligohydramnios - use HC instead)
Fetal presentationLeopold's + USS
Labor assessmentContractions? Cervical dilation (speculum only - no digital exam)
Infection screenMaternal temp, pulse, WBC, CRP; GBS status from swabs within 6 weeks
Fetal well-beingContinuous CTG at viable gestational age
UltrasoundFetal weight, growth, AFI/MVP, cord position, placenta, anomalies
Facility checkCan this centre provide emergent delivery + acute neonatal resuscitation? If not - transfer early
DVT prophylaxis: Prolonged bed rest increases DVT risk. Use leg exercises, compression stockings. Weigh subcutaneous heparin risk vs. benefit case by case.

Management by Gestational Age


A. Term PROM (≥ 37 weeks)

No fetal benefit to waiting. The risk of chorioamnionitis rises sharply with time:
  • Chorioamnionitis at term: 9% overall
  • Rises to 24% if membranes ruptured >24 hours
Management:
  1. Oxytocin induction - preferred approach; do not await spontaneous labour beyond 12-18 hours
  2. Misoprostol is also appropriate if cervix is unfavourable
  3. GBS prophylaxis:
    • GBS positive or unknown status: IV Penicillin G 5 MU loading, then 2.5 MU q4h until delivery
    • Alternatives: Ampicillin 2g IV then 1g q4h; Cefazolin if PCN allergy (low risk); Clindamycin/Vancomycin if high-risk allergy
  4. Continuous CTG in labour
  5. Temperature monitoring q4h
  6. C-section only for standard obstetric indications (malpresentation, fetal distress, failed induction, etc.)
TERMPROM trial (Hannah et al.): Oxytocin induction resulted in fewer cases of chorioamnionitis without increasing C-section rates compared to expectant management.

B. Preterm PROM at 34 0/7 - 36 6/7 weeks (Late Preterm)

Evidence from PROMEXIL, PROMEXIL-2, and the PPROM trial shows:
  • Conservative management extends latency by only 3-4 days on average
  • 2-5-fold increase in chorioamnionitis with expectant management
  • Worse cord pH with conservative management
  • Active delivery group: more neonatal hypoglycaemia and hyperbilirubinaemia, but less RDS and shorter NICU stay (PPROM trial)
Current recommendation: Deliver at 34 0/7 weeks
Steps:
  1. Administer antenatal corticosteroids if not already given (betamethasone - evidence supports use at 34-36 wks for late preterm)
  2. GBS prophylaxis
  3. Individualize at 34-36 weeks with shared decision-making
  4. Plan delivery; do not prolong expectantly beyond 37 weeks

C. Preterm PROM at 23 0/7 - 33 6/7 weeks (Remote from Term)

Goal: Conservative (expectant) management to gain fetal maturity - provided there are no indications for immediate delivery.

Indications to Deliver Immediately (Despite Prematurity):

  • Clinical chorioamnionitis
  • Placental abruption
  • Non-reassuring / abnormal fetal heart rate
  • Umbilical cord prolapse
  • Active/progressive labour

General Measures:

MeasureDetails
SettingInpatient at facility with emergent delivery capability + NICU. Outpatient NOT recommended after viability
ActivityModified bed rest (not strict); pelvic rest
MonitoringContinuous CTG initially; then daily FHR assessment (cord compression rate 32-76%)
Biophysical profileIf NST equivocal; a BPP ≤6 within 24h of delivery is associated with perinatal infection
Infection surveillanceMaternal temp q4h, pulse, WBC + CRP daily, uterine tenderness, vaginal discharge character
USSWeekly: amniotic fluid, fetal growth, doppler

Specific Interventions (The "Conservative Bundle"):

1. Antenatal Corticosteroids
DrugDoseSchedule
Betamethasone12 mg IMTwo doses, 24 hours apart
Dexamethasone6 mg IMFour doses, 12 hours apart
  • Recommended at 24 0/7 - 33 6/7 weeks; may be considered from 22 0/7 weeks if risk of delivery within 7 days
  • Reduces RDS: 21.8% vs 31.9% (NNT ~10)
  • Reduces IVH: 4.2% vs 8.6%
  • Reduces neonatal death: 10.4% vs 16.8%
  • Does NOT increase maternal chorioamnionitis or endometritis risk
  • A single rescue course may be given if first course was >14 days ago and delivery risk remains; controversial
  • Administer at 34-36 weeks if considering late preterm delivery
2. Adjuvant Antibiotics (ORACLE Regimen)
Purpose: Treat subclinical ascending infection, prolong latency, reduce neonatal morbidity.
PhaseDrugDoseDuration
IV phase (48h)Ampicillin2g IV q6h48 hours
IV phase (48h)Erythromycin250mg IV q6h48 hours
Oral phase (5 days)Amoxicillin250mg PO q8h5 days
Oral phase (5 days)Erythromycin333mg PO q8h5 days
Total course = 7 days
Benefits (vs placebo):
  • Chorioamnionitis: RR 0.66
  • Delivery within 48h: RR 0.71
  • Delivery within 7 days: RR 0.79
  • Neonatal infection: RR 0.67
  • Major cerebral abnormalities on USS: RR 0.81
  • Need for surfactant: RR 0.83
⚠ NEVER use amoxicillin-clavulanate (Augmentin/co-amoxiclav) - associated with 4.72x increased NEC risk (ORACLE trial, PMID: 11248199)
3. Magnesium Sulfate for Neuroprotection
  • Indicated at <32 weeks when delivery is imminent or expected
  • Dose: 4g IV over 20-30 minutes, then 1-2g/h maintenance until delivery or 12 hours, whichever comes first
  • Reduces cerebral palsy and periventricular leukomalacia
  • Monitor: deep tendon reflexes, respiratory rate, urine output
  • Antidote: Calcium gluconate 1g IV if toxicity
4. GBS Prophylaxis
  • Intrapartum IV Penicillin G (or alternatives) if GBS positive, unknown, or swab >6 weeks old
  • Continue regardless of prior antibiotic course
5. Tocolysis
  • Short-term (48 hours only) to allow corticosteroid benefit and maternal transfer if needed
  • NOT used for prolonged tocolysis - does not improve outcomes and may mask infection
  • Contraindicated if: chorioamnionitis, abruption, non-reassuring FHR, advanced labour
  • Agents: nifedipine or indomethacin (if <32 weeks) commonly used

D. Periviable PROM (< 23 weeks)

This is the most ethically complex situation.
Prognosis:
  • Average fetal death rate: ~30%
  • Neonatal survival with conservative management ≤24 weeks: 44%
  • If PROM before 24 weeks: survival only ~14%
  • Pulmonary hypoplasia is the critical risk - strongest predictor is persistent severe oligohydramnios (AFI <2 cm) after PROM before 20 weeks
Counselling must include:
  • Realistic gestational age-specific survival and morbidity data
  • Maternal risks: infection (25-77%), DVT, bone demineralisation, prolonged hospitalisation
  • Financial and social implications
Special favourable prognostic factors:
  • PROM after amniocentesis (often reseals; good prognosis)
  • Reaccumulation of fluid on serial USS = favourable sign
Poor prognostic factors:
  • PROM with persistent second-trimester bleeding
  • Elevated MSAFP
  • Persistent severe oligohydramnios
Options:
  1. Expectant management - initial inpatient; pelvic rest; serial USS q1-2 weeks; admit when viability reached; then standard conservative bundle
  2. Delivery/termination - vaginal PGE2, misoprostol, high-dose oxytocin, or D&E
  3. Experimental: Amniopatch (fibrin/platelet/cryoprecipitate plug) - success rate 36-63% post-amniocentesis PROM, ~12% post-spontaneous PROM; amnioinfusion (AMIPROM trial - limited data)

Diagnosis and Management of Chorioamnionitis (IAI)

Clinical diagnosis requires:
  • Maternal fever ≥ 38°C (100.4°F)
  • PLUS at least ONE of:
    • Maternal leukocytosis >15,000
    • Maternal tachycardia >100 bpm
    • Fetal tachycardia >160 bpm
    • Uterine tenderness
    • Purulent amniotic fluid
Supporting investigations:
  • Amniotic fluid glucose <16-20 mg/dL = sensitivity/specificity ~80-90% for positive culture
  • Gram stain positive for bacteria: specificity 80-97%
  • Vaginal pool glucose <5 mg/dL: 74.2% accuracy for positive culture (non-invasive)
  • Note: WBC may be falsely elevated 5-7 days after corticosteroid administration
Management of confirmed IAI:
  1. Deliver - do not delay regardless of gestational age
  2. IV broad-spectrum antibiotics before delivery (reduces neonatal sepsis):
    • Ampicillin + Gentamicin (standard)
    • Add Clindamycin or Metronidazole if C-section
  3. Continue antibiotics until 24-48h post-delivery
  4. Neonatal team present at delivery; septic workup for neonate

Monitoring Schedule Summary

ParameterFrequency
Maternal temperatureEvery 4 hours
Pulse, BPEvery 4 hours
Fetal heart rate (CTG)Daily minimum; continuous if decelerations
WBC + CRPDaily
Uterine tenderness checkEvery assessment
Ultrasound (fluid, growth, Doppler)Weekly
BPPIf NST equivocal
Kick countsDaily

Delivery Timing Summary

Gestational AgeRecommendation
≥ 37 weeksDeliver promptly (oxytocin within 12-18h)
34 0/7 - 36 6/7 weeksDeliver at 34 weeks; individualise at 34-36 wks
32 0/7 - 33 6/7 weeksConservative; deliver at 34 weeks
24 0/7 - 31 6/7 weeksConservative; deliver at 34 weeks or if complications
< 24 weeksCounsel; shared decision; deliver if IAI/complications

Key Clinical Rules (Must-Know)

  1. No digital vaginal exam - shortens latency, increases infection risk. Speculum only until term labour is confirmed.
  2. Avoid amoxicillin-clavulanate - causes 4.72x NEC. Use ampicillin + erythromycin only.
  3. MgSO4 at <32 weeks - neuroprotection; do not omit.
  4. Steroids do not increase infection risk even with PROM - give them.
  5. Do not tocolyse beyond 48 hours - no long-term benefit; may delay detection of infection.
  6. Chorioamnionitis = deliver regardless of GA - delay increases neonatal sepsis.
  7. Cord prolapse = Category 1 emergency - immediate C-section.
  8. Transfer early - if your facility cannot provide emergent delivery + NICU, transfer before complications occur.
Creasy & Resnik's Maternal-Fetal Medicine 9e, Chapter 39 | Recent systematic review on periviable PROM outcomes: PMID 38648897 (Di Mascio et al., 2024, Am J Obstet Gynecol MFM)

According to Malaysia CPG

Searching for the Malaysia CPG on PROM now.
Searching sources...
Searching the Web

Malaysia Clinical Practice Guideline PROM premature rupture of membranes MOH CPG

Searching the Web

Malaysia MOH CPG "prelabour rupture of membranes" OR "premature rupture of membranes" site:moh.gov.my OR site:acadmed.org.my

Found the MOH Malaysia Guideline on Preterm Birth (2023) and the Handbook of Obstetrics Guideline. Let me extract both now.
Reading Web Page

https://www.moh.gov.my/images/04-penerbitan/penerbitan-klini…

Searching the Web

Malaysia MOH "handbook of obstetrics" PROM PPROM management corticosteroids antibiotics 2024

Found the MOH Malaysia Handbook of Obstetrics Guideline 2024 reference and the MOH Preterm Birth Guideline 2023. Let me now get the specific PROM/PPROM content and the NAG antibiotic section.
Reading Web Page

https://sites.google.com/moh.gov.my/nag/contents/section-a-a…

Searching the Web

Malaysia MOH CPG PROM PPROM "corticosteroids" "erythromycin" OR "ampicillin" "betamethasone" gestational age management 2023 2024

I now have the primary Malaysian sources. Let me extract more of the MOH Preterm Birth Guideline for the full PPROM section.
Reading Web Page

https://www.moh.gov.my/images/04-penerbitan/penerbitan-klini…

I now have all the key Malaysian CPG content. Let me compile the comprehensive response.

PROM Management — According to Malaysia CPG

The following is drawn from three Malaysian Ministry of Health (MOH) documents:
  1. MOH Guidelines on Prevention and Management of Preterm Birth (MOH/P/PAK/516.23(GU)-e, 2023) — the primary Malaysian CPG for PPROM
  2. MOH National Antimicrobial Guideline (NAG) — antibiotic-specific recommendations for PPROM (updated Jan 2026)
  3. MOH Handbook of Obstetrics Guideline (MOH/P/PAK/534.24(GU)-e, 2024) — supporting reference

Key Principle (Malaysia CPG)

Management is guided by gestational age, presence of infection, fetal status, and availability of NICU. The CPG focuses on singleton pregnancies with spontaneous preterm birth.

A. PPROM Management (< 37 Weeks)

1. Initial Assessment

Upon diagnosis, the following investigations are recommended:
InvestigationPurpose
FBC (BUSE/FBE)WBC for infection screening
MSU FEME and C&SExclude UTI / bacteriuria
Cardiotocograph (CTG)Fetal well-being assessment
UltrasoundAmniotic fluid volume, fetal presentation, exclude fetal anomaly, estimate weight
Note: The CPG specifically states to exclude gross foetal anomaly during the initial scan.

2. Antenatal Corticosteroids

Malaysia MOH Recommendation (Section 5.4.1):
"Administer antenatal corticosteroids to women between 24 weeks and 35 weeks 6 days of pregnancy who have preterm labour and PPROM."
Malaysian Regime (differs from international standard):
DrugDoseSchedule
Dexamethasone6 mg IMTwice daily (bd) for 2 days (total 4 doses)
⚠ Note: Malaysia uses Dexamethasone (not Betamethasone as in ACOG/RCOG), reflecting local drug availability. The total dose is 4 × 6 mg = 24 mg IM.
Benefits (as stated in Malaysia CPG):
  • Reduction in neonatal death
  • Reduction in RDS
  • Reduction in IVH
  • Reduction in necrotising enterocolitis (NEC)
  • Reduction in need for mechanical ventilation
Rescue course (Section 5.4.5):
  • Rescue antenatal corticosteroids improve short-term outcomes (↓ RDS, ↓ surfactant need, ↓ composite morbidity)
  • Use with caution - repeated courses associated with reduced birth weight, length, and head circumference; the more courses given, the larger the reduction
Blood sugar monitoring: Mandatory after corticosteroid administration. Consider additional insulin for diabetic mothers.

3. Antibiotics — Malaysia NAG (Updated Jan 2026)

The Malaysia National Antimicrobial Guideline distinguishes between GBS carrier status:

6.1 Non-GBS Carrier (PPROM)

Regimen
PreferredErythromycin ethylsuccinate 400 mg PO q6h OR 800 mg PO q12h for 7-10 days
Alternative—

6.2 GBS Carrier (PPROM)

PhaseDrugDoseDuration
IV phaseAmpicillin2g IV q6h48 hours
PLUS (on admission)Azithromycin1g PO STATSingle dose
Then oral phaseAmoxicillin500mg PO q8h5-7 days (or until delivery, whichever first)
Azithromycin rationale: Covers Ureaplasma spp. — recognised as an important cause of chorioamnionitis in the Malaysian NAG — and Chlamydia trachomatis.
⚠ No amoxicillin-clavulanate for PPROM (consistent with international guidance due to NEC risk).

4. Tocolysis (Section 5.3)

Malaysia CPG permits tocolysis in preterm labour between 24 weeks and 35 weeks 6 days:
"Tocolysis can delay delivery by 48 hours so that it allows the completion of a course of antenatal corticosteroids and in-utero transfer."
Approved tocolytic agents:
AgentRouteNotes
NifedipineOralFirst-line at most hospitals
Atosiban (Tractocile)IVOxytocin receptor antagonist; milder side effects
Terbutaline (Bricanyl)SC 0.25 mg STATPreferred at district hospitals / peripheral clinics for in-utero transfer
Magnesium sulphateIVAlso listed as tocolytic option
Side effects to monitor:
DrugSide Effects
NifedipineMaternal hypotension, dizziness, tachycardia
AtosibanNausea (usually mild)
TerbutalineTachycardia, hypotension, hyperglycaemia, pulmonary oedema
MgSO4Flushing, respiratory depression, cardiac arrest
Contraindications to tocolysis:
  • Antepartum haemorrhage
  • Clinical features of infection (chorioamnionitis)
  • Non-reassuring fetal heart rate

5. Magnesium Sulphate for Fetal Neuroprotection (Section 5.5)

Malaysia CPG Recommendation (Section 5.5.4):
Gestational AgeRecommendation
< 30 weeksRecommended
30 - 33 weeks 6 daysCan be considered
≥ 34 weeksNot routinely recommended
Evidence cited: MgSO4 substantially reduced cerebral palsy (RR 0.68; 95% CI 0.54-0.87) and substantial gross motor dysfunction (RR 0.61; 95% CI 0.44-0.85) in preterm infants.
Standard protocol (consistent with international practice):
  • Loading dose: 4g IV over 20-30 minutes
  • Maintenance: 1-2g/h
  • Monitor: DTRs, respiratory rate, urine output
  • Antidote: Calcium gluconate 1g IV

6. GBS Intrapartum Antibiotic Prophylaxis (IAP) — Malaysia NAG

Indications for IAP (Malaysia NAG Section 5):
  • Previous infant with invasive GBS disease
  • Preterm labour
  • GBS carriage in previous pregnancy
  • PPROM with known GBS carrier
  • GBS carriage in current pregnancy
  • GBS bacteriuria
ScenarioPreferredAlternative
StandardBenzylpenicillin 5 MU IV loading, then 2.5-3 MU IV q4h until deliveryAmpicillin 2g IV then 1g q4h
Mild penicillin allergyCefazolin 2g IV then 1g q8hCefuroxime 1.5g IV then 750mg q8h
Severe penicillin allergyVancomycin 15-20 mg/kg IV q8-12hClindamycin 900mg IV q8h

B. Term PROM Management (≥ 37 Weeks)

From the MOH Guideline on Induction of Labour (KKM):
  • Spontaneous labour commences within 24 hours in 70% of women and within 48 hours in 85% after term PROM
  • IOL (Induction of Labour) is recommended within 24 hours for term PROM
  • IOL method: Oxytocin infusion is preferred (prostaglandins associated with higher chorioamnionitis and neonatal infection risk at term PROM)
  • GBS prophylaxis as per NAG above

C. Chorioamnionitis — Malaysia NAG (Section 4)

Clinical diagnosis: Maternal fever ≥ 38°C with at least one of:
  • Maternal/fetal tachycardia
  • Uterine tenderness
  • Purulent/foul-smelling amniotic fluid
Treatment — Malaysia NAG Chorioamnionitis Regimen:
PreferredAmpicillin + Gentamicin
If C-sectionAdd Metronidazole or Clindamycin
Penicillin allergyClindamycin + Gentamicin
Deliver regardless of gestational age.

Summary Table — Malaysia CPG PPROM Bundle

InterventionMalaysia Recommendation
CorticosteroidsDexamethasone 6 mg IM bd × 2 days (24-35+6 weeks)
Antibiotics (non-GBS)Erythromycin ethylsuccinate 400 mg q6h PO × 7-10 days
Antibiotics (GBS+)Ampicillin 2g IV q6h × 48h + Azithromycin 1g STAT, then Amoxicillin 500 mg q8h PO × 5-7 days
MgSO4 neuroprotectionRecommended <30 weeks; consider 30-33+6 weeks
Tocolysis24-35+6 weeks; terbutaline SC for peripheral transfer
IAP (GBS+)Benzylpenicillin 5 MU IV then 2.5-3 MU q4h until delivery
Term PROM IOLWithin 24 hours; oxytocin preferred
CorticosteroidsAvoid amoxicillin-clavulanate (NEC risk)

Sources:
This is a shared conversation. Sign in to Orris to start your own chat.