attachment
attachment

Convert into visual form flow chart diagrammatic way

analyse_media
Generating Image

A clean medical flowchart titled "Normal Pregnancy: Blood Pressure Regulation & Spiral Arteriole Changes" with two parallel pathways merging. TOP BOX (wide, blue): "Physiological Changes in Spiral Arterioles" → Arrow down → Box: "Endothelial lining + muscular arterial wall replaced by fibrinoid formation" → Arrow down → Box: "Spiral arterioles become distended, tortuous, funnel-shaped" → Arrow down → Highlighted green box: "LOW RESISTANCE | LOW PRESSURE | HIGH FLOW SYSTEM" Then below, label: "In Normal Pregnancy — Blood Pressure Stabilization" TWO PARALLEL PATHWAYS side by side: LEFT PATHWAY (orange header): "Mechanism 1: Angiotensin-II Destruction" → Box: "Angiotensin-II (part of α2-globulin) present" → Arrow down: "Angiotensinase liberated from placenta" → Arrow down: "Angiotensin-II destroyed" → Arrow down: "Blood Pressure Stabilized" RIGHT PATHWAY (purple header): "Mechanism 2: Vascular Refractoriness" → Box: "Vascular system becomes refractory to Angiotensin-II (pressor agent)" → Arrow down: "Vascular synthesis of Prostaglandin I2 + Nitric Oxide (NO)" → Arrow down: "Vasodilator Effect" → Arrow down: "Blood Pressure Stabilized" BOTH LEFT AND RIGHT arrows converge into a CENTRAL BLUE BOX: "Interaction of both systems → Blood Pressure Stabilized in Normal Pregnancy" FINAL BOX below (green): "↑ VEGF (Vascular Endothelial Growth Factor — mitogenic glycoprotein) → Restores Uteroplacental Blood Flow to Normal Level" Use arrows, rounded boxes, pastel colors, medical diagram style, clean white background, readable fonts

Normal Pregnancy Blood Pressure Regulation Flowchart
Here is the flowchart summarizing the content from your textbook. It covers two main sections:

Section 1 - Spiral Arteriole Changes:
  • Fibrinoid formation replaces endothelial lining and muscular arterial wall
  • Arterioles become distended, tortuous, and funnel-shaped
  • Result: Low resistance, low pressure, high flow system

Section 2 - Blood Pressure Regulation in Normal Pregnancy (two parallel mechanisms):
Mechanism 1Mechanism 2
Angiotensin-II (α2-globulin) destroyed by angiotensinase from placentaVascular system becomes refractory to Angiotensin-II
BP stabilized via removal of pressor agentProstaglandin I2 + Nitric Oxide (NO) synthesis causes vasodilation
Both mechanisms interact to stabilize blood pressure in normal pregnancy.

Final step: Increased VEGF (a mitogenic glycoprotein) restores uteroplacental blood flow to normal level.

Make a presentation comparing normal vs pre-eclampsia pathophysiology

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

ls /home/daytona/workspace/ 2>/dev/null && echo "---" && ls /home/daytona/skills/pptx/

Running Command

mkdir -p /home/daytona/workspace/preeclampsia-ppt

Writing File

~/preeclampsia-ppt/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Normal Pregnancy vs Pre-eclampsia: Pathophysiology";
pres.author = "Medical Education";

// ─── Color Palette ───────────────────────────────────────────────
const C = {
  darkBg:   "0D1B2A",   // deep navy – title / section covers
  midBg:    "1B2A3B",   // mid-navy – content background
  normal:   "1A936F",   // teal-green for Normal Pregnancy
  pre:      "C0392B",   // crimson for Pre-eclampsia
  accent:   "F4A261",   // amber – highlights
  white:    "FFFFFF",
  lightGray:"E8EDF2",
  textDark: "0D1B2A",
  subtext:  "7F8C8D",
  border:   "2C3E50",
};

