make a powepoint presentation on the topic pregnancy induced hypertension

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/pih-presentation && ls /home/daytona/workspace/…

Writing File

~/pih-presentation/pih.js

const pptxgen = require("pptxgenjs");
const prs = new pptxgen();

prs.layout = "LAYOUT_16x9";
prs.title = "Pregnancy Induced Hypertension";
prs.author = "Medical Education";

// ── Color palette ──────────────────────────────────────────────
const DARK_BG   = "0D1B2A";   // deep navy – title / section dividers
const MID_BG    = "1B3A5C";   // steel blue
const ACCENT    = "E63946";   // vivid red – danger/warning emphasis
const GOLD      = "F4A261";   // warm amber – headings on dark bg
const WHITE     = "FFFFFF";
const LIGHT_BG  = "F0F4F8";   // slide body bg
const TEXT_DARK = "1A1A2E";   // near-black body text
const TEAL      = "2A9D8F";   // secondary accent
const LIGHT_TXT = "D0E4F7";   // muted light text on dark bg

// ── Helper: section divider slide ─────────────────────────────
function sectionDivider(title, subtitle) {
  const sl = prs.addSlide();
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  // Accent bar
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 2.4, w: 10, h: 0.08, fill: { color: ACCENT } });
  sl.addText(title, {
    x: 0.8, y: 1.3, w: 8.4, h: 1,
    fontSize: 36, bold: true, color: GOLD, align: "center", fontFace: "Calibri"
  });
  if (subtitle) {
    sl.addText(subtitle, {
      x: 1, y: 2.8, w: 8, h: 0.8,
      fontSize: 18, color: LIGHT_TXT, align: "center", fontFace: "Calibri"
    });
  }
  return sl;
}

// ── Helper: body slide ────────────────────────────────────────
function bodySlide(title, bullets, opts = {}) {
  const sl = prs.addSlide();
  // Background
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_BG } });
  // Title bar
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.95, fill: { color: MID_BG } });
  // Left accent strip
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT } });
  sl.addText(title, {
    x: 0.22, y: 0.08, w: 9.6, h: 0.78,
    fontSize: 22, bold: true, color: WHITE, valign: "middle", fontFace: "Calibri", margin: 0
  });
  // Bullets
  const items = bullets.map((b, i) => {
    if (b.sub) {
      return { text: b.text, options: { bullet: { indent: 25 }, fontSize: 14, color: "555577", breakLine: i < bullets.length - 1 } };
    }
    return { text: b.text || b, options: { bullet: { color: ACCENT, code: "2022" }, fontSize: opts.fontSize || 15.5, color: TEXT_DARK, bold: b.bold || false, breakLine: i < bullets.length - 1 } };
  });
  sl.addText(items, {
    x: 0.35, y: 1.05, w: opts.w || 9.4, h: opts.h || 4.35,
    valign: "top", fontFace: "Calibri", lineSpacingMultiple: 1.15
  });
  return sl;
}

