Sepsis in pregnancy and puerperiumlong answer

Reading File
Finding Sources
Finding Sources
Searching PubMed

"sepsis" AND "pregnancy" AND "puerperium"

Finding Sources
Finding Sources
Searching PubMed

"maternal sepsis" AND "pregnancy"

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
I now have comprehensive content. Let me compile the full long-answer response.

Sepsis in Pregnancy and Puerperium


1. Definition

Sepsis is defined as life-threatening organ dysfunction caused by a dysregulated host response to infection. This modern definition (Sepsis-3, 2016) replaced older SIRS-based criteria. In pregnancy, the WHO defines maternal sepsis as a life-threatening condition defined as organ dysfunction resulting from infection during pregnancy, childbirth, post-abortion, or the postpartum period.
Puerperal sepsis is infection of the genital tract within 3 weeks of delivery, classically accompanied by fever, tachycardia, foul-smelling lochia, and lower abdominal pain and tenderness.
Septic shock is defined as a subset of sepsis with profound circulatory, cellular, and metabolic abnormalities, identified clinically as persisting hypotension requiring vasopressors to maintain MAP >/= 65 mmHg, and a serum lactate >2 mmol/L despite adequate fluid resuscitation.

2. Epidemiology

Sepsis is one of the leading direct causes of maternal mortality worldwide. Data vary by region and definition:
RegionPeriodIncidence (severe sepsis/100,000)Mortality (per 100,000)
Netherlands1993-2006211.64
United Kingdom2011-12470.64
United States2013-16496.9
The Global Maternal Sepsis Study (GLOSS, 2017), covering 2,850 patients in 52 countries, found the overall prevalence of severe maternal infection to be 70 per 1,000 live births, with case-fatality rates ranging from 1% to 15% (average 7%). Cases were almost evenly divided between antepartum/intrapartum (47%) and postpartum (53%) onset. The source of infection was identified in 80% of cases - uterine and urinary sources dominated, followed by skin/soft tissue, respiratory, and abortion-related causes.
Septic shock in pregnancy occurs in only 0.002%-0.01% of deliveries and in 0.3%-0.6% of pregnant women overall.
  • Creasy & Resnik's Maternal-Fetal Medicine, p. 1755

3. Risk Factors

Risk factors for sepsis in obstetric patients are stratified by strength of association:

Inconsistent Evidence

  • Obesity
  • Multiple pregnancy (OR 1.0-6.5)
  • Preterm prelabour rupture of membranes (OR 1.0-3.0)
  • Retained products of conception (OR 1.0-4.5)
  • Pregestational diabetes (OR 1.0-3.4)

Modest Risk (OR < 2)

  • Nulliparity
  • African ancestry
  • Age >35 years
  • Low socioeconomic status, living in high-poverty neighbourhood
  • Uninsured or public insurance

Stronger Risk (OR >/= 2)

  • Assisted reproductive technology (OR ~5)
  • Cerclage (OR 3.4-9.8)
  • Caesarean delivery (OR 2.0-8.1)
  • HIV infection (OR 3.2-4.2)
  • Transfusion (OR 10.9)
  • Peripartum hysterectomy (OR 56)
  • Chronic renal disease (OR 33)
  • Chronic liver disease (OR 55)
  • Congestive heart failure (OR 135)
  • Creasy & Resnik's Maternal-Fetal Medicine, Box 71.3, p. 1755

4. Aetiology and Microbiology

The most common predisposing conditions for septic shock in obstetric patients are:
  1. Septic abortion
  2. Acute pyelonephritis (leading cause of septic shock in pregnancy)
  3. Chorioamnionitis
  4. Puerperal endometritis
Fewer than 2% of patients with any of these conditions develop septic shock.

Common organisms:

  • Group A Streptococcus (S. pyogenes) - classically associated with puerperal sepsis; presents with fever, abdominal pain, and hypotension (notably without tachycardia or leukocytosis); incidence 6-80 per 100,000 live births; case-fatality ~3.5%
  • Escherichia coli - most frequent gram-negative; leading cause of bacteremia and pyelonephritis-related sepsis
  • Group B Streptococcus (S. agalactiae) - historically first recognised as a cause of puerperal sepsis
  • Staphylococci, other gram-negatives, and anaerobes are also reported
  • Polymicrobial infection accounts for 15% of maternal sepsis deaths where organisms are identified
  • In 16% of cases in large series, neither the organism nor source was identified
Organisms reach the genital tract via:
  • Ascending vaginal flora (commonest route)
  • Exogenous infection during vaginal examination or delivery
  • Haematogenous spread from a distant focus
  • Nosocomial transmission (e.g., from healthcare workers carrying GAS)
  • Creasy & Resnik's Maternal-Fetal Medicine, p. 1755; Goldman-Cecil Medicine, p. 244

5. Pathophysiology

Sepsis is neither bacteremia nor infection per se - it is organ dysfunction caused by a dysregulated host response to infection. Virtually any organ can be affected:
SystemManifestation
CNSAltered mental status
CardiovascularHypotension, myocardial dysfunction, circulatory collapse
LungsARDS
GI tractParalytic ileus
LiverHepatic failure, abnormal transaminases
KidneysOliguria, acute renal failure
HaematologicThrombocytopenia, DIC
EndocrineAbnormal glucose handling, adrenal dysfunction
A successful host response to infection must balance pro-inflammatory and anti-inflammatory limbs to clear pathogens without destroying host tissues. When this balance fails, the result is the systemic inflammatory response characteristic of sepsis.

Pregnancy-specific considerations:

Normal pregnancy is already a state of expanded plasma volume, increased cardiac output, and peripheral vasodilation - the hyperdynamic picture of sepsis overlaps with normal pregnancy physiology. This creates diagnostic challenges because:
  • Tachycardia is common in normal labour
  • Leukocytosis is normal in pregnancy and early puerperium
  • Respiratory rate increases physiologically
  • Blood pressure may be physiologically lower
  • PaCO2 is lower in normal pregnancy
This overlap means obstetricians may underreact to early sepsis signals or over-diagnose SIRS.
  • Creasy & Resnik's Maternal-Fetal Medicine, p. 1755-1756

6. Clinical Features

General

  • Fever (may be absent - especially GAS sepsis)
  • Rigors, chills
  • Tachycardia
  • Hypotension
  • Tachypnoea
  • Altered mentation

Specific to Puerperal Sepsis

  • Foul-smelling lochia
  • Uterine tenderness and subinvolution
  • Lower abdominal pain
  • Wound infection after caesarean section
  • Breast tenderness (if mastitis is source)

GAS Puerperal Sepsis (classical)

  • Fever, abdominal pain, hypotension WITHOUT tachycardia or leukocytosis
  • Rapid deterioration
  • Higher mortality when infection occurs within 4 days of delivery or in late third trimester

Sources of Infection

  • Uterine/genital tract (endometritis, chorioamnionitis, retained products)
  • Urinary tract (pyelonephritis - leading cause of septic shock in pregnancy)
  • Respiratory tract (pneumonia, especially influenza)
  • Skin and soft tissue (wound infection, necrotizing fasciitis)
  • Breast (mastitis, breast abscess)
  • Intra-abdominal (appendicitis, bowel perforation)

7. Diagnosis and Scoring

Standard Sepsis-3 Definitions (2016)

The Sepsis-3 definitions use:
  • qSOFA (quick SOFA): 2 or more of: altered mentation, respiratory rate >/=22/min, systolic BP </=100 mmHg
  • SOFA score (for ICU): an increase of 2 or more from baseline

Problem in Pregnancy:

Standard qSOFA and SIRS criteria were not derived in pregnant populations. Physiologic pregnancy overlaps with sepsis cutoffs for:
  • Respiratory rate
  • Heart rate
  • PaCO2
  • White cell count