// ─── Helper: add a dark-background header bar ─────────────────────
function addHeader(slide, title, subtitle) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: "100%", h: 1.1,
    fill: { color: C.darkBg },
  });
  slide.addText(title, {
    x: 0.35, y: 0.08, w: 9.3, h: 0.55,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.35, y: 0.62, w: 9.3, h: 0.38,
      fontSize: 12, color: C.accent, fontFace: "Calibri", italic: true, margin: 0,
    });
  }
}

// ─── Helper: tag pill ─────────────────────────────────────────────
function addTag(slide, label, x, y, color) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x, y, w: 2.1, h: 0.32,
    fill: { color }, rectRadius: 0.08,
  });
  slide.addText(label, {
    x, y, w: 2.1, h: 0.32,
    fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle",
    fontFace: "Calibri", margin: 0,
  });
}

// ─── Helper: section card ─────────────────────────────────────────
function addCard(slide, x, y, w, h, headText, headColor, bodyItems) {
  // header stripe
  slide.addShape(pres.shapes.RECTANGLE, {
    x, y, w, h: 0.38,
    fill: { color: headColor },
  });
  slide.addText(headText, {
    x: x + 0.08, y, w: w - 0.16, h: 0.38,
    fontSize: 11, bold: true, color: C.white, valign: "middle", fontFace: "Calibri", margin: 0,
  });
  // body
  slide.addShape(pres.shapes.RECTANGLE, {
    x, y: y + 0.38, w, h: h - 0.38,
    fill: { color: C.white },
    line: { color: headColor, width: 1.5 },
  });
  const bullets = bodyItems.map((item, i) => ({
    text: item,
    options: { bullet: true, breakLine: i < bodyItems.length - 1, fontSize: 10, color: C.textDark, fontFace: "Calibri" },
  }));
  slide.addText(bullets, {
    x: x + 0.12, y: y + 0.42, w: w - 0.24, h: h - 0.52,
    valign: "top", fontFace: "Calibri",
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 1 – TITLE
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.darkBg } });

  // accent left stripe
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: "100%", fill: { color: C.normal } });

  sl.addText("Normal Pregnancy", {
    x: 0.5, y: 1.2, w: 9, h: 0.65,
    fontSize: 32, bold: true, color: C.normal, fontFace: "Calibri", margin: 0,
  });
  sl.addText("vs", {
    x: 0.5, y: 1.85, w: 9, h: 0.5,
    fontSize: 22, color: C.white, fontFace: "Calibri", italic: true, margin: 0,
  });
  sl.addText("Pre-eclampsia", {
    x: 0.5, y: 2.3, w: 9, h: 0.65,
    fontSize: 32, bold: true, color: C.pre, fontFace: "Calibri", margin: 0,
  });
  sl.addText("Pathophysiology — A Comparative Overview", {
    x: 0.5, y: 3.1, w: 9, h: 0.45,
    fontSize: 16, color: C.accent, fontFace: "Calibri", italic: true, margin: 0,
  });
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0.5, y: 3.62, w: 5, h: 0.04,
    fill: { color: C.accent },
  });
  sl.addText("Sources: Robbins & Kumar Basic Pathology | DC Dutta's Textbook of Obstetrics", {
    x: 0.5, y: 4.8, w: 9, h: 0.35,
    fontSize: 9, color: C.subtext, fontFace: "Calibri", italic: true, margin: 0,
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 2 – OVERVIEW TABLE
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.lightGray } });
  addHeader(sl, "At a Glance: Key Differences", "A side-by-side snapshot");

  const rows = [
    ["Feature", "Normal Pregnancy", "Pre-eclampsia"],
    ["Spiral artery remodeling", "Complete — dilated sinusoids", "Impaired — narrow channels"],
    ["Trophoblast invasion", "Full (musculoelastic wall replaced)", "Partial / absent"],
    ["Blood pressure", "Stabilized / normal", "Hypertension (>140/90)"],
    ["Angiotensin-II", "Destroyed by angiotensinase", "Vascular hyper-reactivity"],
    ["Prostacyclin / PGI2", "Increased — vasodilation", "Decreased"],
    ["Thromboxane A2", "Low", "Increased — vasoconstriction"],
    ["Nitric Oxide (NO)", "Produced — vasodilator", "Reduced production"],
    ["VEGF", "Increased — restores blood flow", "Antagonized by sFlt-1 & endoglin"],
    ["Proteinuria", "Absent", "Present (hallmark)"],
    ["Outcome", "Normal uteroplacental flow", "Placental hypoxia / end-organ damage"],
  ];

  const colW = [2.6, 3.2, 3.2];
  const rowH = 0.33;
  const startX = 0.3;
  const startY = 1.2;

  rows.forEach((row, ri) => {
    row.forEach((cell, ci) => {
      const x = startX + colW.slice(0, ci).reduce((a, b) => a + b, 0);
      const y = startY + ri * rowH;
      let bg = ri === 0 ? C.darkBg : (ri % 2 === 0 ? "DDEEFF" : C.white);
      if (ri > 0 && ci === 1) bg = ri % 2 === 0 ? "D5F5E8" : "EAF9F2";
      if (ri > 0 && ci === 2) bg = ri % 2 === 0 ? "FADBD8" : "FDEDEC";
      sl.addShape(pres.shapes.RECTANGLE, {
        x, y, w: colW[ci], h: rowH,
        fill: { color: bg },
        line: { color: "C8D6E5", width: 0.5 },
      });
      sl.addText(cell, {
        x: x + 0.06, y, w: colW[ci] - 0.12, h: rowH,
        fontSize: ri === 0 ? 10 : 9,
        bold: ri === 0 || ci === 0,
        color: ri === 0 ? C.white : C.textDark,
        valign: "middle", fontFace: "Calibri", margin: 0,
      });
    });
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 3 – SPIRAL ARTERY REMODELING
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: "F0F4F8" } });
  addHeader(sl, "Spiral Artery Remodeling", "The central divergence in normal vs pre-eclamptic pregnancy");

  addTag(sl, "NORMAL PREGNANCY", 0.3, 1.25, C.normal);
  addTag(sl, "PRE-ECLAMPSIA", 5.3, 1.25, C.pre);

  // Normal side
  const normalSteps = [
    "Trophoblasts invade spiral artery walls",
    "Musculoelastic wall replaced by fibrinoid formation",
    "Arterioles become distended, tortuous & funnel-shaped",
    "Low resistance · Low pressure · High flow system",
    "Adequate uteroplacental perfusion",
  ];
  addCard(sl, 0.3, 1.65, 4.3, 3.5, "Normal Remodeling Pathway", C.normal, normalSteps);

  // Pre-eclampsia side
  const preSteps = [
    "Second wave of endovascular trophoblast migration FAILS",
    "Musculoelastic walls are RETAINED",
    "Channels remain narrow — vascular remodeling impaired",
    "Decreased uteroplacental blood flow",
    "Placental hypoxia & dysfunction",
  ];
  addCard(sl, 5.3, 1.65, 4.3, 3.5, "Impaired Remodeling in Pre-eclampsia", C.pre, preSteps);

  // Arrow in middle
  sl.addShape(pres.shapes.LEFT_RIGHT_ARROW, {
    x: 4.65, y: 2.8, w: 0.65, h: 0.4,
    fill: { color: C.accent },
  });
  sl.addText("vs", {
    x: 4.65, y: 3.28, w: 0.65, h: 0.28,
    fontSize: 10, bold: true, color: C.border, align: "center", fontFace: "Calibri", margin: 0,
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 4 – BLOOD PRESSURE MECHANISMS
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: "F0F4F8" } });
  addHeader(sl, "Blood Pressure Regulation", "Vasoactive mediator balance in normal pregnancy vs pre-eclampsia");

  // Normal mechanisms
  addCard(sl, 0.3, 1.25, 4.3, 1.7, "Normal: Angiotensin-II Control", C.normal, [
    "Angiotensin-II (part of α2-globulin) present",
    "Angiotensinase liberated from placenta destroys it",
    "Result: Blood pressure stabilized",
  ]);

  addCard(sl, 0.3, 3.05, 4.3, 1.7, "Normal: Prostaglandin I2 & NO", C.normal, [
    "Vascular synthesis of PGI2 and Nitric Oxide (NO)",
    "Vasodilator effect — blunts pressor response to Ang-II",
    "Both systems together maintain normal BP",
  ]);

  // Pre-eclampsia mechanisms
  addCard(sl, 5.3, 1.25, 4.3, 1.7, "Pre-eclampsia: Vascular Hyper-reactivity", C.pre, [
    "Loss of vascular refractoriness to Angiotensin-II",
    "Increased thromboxane A2 (vasoconstrictor)",
    "Result: Severe hypertension",
  ]);

  addCard(sl, 5.3, 3.05, 4.3, 1.7, "Pre-eclampsia: Vasodilator Deficiency", C.pre, [
    "Reduced prostacyclin (PGI2) production",
    "Reduced endothelial Nitric Oxide (NO)",
    "Net effect: Unopposed vasoconstriction → ↑ BP",
  ]);

  // divider line
  sl.addShape(pres.shapes.LINE, {
    x: 4.95, y: 1.2, w: 0, h: 3.6,
    line: { color: C.accent, width: 1.5, dashType: "dash" },
  });
  sl.addText("vs", {
    x: 4.68, y: 2.85, w: 0.6, h: 0.35,
    fontSize: 11, bold: true, color: C.border, align: "center", fontFace: "Calibri",
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 5 – ANGIOGENIC FACTORS (VEGF / sFlt-1 / Endoglin)
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: "F0F4F8" } });
  addHeader(sl, "Angiogenic Factor Imbalance", "VEGF, sFlt-1, endoglin, TGF-β in normal vs pre-eclampsia");

  // VEGF normal
  addCard(sl, 0.3, 1.25, 4.3, 2.0, "Normal Pregnancy: Pro-angiogenic State", C.normal, [
    "VEGF (Vascular Endothelial Growth Factor) — a mitogenic glycoprotein",
    "Increased VEGF restores uteroplacental blood flow to normal",
    "TGF-β supports normal endothelial function",
    "Balance maintained — healthy vascular remodeling",
  ]);

  // VEGF preeclampsia
  addCard(sl, 5.3, 1.25, 4.3, 2.0, "Pre-eclampsia: Anti-angiogenic Shift", C.pre, [
    "↑ Soluble FMS-like tyrosine kinase-1 (sFlt-1) — antagonizes VEGF",
    "↑ Soluble endoglin — antagonizes TGF-β",
    "Net result: VEGF & TGF-β activity suppressed",
    "Endothelial dysfunction & vascular hyper-reactivity",
  ]);

  // Consequences box
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0.3, y: 3.35, w: 9.3, h: 1.8,
    fill: { color: C.pre }, line: { color: C.pre, width: 0 },
  });
  sl.addText("Consequences of Endothelial Dysfunction in Pre-eclampsia", {
    x: 0.45, y: 3.4, w: 9, h: 0.35,
    fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  const consequences = [
    { text: "Placental infarction", options: { bullet: true, breakLine: true, fontSize: 10, color: C.white, fontFace: "Calibri" } },
    { text: "Vascular hyperreactivity → hypertension", options: { bullet: true, breakLine: true, fontSize: 10, color: C.white, fontFace: "Calibri" } },
    { text: "Hypercoagulability → ↑ thrombus risk", options: { bullet: true, breakLine: true, fontSize: 10, color: C.white, fontFace: "Calibri" } },
    { text: "End-organ failure — kidney, liver (HELLP syndrome in ~10% severe cases)", options: { bullet: true, fontSize: 10, color: C.white, fontFace: "Calibri" } },
  ];
  sl.addText(consequences, {
    x: 0.45, y: 3.78, w: 9, h: 1.3, valign: "top", fontFace: "Calibri",
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 6 – PATHOGENESIS FLOWCHART
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: "F0F4F8" } });
  addHeader(sl, "Pre-eclampsia: Pathogenesis Cascade", "Step-by-step mechanism from impaired remodeling to end-organ damage");

  const boxes = [
    { x: 3.5, y: 1.15, w: 3.0, h: 0.45, text: "Inadequate trophoblast invasion", color: C.darkBg },
    { x: 3.5, y: 1.85, w: 3.0, h: 0.45, text: "Retained narrow spiral arteries", color: C.border },
    { x: 3.5, y: 2.55, w: 3.0, h: 0.45, text: "Reduced uteroplacental blood flow", color: C.border },
    { x: 3.5, y: 3.25, w: 3.0, h: 0.45, text: "Placental hypoxia & dysfunction", color: C.pre },
    { x: 3.5, y: 3.95, w: 3.0, h: 0.45, text: "↑ sFlt-1 & Endoglin → endothelial dysfunction", color: C.pre },
    { x: 3.5, y: 4.65, w: 3.0, h: 0.45, text: "Hypertension · Proteinuria · End-organ damage", color: "7D3C98" },
  ];

  boxes.forEach((b, i) => {
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x: b.x, y: b.y, w: b.w, h: b.h,
      fill: { color: b.color }, rectRadius: 0.08,
    });
    sl.addText(b.text, {
      x: b.x, y: b.y, w: b.w, h: b.h,
      fontSize: 9.5, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    // downward arrow
    if (i < boxes.length - 1) {
      sl.addShape(pres.shapes.DOWN_ARROW, {
        x: 4.7, y: b.y + b.h, w: 0.6, h: 0.28,
        fill: { color: C.accent },
      });
    }
  });

  // side note: HELLP
  sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 0.2, y: 4.55, w: 2.9, h: 0.65,
    fill: { color: "7D3C98" }, rectRadius: 0.08,
  });
  sl.addText("HELLP Syndrome\n(~10% severe cases)\nHemolysis · Elevated liver enzymes · Low platelets", {
    x: 0.3, y: 4.57, w: 2.7, h: 0.62,
    fontSize: 8, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0,
  });

  // side note: DIC
  sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 6.9, y: 4.55, w: 2.8, h: 0.65,
    fill: { color: "7D3C98" }, rectRadius: 0.08,
  });
  sl.addText("DIC possible\n(Disseminated Intravascular\nCoagulation)", {
    x: 7.0, y: 4.57, w: 2.6, h: 0.62,
    fontSize: 8, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0,
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 7 – CLINICAL FEATURES & MORPHOLOGY
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: "F0F4F8" } });
  addHeader(sl, "Clinical Features & Morphological Changes", "Pre-eclampsia presentation and tissue pathology");

  addCard(sl, 0.3, 1.25, 4.55, 3.7, "Clinical Presentation", C.pre, [
    "Onset: usually after 34 weeks gestation",
    "Earlier if: hydatidiform mole, pre-existing renal disease, hypertension, coagulopathy",
    "Triad: Hypertension + Oedema + Proteinuria",
    "Convulsions / coma → eclampsia",
    "BP and proteinuria resolve within 1–2 weeks post-delivery",
    "Most effective treatment: prompt delivery",
  ]);

  addCard(sl, 5.15, 1.25, 4.45, 3.7, "Morphological Changes (Placenta)", C.pre, [
    "Multiple placental infarcts (more numerous than normal)",
    "Retroplacental haemorrhage",
    "Ischaemic changes of placental villi",
    "Increased syncytial epithelial knots",
    "Fibrinoid necrosis of decidual vessels",
    "Focal lipid-laden macrophages (acute atherosis)",
  ]);

  sl.addText("Incidence: 3–5% of pregnancies | More common in primigravidae", {
    x: 0.3, y: 5.1, w: 9.3, h: 0.3,
    fontSize: 10, italic: true, color: C.subtext, fontFace: "Calibri", margin: 0,
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 8 – MEDIATOR BALANCE VISUAL
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: "F0F4F8" } });
  addHeader(sl, "Vasoactive Mediator Balance", "The tipping point between normal BP and hypertension");

  // Vasodilators column
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0.3, y: 1.2, w: 3.5, h: 0.4,
    fill: { color: C.normal },
  });
  sl.addText("VASODILATORS", {
    x: 0.3, y: 1.2, w: 3.5, h: 0.4,
    fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  const dilators = [
    ["Prostacyclin (PGI2)", "Normal ↑", "Pre-eclampsia ↓"],
    ["Nitric Oxide (NO)", "Normal ↑", "Pre-eclampsia ↓"],
    ["VEGF", "Normal ↑", "Pre-eclampsia ↓ (blocked by sFlt-1)"],
    ["Prostaglandin E2", "Normal ↑", "Pre-eclampsia ↓"],
  ];

  dilators.forEach((d, i) => {
    const y = 1.7 + i * 0.65;
    sl.addShape(pres.shapes.RECTANGLE, {
      x: 0.3, y, w: 3.5, h: 0.55,
      fill: { color: i % 2 === 0 ? "D5F5E8" : "EAF9F2" },
      line: { color: C.normal, width: 1 },
    });
    sl.addText([
      { text: d[0] + "\n", options: { bold: true, fontSize: 9.5, color: C.textDark, fontFace: "Calibri" } },
      { text: d[1] + "   |   " + d[2], options: { fontSize: 8.5, color: C.subtext, fontFace: "Calibri" } },
    ], { x: 0.4, y, w: 3.3, h: 0.55, valign: "middle", margin: 0 });
  });

  // Vasoconstrictors column
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 6.2, y: 1.2, w: 3.5, h: 0.4,
    fill: { color: C.pre },
  });
  sl.addText("VASOCONSTRICTORS", {
    x: 6.2, y: 1.2, w: 3.5, h: 0.4,
    fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  const constrictors = [
    ["Thromboxane A2", "Normal ↓", "Pre-eclampsia ↑"],
    ["Angiotensin-II", "Normal — destroyed", "Pre-eclampsia — hyper-reactivity"],
    ["Endothelin", "Normal low", "Pre-eclampsia ↑"],
    ["sFlt-1 / Endoglin", "Normal absent", "Pre-eclampsia ↑↑ (anti-VEGF)"],
  ];

  constrictors.forEach((d, i) => {
    const y = 1.7 + i * 0.65;
    sl.addShape(pres.shapes.RECTANGLE, {
      x: 6.2, y, w: 3.5, h: 0.55,
      fill: { color: i % 2 === 0 ? "FADBD8" : "FDEDEC" },
      line: { color: C.pre, width: 1 },
    });
    sl.addText([
      { text: d[0] + "\n", options: { bold: true, fontSize: 9.5, color: C.textDark, fontFace: "Calibri" } },
      { text: d[1] + "   |   " + d[2], options: { fontSize: 8.5, color: C.subtext, fontFace: "Calibri" } },
    ], { x: 6.3, y, w: 3.3, h: 0.55, valign: "middle", margin: 0 });
  });

  // Balance scale divider
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 4.6, y: 1.1, w: 0.8, h: 3.9,
    fill: { color: C.lightGray },
    line: { color: C.accent, width: 1.5 },
  });
  sl.addText("⚖", {
    x: 4.6, y: 2.7, w: 0.8, h: 0.5,
    fontSize: 22, align: "center", fontFace: "Calibri", margin: 0,
  });
  sl.addText("BALANCE", {
    x: 4.6, y: 3.25, w: 0.8, h: 0.35,
    fontSize: 7, bold: true, color: C.border, align: "center", fontFace: "Calibri", margin: 0,
  });
}

