Pregnancy Induced Hypertension

Reading File
Finding Sources
Searching PubMed

"pregnancy induced hypertension" OR "preeclampsia" management

Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
I now have comprehensive content from multiple authoritative sources. Let me compile the full response.

Pregnancy-Induced Hypertension (PIH)

Definition & Classification

Hypertension complicates up to 8-10% of pregnancies and is divided into distinct categories:
CategoryDefinition
Gestational HypertensionNew BP ≥140/90 mm Hg after 20 weeks, resolves postpartum, no proteinuria or end-organ damage
PreeclampsiaGestational hypertension + proteinuria (>300 mg/24 h) OR end-organ damage (after 20 weeks)
EclampsiaOnset of seizures in a preeclamptic patient
Superimposed PreeclampsiaChronic hypertension with new-onset proteinuria or sudden worsening
Chronic/Coincidental HypertensionPresent before pregnancy or persists >6 weeks postpartum
  • Rosen's Emergency Medicine, p. 3356; Brenner and Rector's The Kidney, p. 2145

ACOG 2013 Diagnostic Criteria for Preeclampsia

Hypertension: SBP ≥140 mm Hg OR DBP ≥90 mm Hg on two occasions at least 4 hours apart in a previously normotensive woman (after 20 weeks). If BP ≥160/105, hypertension may be confirmed within minutes to facilitate urgent treatment.
PLUS one of the following:
FeatureThreshold
Proteinuria≥300 mg/24 h, OR protein:creatinine ratio ≥0.3, OR dipstick 2+
ThrombocytopeniaPlatelets ≤100,000/mL
Renal insufficiencyCreatinine >1.1 mg/dL or doubling without other renal disease
Impaired liver functionTransaminases >2x normal
Pulmonary edemaNew onset
Cerebral/visual symptomsHeadache, visual disturbances
Key update from 2013: Proteinuria is no longer required if severe features are present.
  • Brenner and Rector's The Kidney, p. 2145 (Table 48.3)

Epidemiology & Risk Factors

Approximately 2-7% of pregnancies are complicated by PIH. Risk is highest in:
  • Women <20 years old
  • Primigravidas
  • Twin or molar pregnancies
  • Hypercholesterolemia, pregestational diabetes, obesity
  • Family history of PIH
  • Chronic hypertension (established risk factor for preeclampsia)
  • Rosen's Emergency Medicine, p. 3356

Pathophysiology

The exact cause remains unknown. The current model centers on a two-stage hypothesis:
Stage 1 - Abnormal placentation: Inadequate trophoblast invasion of spiral arteries. Normally, these become low-resistance, high-capacitance vessels. In preeclampsia, they remain high-resistance, leading to placental ischemia.
Stage 2 - Maternal syndrome: Placental ischemia triggers release of factors that cause widespread maternal endothelial dysfunction via:
  • Imbalance between proangiogenic factors (VEGF, PlGF) and antiangiogenic factors (sFlt-1, soluble endoglin)
  • Excess sFlt-1 acts as a VEGF decoy receptor - in the kidney, this causes endotheliosis and proteinuria
  • Intravascular inflammation, oxidative stress, syncytiotrophoblast stress
Hemodynamic changes: Normal pregnancy is a high-output, low-resistance state. Preeclampsia is characterized by initially elevated cardiac output, followed by a rise in peripheral vascular resistance as disease develops, ultimately causing reduced cardiac output.
  • Barash Clinical Anesthesia, p. 3509; Brenner and Rector's The Kidney, p. 2086-2094; NKF Primer, p. 2856

Systemic End-Organ Effects

SystemManifestation
NeurologicHeadache, cortical blindness, hyperreflexia, seizures; cerebral hemorrhage is a leading cause of death
RenalProteinuria, oliguria, creatinine rise ("glomerular endotheliosis")
HepaticTransaminitis, RUQ/epigastric pain, subcapsular hematoma
HematologicThrombocytopenia, microangiopathic hemolytic anemia
PlacentalInfarction, abruption, fetal growth restriction, hypoxia

HELLP Syndrome