// ── Helper: two-column slide ──────────────────────────────────
function twoColSlide(title, leftItems, rightItems, leftHead, rightHead) {
  const sl = prs.addSlide();
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.95, fill: { color: MID_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT } });
  sl.addText(title, {
    x: 0.22, y: 0.08, w: 9.6, h: 0.78,
    fontSize: 22, bold: true, color: WHITE, valign: "middle", fontFace: "Calibri", margin: 0
  });
  // Column divider
  sl.addShape(prs.ShapeType.rect, { x: 5.08, y: 1.0, w: 0.04, h: 4.4, fill: { color: TEAL } });
  // Left heading
  if (leftHead) {
    sl.addShape(prs.ShapeType.rect, { x: 0.25, y: 1.0, w: 4.6, h: 0.42, fill: { color: TEAL } });
    sl.addText(leftHead, { x: 0.3, y: 1.02, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
  }
  if (rightHead) {
    sl.addShape(prs.ShapeType.rect, { x: 5.2, y: 1.0, w: 4.6, h: 0.42, fill: { color: MID_BG } });
    sl.addText(rightHead, { x: 5.25, y: 1.02, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
  }
  const mkItems = (arr) => arr.map((b, i) => ({
    text: b.text || b,
    options: { bullet: { color: ACCENT, code: "2022" }, fontSize: 13.5, color: TEXT_DARK, breakLine: i < arr.length - 1 }
  }));
  sl.addText(mkItems(leftItems), { x: 0.25, y: leftHead ? 1.5 : 1.1, w: 4.7, h: leftHead ? 3.9 : 4.3, valign: "top", fontFace: "Calibri", lineSpacingMultiple: 1.15 });
  sl.addText(mkItems(rightItems), { x: 5.2, y: rightHead ? 1.5 : 1.1, w: 4.6, h: rightHead ? 3.9 : 4.3, valign: "top", fontFace: "Calibri", lineSpacingMultiple: 1.15 });
  return sl;
}

// ╔══════════════════════════════════════════════════════════════╗
// ║  SLIDE 1 — TITLE                                            ║
// ╚══════════════════════════════════════════════════════════════╝
{
  const sl = prs.addSlide();
  // Full dark background
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  // Top decorative bar
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.18, fill: { color: ACCENT } });
  // Bottom decorative bar
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 5.44, w: 10, h: 0.18, fill: { color: ACCENT } });
  // Side accent
  sl.addShape(prs.ShapeType.rect, { x: 0.3, y: 0.18, w: 0.1, h: 5.265, fill: { color: TEAL } });

  sl.addText("PREGNANCY INDUCED", {
    x: 0.6, y: 0.8, w: 8.8, h: 1.0,
    fontSize: 42, bold: true, color: WHITE, align: "center", fontFace: "Calibri", charSpacing: 3
  });
  sl.addText("HYPERTENSION", {
    x: 0.6, y: 1.65, w: 8.8, h: 1.1,
    fontSize: 52, bold: true, color: GOLD, align: "center", fontFace: "Calibri", charSpacing: 4
  });
  // Subtitle line
  sl.addShape(prs.ShapeType.rect, { x: 2.5, y: 2.88, w: 5, h: 0.06, fill: { color: ACCENT } });
  sl.addText("Preeclampsia · Eclampsia · HELLP Syndrome", {
    x: 0.6, y: 3.0, w: 8.8, h: 0.6,
    fontSize: 19, color: LIGHT_TXT, align: "center", fontFace: "Calibri", italic: true
  });
  sl.addText("Pathophysiology · Diagnosis · Management", {
    x: 0.6, y: 3.55, w: 8.8, h: 0.5,
    fontSize: 15, color: LIGHT_TXT, align: "center", fontFace: "Calibri"
  });
  sl.addText("Sources: Creasy & Resnik's Maternal-Fetal Medicine · Robbins Pathology · Guyton & Hall · Goodman & Gilman", {
    x: 0.6, y: 4.8, w: 8.8, h: 0.45,
    fontSize: 10, color: "8899AA", align: "center", fontFace: "Calibri", italic: true
  });
}

// ╔══════════════════════════════════════════════════════════════╗
// ║  SLIDE 2 — OUTLINE                                          ║
// ╚══════════════════════════════════════════════════════════════╝
bodySlide("Presentation Outline", [
  { text: "1.  Introduction & Definition" },
  { text: "2.  ACOG Classification of Hypertensive Disorders of Pregnancy" },
  { text: "3.  Epidemiology & Risk Factors" },
  { text: "4.  Pathogenesis – Placental & Vascular Mechanisms" },
  { text: "5.  Pathophysiologic Changes (Multi-Organ)" },
  { text: "6.  Clinical Features & Diagnostic Criteria" },
  { text: "7.  Laboratory Findings & Investigations" },
  { text: "8.  HELLP Syndrome" },
  { text: "9.  Eclampsia" },
  { text: "10. Management – Antihypertensives & MgSO4" },
  { text: "11. Delivery Timing & Definitive Treatment" },
  { text: "12. Prevention & Prognosis" },
  { text: "13. Summary" },
]);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 1 — INTRODUCTION                                   ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 1", "Introduction & Definition");

bodySlide("What is Pregnancy Induced Hypertension?", [
  { text: "Hypertension affects up to 10% of pregnant women in the United States" },
  { text: "Hypertensive disorders of pregnancy (HDP) = ~85 per 1,000 deliveries in the US" },
  { text: "PIH is a disorder unique to pregnancy – completely reversible after delivery" },
  { text: "Characterized by poor perfusion of vital organs including the fetoplacental unit" },
  { text: "NOT merely an unmasking of pre-existing chronic hypertension" },
  { text: "Umbrella term includes: gestational hypertension, preeclampsia, eclampsia, HELLP" },
  { text: "Generally presents after 20 weeks of gestation" },
  { text: "New-onset hypertension with or without proteinuria >300 mg/24 h" },
]);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 2 — CLASSIFICATION                                 ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 2", "ACOG Classification of Hypertensive Disorders");