Obstetrically Modified Scores (SOMANZ Guidelines 2017)

omqSOFA (Obstetrically Modified qSOFA) - consider sepsis when 2 or more present:
ParameterScore 0Score 1
Systolic BP>90 mmHg<90 mmHg
Respiratory rate<25/min>25/min
Altered mental statusAlertNot alert
Obstetrically Modified SOFA:
SystemScore 0Score 1Score 2
Respiratory (PaO2/FiO2)>400300-399<300
Coagulation (platelets)>150,000/μL100-150<100
Hepatic (bilirubin)<1.2 mg/dL1.2-1.9 mg/dL>1.9 mg/dL
Cardiovascular (MAP mmHg)>70<70Vasopressors required
CNSAlertRousable to voiceRousable to pain
Renal (creatinine)<1.0 mg/dL1.0-1.4 mg/dL>1.4 mg/dL

Investigations

  • Blood cultures (x2 sets, from different sites) - before antibiotics
  • Full blood count (WBC, differential, platelets)
  • CRP, procalcitonin
  • Serum lactate (>2 mmol/L = hypoperfusion; >4 mmol/L = severe)
  • LFTs, renal function, coagulation screen
  • Urinalysis and urine culture
  • High vaginal swab, cervical/endometrial swabs
  • Chest X-ray, wound swabs as indicated
  • Imaging (ultrasound, CT) to identify source
  • Creasy & Resnik's Maternal-Fetal Medicine, p. 1756-1757

8. Management

Management follows the Surviving Sepsis Campaign (SSC) Bundle (last updated 2021), adapted for pregnancy.

"Hour-1 Bundle"

ActionDetail
Measure serum lactateRepeat if >2 mmol/L
Obtain blood culturesBefore antibiotics
Administer broad-spectrum antibioticsWithin 1 hour of recognition
Rapid IV fluid administration30 mL/kg crystalloid if hypotensive or lactate >4 mmol/L (use cautiously in pregnancy)
VasopressorsIf hypotension persists after fluid; target MAP >65 mmHg (may be lower in young pregnant women)

A - Airway and Breathing

  • Supplemental oxygen to maintain SpO2 >94%
  • Mechanical ventilation if ARDS develops (lung-protective strategy: tidal volume 6 mL/kg ideal body weight)
  • ARDS in pregnancy: bilateral opacities on CXR/CT, acute onset within 1 week of insult, not explained by fluid overload (Berlin criteria)

B - Antibiotics (empiric, broad-spectrum within 1 hour)

Choice depends on suspected source:
  • Genital/uterine source (endometritis, chorioamnionitis): IV ampicillin + gentamicin + metronidazole (or piperacillin-tazobactam)
  • Urinary source (pyelonephritis): IV ceftriaxone or gentamicin
  • Unknown source: piperacillin-tazobactam or meropenem +/- vancomycin if MRSA suspected
  • GAS sepsis: IV penicillin G (drug of choice) + clindamycin (to inhibit toxin production)
  • Narrow spectrum once sensitivities are known

C - Circulatory Support