A particularly severe variant seen in up to 12% of severe preeclampsia (0.2-0.8% of all pregnancies):
  • H - Hemolysis
  • EL - Elevated Liver enzymes (ALT/AST >70 U/L)
  • LP - Low Platelets (<100,000/mL)
  • Rosen's Emergency Medicine, p. 3357; Sleisenger & Fordtran's GI and Liver Disease

Management

Antihypertensive Therapy

When to start: BP >160 mm Hg systolic OR >105 mm Hg diastolic (threshold for acute treatment; chronic treatment threshold is DBP >105 or SBP >160 per consensus panels).
Goal of BP lowering: Reduce by 15-20%, targeting systolic 140-150 mm Hg. Avoid rapid lowering (risk of uterine hypoperfusion).
Drugs contraindicated in pregnancy: ACE inhibitors, ARBs - unequivocal evidence of fetal harm.
SettingDrugDose
Outpatient/chronicα-methyldopa250 mg twice daily (former FDA category B)
Outpatient/chronicLabetalol100 mg twice daily
Outpatient/chronicNifedipine30 mg once daily (extended-release)
Acute/inpatientHydralazine5-10 mg IV/IM, repeat q20 min
Acute/inpatientLabetalol20 mg IV, escalate to 40 mg at 10 min
  • Goodman & Gilman's Pharmacological Basis of Therapeutics; Rosen's Emergency Medicine, p. 3358

Seizure Prophylaxis and Treatment: Magnesium Sulfate

Magnesium sulfate is first-line for both seizure prevention and treatment. It has little antihypertensive effect but is the most effective anticonvulsant, maintaining uterine and fetal blood flow.
Indications: Severe preeclampsia, CNS manifestations (headache, visual disturbance, altered mental status), active eclampsia. Also consider postpartum - ~20% of eclampsia occurs >48 hours after delivery.
Dosing:
  • Loading dose: 4-6 g IV over 15-20 minutes
  • Maintenance: 2 g/hr IV infusion
Toxicity monitoring:
Magnesium LevelEffect
~10 mg/dLLoss of deep tendon reflexes
~12 mg/dLRespiratory depression
>15 mg/dLCardiac arrest
Antidote: Calcium gluconate 1 g IV (slow push) reverses hypermagnesemia.
If seizures persist despite MgSO4:
  • Lorazepam 2-4 mg IV (may repeat x1 after 10-15 min)
  • Phenytoin/Fosphenytoin 15-20 mg/kg IV
  • Levetiracetam 20-60 mg/kg IV
  • Rosen's Emergency Medicine, p. 3358; Goodman & Gilman's

Definitive Treatment

Delivery is the only cure. In severe preeclampsia with end-organ damage, delivery is the treatment of choice when the fetus is sufficiently mature. If very preterm, hospitalization + pharmacotherapy may allow further fetal maturation. Baseline labs (CBC, LFTs, creatinine, uric acid) are essential for monitoring end-organ status.

Postpartum Considerations

  • PIH and eclampsia can present or worsen up to 48+ hours postpartum
  • Women should remain on magnesium postpartum if they had CNS manifestations
  • Chronic hypertension is a major risk factor for recurrence in subsequent pregnancies (recurrence rate ~70% in women with hypertension in a prior pregnancy)
  • Goodman & Gilman's; Creasy & Resnik's Maternal-Fetal Medicine

Summary Diagram

Normal Pregnancy:          PIH Pathway:
Low-resistance spiral   →  Inadequate trophoblast invasion
arteries (remodeled)       ↓
                           Placental ischemia
                           ↓
                           sFlt-1 ↑, VEGF/PlGF ↓
                           ↓
                           Endothelial dysfunction (systemic)
                           ↓
            ┌──────────────┼────────────────┐
            ↓              ↓                ↓
         Kidney          Brain           Liver
      (proteinuria,   (seizures,       (transaminitis,
       oliguria)       headache)        HELLP)