{
  const sl = prs.addSlide();
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.95, fill: { color: MID_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT } });
  sl.addText("ACOG Classification (2020 Practice Bulletin #222)", {
    x: 0.22, y: 0.08, w: 9.6, h: 0.78,
    fontSize: 20, bold: true, color: WHITE, valign: "middle", fontFace: "Calibri", margin: 0
  });

  const rows = [
    [{ text: "Category", options: { bold: true, color: WHITE, fill: { color: MID_BG } } },
     { text: "Timing / BP Criteria", options: { bold: true, color: WHITE, fill: { color: MID_BG } } },
     { text: "Key Features", options: { bold: true, color: WHITE, fill: { color: MID_BG } } }],
    [{ text: "Gestational HTN" }, { text: "New BP ≥140/90 after 20 wks (×2, ≥4 hr apart)" }, { text: "No proteinuria; resolves postpartum" }],
    [{ text: "Preeclampsia" }, { text: "Gestational HTN + proteinuria >0.3 g/24 h OR end-organ damage" }, { text: "Thrombocytopenia, renal/hepatic impairment, pulmonary edema, headache" }],
    [{ text: "Preeclampsia\nwith Severe Features" }, { text: "SBP ≥160 or DBP ≥110 mmHg" }, { text: "Platelets <100×10⁹/L; Cr >1.1 mg/dL; AST/ALT ≥2× ULN; pulmonary edema; visual/neuro symptoms" }],
    [{ text: "Eclampsia" }, { text: "Preeclampsia + new-onset seizures" }, { text: "Can occur antepartum, intrapartum, or ≤48 h postpartum" }],
    [{ text: "HELLP Syndrome" }, { text: "Variant of severe preeclampsia" }, { text: "Hemolysis + Elevated Liver enzymes + Low Platelets" }],
    [{ text: "Chronic HTN" }, { text: "Hypertension before pregnancy or before 20 wks" }, { text: "Does not resolve postpartum" }],
    [{ text: "Chronic HTN + Superimposed\nPreeclampsia" }, { text: "Preeclampsia in a woman with chronic HTN" }, { text: "Worse prognosis than either condition alone" }],
  ];

  sl.addTable(rows, {
    x: 0.2, y: 1.0, w: 9.6, h: 4.4,
    colW: [1.8, 3.6, 4.2],
    border: { color: "C0C8D8", pt: 0.5 },
    align: "left",
    fontFace: "Calibri",
    fontSize: 11,
    color: TEXT_DARK,
    autoPage: false,
  });
}

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 3 — EPIDEMIOLOGY & RISK FACTORS                    ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 3", "Epidemiology & Risk Factors");

{
  const sl = prs.addSlide();
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.95, fill: { color: MID_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT } });
  sl.addText("Epidemiology", {
    x: 0.22, y: 0.08, w: 9.6, h: 0.78,
    fontSize: 22, bold: true, color: WHITE, valign: "middle", fontFace: "Calibri", margin: 0
  });

  // Stat boxes
  const stats = [
    { val: "~5%", lbl: "Preeclampsia prevalence" },
    { val: "85/1000", lbl: "HDP rate (US deliveries)" },
    { val: "32.3%", lbl: "Attributable fraction: nulliparity" },
    { val: "25%", lbl: "Risk with chronic HTN" },
    { val: "20%", lbl: "Risk in pregestational diabetes" },
    { val: "~20%", lbl: "Eclampsia >48h postpartum" },
  ];
  stats.forEach((s, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col * 3.2;
    const y = 1.1 + row * 2.1;
    sl.addShape(prs.ShapeType.rect, { x, y, w: 3.0, h: 1.7, fill: { color: MID_BG }, line: { color: TEAL, pt: 1.5 } });
    sl.addText(s.val, { x, y: y + 0.15, w: 3.0, h: 0.8, fontSize: 30, bold: true, color: GOLD, align: "center", fontFace: "Calibri" });
    sl.addText(s.lbl, { x, y: y + 0.9, w: 3.0, h: 0.65, fontSize: 12, color: LIGHT_TXT, align: "center", fontFace: "Calibri" });
  });
}

twoColSlide(
  "Risk Factors for Preeclampsia",
  [
    "Nulliparity (greatest population-attributable risk)",
    "Prior preeclampsia in previous pregnancy",
    "Chronic hypertension",
    "Chronic renal failure (with or without DM)",
    "Pregestational diabetes mellitus",
    "Antiphospholipid syndrome",
    "Connective tissue disorders (SLE)",
    "Extremes of maternal age",
  ],
  [
    "Multiple gestation / IVF",
    "Family history of preeclampsia",
    "Non-White race (linked to severity)",
    "Hydatidiform mole",
    "Hydrops fetalis",
    "Obesity / metabolic syndrome",
    "First pregnancy with new partner",
    "Low socioeconomic status (for eclampsia)",
  ],
  "Maternal / Medical Factors",
  "Obstetric / Other Factors"
);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 4 — PATHOGENESIS                                   ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 4", "Pathogenesis – Placental & Vascular Mechanisms");