Fluid resuscitation:
  • SSC recommends 30 mL/kg isotonic crystalloid (normal saline or Ringer's lactate) in first 3 hours
  • Caution in pregnancy: lower colloid oncotic pressure, higher risk of pulmonary oedema
  • Assess fluid responsiveness - IVC diameter <1.5 cm predicts fluid responsiveness; >2.5 cm suggests the patient is fully loaded
  • Point-of-care ultrasound to guide resuscitation
  • Passive leg raising (45 degrees): quick, reversible test of fluid responsiveness
  • Only ~50% of hypotensive septic patients are fluid responders
Vasopressors:
  • Norepinephrine is first-line (SSC guideline); has been studied in pregnancy and appears safe
  • Target MAP: generally >/=65 mmHg, but may be appropriately lower in young, previously healthy pregnant women
  • Add vasopressin if norepinephrine dose is high
  • Avoid dopamine (increased risk of arrhythmia)

D - Source Control

  • Identify and eliminate focus of infection within 6-12 hours of resuscitation, or "as soon as possible"
  • Retained products of conception - curettage
  • Abscess - percutaneous or surgical drainage (prefer least invasive)
  • Necrotizing fasciitis - prompt, extensive surgical debridement (exception to least-invasive rule)
  • Many obstetric sepsis foci are uterine and easily accessible to source control
  • Source control has been demonstrated to reduce mortality in sepsis

E - Endocrine / Supportive

  • Corticosteroids: Consider hydrocortisone 200 mg/day IV if septic shock persists despite adequate fluids and vasopressors (relative adrenal insufficiency)
  • Blood glucose control: Target 140-180 mg/dL (7.8-10.0 mmol/L); avoid hypoglycaemia
  • DVT prophylaxis: Low molecular weight heparin
  • Stress ulcer prophylaxis: Proton pump inhibitor
  • Packed red cells: Transfuse if Hb <7 g/dL (unless haemodynamically unstable or cardiac ischaemia)
  • Activated protein C: No longer recommended (PROWESS-SHOCK trial showed no benefit)

F - Fetal Considerations

  • Fetal monitoring: Continuous CTG during acute sepsis (fetal tachycardia is often first sign of maternal fever/sepsis)
  • Intrauterine fetal death may occur with severe sepsis
  • Maternal stabilisation takes priority over delivery; delivery does not always improve maternal sepsis unless the uterus is the source and cannot be otherwise controlled
  • If chorioamnionitis at term - expedite delivery (vaginal preferred if no contraindications)
  • Antibiotics that are safe in pregnancy: Penicillins, cephalosporins, clindamycin; avoid tetracyclines, chloramphenicol; use aminoglycosides only when necessary with monitoring
  • Neonatal sepsis screening if maternal GBS or GAS sepsis
  • Creasy & Resnik's Maternal-Fetal Medicine, p. 1756-1758

9. Specific Clinical Entities

Chorioamnionitis

  • Infection of the amniotic fluid, membranes, placenta, and/or decidua
  • Predisposes to neonatal sepsis (highest risk factor compared to other obstetric risk factors)
  • Risk factors: prolonged rupture of membranes, multiple vaginal examinations, prolonged labour
  • Management: IV ampicillin + gentamicin intrapartum; one additional IV dose post-delivery to reduce endometritis risk

Puerperal Endometritis

  • Most common source of postpartum sepsis
  • More common after caesarean section
  • Organisms: polymicrobial (GAS, E. coli, anaerobes, GBS)
  • Treatment: IV clindamycin + gentamicin (standard regimen)

Pyelonephritis

  • Leading cause of septic shock in pregnancy
  • Often preceded by asymptomatic bacteriuria (present in 2-7% of pregnant women)
  • If asymptomatic bacteriuria is untreated, up to 25% progress to pyelonephritis
  • Organism: usually E. coli
  • Treatment: IV ceftriaxone or gentamicin, converted to oral when apyrexial 48 hours

GAS (Streptococcal) Puerperal Sepsis

  • Incidence 6-80 per 100,000 live births; case-fatality ~3.5%
  • Can be nosocomial (from healthcare workers) or community-acquired (young children in household with pharyngitis)
  • Caesarean section recipients (who receive prophylactic antibiotics) and primiparas are at lower risk
  • Characteristically: fever, abdominal pain, hypotension WITHOUT tachycardia/leukocytosis
  • May progress to toxic shock syndrome and necrotizing fasciitis

Necrotizing Fasciitis

  • Rapidly spreading infection of deep subcutaneous tissue and fascia
  • Characterised by rapidly spreading gangrene of skin and underlying structures
  • Clinical clue: pain out of proportion to the injury
  • Unexplained tachycardia, marked left shift, elevated CK
  • Imaging (CT/MRI) shows deep tissue swelling but often no frank gas/abscess early
  • Treatment: emergency surgical debridement + IV antibiotics (penicillin + clindamycin +/- gentamicin)

10. Complications

ComplicationNotes
Septic shockHypotension unresponsive to fluid; vasopressors required
ARDSBilateral pulmonary infiltrates, hypoxaemia; mechanical ventilation needed
Acute kidney injuryOliguria, rising creatinine
DICCoagulopathy, haemorrhage
Multi-organ failureHepatic, renal, cardiac, CNS
Maternal deathGAS sepsis is a leading cause in developed nations
Intrauterine fetal death
Preterm labourInflammatory mediators stimulate uterine contractions
ARDS in pregnancy: rate in the US rose from 37.5 per 100,000 live births in 2006 to 59.6 in 2012. Among women with H1N1 influenza, ARDS was nearly twice as common as in non-pregnant women (9.7% vs 5.4%).

11. Prevention

  • Strict asepsis during labour and delivery - hand hygiene, sterile gloves
  • Prophylactic antibiotics at caesarean section (reduces wound infection and endometritis)
  • GBS screening at 35-37 weeks; intrapartum IV penicillin prophylaxis if GBS positive or risk factors
  • Prompt treatment of UTI and asymptomatic bacteriuria in antenatal care
  • Vaccination (influenza, COVID-19) to prevent respiratory sources
  • Minimise number of vaginal examinations, avoid unnecessary interventions
  • Surveillance and education of healthcare workers for GAS carriage
  • Early recognition protocols, sepsis bundles, and MDT management
  • Domiciliary midwifery: particular attention to asepsis before and after delivery

12. Prognosis

  • Overall case-fatality in maternal sepsis: 1-15% (average 7%)
  • GAS puerperal sepsis: case-fatality ~3.5%
  • Maternal mortality highest when GAS infection begins within 4 days of delivery or late third trimester
  • Survivors may have long-term morbidity (quality of life affected): only 20% of adult sepsis survivors are discharged directly home; 35% go to skilled nursing facility; 12% require additional home care
  • Prompt antibiotic therapy within 1 hour and early source control are the most important determinants of outcome

Summary

Sepsis in pregnancy and the puerperium is a serious condition with significant maternal and fetal morbidity and mortality. The physiologic changes of pregnancy make diagnosis challenging because they overlap with SIRS criteria. Clinicians must maintain a high index of suspicion, use obstetric-modified scoring tools (omqSOFA, omSOFA), initiate broad-spectrum antibiotics within 1 hour, perform aggressive fluid resuscitation (with caution in pregnancy), use norepinephrine as first-line vasopressor, and achieve early source control. Common sources are uterine (endometritis, chorioamnionitis), urinary (pyelonephritis), and respiratory. Group A streptococcus and E. coli are the most clinically important organisms. Management follows the Surviving Sepsis Campaign bundle, adapted for the pregnant patient.
Recent evidence note: A 2025 systematic review and meta-analysis (PMID: 40056980) examined the global incidence of maternal sepsis - clinicians should consult this for updated global burden estimates, as data presented here largely predate this publication.

Generate a quick reference PDF for sepsis bundles in pregnancy

Reading File
Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || echo "workspace does not exist yet"

Running Command

mkdir -p /tmp/workspace/sepsis-pregnancy-pdf

Writing File

~/sepsis-pregnancy-pdf/generate_pdf.py

from reportlab.platypus import (
    SimpleDocTemplate, Table, TableStyle, Paragraph,
    Spacer, HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib import colors
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import cm, mm
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import PageBreak

OUTPUT = "/tmp/workspace/sepsis-pregnancy-pdf/Sepsis_Bundles_Pregnancy_Quick_Reference.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
RED_DARK   = colors.HexColor("#C0392B")
RED_LIGHT  = colors.HexColor("#FADBD8")
BLUE_DARK  = colors.HexColor("#1A5276")
BLUE_MED   = colors.HexColor("#2E86C1")
BLUE_LIGHT = colors.HexColor("#D6EAF8")
TEAL       = colors.HexColor("#148F77")
TEAL_LIGHT = colors.HexColor("#D1F2EB")
ORANGE     = colors.HexColor("#D35400")
ORANGE_LT  = colors.HexColor("#FAE5D3")
GREY_DARK  = colors.HexColor("#2C3E50")
GREY_LIGHT = colors.HexColor("#F2F3F4")
WHITE      = colors.white
YELLOW_LT  = colors.HexColor("#FEF9E7")

# ── Page setup ───────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=1.5*cm, leftMargin=1.5*cm,
    topMargin=1.8*cm,  bottomMargin=1.8*cm,
    title="Sepsis Bundles in Pregnancy – Quick Reference",
    author="Orris Medical AI",
)

W, H = A4
CONTENT_W = W - 3*cm

styles = getSampleStyleSheet()

# Custom styles
def S(name, **kw):
    return ParagraphStyle(name, **kw)

style_title = S("Title2",
    fontSize=20, leading=24, textColor=WHITE,
    fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=0)

style_subtitle = S("Subtitle2",
    fontSize=10, leading=13, textColor=colors.HexColor("#D6EAF8"),
    fontName="Helvetica", alignment=TA_CENTER, spaceAfter=0)

style_section = S("Section",
    fontSize=11, leading=14, textColor=WHITE,
    fontName="Helvetica-Bold", alignment=TA_LEFT,
    spaceBefore=4, spaceAfter=2)

style_body = S("Body2",
    fontSize=8.5, leading=11.5, textColor=GREY_DARK,
    fontName="Helvetica", alignment=TA_LEFT,
    spaceBefore=1, spaceAfter=1)

style_body_bold = S("BodyBold",
    fontSize=8.5, leading=11.5, textColor=GREY_DARK,
    fontName="Helvetica-Bold", alignment=TA_LEFT)

style_bullet = S("Bullet",
    fontSize=8.5, leading=12, textColor=GREY_DARK,
    fontName="Helvetica", leftIndent=10, bulletIndent=0,
    spaceBefore=1, spaceAfter=1)

style_small = S("Small",
    fontSize=7, leading=10, textColor=colors.HexColor("#7F8C8D"),
    fontName="Helvetica-Oblique", alignment=TA_CENTER)

style_warn = S("Warn",
    fontSize=8, leading=11, textColor=colors.HexColor("#7B241C"),
    fontName="Helvetica-Bold", alignment=TA_CENTER)

style_cell_hdr = S("CellHdr",
    fontSize=8.5, leading=11, textColor=WHITE,
    fontName="Helvetica-Bold", alignment=TA_CENTER)

style_cell = S("Cell",
    fontSize=8, leading=11, textColor=GREY_DARK,
    fontName="Helvetica", alignment=TA_LEFT)

style_cell_bold = S("CellBold",
    fontSize=8, leading=11, textColor=GREY_DARK,
    fontName="Helvetica-Bold", alignment=TA_LEFT)

style_note = S("Note",
    fontSize=7.5, leading=10.5, textColor=colors.HexColor("#6E2F1A"),
    fontName="Helvetica-Oblique", alignment=TA_LEFT)

# ── Helper: section header bar ───────────────────────────────────────────────
def section_header(text, bg=BLUE_DARK, icon=""):
    full = f"{icon}  {text}" if icon else text
    data = [[Paragraph(full, style_section)]]
    t = Table(data, colWidths=[CONTENT_W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("TOPPADDING",    (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("RIGHTPADDING",  (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [4,4,4,4]),
    ]))
    return t

def B(text):
    return f"<b>{text}</b>"

def bullet_para(text, style=style_bullet):
    return Paragraph(f"• {text}", style)

def note_box(text):
    data = [[Paragraph(text, style_note)]]
    t = Table(data, colWidths=[CONTENT_W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), ORANGE_LT),
        ("BOX",        (0,0), (-1,-1), 0.5, ORANGE),
        ("TOPPADDING",    (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("RIGHTPADDING",  (0,0), (-1,-1), 8),
    ]))
    return t

# ── Build elements list ───────────────────────────────────────────────────────
elems = []

# ═══════════════════════════════════════════════════════════════════════════════
# HEADER BANNER
# ═══════════════════════════════════════════════════════════════════════════════
header_data = [[
    Paragraph("SEPSIS IN PREGNANCY &amp; PUERPERIUM", style_title),
    Paragraph("Quick Reference Card  |  Based on Surviving Sepsis Campaign 2021 &amp; SOMANZ Guidelines", style_subtitle),
]]
header_table = Table([[
    Paragraph("SEPSIS IN PREGNANCY &amp; PUERPERIUM", style_title),
], [
    Paragraph("Quick Reference Card  •  Surviving Sepsis Campaign 2021 (SSC) &amp; SOMANZ Guidelines 2017", style_subtitle),
]], colWidths=[CONTENT_W])
header_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), BLUE_DARK),
    ("TOPPADDING",    (0,0), (-1,-1), 12),
    ("BOTTOMPADDING", (0,0), (-1,-1), 12),
    ("LEFTPADDING",   (0,0), (-1,-1), 10),
    ("RIGHTPADDING",  (0,0), (-1,-1), 10),
]))
elems.append(header_table)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# DEFINITIONS ROW
# ═══════════════════════════════════════════════════════════════════════════════
elems.append(section_header("DEFINITIONS", bg=BLUE_DARK, icon="📋"))
elems.append(Spacer(1, 3))