Sources: Goodman & Gilman's Pharmacological Basis of Therapeutics | Rosen's Emergency Medicine | Brenner & Rector's The Kidney (ACOG 2013 criteria, Table 48.3) | Barash Clinical Anesthesia | NKF Primer on Kidney Diseases | Creasy & Resnik's Maternal-Fetal Medicine | Sleisenger & Fordtran's GI and Liver Disease

Pdf

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace does not exist"

Running Command

mkdir -p /home/daytona/workspace/pih-pdf

Writing File

~/pih-pdf/generate_pih_pdf.py

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

OUTPUT = "/home/daytona/workspace/pih-pdf/Pregnancy_Induced_Hypertension.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=2*cm, rightMargin=2*cm,
    topMargin=2.5*cm, bottomMargin=2.5*cm,
    title="Pregnancy-Induced Hypertension",
    author="Orris Medical Reference"
)

W, H = A4
styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle(
    "MainTitle",
    parent=styles["Title"],
    fontSize=22,
    leading=28,
    textColor=colors.HexColor("#1a3a5c"),
    spaceAfter=6,
    alignment=TA_CENTER,
)
subtitle_style = ParagraphStyle(
    "SubTitle",
    parent=styles["Normal"],
    fontSize=11,
    textColor=colors.HexColor("#5a7fa8"),
    spaceAfter=16,
    alignment=TA_CENTER,
)
h1_style = ParagraphStyle(
    "H1",
    parent=styles["Heading1"],
    fontSize=14,
    leading=18,
    textColor=colors.white,
    backColor=colors.HexColor("#1a3a5c"),
    spaceBefore=14,
    spaceAfter=6,
    leftIndent=-12,
    rightIndent=-12,
    borderPad=6,
)
h2_style = ParagraphStyle(
    "H2",
    parent=styles["Heading2"],
    fontSize=12,
    leading=16,
    textColor=colors.HexColor("#1a3a5c"),
    spaceBefore=10,
    spaceAfter=4,
    borderPad=2,
)
body_style = ParagraphStyle(
    "Body",
    parent=styles["Normal"],
    fontSize=10,
    leading=15,
    spaceAfter=6,
    alignment=TA_JUSTIFY,
    textColor=colors.HexColor("#222222"),
)
bullet_style = ParagraphStyle(
    "Bullet",
    parent=body_style,
    leftIndent=16,
    bulletIndent=6,
    spaceAfter=3,
)
note_style = ParagraphStyle(
    "Note",
    parent=body_style,
    fontSize=9,
    textColor=colors.HexColor("#555555"),
    backColor=colors.HexColor("#eef4fb"),
    borderPad=6,
    leftIndent=8,
    rightIndent=8,
    spaceAfter=8,
)
source_style = ParagraphStyle(
    "Source",
    parent=styles["Normal"],
    fontSize=8,
    textColor=colors.HexColor("#888888"),
    spaceAfter=4,
    leftIndent=8,
)

def h1(text):
    return Paragraph(f"&nbsp;&nbsp;{text}", h1_style)

def h2(text):
    return Paragraph(text, h2_style)

def body(text):
    return Paragraph(text, body_style)

def bullet(text):
    return Paragraph(f"• &nbsp;{text}", bullet_style)

def note(text):
    return Paragraph(f"<i>{text}</i>", note_style)

def source(text):
    return Paragraph(f"<i>Source: {text}</i>", source_style)

def spacer(h=6):
    return Spacer(1, h)

def hr():
    return HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#cccccc"), spaceAfter=6)

# --- Table helper ---
TABLE_HEADER_BG = colors.HexColor("#1a3a5c")
TABLE_ALT_BG    = colors.HexColor("#eef4fb")
TABLE_BORDER    = colors.HexColor("#aacce0")

