PPROM and PROM theory and clinical notes

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Searching PubMed

"premature rupture of membranes" management

Reading File
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File

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;…

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)
This is a shared conversation. Sign in to Orris to start your own chat.