bodySlide("Normal vs. Preeclamptic Placentation", [
  { text: "NORMAL PREGNANCY:", bold: true },
  { text: "Trophoblasts invade spiral arteries of uterine endometrium", sub: true },
  { text: "Musculoelastic walls remodeled → wide vascular sinusoids (low resistance)", sub: true },
  { text: "High-flow, low-resistance uteroplacental circulation established", sub: true },
  { text: "PREECLAMPSIA:", bold: true },
  { text: "Trophoblast invasion is IMPAIRED – reason still unclear", sub: true },
  { text: "Musculoelastic walls retained → channels remain narrow", sub: true },
  { text: "Reduced uteroplacental blood flow → placental hypoxia & ischemia", sub: true },
  { text: "Placenta releases antiangiogenic factors: sFlt-1 (anti-VEGF) & soluble endoglin (anti-TGF-β)", sub: true },
  { text: "→ Endothelial dysfunction, vascular hyperreactivity, end-organ microangiopathy", sub: true },
], { fontSize: 14 });

bodySlide("Molecular Mechanisms of Endothelial Dysfunction", [
  { text: "Prostacyclin (PGI₂) ↓ — vasodilator and anti-aggregant" },
  { text: "Thromboxane A₂ (TXA₂) ↑ — vasoconstrictor and pro-aggregant → net vasoconstriction" },
  { text: "Nitric oxide (NO) production ↓ → impaired vasodilation" },
  { text: "Soluble Flt-1 (sFlt-1) ↑ → binds and neutralizes VEGF and PlGF in circulation" },
  { text: "Soluble endoglin ↑ → antagonizes TGF-β signaling" },
  { text: "Inflammatory cytokines (TNF-α, IL-6) ↑ → systemic endothelial injury" },
  { text: "Endothelin-1 ↑ → potent vasoconstrictor (though at sub-threshold levels in vivo)" },
  { text: "Exaggerated sensitivity to angiotensin II → small doses cause large BP spikes" },
  { text: "Net result: Hypertension + proteinuria + multi-organ ischemia" },
]);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 5 — PATHOPHYSIOLOGY (MULTI-ORGAN)                  ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 5", "Pathophysiologic Changes – Multi-Organ Involvement");

twoColSlide(
  "Cardiovascular & Renal Changes",
  [
    "Cardiac output falls to pre-pregnancy levels with onset of preeclampsia",
    "Systemic vascular resistance ↑↑ → drives hypertension",
    "Arteriolar narrowing (retina, kidney, nail bed, conjunctiva)",
    "Increased sensitivity to all endogenous pressors (angiotensin II ×2.5 more sensitive)",
    "Plasma volume contraction despite sodium/water retention",
    "Paradoxical ↑ ANF with ↓ plasma renin → suggests effective circulating volume ↑ relatively",
  ],
  [
    "Glomerular filtration rate (GFR) ↓ – opposite to normal pregnancy",
    "Renal blood flow ↓",
    "Glomeruloendotheliosis – hallmark renal lesion (swollen glomerular endothelium)",
    "Proteinuria >300 mg/24 h (diagnostic criterion)",
    "Hyperuricemia – early sensitive marker (uric acid clearance ↓ before GFR falls)",
    "Serum creatinine ↑ in severe disease",
    "Sodium retention → edema, weight gain",
    "Total body sodium ↑ despite concentrated urine",
  ],
  "Cardiovascular",
  "Renal"
);

twoColSlide(
  "Hepatic, CNS & Hematologic Changes",
  [
    "Hepatic: Periportal fibrin deposition & necrosis",
    "AST and ALT ↑↑ → poor prognosis",
    "Hepatic capsular distension → RUQ pain, tenderness",
    "Risk of hepatic rupture (rare but catastrophic)",
    "HELLP: Microangiopathic hemolytic anemia + elevated liver enzymes + low platelets",
    "Placental: Infarcts, retroplacental hemorrhage, ischemic villous changes",
    "Acute atherosis of decidual vessels",
  ],
  [
    "CNS: Cerebral edema, vasospasm, microinfarcts",
    "Posterior reversible encephalopathy syndrome (PRES) on MRI",
    "Symptoms: Headache, visual disturbances, altered mental status",
    "Seizures = eclampsia",
    "Hematologic: Thrombocytopenia (platelet consumption)",
    "DIC in severe cases (rare but life-threatening)",
    "Coagulation factor changes, ↓ antithrombin III",
    "Hypercoagulability from endothelial dysfunction",
  ],
  "Hepatic & Placental",
  "CNS & Hematologic"
);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 6 — CLINICAL FEATURES                              ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 6", "Clinical Features & Diagnostic Criteria");