def make_table(headers, rows, col_widths=None):
    cell_style = ParagraphStyle("tc", parent=styles["Normal"], fontSize=9, leading=13)
    hdr_style  = ParagraphStyle("th", parent=styles["Normal"], fontSize=9, leading=13,
                                 textColor=colors.white, fontName="Helvetica-Bold")
    data = [[Paragraph(h, hdr_style) for h in headers]]
    for i, row in enumerate(rows):
        data.append([Paragraph(str(c), cell_style) for c in row])
    ts = TableStyle([
        ("BACKGROUND",  (0,0), (-1,0), TABLE_HEADER_BG),
        ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, TABLE_ALT_BG]),
        ("GRID",        (0,0), (-1,-1), 0.4, TABLE_BORDER),
        ("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),
    ])
    avail = 17 * cm
    if col_widths:
        cw = [x * cm for x in col_widths]
    else:
        cw = None
    t = Table(data, colWidths=cw, repeatRows=1)
    t.setStyle(ts)
    return t

# ===================== BUILD STORY =====================
story = []

# --- Cover block ---
story.append(spacer(20))
story.append(Paragraph("Pregnancy-Induced Hypertension", title_style))
story.append(Paragraph("PIH · Preeclampsia · Eclampsia · HELLP Syndrome", subtitle_style))
story.append(HRFlowable(width="60%", thickness=2, color=colors.HexColor("#1a3a5c"),
                         hAlign="CENTER", spaceAfter=4))
story.append(Paragraph("Medical Reference Summary — Orris AI | June 2026", subtitle_style))
story.append(spacer(10))
story.append(hr())

# ============================================================
# 1. DEFINITION & CLASSIFICATION
# ============================================================
story.append(h1("1. Definition & Classification"))
story.append(body(
    "Hypertension complicates up to <b>8–10% of pregnancies</b> and is divided into distinct categories. "
    "The key differentiator is the gestational age of onset, presence of proteinuria, and evidence of end-organ damage."
))
story.append(spacer(4))
story.append(make_table(
    ["Category", "Definition"],
    [
        ["Gestational Hypertension", "New BP ≥140/90 mm Hg after 20 weeks; resolves postpartum; no proteinuria or end-organ damage"],
        ["Preeclampsia", "Gestational hypertension + proteinuria (>300 mg/24 h) OR end-organ damage after 20 weeks"],
        ["Eclampsia", "New-onset seizures in a patient with signs of preeclampsia"],
        ["Superimposed Preeclampsia", "Chronic hypertension with new-onset proteinuria or sudden BP worsening"],
        ["Chronic/Coincidental Hypertension", "Present before pregnancy or persists >6 weeks postpartum"],
        ["Pregnancy-Aggravated Hypertension", "Chronic hypertension with superimposed preeclampsia or eclampsia"],
    ],
    col_widths=[6, 11]
))
story.append(source("Rosen's Emergency Medicine; Brenner & Rector's The Kidney"))

# ============================================================
# 2. ACOG 2013 DIAGNOSTIC CRITERIA
# ============================================================
story.append(h1("2. ACOG 2013 Diagnostic Criteria for Preeclampsia"))
story.append(body(
    "The 2013 ACOG Task Force updated the diagnostic criteria, allowing preeclampsia to be diagnosed "
    "<b>without proteinuria</b> if severe features are present."
))
story.append(h2("Hypertension (required)"))
story.append(body(
    "SBP ≥140 mm Hg OR DBP ≥90 mm Hg on <b>two occasions ≥4 hours apart</b> in a previously normotensive woman "
    "after 20 weeks gestation. If BP ≥160/105, confirmation may occur within minutes for urgent treatment."
))
story.append(h2("PLUS Proteinuria OR one or more of the following:"))
story.append(make_table(
    ["Feature", "Threshold / Criterion"],
    [
        ["Proteinuria", "≥300 mg/24 h; OR protein:creatinine ratio ≥0.3; OR dipstick 2+"],
        ["Thrombocytopenia", "Platelets ≤100,000/mL"],
        ["Renal insufficiency", "Creatinine >1.1 mg/dL OR doubling of creatinine (no other renal disease)"],
        ["Impaired liver function", "Transaminases (ALT/AST) >2× normal"],
        ["Pulmonary edema", "New onset"],
        ["Cerebral or visual symptoms", "Severe headache, visual disturbances, altered mental status"],
    ],
    col_widths=[5.5, 11.5]
))
story.append(note(
    "Key 2013 update: Proteinuria is NO longer required for diagnosis if severe features are present. "
    "Hyperuricemia is common but is not a diagnostic criterion."
))
story.append(source("Brenner & Rector's The Kidney, Table 48.3; ACOG Obstet Gynecol. 2013;122:1122–1131"))