def_data = [
    [
        Paragraph(B("Maternal Sepsis"), style_cell_bold),
        Paragraph("Life-threatening organ dysfunction from infection during pregnancy, childbirth, post-abortion, or postpartum period (WHO 2017 / Sepsis-3)", style_cell),
    ],
    [
        Paragraph(B("Puerperal Sepsis"), style_cell_bold),
        Paragraph("Infection of the genital tract within <b>3 weeks</b> of delivery with fever, tachycardia, foul-smelling lochia, lower abdominal pain/tenderness", style_cell),
    ],
    [
        Paragraph(B("Septic Shock"), style_cell_bold),
        Paragraph("Sepsis + persisting hypotension requiring vasopressors to maintain MAP ≥65 mmHg AND serum lactate >2 mmol/L despite adequate fluid resuscitation", style_cell),
    ],
]
def_table = Table(def_data, colWidths=[3.5*cm, CONTENT_W - 3.5*cm])
def_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), BLUE_LIGHT),
    ("BACKGROUND", (0,0), (0,-1), colors.HexColor("#A9CCE3")),
    ("GRID",       (0,0), (-1,-1), 0.5, colors.HexColor("#AED6F1")),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 7),
    ("RIGHTPADDING",  (0,0), (-1,-1), 7),
    ("VALIGN",     (0,0), (-1,-1), "MIDDLE"),
]))
elems.append(def_table)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# SCORING: omqSOFA + omSOFA side by side
# ═══════════════════════════════════════════════════════════════════════════════
elems.append(section_header("OBSTETRIC SCREENING SCORES (SOMANZ 2017)", bg=TEAL, icon="📊"))
elems.append(Spacer(1, 3))

COL_HALF = (CONTENT_W - 4) / 2

# omqSOFA
qsofa_data = [
    [Paragraph("omqSOFA  —  SCREEN (≥2 = consider sepsis)", style_cell_hdr)],
    [Paragraph(B("Parameter")+"     |     "+B("Normal")+"     |     "+B("Abnormal (score 1)"), style_cell_bold)],
    [Paragraph("Systolic BP          |  >90 mmHg  |  <b>&lt;90 mmHg</b>", style_cell)],
    [Paragraph("Respiratory rate   |  &lt;25/min   |  <b>&gt;25/min</b>", style_cell)],
    [Paragraph("Mental status       |  Alert         |  <b>Not alert</b>", style_cell)],
    [Paragraph("<i>Note: Higher RR &amp; lower SBP thresholds than standard qSOFA to account for normal pregnancy physiology</i>", style_note)],
]
qsofa_t = Table(qsofa_data, colWidths=[COL_HALF])
qsofa_t.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (0,0), TEAL),
    ("BACKGROUND", (0,1), (0,1), TEAL_LIGHT),
    ("BACKGROUND", (0,2), (0,4), WHITE),
    ("BACKGROUND", (0,5), (0,5), YELLOW_LT),
    ("BOX",        (0,0), (-1,-1), 0.8, TEAL),
    ("LINEBELOW",  (0,0), (-1,-2), 0.3, colors.HexColor("#A2D9CE")),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 7),
]))

# omSOFA
sofa_data = [
    [Paragraph("omSOFA  —  ICU (increase ≥2 = sepsis)", style_cell_hdr)],
    [Paragraph(B("System")+"  |  "+B("Score 0")+"  |  "+B("Score 1")+"  |  "+B("Score 2"), style_cell_bold)],
    [Paragraph("Resp (PaO₂/FiO₂)  |  >400  |  300-399  |  <b>&lt;300</b>", style_cell)],
    [Paragraph("Platelets (×10³)      |  >150   |  100-150  |  <b>&lt;100</b>", style_cell)],
    [Paragraph("Bilirubin (mg/dL)   |  &lt;1.2   |  1.2-1.9  |  <b>&gt;1.9</b>", style_cell)],
    [Paragraph("MAP (mmHg)           |  >70    |   &lt;70     |  <b>Vasopressors</b>", style_cell)],
    [Paragraph("CNS                       |  Alert  |  Voice    |  <b>Pain</b>", style_cell)],
    [Paragraph("Creatinine (mg/dL) |  &lt;1.0   |  1.0-1.4  |  <b>&gt;1.4</b>", style_cell)],
]
sofa_t = Table(sofa_data, colWidths=[COL_HALF])
sofa_t.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (0,0), TEAL),
    ("BACKGROUND", (0,1), (0,1), TEAL_LIGHT),
    ("BACKGROUND", (0,2), (0,7), WHITE),
    ("BOX",        (0,0), (-1,-1), 0.8, TEAL),
    ("LINEBELOW",  (0,0), (-1,-2), 0.3, colors.HexColor("#A2D9CE")),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 7),
]))

score_row = Table([[qsofa_t, Spacer(4,1), sofa_t]],
                  colWidths=[COL_HALF, 4, COL_HALF])
score_row.setStyle(TableStyle([
    ("VALIGN", (0,0), (-1,-1), "TOP"),
    ("TOPPADDING", (0,0), (-1,-1), 0),
    ("LEFTPADDING", (0,0), (-1,-1), 0),
    ("RIGHTPADDING", (0,0), (-1,-1), 0),
]))
elems.append(score_row)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# HOUR-1 BUNDLE
# ═══════════════════════════════════════════════════════════════════════════════
elems.append(section_header("HOUR-1 BUNDLE  (start immediately on recognition)", bg=RED_DARK, icon="⏱"))
elems.append(Spacer(1, 3))