bodySlide("Clinical Features of Preeclampsia", [
  { text: "Most commonly starts after 34 weeks; earlier with hydatidiform mole or pre-existing disease" },
  { text: "Classic triad: Hypertension + Edema + Proteinuria (edema no longer diagnostic)" },
  { text: "Hypertension: SBP ≥140 OR DBP ≥90 mmHg on two readings ≥4 hours apart" },
  { text: "Severe range: SBP ≥160 OR DBP ≥110 mmHg (can confirm within minutes)" },
  { text: "Edema: Dependent edema common; facial/periorbital edema more concerning" },
  { text: "Rapid weight gain (fluid retention)" },
  { text: "Headache (new-onset, not relieved by analgesics)" },
  { text: "Visual disturbances: Blurring, scotoma, diplopia" },
  { text: "Epigastric or RUQ pain (hepatic capsular distension)" },
  { text: "Signs of severe disease: Pulmonary edema, oliguria, convulsions, coma" },
]);

// Diagnostic criteria table slide
{
  const sl = prs.addSlide();
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.95, fill: { color: MID_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT } });
  sl.addText("Diagnostic Criteria – Severe Features of Preeclampsia", {
    x: 0.22, y: 0.08, w: 9.6, h: 0.78,
    fontSize: 20, bold: true, color: WHITE, valign: "middle", fontFace: "Calibri", margin: 0
  });

  const rows2 = [
    [{ text: "System", options: { bold: true, color: WHITE, fill: { color: DARK_BG } } },
     { text: "Criterion", options: { bold: true, color: WHITE, fill: { color: DARK_BG } } },
     { text: "Threshold", options: { bold: true, color: WHITE, fill: { color: DARK_BG } } }],
    [{ text: "Blood Pressure" }, { text: "Severe range HTN" }, { text: "SBP ≥160 or DBP ≥110 mmHg (×2, ≥4 hr apart)" }],
    [{ text: "Renal" }, { text: "Proteinuria" }, { text: ">0.3 g/24 hr OR protein/creatinine ratio >0.3" }],
    [{ text: "Renal" }, { text: "Renal insufficiency" }, { text: "Cr >1.1 mg/dL or doubling (excl. other causes)" }],
    [{ text: "Hematologic" }, { text: "Thrombocytopenia" }, { text: "Platelets <100 × 10⁹/L" }],
    [{ text: "Hepatic" }, { text: "Impaired liver function" }, { text: "AST/ALT ≥2× ULN + severe RUQ/epigastric pain" }],
    [{ text: "Pulmonary" }, { text: "Pulmonary edema" }, { text: "New onset" }],
    [{ text: "CNS" }, { text: "Neurological symptoms" }, { text: "Headache unrelieved by analgesics; visual disturbances" }],
    [{ text: "Special" }, { text: "HELLP syndrome" }, { text: "Hemolysis + elevated liver enzymes + low platelets" }],
  ];
  sl.addTable(rows2, {
    x: 0.2, y: 1.0, w: 9.6, h: 4.45,
    colW: [1.6, 3.0, 5.0],
    border: { color: "C0C8D8", pt: 0.5 },
    align: "left",
    fontFace: "Calibri",
    fontSize: 12,
    color: TEXT_DARK,
  });
}

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 7 — LABORATORY INVESTIGATIONS                      ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 7", "Laboratory Findings & Investigations");