# ============================================================
# 3. EPIDEMIOLOGY & RISK FACTORS
# ============================================================
story.append(h1("3. Epidemiology & Risk Factors"))
story.append(body(
    "Approximately <b>2–7% of pregnancies</b> are complicated by PIH. Eclampsia remains one of the major causes "
    "of maternal mortality, though its incidence has progressively declined."
))
story.append(h2("High-Risk Groups"))
for item in [
    "Women <b>younger than 20 years</b>",
    "<b>Primigravidas</b>",
    "Twin or molar pregnancies",
    "Hypercholesterolemia, pregestational diabetes, or obesity",
    "Family history of PIH",
    "Chronic hypertension (established risk factor for superimposed preeclampsia)",
    "Underlying renal disease or autoimmune conditions (SLE, antiphospholipid syndrome)",
]:
    story.append(bullet(item))
story.append(source("Rosen's Emergency Medicine, p. 3356; Creasy & Resnik's Maternal-Fetal Medicine"))

# ============================================================
# 4. PATHOPHYSIOLOGY
# ============================================================
story.append(h1("4. Pathophysiology"))
story.append(body(
    "The exact cause remains unknown. The current model is a <b>two-stage hypothesis</b>:"
))
story.append(h2("Stage 1 — Abnormal Placentation (Before 20 Weeks)"))
story.append(body(
    "Inadequate trophoblast invasion of maternal spiral arteries. Normally, these remodel into wide, "
    "low-resistance vessels. In preeclampsia, they remain <b>high-resistance</b>, leading to reduced "
    "uteroplacental perfusion and <b>placental ischemia</b>. Abnormal uterine artery Doppler (increased "
    "resistance) precedes clinical disease."
))
story.append(h2("Stage 2 — Maternal Systemic Syndrome (Clinical Disease)"))
story.append(body(
    "Placental ischemia and syncytiotrophoblast stress trigger release of circulating factors causing "
    "<b>widespread maternal endothelial dysfunction</b>:"
))
for item in [
    "<b>Antiangiogenic factors elevated</b>: sFlt-1 (soluble fms-like tyrosine kinase-1), soluble endoglin",
    "<b>Proangiogenic factors reduced</b>: VEGF (vascular endothelial growth factor), PlGF (placental growth factor)",
    "sFlt-1 acts as a VEGF decoy receptor — in the kidney, free VEGF depletion causes glomerular endotheliosis and proteinuria",
    "Intravascular inflammation, oxidative stress, and coagulation activation",
]:
    story.append(bullet(item))
story.append(h2("Hemodynamic Changes"))
story.append(body(
    "Normal pregnancy = high cardiac output, low peripheral resistance. In preeclampsia: cardiac output is "
    "initially elevated, then peripheral vascular resistance rises sharply. Ultimately cardiac output "
    "<i>falls</i> as resistance continues to rise, causing end-organ ischemia."
))
story.append(h2("End-Organ Effects"))
story.append(make_table(
    ["System", "Manifestation / Mechanism"],
    [
        ["Neurologic", "Focal vasoconstriction → cerebral edema, petechial hemorrhage; headache, cortical blindness, hyperreflexia, seizures; cerebral hemorrhage is a leading cause of death"],
        ["Renal", "Glomerular endotheliosis → proteinuria, oliguria, creatinine rise"],
        ["Hepatic", "Sinusoidal fibrin deposition → transaminitis, RUQ/epigastric pain, subcapsular hematoma"],
        ["Hematologic", "Microangiopathic hemolytic anemia, thrombocytopenia (platelet consumption)"],
        ["Placental", "Infarction, abruption, fetal growth restriction, fetal hypoxia/death"],
        ["Cardiovascular", "Vasospasm, increased afterload, pulmonary edema"],
    ],
    col_widths=[4, 13]
))
story.append(source("Barash Clinical Anesthesia; Brenner & Rector's The Kidney; NKF Primer on Kidney Diseases"))