h1_data = [
    [Paragraph("STEP", style_cell_hdr), Paragraph("ACTION", style_cell_hdr), Paragraph("PREGNANCY NOTES", style_cell_hdr)],
    [
        Paragraph(B("1. Cultures"), style_cell_bold),
        Paragraph("Blood cultures ×2 sets before antibiotics; urine MC&amp;S; HVS/wound swabs as indicated", style_cell),
        Paragraph("Do NOT delay antibiotics &gt;45 min for culture collection", style_note),
    ],
    [
        Paragraph(B("2. Lactate"), style_cell_bold),
        Paragraph("Serum lactate STAT\n• &gt;2 mmol/L = hypoperfusion\n• &gt;4 mmol/L = high risk; remeasure at 2 h", style_cell),
        Paragraph("Lactate not affected by pregnancy; use standard thresholds", style_note),
    ],
    [
        Paragraph(B("3. Antibiotics"), style_cell_bold),
        Paragraph("Broad-spectrum IV within <b>1 hour</b> of recognition\n(see Antibiotic Guide below)", style_cell),
        Paragraph("Choose agents safe in pregnancy; narrow once sensitivities known", style_note),
    ],
    [
        Paragraph(B("4. Fluids"), style_cell_bold),
        Paragraph("30 mL/kg IV balanced crystalloid (Ringer's Lactate preferred) if:\n• Hypotension (SBP &lt;90) OR\n• Lactate ≥4 mmol/L", style_cell),
        Paragraph("⚠ Cautious in pregnancy: lower colloid oncotic pressure → higher pulmonary oedema risk. Assess fluid responsiveness. Consider passive leg raise test.", style_note),
    ],
    [
        Paragraph(B("5. Vasopressors"), style_cell_bold),
        Paragraph("Start if MAP &lt;65 despite fluids\n<b>1st line: Norepinephrine</b>\n2nd line: Vasopressin (if NE dose high)\nAvoid dopamine", style_cell),
        Paragraph("Norepinephrine studied in pregnancy and appears safe. Target MAP may be lower in young healthy gravidas.", style_note),
    ],
    [
        Paragraph(B("6. Source control"), style_cell_bold),
        Paragraph("Identify focus within 6–12 h:\n• Retained POC → curettage\n• Abscess → percutaneous drainage\n• Necrotising fasciitis → urgent debridement", style_cell),
        Paragraph("Most obstetric sepsis foci are uterine and easily accessible. Delivery ≠ automatic source control unless uterus is source.", style_note),
    ],
]

h1_col_w = [2.8*cm, CONTENT_W*0.48, CONTENT_W*0.35]
h1_table = Table(h1_data, colWidths=h1_col_w, repeatRows=1)
h1_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), RED_DARK),
    ("BACKGROUND", (0,1), (-1,1), RED_LIGHT),
    ("BACKGROUND", (0,2), (-1,2), WHITE),
    ("BACKGROUND", (0,3), (-1,3), RED_LIGHT),
    ("BACKGROUND", (0,4), (-1,4), WHITE),
    ("BACKGROUND", (0,5), (-1,5), RED_LIGHT),
    ("BACKGROUND", (0,6), (-1,6), WHITE),
    ("GRID",       (0,0), (-1,-1), 0.4, colors.HexColor("#F1948A")),
    ("VALIGN",     (0,0), (-1,-1), "TOP"),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 6),
    ("RIGHTPADDING",  (0,0), (-1,-1), 6),
    ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
]))
elems.append(h1_table)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# ANTIBIOTIC GUIDE
# ═══════════════════════════════════════════════════════════════════════════════
elems.append(section_header("EMPIRIC ANTIBIOTIC GUIDE (IV, narrow when cultures return)", bg=BLUE_MED, icon="💊"))
elems.append(Spacer(1, 3))

abx_data = [
    [
        Paragraph("SOURCE", style_cell_hdr),
        Paragraph("FIRST-LINE REGIMEN", style_cell_hdr),
        Paragraph("ALTERNATIVE", style_cell_hdr),
        Paragraph("SAFETY", style_cell_hdr),
    ],
    [
        Paragraph(B("Uterine / Genital\n(endometritis, chorioamnionitis)"), style_cell_bold),
        Paragraph("Ampicillin 2g q6h IV\n+ Gentamicin 5mg/kg/day IV\n+ Metronidazole 500mg q8h IV", style_cell),
        Paragraph("Pip-Tazo 4.5g q8h IV", style_cell),
        Paragraph("Penicillins: safe\nGentamicin: use with TDM; avoid prolonged use\nMetronidazole: safe (avoid 1st trimester if possible)", style_note),
    ],
    [
        Paragraph(B("Urinary tract\n(pyelonephritis)"), style_cell_bold),
        Paragraph("Ceftriaxone 2g od IV", style_cell),
        Paragraph("Gentamicin 5mg/kg/day IV\nPip-Tazo if resistant", style_cell),
        Paragraph("Cephalosporins: safe in all trimesters", style_note),
    ],
    [
        Paragraph(B("Unknown source\n(sepsis of unknown origin)"), style_cell_bold),
        Paragraph("Pip-Tazo 4.5g q6h IV\n± Vancomycin if MRSA suspected", style_cell),
        Paragraph("Meropenem 1g q8h if\nmulti-resistant suspected", style_cell),
        Paragraph("Carbapenems: use only if necessary; considered safe", style_note),
    ],
    [
        Paragraph(B("Group A Strep (GAS)\npuerperal sepsis"), style_cell_bold),
        Paragraph("Benzylpenicillin 2.4g q4h IV\n+ Clindamycin 900mg q8h IV\n(toxin suppression)", style_cell),
        Paragraph("Ampicillin + Clindamycin", style_cell),
        Paragraph("Penicillin + Clindamycin: safe\nAvoid chloramphenicol, tetracyclines", style_note),
    ],
    [
        Paragraph(B("Necrotising fasciitis"), style_cell_bold),
        Paragraph("Pip-Tazo 4.5g q6h IV\n+ Clindamycin 900mg q8h IV\n+ Gentamicin\n→ URGENT surgical debridement", style_cell),
        Paragraph("Meropenem + Clindamycin", style_cell),
        Paragraph("Surgical debridement is mandatory; antibiotics alone insufficient", style_note),
    ],
]
abx_col_w = [3.2*cm, CONTENT_W*0.33, CONTENT_W*0.25, CONTENT_W*0.27]
abx_table = Table(abx_data, colWidths=abx_col_w, repeatRows=1)
abx_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), BLUE_MED),
    ("BACKGROUND", (0,1), (0,-1), colors.HexColor("#D6EAF8")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#EBF5FB"), WHITE]),
    ("GRID",       (0,0), (-1,-1), 0.4, colors.HexColor("#AED6F1")),
    ("VALIGN",     (0,0), (-1,-1), "TOP"),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 6),
    ("RIGHTPADDING",  (0,0), (-1,-1), 6),
]))
elems.append(abx_table)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# RISK FACTORS  |  COMMON ORGANISMS side by side
# ═══════════════════════════════════════════════════════════════════════════════
COL3 = (CONTENT_W - 6) / 2

# Risk Factors
rf_hdr = Table([[Paragraph("RISK FACTORS", style_section)]],
               colWidths=[COL3])
rf_hdr.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,-1), ORANGE),
    ("TOPPADDING", (0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),8),
]))

rf_content = [
    Paragraph(B("Stronger Risk (OR ≥2):"), style_cell_bold),
    bullet_para("Caesarean section (OR 2–8)"),
    bullet_para("Cerclage (OR 3.4–9.8)"),
    bullet_para("Assisted reproductive technology (~OR 5)"),
    bullet_para("HIV infection (OR 3.2–4.2)"),
    bullet_para("Transfusion (OR 10.9)"),
    bullet_para("Peripartum hysterectomy (OR 56)"),
    bullet_para("Chronic renal disease (OR 33)"),
    bullet_para("Chronic liver disease (OR 55)"),
    bullet_para("Congestive heart failure (OR 135)"),
    Spacer(1,3),
    Paragraph(B("Moderate Risk:"), style_cell_bold),
    bullet_para("Retained products of conception"),
    bullet_para("Preterm prelabour ROM"),
    bullet_para("Multiple pregnancy"),
    bullet_para("Nulliparity, Age >35, African ancestry"),
    bullet_para("Pregestational diabetes"),
]
rf_body = Table([[p] for p in rf_content], colWidths=[COL3])
rf_body.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), ORANGE_LT),
    ("TOPPADDING",    (0,0),(-1,-1),2),
    ("BOTTOMPADDING", (0,0),(-1,-1),2),
    ("LEFTPADDING",   (0,0),(-1,-1),6),
    ("RIGHTPADDING",  (0,0),(-1,-1),6),
    ("BOX", (0,0),(-1,-1), 0.5, ORANGE),
]))