bodySlide("Investigations in Preeclampsia", [
  { text: "URINE:", bold: true },
  { text: "24-hr urine protein (>300 mg diagnostic)", sub: true },
  { text: "Spot protein/creatinine ratio >0.3", sub: true },
  { text: "Urine dipstick ≥2+ (if quantitative unavailable)", sub: true },
  { text: "RENAL FUNCTION:", bold: true },
  { text: "Serum uric acid ↑ – early sensitive marker; precedes GFR fall", sub: true },
  { text: "Serum creatinine (↑ in severe disease)", sub: true },
  { text: "24-hr creatinine clearance (decreased in most severe cases)", sub: true },
  { text: "HEPATIC & HEMATOLOGIC:", bold: true },
  { text: "AST, ALT (elevated = poor prognosis)", sub: true },
  { text: "Full blood count – platelets (↓); RBC morphology (schistocytes in HELLP)", sub: true },
  { text: "Coagulation screen – PT, aPTT, fibrinogen, antithrombin III", sub: true },
  { text: "LDH ↑ (hemolysis), serum bilirubin ↑", sub: true },
  { text: "IMAGING:", bold: true },
  { text: "MRI brain in eclampsia – PRES pattern (white matter edema)", sub: true },
  { text: "Fetal ultrasound – IUGR assessment, biophysical profile, Doppler", sub: true },
], { fontSize: 13.5 });

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 8 — HELLP SYNDROME                                 ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 8", "HELLP Syndrome");

bodySlide("HELLP Syndrome – Overview", [
  { text: "HELLP = Hemolysis + Elevated Liver enzymes + Low Platelets" },
  { text: "Occurs in ~10% of women with severe preeclampsia" },
  { text: "A microangiopathic process driven by endothelial dysfunction" },
  { text: "Hemolysis: Microangiopathic hemolytic anemia – schistocytes on blood film" },
  { text: "Elevated liver enzymes: AST/ALT ≥2× ULN; LDH ↑" },
  { text: "Low platelets: <100 × 10⁹/L from platelet consumption in microthrombi" },
  { text: "Can occur without hypertension or proteinuria in up to 20% of cases" },
  { text: "Associated with risk of: DIC, renal failure, abruptio placentae, hepatic rupture" },
  { text: "Management: Urgent delivery; corticosteroids may improve platelet counts transiently" },
  { text: "Prognosis: Maternal mortality ~1-3%; perinatal mortality significantly elevated" },
]);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 9 — ECLAMPSIA                                      ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 9", "Eclampsia");

bodySlide("Eclampsia – Features & Management", [
  { text: "Definition: New-onset tonic-clonic convulsions in the setting of preeclampsia" },
  { text: "Can occur: Antepartum (most common), intrapartum, or ≤48 h postpartum" },
  { text: "~20% of eclampsia episodes occur >48 hours after delivery" },
  { text: "Pathology: Cerebral vasospasm, edema, microinfarcts, petechial hemorrhages" },
  { text: "PRES (Posterior Reversible Encephalopathy) seen on MRI" },
  { text: "MgSO₄ is the drug of choice – seizure prophylaxis AND treatment" },
  { text: "MgSO₄ mechanism: Blocks NMDA receptors; vasodilation; ↓ cerebral irritability" },
  { text: "Loading dose: 4-6 g IV over 15-20 min; maintenance 1-2 g/hr infusion" },
  { text: "Monitor: Knee reflexes (loss precedes respiratory depression), urine output, Mg levels" },
  { text: "Antidote for Mg toxicity: Calcium gluconate 10 mL of 10% IV" },
  { text: "Renal function and hepatic function impaired in eclampsia" },
  { text: "Proteinuria and hypertension usually disappear within 1-2 weeks post delivery" },
]);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 10 — MANAGEMENT                                    ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 10", "Pharmacologic Management");

bodySlide("Antihypertensive Therapy in Pregnancy", [
  { text: "WHEN TO TREAT: DBP >105 mmHg OR SBP >160 mmHg (ACOG consensus)" },
  { text: "DRUGS TO AVOID:", bold: true },
  { text: "ACE inhibitors → fetal renal dysgenesis, oligohydramnios, IUFD", sub: true },
  { text: "Angiotensin receptor blockers (ARBs) → same fetal toxicity profile", sub: true },
  { text: "PREFERRED ORAL AGENTS:", bold: true },
  { text: "Alpha-methyldopa (250 mg BD) – former FDA category B; centrally acting; first-line oral", sub: true },
  { text: "Labetalol (100 mg BD) – combined α1/β blocker; reasonable safety data", sub: true },
  { text: "Nifedipine (30 mg OD slow-release) – calcium channel blocker; effective", sub: true },
  { text: "ACUTE/SEVERE HYPERTENSION (inpatient):", bold: true },
  { text: "Hydralazine: 5-10 mg IV/IM; repeat every 20 min based on response", sub: true },
  { text: "Labetalol: 20 mg IV; escalate to 40 mg at 10 min if inadequate", sub: true },
  { text: "IV nifedipine or nicardipine also used in some settings", sub: true },
], { fontSize: 13.5 });