# ============================================================
# 5. HELLP SYNDROME
# ============================================================
story.append(h1("5. HELLP Syndrome"))
story.append(body(
    "A particularly severe variant of preeclampsia occurring in <b>up to 12% of severe preeclampsia cases</b> "
    "(0.2–0.8% of all pregnancies)."
))
story.append(make_table(
    ["Letter", "Finding", "Diagnostic Threshold"],
    [
        ["H", "Hemolysis", "Microangiopathic hemolytic anemia (schistocytes on smear, elevated LDH, low haptoglobin)"],
        ["EL", "Elevated Liver enzymes", "ALT and AST > 70 U/L"],
        ["LP", "Low Platelets", "< 100,000/mL"],
    ],
    col_widths=[1.5, 5, 10.5]
))
story.append(body(
    "Two major classification systems exist: <b>Tennessee classification</b> and <b>Mississippi classification</b>. "
    "HELLP may present without classic hypertension or proteinuria in some cases, making diagnosis challenging."
))
story.append(source("Rosen's Emergency Medicine; Sleisenger & Fordtran's GI and Liver Disease"))

# ============================================================
# 6. MANAGEMENT
# ============================================================
story.append(h1("6. Management"))
story.append(h2("When to Treat Blood Pressure"))
story.append(body(
    "Initiate antihypertensive therapy when: <b>SBP >160 mm Hg OR DBP >105 mm Hg</b> (acute threshold). "
    "Chronic therapy may begin at lower thresholds based on clinical context. "
    "<b>Goal</b>: Reduce BP by 15–20%, targeting systolic 140–150 mm Hg. "
    "Avoid rapid lowering — risks uterine hypoperfusion and fetal distress."
))
story.append(h2("Drugs to AVOID in Pregnancy"))
story.append(body(
    "<b>ACE inhibitors and ARBs are contraindicated</b> — unequivocal evidence of adverse fetal effects "
    "(renal dysgenesis, oligohydramnios, fetal death)."
))
story.append(h2("Antihypertensive Drug Choices"))
story.append(make_table(
    ["Drug", "Setting", "Dose", "Notes"],
    [
        ["α-Methyldopa", "Outpatient / Chronic", "250 mg twice daily", "Former FDA category B; centrally acting α2-agonist; drug of choice for chronic PIH"],
        ["Labetalol", "Outpatient or Acute IV", "100 mg PO twice daily;\n20 mg IV, escalate to 40 mg at 10 min", "Combined α1/β-blocker; safe; widely used"],
        ["Nifedipine (extended-release)", "Outpatient / Chronic", "30 mg once daily", "Ca²⁺ channel blocker; safe in pregnancy"],
        ["Hydralazine", "Acute / Inpatient IV", "5–10 mg IV or IM; repeat q20 min", "Direct vasodilator; first-line acute IV agent"],
    ],
    col_widths=[3.5, 3.5, 4, 6]
))
story.append(source("Goodman & Gilman's Pharmacological Basis of Therapeutics; Rosen's Emergency Medicine"))

story.append(h2("Seizure Prophylaxis & Treatment: Magnesium Sulfate"))
story.append(note(
    "Magnesium sulfate has LITTLE antihypertensive effect but is the most effective anticonvulsant in eclampsia. "
    "It prevents recurrent seizures while maintaining uterine and fetal blood flow."
))
story.append(body("<b>Indications:</b>"))
for item in [
    "Severe preeclampsia (BP ≥160/110 with symptoms)",
    "CNS manifestations: headache, visual disturbance, altered mental status",
    "Active eclamptic seizures",
    "Postpartum with CNS manifestations (~20% of eclampsia occurs >48 h after delivery)",
]:
    story.append(bullet(item))