# Common Organisms
org_hdr = Table([[Paragraph("COMMON ORGANISMS", style_section)]],
                colWidths=[COL3])
org_hdr.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), colors.HexColor("#6C3483")),
    ("TOPPADDING", (0,0),(-1,-1),5), ("BOTTOMPADDING",(0,0),(-1,-1),5),
    ("LEFTPADDING",(0,0),(-1,-1),8),
]))

ORG_BG = colors.HexColor("#E8DAEF")
ORG_BORDER = colors.HexColor("#9B59B6")
org_content = [
    Paragraph(B("Most Common:"), style_cell_bold),
    bullet_para("E. coli — UTI/pyelonephritis, bacteraemia"),
    bullet_para("Group A Streptococcus (S. pyogenes) — puerperal sepsis, toxic shock"),
    bullet_para("Group B Streptococcus (S. agalactiae) — historic first cause"),
    Spacer(1,3),
    Paragraph(B("Also important:"), style_cell_bold),
    bullet_para("Staphylococcus aureus (incl. MRSA) — wound/skin"),
    bullet_para("Anaerobes — polymicrobial endometritis"),
    bullet_para("Klebsiella, Proteus — urinary"),
    bullet_para("Clostridium perfringens — post-abortion"),
    Spacer(1,3),
    Paragraph(B("Special features:"), style_cell_bold),
    bullet_para("Blood cultures negative in ~2/3 of sepsis cases"),
    bullet_para("No organism identified in ~16% of maternal sepsis"),
    bullet_para("Polymicrobial in 15% of fatal cases"),
    Paragraph("<i>GAS: presents WITHOUT tachycardia or leukocytosis — do not be falsely reassured</i>", style_note),
]
org_body = Table([[p] for p in org_content], colWidths=[COL3])
org_body.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), ORG_BG),
    ("TOPPADDING",    (0,0),(-1,-1),2),
    ("BOTTOMPADDING", (0,0),(-1,-1),2),
    ("LEFTPADDING",   (0,0),(-1,-1),6),
    ("RIGHTPADDING",  (0,0),(-1,-1),6),
    ("BOX", (0,0),(-1,-1), 0.5, ORG_BORDER),
]))

two_col = Table(
    [[rf_hdr,  Spacer(6,1), org_hdr],
     [rf_body, Spacer(6,1), org_body]],
    colWidths=[COL3, 6, COL3]
)
two_col.setStyle(TableStyle([
    ("VALIGN", (0,0),(-1,-1), "TOP"),
    ("TOPPADDING",    (0,0),(-1,-1),0),
    ("BOTTOMPADDING", (0,0),(-1,-1),0),
    ("LEFTPADDING",   (0,0),(-1,-1),0),
    ("RIGHTPADDING",  (0,0),(-1,-1),0),
]))
elems.append(two_col)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# FLUID RESUSCITATION & VASOPRESSORS
# ═══════════════════════════════════════════════════════════════════════════════
elems.append(section_header("HAEMODYNAMIC MANAGEMENT", bg=colors.HexColor("#117A65"), icon="🩺"))
elems.append(Spacer(1,3))

hd_data = [
    [
        Paragraph(B("Fluid responsiveness assessment:"), style_cell_bold),
        Paragraph("• Passive leg raise 45° for 2–3 min → improved HR/BP = fluid responder (easy, reversible)\n"
                  "• POCUS: IVC &lt;1.5 cm collapsibility = fluid responsive; IVC &gt;2.5 cm = avoid loading\n"
                  "• Only ~50% of hypotensive septic patients are fluid responders\n"
                  "• ⚠ Supine IVC compressed by gravid uterus — ensure LEFT LATERAL TILT when assessing", style_cell),
    ],
    [
        Paragraph(B("Vasopressors:"), style_cell_bold),
        Paragraph("• 1st line: <b>Norepinephrine</b> — start if MAP &lt;65 despite 30 mL/kg fluid\n"
                  "• 2nd line: <b>Vasopressin</b> 0.03 u/min — add if NE dose escalating\n"
                  "• 3rd line: <b>Epinephrine</b> — severe refractory shock\n"
                  "• Avoid <b>dopamine</b> (higher arrhythmia risk)\n"
                  "• MAP target: ≥65 mmHg (may accept slightly lower in young healthy gravidas)", style_cell),
    ],
    [
        Paragraph(B("Steroids:"), style_cell_bold),
        Paragraph("Consider <b>Hydrocortisone 200 mg/day IV</b> (50 mg q6h or infusion) if septic shock refractory to fluids + vasopressors (relative adrenal insufficiency)", style_cell),
    ],
]
hd_col_w = [3.5*cm, CONTENT_W - 3.5*cm]
hd_table = Table(hd_data, colWidths=hd_col_w)
hd_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), TEAL_LIGHT),
    ("BACKGROUND", (0,0),(0,-1), colors.HexColor("#A2D9CE")),
    ("GRID",       (0,0),(-1,-1), 0.4, TEAL),
    ("VALIGN",     (0,0),(-1,-1), "TOP"),
    ("TOPPADDING",    (0,0),(-1,-1),5),
    ("BOTTOMPADDING", (0,0),(-1,-1),5),
    ("LEFTPADDING",   (0,0),(-1,-1),6),
    ("RIGHTPADDING",  (0,0),(-1,-1),6),
]))
elems.append(hd_table)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# FETAL CONSIDERATIONS + SUPPORTIVE CARE side by side
# ═══════════════════════════════════════════════════════════════════════════════
COL4 = (CONTENT_W - 6) / 2

fetal_items = [
    Paragraph(B("Monitoring:"), style_cell_bold),
    bullet_para("Continuous CTG — fetal tachycardia often first sign of maternal fever"),
    bullet_para("Maternal stabilisation is priority over immediate delivery"),
    Spacer(1,3),
    Paragraph(B("Delivery decisions:"), style_cell_bold),
    bullet_para("Delivery does NOT automatically improve maternal sepsis"),
    bullet_para("If chorioamnionitis at term → expedite delivery (vaginal preferred)"),
    bullet_para("If uterus is septic focus and not controllable — consider delivery"),
    bullet_para("Neonatal team alert if GAS/GBS maternal sepsis → neonatal sepsis screen"),
    Spacer(1,3),
    Paragraph(B("IUFD:"), style_cell_bold),
    bullet_para("Intrauterine fetal death possible with severe maternal sepsis"),
]

supp_items = [
    Paragraph(B("Supportive care bundle:"), style_cell_bold),
    bullet_para("O₂: maintain SpO₂ ≥94%"),
    bullet_para("Mechanical ventilation if ARDS (tidal vol 6 mL/kg IBW)"),
    bullet_para("Blood glucose: target 7.8–10 mmol/L (140–180 mg/dL)"),
    bullet_para("LMWH thromboprophylaxis when haemostasis secure"),
    bullet_para("PPI for stress ulcer prophylaxis"),
    bullet_para("RBC transfusion if Hb &lt;7 g/dL (unless cardiac ischaemia/shock)"),
    bullet_para("Serum lactate clearance: remeasure at 2 h; target &gt;10% clearance"),
    bullet_para("Urinary catheter — hourly urine output (target &gt;0.5 mL/kg/h)"),
    Spacer(1,3),
    Paragraph(B("Do NOT use:"), style_cell_bold),
    bullet_para("Activated Protein C (no mortality benefit — withdrawn)"),
    bullet_para("Dopamine as vasopressor"),
]