// ─────────────────────────────────────────────────────────────────
//  SLIDE 9 – SUMMARY / CONCLUSION
// ─────────────────────────────────────────────────────────────────
{
  const sl = pres.addSlide();
  sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: C.darkBg } });

  sl.addText("Key Takeaways", {
    x: 0.5, y: 0.25, w: 9, h: 0.6,
    fontSize: 28, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  sl.addShape(pres.shapes.RECTANGLE, {
    x: 0.5, y: 0.88, w: 4, h: 0.05,
    fill: { color: C.accent },
  });

  const points = [
    { num: "01", title: "Trophoblast invasion is the crux", body: "Successful invasion → low resistance flow. Failure → placental hypoxia — the root of pre-eclampsia." },
    { num: "02", title: "Vasodilators vs Vasoconstrictors", body: "Normal pregnancy balances PGI2, NO, VEGF against constrictors. Pre-eclampsia tips this balance toward constriction and hypertension." },
    { num: "03", title: "VEGF / sFlt-1 imbalance", body: "Anti-angiogenic factors (sFlt-1, endoglin) suppress VEGF/TGF-β — this drives endothelial dysfunction systemically." },
    { num: "04", title: "HELLP & DIC — severe end", body: "~10% of severe pre-eclampsia → HELLP (haemolysis, elevated LFTs, low platelets). Convulsions = eclampsia." },
  ];

  points.forEach((p, i) => {
    const x = i < 2 ? 0.3 : 5.2;
    const y = i % 2 === 0 ? 1.1 : 3.1;
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x, y, w: 4.5, h: 1.75,
      fill: { color: C.midBg }, rectRadius: 0.1,
      line: { color: i < 2 ? C.normal : C.pre, width: 2 },
    });
    sl.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x: x + 0.12, y: y + 0.12, w: 0.42, h: 0.42,
      fill: { color: i < 2 ? C.normal : C.pre }, rectRadius: 0.05,
    });
    sl.addText(p.num, {
      x: x + 0.12, y: y + 0.12, w: 0.42, h: 0.42,
      fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    sl.addText(p.title, {
      x: x + 0.62, y: y + 0.12, w: 3.75, h: 0.42,
      fontSize: 11, bold: true, color: C.accent, fontFace: "Calibri", margin: 0,
    });
    sl.addText(p.body, {
      x: x + 0.18, y: y + 0.6, w: 4.15, h: 1.05,
      fontSize: 9.5, color: C.lightGray, fontFace: "Calibri", margin: 0,
    });
  });

  sl.addText("Robbins & Kumar Basic Pathology | DC Dutta's Textbook of Obstetrics", {
    x: 0.3, y: 5.22, w: 9.3, h: 0.28,
    fontSize: 8, color: C.subtext, fontFace: "Calibri", italic: true, margin: 0,
  });
}