story.append(body("<b>Dosing Protocol (Pritchard/Parkland Protocol):</b>"))
story.append(make_table(
    ["Phase", "Dose", "Route", "Duration"],
    [
        ["Loading dose", "4–6 g", "IV", "Over 15–20 minutes"],
        ["Maintenance", "2 g/hr", "IV infusion", "Continued intrapartum and 24 h postpartum"],
    ],
    col_widths=[3.5, 3, 3, 7.5]
))
story.append(h2("Magnesium Toxicity Monitoring"))
story.append(make_table(
    ["Serum Mg²⁺ Level", "Clinical Effect"],
    [
        ["4–7 mg/dL (therapeutic)", "Seizure prophylaxis; normal reflexes"],
        ["~10 mg/dL", "Loss of deep tendon reflexes (early warning sign — STOP infusion)"],
        ["~12 mg/dL", "Respiratory depression"],
        [">15 mg/dL", "Cardiac arrest"],
    ],
    col_widths=[5.5, 11.5]
))
story.append(body(
    "<b>Antidote for hypermagnesemia:</b> Calcium gluconate 1 g IV (given slowly) — reverses "
    "respiratory depression and loss of reflexes."
))
story.append(h2("If Seizures Persist Despite MgSO₄"))
story.append(make_table(
    ["Agent", "Dose"],
    [
        ["Lorazepam", "2–4 mg IV; may repeat ×1 after 10–15 min"],
        ["Phenytoin / Fosphenytoin", "15–20 mg/kg IV ×1; may repeat 10 mg/kg after 20 min"],
        ["Levetiracetam", "20–60 mg/kg IV; may repeat in 12 hours"],
    ],
    col_widths=[6, 11]
))
story.append(note(
    "Always exclude other causes of seizures: hypoglycemia, intracranial hemorrhage, drug overdose."
))
story.append(source("Rosen's Emergency Medicine, p. 3358; Goodman & Gilman's"))

story.append(h2("Definitive Treatment: Delivery"))
story.append(body(
    "<b>Delivery is the only cure for preeclampsia/eclampsia.</b> Decision depends on gestational age "
    "and severity of disease:"
))
story.append(make_table(
    ["Clinical Situation", "Management"],
    [
        ["Severe preeclampsia, mature fetus (≥34 weeks)", "Proceed with delivery (vaginal or cesarean)"],
        ["Severe preeclampsia, premature fetus (<34 weeks)", "Hospitalize; pharmacotherapy; antenatal steroids for fetal lung maturity; aim for further maturation"],
        ["Eclampsia", "Stabilize (MgSO₄ + antihypertensives), then deliver regardless of gestational age"],
        ["HELLP syndrome", "Urgent delivery; consider dexamethasone to improve platelet count"],
    ],
    col_widths=[6, 11]
))

# ============================================================
# 7. POSTPARTUM CONSIDERATIONS
# ============================================================
story.append(h1("7. Postpartum Considerations"))
for item in [
    "PIH and eclampsia can <b>present or worsen postpartum</b> — ~20% of eclampsia occurs >48 hours after delivery",
    "Continue magnesium sulfate for <b>24–48 hours postpartum</b> in women with severe features",
    "Monitor BP closely — can remain elevated for days to weeks",
    "Recurrence rate: ~70% in subsequent pregnancies in women with documented PIH",
    "Long-term cardiovascular risk: preeclampsia is an independent risk factor for hypertension, stroke, and ischemic heart disease later in life",
    "Women with HELLP should be monitored for DIC and renal failure",
]:
    story.append(bullet(item))
story.append(source("Goodman & Gilman's; Creasy & Resnik's Maternal-Fetal Medicine"))

# ============================================================
# 8. PREVENTION
# ============================================================
story.append(h1("8. Prevention"))
story.append(body(
    "No intervention reliably prevents preeclampsia, but the following have evidence of benefit:"
))
story.append(make_table(
    ["Intervention", "Evidence / Population"],
    [
        ["Low-dose aspirin (81 mg/day)", "Recommended from 12–16 weeks in high-risk women (prior preeclampsia, multifetal gestation, chronic hypertension, diabetes, renal disease); NNT ~19 to prevent one case"],
        ["Calcium supplementation", "Benefit in women with low dietary calcium intake (low-resource settings)"],
        ["Antiplatelet agents", "Reported to reduce incidence; mechanism via reduced thromboxane-mediated vasoconstriction"],
        ["Control of modifiable risk factors", "Optimize weight, glycemia, and lipid levels pre-conception"],
    ],
    col_widths=[5.5, 11.5]
))
story.append(source("Creasy & Resnik's Maternal-Fetal Medicine; Goodman & Gilman's"))