bodySlide("Magnesium Sulfate – Seizure Prophylaxis & Treatment", [
  { text: "INDICATIONS:", bold: true },
  { text: "All severe preeclampsia with CNS manifestations (headache, visual disturbance, altered mental status)", sub: true },
  { text: "All cases of eclampsia (treatment of ongoing seizures)", sub: true },
  { text: "Postpartum women with persistent CNS manifestations (≥48 h watch)", sub: true },
  { text: "DOSING:", bold: true },
  { text: "Loading: 4-6 g in 100 mL normal saline IV over 15-20 min", sub: true },
  { text: "Maintenance: 1-2 g/hr IV infusion", sub: true },
  { text: "MONITORING:", bold: true },
  { text: "Patellar reflex present (loss at ~7 mEq/L, respiratory depression at ~10 mEq/L)", sub: true },
  { text: "Urine output ≥25 mL/hr (Mg excreted renally)", sub: true },
  { text: "Respiratory rate ≥12/min", sub: true },
  { text: "Serum Mg level (therapeutic range 4-7 mEq/L)", sub: true },
  { text: "ANTIDOTE: Calcium gluconate 10 mL of 10% solution IV slowly", sub: true },
  { text: "Documented efficacy with no adverse fetal effects (unlike other anticonvulsants)", sub: true },
], { fontSize: 13.5 });

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 11 — DELIVERY & DEFINITIVE TREATMENT               ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 11", "Delivery Timing & Definitive Treatment");

bodySlide("Delivery – The Definitive Treatment", [
  { text: "ONLY definitive treatment is delivery of the fetus and placenta" },
  { text: "With severe preeclampsia + end-organ damage + mature fetus → IMMEDIATE delivery" },
  { text: "Threshold: ≥34 weeks – generally recommend delivery" },
  { text: "Before 34 weeks: Balance risks of prematurity vs. continued preeclampsia" },
  { text: "Expectant management (hospitalization + pharmacotherapy) may allow fetal lung maturation" },
  { text: "Corticosteroids (betamethasone): Stimulate fetal lung maturation if preterm delivery anticipated" },
  { text: "Mode of delivery: Vaginal preferred if cervix favorable; cesarean for obstetric indications" },
  { text: "Postpartum: Continue MgSO₄ for ≥24-48 h after delivery" },
  { text: "Antihypertensives continued postpartum until BP normalizes" },
  { text: "Hypertension and proteinuria usually resolve within 1-2 weeks after delivery" },
  { text: "Rare: Persistent hypertension >12 wks postpartum → investigate for chronic HTN" },
]);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 12 — PREVENTION & PROGNOSIS                        ║
// ╚══════════════════════════════════════════════════════════════╝
sectionDivider("SECTION 12", "Prevention & Prognosis");

twoColSlide(
  "Prevention & Long-term Outcomes",
  [
    "Low-dose aspirin (81 mg/day from 12-16 wks) → reduces risk in high-risk women",
    "Calcium supplementation (1.5-2 g/day) in low-calcium intake populations",
    "Antioxidant vitamins (C, E) – NOT proven effective in large RCTs",
    "Salt restriction / diuretics do NOT prevent preeclampsia",
    "Preconception optimization: Control chronic HTN, DM, obesity",
    "Close antenatal surveillance for at-risk women",
    "Early screening: UtA Doppler + PlGF + PAPP-A at 11-14 wks",
  ],
  [
    "Favorable: Most cases resolve completely after delivery",
    "Increased lifetime cardiovascular risk after preeclampsia (2-4× risk of CVD)",
    "Higher risk of hypertension, ischemic heart disease, stroke in later life",
    "Recurrence risk: 15-20% in subsequent pregnancies",
    "Higher recurrence with onset <28 wks or severe features",
    "Eclampsia fatality: Now rare with early recognition and MgSO₄",
    "Major cause of maternal mortality globally (especially in LMICs)",
  ],
  "Prevention Strategies",
  "Prognosis & Long-term Risk"
);