def mini_box(items, bg_hdr, bg_body, border_col, title):
    hdr = Table([[Paragraph(title, style_section)]], colWidths=[COL4])
    hdr.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),bg_hdr),
        ("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),8),
    ]))
    body = Table([[i] for i in items], colWidths=[COL4])
    body.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,-1),bg_body),
        ("TOPPADDING",(0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
        ("LEFTPADDING",(0,0),(-1,-1),6),("RIGHTPADDING",(0,0),(-1,-1),6),
        ("BOX",(0,0),(-1,-1),0.5,border_col),
    ]))
    return hdr, body

fhdr, fbody = mini_box(fetal_items, colors.HexColor("#1F618D"), colors.HexColor("#D6EAF8"),
                        colors.HexColor("#2E86C1"), "FETAL CONSIDERATIONS")
shdr, sbody = mini_box(supp_items, colors.HexColor("#117A65"), TEAL_LIGHT,
                        TEAL, "SUPPORTIVE CARE")

two_col2 = Table(
    [[fhdr,  Spacer(6,1), shdr],
     [fbody, Spacer(6,1), sbody]],
    colWidths=[COL4, 6, COL4]
)
two_col2.setStyle(TableStyle([
    ("VALIGN",(0,0),(-1,-1),"TOP"),
    ("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
    ("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
]))
elems.append(two_col2)
elems.append(Spacer(1, 6))

# ═══════════════════════════════════════════════════════════════════════════════
# WARNING BOXES
# ═══════════════════════════════════════════════════════════════════════════════
warn_data = [
    [
        Paragraph("⚠  KEY PREGNANCY-SPECIFIC PITFALLS", style_warn),
    ],
    [
        Table([
            [
                Paragraph("• Normal pregnancy OVERLAPS with SIRS criteria (tachycardia, leukocytosis, ↓PaCO₂, ↑RR) — use omqSOFA thresholds", style_cell),
                Paragraph("• GAS sepsis: fever + pain + hypotension — but NO tachycardia or leukocytosis", style_cell),
                Paragraph("• Pulmonary oedema risk higher — cautious fluid bolus; reassess frequently", style_cell),
            ]
        ], colWidths=[CONTENT_W/3-4, CONTENT_W/3-4, CONTENT_W/3-4])
    ]
]
warn_table = Table(warn_data, colWidths=[CONTENT_W])
warn_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(0,0), colors.HexColor("#C0392B")),
    ("BACKGROUND", (0,1),(0,1), colors.HexColor("#FDEDEC")),
    ("BOX",        (0,0),(-1,-1), 1.0, colors.HexColor("#C0392B")),
    ("TOPPADDING",    (0,0),(-1,-1),5),
    ("BOTTOMPADDING", (0,0),(-1,-1),5),
    ("LEFTPADDING",   (0,0),(-1,-1),8),
    ("RIGHTPADDING",  (0,0),(-1,-1),8),
]))
elems.append(warn_table)
elems.append(Spacer(1, 5))

# ═══════════════════════════════════════════════════════════════════════════════
# FOOTER
# ═══════════════════════════════════════════════════════════════════════════════
footer_data = [[
    Paragraph(
        "Sources: Surviving Sepsis Campaign 2021 (survivingsepsis.org)  •  SOMANZ Sepsis Guidelines 2017  •  "
        "Creasy &amp; Resnik's Maternal-Fetal Medicine 9e  •  Goldman-Cecil Medicine  •  WHO Maternal Sepsis Definition 2017  |  "
        "Generated by Orris Medical AI  •  July 2026  •  For educational/clinical support use. Always verify against local protocols.",
        style_small
    )
]]
footer_table = Table(footer_data, colWidths=[CONTENT_W])
footer_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), GREY_DARK),
    ("TOPPADDING",    (0,0),(-1,-1),6),
    ("BOTTOMPADDING", (0,0),(-1,-1),6),
    ("LEFTPADDING",   (0,0),(-1,-1),8),
    ("RIGHTPADDING",  (0,0),(-1,-1),8),
]))
# Override text color for footer
style_small_white = S("SmallW",
    fontSize=7, leading=10, textColor=WHITE,
    fontName="Helvetica-Oblique", alignment=TA_CENTER)
footer_data2 = [[
    Paragraph(
        "Sources: Surviving Sepsis Campaign 2021 (survivingsepsis.org)  •  SOMANZ Sepsis Guidelines 2017  •  "
        "Creasy &amp; Resnik's Maternal-Fetal Medicine 9e  •  Goldman-Cecil Medicine  •  WHO Maternal Sepsis Definition 2017  |  "
        "Generated by Orris Medical AI  •  July 2026  •  For educational/clinical support use only.",
        style_small_white
    )
]]
footer_table2 = Table(footer_data2, colWidths=[CONTENT_W])
footer_table2.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), GREY_DARK),
    ("TOPPADDING",    (0,0),(-1,-1),6),
    ("BOTTOMPADDING", (0,0),(-1,-1),6),
    ("LEFTPADDING",   (0,0),(-1,-1),8),
    ("RIGHTPADDING",  (0,0),(-1,-1),8),
]))
elems.append(footer_table2)

# ── Build ─────────────────────────────────────────────────────────────────────
doc.build(elems)
print(f"PDF created: {OUTPUT}")
Running Command

cd /tmp/workspace/sepsis-pregnancy-pdf && python generate_pdf.py 2>&1

Running Command

ls -lh /tmp/workspace/sepsis-pregnancy-pdf/

Your quick reference PDF is ready. Here's what's included across a single colour-coded A4 page:

Sepsis Bundles Pregnancy Quick Reference

PDF Document · PDF


What the PDF covers:

SectionContent
DefinitionsMaternal sepsis (WHO 2017/Sepsis-3), Puerperal sepsis, Septic shock
Screening scoresomqSOFA + full obstetrically modified SOFA (SOMANZ 2017) side by side
Hour-1 Bundle6 steps with pregnancy-specific notes for each (cultures, lactate, antibiotics, fluids, vasopressors, source control)
Empiric antibiotics5 source-specific regimens (uterine, UTI, unknown, GAS, necrotising fasciitis) with safety notes
Risk factorsStratified by OR strength (modest → OR ≥135 for CCF)
Common organismsGAS, E. coli, GBS, MRSA, anaerobes with clinical pearls
Haemodynamic managementFluid responsiveness assessment, vasopressor ladder, steroids
Fetal considerationsCTG monitoring, delivery decision algorithm
Supportive careO₂, ventilation, glucose, DVT, stress ulcer, transfusion thresholds
Key pitfalls boxPregnancy-SIRS overlap, GAS no-tachycardia trap, pulmonary oedema risk
Sources cited on the footer: SSC 2021, SOMANZ 2017, Creasy & Resnik's MFM, Goldman-Cecil Medicine, WHO 2017.

Samm in obster short notes

Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
I now have all the material needed for a thorough short-notes answer.

SAMM in Obstetrics - Short Notes

What is SAMM?

SAMM = Severe Acute Maternal Morbidity (also called maternal near-miss).
It refers to a life-threatening condition occurring during pregnancy, delivery, or within 42 days of termination of pregnancy, from which a woman survives - either by chance or as a result of hospital care. It sits on a spectrum between uncomplicated pregnancy and maternal death.
The term "near-miss" was borrowed from aviation safety culture and formalised for obstetrics by the WHO in 2009. Some guidelines use "serious acute maternal morbidity (SAMM)" interchangeably.