# ============================================================
# 9. SUMMARY TABLE
# ============================================================
story.append(h1("9. Quick Reference Summary"))
story.append(make_table(
    ["Parameter", "Key Value / Fact"],
    [
        ["Incidence of PIH", "2–7% of all pregnancies"],
        ["BP threshold for diagnosis", "≥140/90 mm Hg on 2 occasions ≥4 hrs apart (after 20 wks)"],
        ["Proteinuria threshold", ">300 mg/24 h OR P:Cr ratio ≥0.3"],
        ["Threshold to treat BP acutely", "SBP >160 mm Hg OR DBP >105 mm Hg"],
        ["MgSO₄ loading dose", "4–6 g IV over 15–20 min"],
        ["MgSO₄ maintenance dose", "2 g/hr IV"],
        ["Loss of DTRs at Mg level", "~10 mg/dL"],
        ["Respiratory depression at Mg level", "~12 mg/dL"],
        ["Antidote for Mg toxicity", "Calcium gluconate 1 g IV slowly"],
        ["Definitive treatment", "Delivery (only cure)"],
        ["HELLP platelet threshold", "<100,000/mL"],
        ["Post-delivery eclampsia risk", "~20% occurs >48 hrs postpartum"],
    ],
    col_widths=[7, 10]
))

# ============================================================
# SOURCES
# ============================================================
story.append(spacer(12))
story.append(hr())
story.append(Paragraph("<b>References & Sources</b>", ParagraphStyle("RefHead", parent=styles["Normal"],
    fontSize=10, textColor=colors.HexColor("#1a3a5c"), spaceAfter=4)))
for ref in [
    "Goodman & Gilman's The Pharmacological Basis of Therapeutics, 14th Ed.",
    "Rosen's Emergency Medicine: Concepts and Clinical Practice, 9th Ed.",
    "Brenner and Rector's The Kidney, 10th Ed. (ACOG 2013 Criteria, Table 48.3)",
    "Barash, Cullen, and Stoelting's Clinical Anesthesia, 9th Ed.",
    "NKF Primer on Kidney Diseases, 8th Ed.",
    "Creasy & Resnik's Maternal-Fetal Medicine: Principles and Practice, 8th Ed.",
    "Sleisenger and Fordtran's Gastrointestinal and Liver Disease, 11th Ed.",
    "ACOG Task Force on Hypertension in Pregnancy. Obstet Gynecol. 2013;122:1122–1131",
]:
    story.append(Paragraph(f"• {ref}", source_style))

story.append(spacer(8))
story.append(Paragraph(
    "Generated by Orris AI Medical Reference | June 28, 2026",
    ParagraphStyle("Footer", parent=styles["Normal"], fontSize=8,
                   textColor=colors.HexColor("#aaaaaa"), alignment=TA_CENTER)
))

# ===================== BUILD =====================
doc.build(story)
print(f"PDF saved to: {OUTPUT}")
Running Command

cd /home/daytona/workspace/pih-pdf && python generate_pih_pdf.py 2>&1

Your PDF is ready. Here's the download link:

Pregnancy Induced Hypertension

PDF Document · PDF

The PDF includes all sections from the previous response, neatly formatted with:
  • 9 sections with color-coded headers
  • All diagnostic tables (ACOG 2013 criteria, HELLP, antihypertensive drugs, MgSO₄ dosing, toxicity levels)
  • Quick Reference Summary table at the end
  • Full source citations (Goodman & Gilman's, Rosen's, Brenner & Rector's, Creasy & Resnik's, and others)
This is a shared conversation. Sign in to Orris to start your own chat.