// ─────────────────────────────────────────────────────────────────
//  WRITE FILE
// ─────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/preeclampsia-ppt/Normal_vs_Preeclampsia_Pathophysiology.pptx" })
  .then(() => console.log("DONE"))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/preeclampsia-ppt && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/preeclampsia-ppt/

Your presentation is ready. Download it here:

Normal vs Preeclampsia Pathophysiology

Presentation · PPTX


What's inside (9 slides):
SlideContent
1Title slide - dark navy with color-coded branding
2At a Glance comparison table (11 features side-by-side)
3Spiral Artery Remodeling - normal vs impaired (two-column cards)
4Blood Pressure Regulation - Angiotensin-II, PGI2, NO mechanisms
5Angiogenic Factor Imbalance - VEGF / sFlt-1 / Endoglin / TGF-β
6Pre-eclampsia Pathogenesis Cascade (step-by-step flowchart with HELLP/DIC boxes)
7Clinical Features + Morphological placental changes
8Vasoactive Mediator Balance - visual scale of dilators vs constrictors
9Key Takeaways (4-point summary cards)
Color coding: Green = Normal Pregnancy | Red = Pre-eclampsia | Amber = key highlights
Sources: Robbins & Kumar Basic Pathology and DC Dutta's Textbook of Obstetrics.
This is a shared conversation. Sign in to Orris to start your own chat.