// ╔══════════════════════════════════════════════════════════════╗
// ║  SECTION 13 — SUMMARY                                       ║
// ╚══════════════════════════════════════════════════════════════╝
{
  const sl = prs.addSlide();
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 5.545, w: 10, h: 0.08, fill: { color: ACCENT } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: TEAL } });
  sl.addText("Key Takeaways", {
    x: 0.3, y: 0.12, w: 9.4, h: 0.75,
    fontSize: 26, bold: true, color: GOLD, fontFace: "Calibri", align: "center"
  });
  const pts = [
    "PIH is unique to pregnancy – caused by defective trophoblast invasion of spiral arteries",
    "Central mechanism: Placental ischemia → antiangiogenic factors (sFlt-1, endoglin) → systemic endothelial dysfunction",
    "Diagnosis requires BP ≥140/90 after 20 wks + proteinuria OR end-organ damage",
    "Severe features demand urgent delivery or intensive management",
    "MgSO₄ is the standard for seizure prevention and treatment in eclampsia",
    "Avoid ACE inhibitors and ARBs – teratogenic and fetotoxic",
    "HELLP syndrome affects ~10% of severe preeclampsia – life-threatening",
    "Delivery is the ONLY definitive treatment; balance maturity vs. maternal risk",
    "Aspirin (low-dose) from first trimester reduces risk in high-risk patients",
    "Survivors have increased lifetime cardiovascular risk – long-term follow-up needed",
  ];
  const items = pts.map((p, i) => ({
    text: p,
    options: { bullet: { color: GOLD, code: "25CF" }, fontSize: 13.5, color: WHITE, breakLine: i < pts.length - 1 }
  }));
  sl.addText(items, {
    x: 0.3, y: 1.0, w: 9.4, h: 4.4,
    valign: "top", fontFace: "Calibri", lineSpacingMultiple: 1.2
  });
}

// Final Thank You slide
{
  const sl = prs.addSlide();
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(prs.ShapeType.rect, { x: 0, y: 2.5, w: 10, h: 0.06, fill: { color: ACCENT } });
  sl.addText("Thank You", {
    x: 0, y: 1.5, w: 10, h: 1.2,
    fontSize: 52, bold: true, color: GOLD, align: "center", fontFace: "Calibri"
  });
  sl.addText("Questions & Discussion", {
    x: 0, y: 2.75, w: 10, h: 0.7,
    fontSize: 22, color: LIGHT_TXT, align: "center", fontFace: "Calibri", italic: true
  });
  sl.addText("Sources: Creasy & Resnik's Maternal-Fetal Medicine (9780323828499) · Robbins & Kumar Basic Pathology ·\nGuyton & Hall Medical Physiology · Goodman & Gilman Pharmacology · Braunwald's Heart Disease", {
    x: 0.5, y: 3.8, w: 9.0, h: 0.9,
    fontSize: 10, color: "8899AA", align: "center", fontFace: "Calibri", italic: true
  });
}

// Write file
prs.writeFile({ fileName: "/home/daytona/workspace/pih-presentation/Pregnancy_Induced_Hypertension.pptx" })
  .then(() => console.log("DONE: Pregnancy_Induced_Hypertension.pptx created"))
  .catch(e => { console.error(e); process.exit(1); });
Running Command

cd /home/daytona/workspace/pih-presentation && node pih.js

Running Command

ls -lh /home/daytona/workspace/pih-presentation/

Your presentation is ready! Here is the download link:

Pregnancy Induced Hypertension

Presentation · PPTX


What's inside (21 slides, professional navy/red/gold theme):
#Slide
1Title slide – bold dark navy with gold typography
2Outline – 13-section roadmap
3-4Introduction & Definition – what PIH is, unique features, basic criteria
5ACOG Classification Table – gestational HTN, preeclampsia, severe features, eclampsia, HELLP, chronic HTN, superimposed – with BP thresholds (ACOG 2020 Bulletin #222)
6-7Epidemiology – stat-card infographic (5%, 85/1000, etc.) + two-column risk factor slide
8-9Pathogenesis – normal vs preeclamptic spiral artery remodeling; sFlt-1, endoglin, prostacyclin/TXA₂ imbalance, angiotensin sensitivity
10-11Multi-organ pathophysiology – cardiovascular & renal; hepatic, CNS & hematologic
12-13Clinical features & diagnostic criteria – with detailed severe-features table
14Investigations – urine, renal, hepatic, hematologic, imaging
15HELLP syndrome – definition, features, management, prognosis
16Eclampsia – definition, PRES, MgSO₄ dosing & monitoring
17-18Management – antihypertensives (avoid ACEi/ARBs; use methyldopa/labetalol/nifedipine/hydralazine) + MgSO₄ protocol
19Delivery timing – definitive treatment decision tree
20Prevention & prognosis – aspirin, calcium; lifetime CVD risk
21Summary & Thank You – 10 key takeaways
Sources drawn from: Creasy & Resnik's Maternal-Fetal Medicine, Robbins Pathology, Guyton & Hall Physiology, Goodman & Gilman Pharmacology, and Braunwald's Heart Disease.
This is a shared conversation. Sign in to Orris to start your own chat.