Why It Matters

  • Every maternal death is preceded by a period of SAMM - identifying SAMM allows preventive intervention before death
  • SAMM is far more common than maternal death and is therefore a more statistically useful quality indicator
  • Studying near-misses reveals system failures, avoidable factors, and opportunities for improvement
  • In the United States, severe maternal morbidity (SMB) affects approximately 50,000 women/year (CDC data)
  • At least 40% of maternal morbidity and mortality is deemed preventable (California data)

Definition Criteria

The WHO (2009) defines a maternal near-miss as a woman who:
  • Nearly died but survived a severe complication during or within 42 days of pregnancy
  • Would have died without significant medical intervention

Three marker domains (WHO near-miss criteria):

DomainExamples
Clinical markersAcute cyanosis, gasping, respiratory rate <6 or >40/min, shock (pulse >150 or BP <90 systolic for >60 min)
Laboratory markerspH <7.1, lactate >5 mmol/L, severe acute thrombocytopenia (<50,000 platelets), severe hyperbilirubinaemia
Management-based markersContinuous use of vasoactive agents, hysterectomy for infection/haemorrhage, dialysis for acute renal failure, intubation and ventilation unrelated to anaesthesia, transfusion of ≥5 units pRBC

The Severity Spectrum

Pregnancy  →  Complication  →  SAMM / Near-miss  →  Maternal Death
                                       ↑
                                   SAMM zone
This continuum is used in the WHO Maternal Near-Miss Review framework to audit quality of obstetric care.

Common Causes / Conditions

The five major causes of SAMM (same as maternal mortality):

1. Obstetric Haemorrhage

  • Postpartum haemorrhage (PPH), placenta praevia/accreta, abruption
  • Leading cause of SAMM in low/middle-income countries
  • Bundle-based protocols reduce SMM by ~21% (Miller's Anesthesia)

2. Hypertensive Disorders

  • Severe pre-eclampsia, eclampsia, HELLP syndrome
  • Stroke/cerebrovascular accident is a rising cause
  • In the UK: hypertensive disorders account for 2% of deaths but large proportion of near-misses

3. Sepsis / Infection

  • Puerperal sepsis, chorioamnionitis, pyelonephritis
  • In the UK: 10% of maternal deaths; significant SAMM cause
  • GAS sepsis particularly fulminant

4. Venous Thromboembolism (VTE)

  • PE, DVT
  • 16% of UK maternal deaths
  • Second only to cardiac disease in UK series

5. Cardiovascular / Medical Conditions

  • Peripartum cardiomyopathy, pre-existing cardiac disease
  • Leading single cause of maternal death in US (15.5%) and UK (23%)
  • Cardiomyopathy accounts for 11.5% of US maternal deaths

Other causes:

  • Amniotic fluid embolism (AFE)
  • Acute fatty liver of pregnancy (AFLP)
  • Uterine rupture
  • Anaesthetic complications
  • Mental health (UK: 10% of maternal deaths)

Risk Factors for SAMM

CategoryRisk Factor
DemographicBlack/ethnic minority (5-fold higher risk in Black vs White women - UK data), age extremes, low socioeconomic status
ObstetricCaesarean section, multiple pregnancy, nulliparity, assisted conception
MedicalPre-existing cardiac/renal/liver disease, diabetes, HIV, obesity
IatrogenicPeripartum hysterectomy (OR 56), transfusion, cerclage
Racial disparity is a major public health concern: non-Hispanic Black women have mortality of 41.7 per 100,000 live births vs 11.6 for Hispanic women (US CDC 2017).

Surveillance Systems and Audit

United Kingdom

  • UKOSS (UK Obstetric Surveillance System): prospective nationwide case-capture system; has published on stroke, AFE, AFLP, severe sepsis, peripartum hysterectomy
  • MBRRACE-UK: Confidential Enquiry into Maternal Deaths and Morbidity - annual audit reports (formerly CEMACH/CMACE)
  • ICNARC report: Audited all obstetric ICU admissions 2009-2012; ICU admission rate 2.9/1000 maternities; ICU mortality 1.3-1.7%

United States

  • CDC Severe Maternal Morbidity Indicators: 21 diagnoses and procedures used as proxy markers of near-miss (e.g., mechanical ventilation, renal failure, blood transfusion, hysterectomy, sepsis codes)
  • Alliance for Innovation on Maternal Health (AIM): Implements bundles at state level

International

  • INOSS (International Network of Obstetric Survey Systems): Transnational SAMM data collaboration
  • WHO Maternal Near-Miss Review: Standardised tool for low/middle-income countries

Key Indices Used in SAMM Audit

IndexFormulaInterpretation
Maternal near-miss ratioNear-miss cases per 1000 live births↑ = poor care quality
Maternal near-miss mortality ratioNear-miss : maternal deaths↑ = better care (more survived)
Mortality indexDeaths ÷ (deaths + near-misses) × 100%↓ = better survival
Severe maternal outcome ratio(Near-miss + deaths) per 1000 live birthsOverall burden

SAMM and the Maternal Early Warning System (MEWS)

The National Partnership for Maternal Safety proposed the Maternal Early Warning Criteria (MEWC) to trigger escalation of care. Any ONE abnormal value prompts urgent bedside clinician review.
The Maternal Early Warning Trigger (MEWT) tool addresses the four most common areas of maternal morbidity:
  1. Sepsis
  2. Hypertension
  3. Haemorrhage
  4. Cardiopulmonary dysfunction
Studies show that using MEWT reduces severe maternal morbidity in post-implementation audits. However, specificity is poor (many false alarms) - patients who do NOT trigger are at low risk.

Preventability

  • In California: 70% of haemorrhage deaths and 60% of preeclampsia deaths were preventable
  • UK: improvements in care could have made a difference in 20% of maternal deaths
  • Key preventable factors: delays in recognition, delays in treatment, failure to escalate, substandard care

Management Principles for SAMM Conditions

Use safety bundles - evidence-based sets of interventions implemented together:
BundleComponents
Obstetric Haemorrhage BundleActive management of 3rd stage, oxytocin, uterotonic step-up, massive transfusion protocol, surgical options
Severe Hypertension BundleAntihypertensives within 30-60 min of severe BP, MgSO4 for seizure prophylaxis, delivery planning
Sepsis BundleBlood cultures, IV antibiotics within 1 hour, source control, fluids, vasopressors (SSC/SOMANZ)
VTE BundleRisk assessment, LMWH, TED stockings, mobilisation
Peripartum CardiomyopathyEcho, guideline-directed heart failure therapy, delivery planning
Both the severe hypertension and obstetric haemorrhage bundles are now formal Joint Commission elements of performance for accreditation in the US.

Summary Table

FeatureDetail
DefinitionLife-threatening condition in pregnancy/puerperium from which woman survives
SynonymMaternal near-miss
WHO criteriaClinical + lab + management-based markers
Main causesHaemorrhage, hypertension, sepsis, VTE, cardiac
Key audit toolMaternal near-miss ratio, mortality index
UK surveillanceMBRRACE-UK, UKOSS, ICNARC
US surveillanceCDC SMM indicators, AIM bundles
PreventionSafety bundles, early warning systems, MDT care, racial equity initiatives
Preventable fraction40-70% of cases
  • Creasy & Resnik's Maternal-Fetal Medicine, 9e, p. 1727, 1741, 1755; Miller's Anesthesia, 10e; UKOSS / MBRRACE-UK data
This is a shared conversation. Sign in to Orris to start your own chat.