Make ppt on topic small for gestational age versus fetal growth restriction 20 slides
small for gestational age vs fetal growth restriction definitions diagnosis management 2024
mkdir -p /home/daytona/workspace/sga-fgr-ppt && ls /home/daytona/workspace/sga-fgr-ppt/
~/sga-fgr-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "SGA vs FGR: Understanding the Difference";
pres.author = "Medical Education";
// ─── DESIGN TOKENS ───────────────────────────────────────────────────────────
const C = {
navy: "0D2B55",
teal: "1A7A8C",
tealLt: "2EA8BE",
gold: "E8A020",
white: "FFFFFF",
offWht: "F0F6FA",
gray: "445566",
grayLt: "7A90A0",
red: "C0392B",
green: "1D7A4A",
panel1: "0A3A5C", // dark panel
panel2: "112244", // darker panel
accent: "F0B429",
};
// ─── HELPER FUNCTIONS ────────────────────────────────────────────────────────
function addBg(slide, color) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color }, line: { color } });
}
function addHeader(slide, title, subtitle) {
// Title bar
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.05, fill: { color: C.navy }, line: { color: C.navy } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 1.05, w: 10, h: 0.07, fill: { color: C.gold }, line: { color: C.gold } });
slide.addText(title, { x: 0.4, y: 0.08, w: 9.2, h: 0.7, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
if (subtitle) {
slide.addText(subtitle, { x: 0.4, y: 0.78, w: 9.2, h: 0.3, fontSize: 13, color: C.gold, fontFace: "Calibri", italic: true, margin: 0 });
}
}
function addFooter(slide, pageNum) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: C.navy }, line: { color: C.navy } });
slide.addText(`SGA vs FGR | Creasy & Resnik's Maternal-Fetal Medicine`, { x: 0.3, y: 5.36, w: 8, h: 0.22, fontSize: 8, color: C.grayLt, fontFace: "Calibri", margin: 0 });
slide.addText(`${pageNum} / 20`, { x: 9.1, y: 5.36, w: 0.7, h: 0.22, fontSize: 8, color: C.grayLt, fontFace: "Calibri", align: "right", margin: 0 });
}
function bulletItems(items, opts = {}) {
return items.map((txt, i) => ({
text: txt,
options: { bullet: { type: "bullet" }, breakLine: i < items.length - 1, ...opts }
}));
}
function card(slide, x, y, w, h, headText, bodyItems, headBg, bodyBg) {
// Head
slide.addShape(pres.ShapeType.rect, { x, y, w, h: 0.42, fill: { color: headBg }, line: { color: headBg }, rectRadius: 0.04 });
slide.addText(headText, { x: x + 0.08, y: y + 0.04, w: w - 0.16, h: 0.34, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
// Body
const bh = h - 0.42;
slide.addShape(pres.ShapeType.rect, { x, y: y + 0.42, w, h: bh, fill: { color: bodyBg }, line: { color: headBg } });
const items = bodyItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < bodyItems.length - 1 } }));
slide.addText(items, { x: x + 0.1, y: y + 0.48, w: w - 0.2, h: bh - 0.12, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
}
function labelValue(slide, x, y, label, value, labelColor, valueColor) {
slide.addText(label, { x, y, w: 2.2, h: 0.32, fontSize: 11, bold: true, color: labelColor, fontFace: "Calibri", margin: 0 });
slide.addText(value, { x: x + 2.2, y, w: 4.5, h: 0.32, fontSize: 11, color: valueColor, fontFace: "Calibri", margin: 0 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
// Full-slide dark background gradient simulation with two rects
sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.panel2 }, line: { color: C.panel2 } });
sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy, transparency: 30 }, line: { color: C.navy, transparency: 30 } });
// Accent bar
sl.addShape(pres.ShapeType.rect, { x: 0, y: 2.3, w: 10, h: 0.09, fill: { color: C.gold }, line: { color: C.gold } });
// Left teal accent
sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Small for Gestational Age", { x: 0.6, y: 0.45, w: 8.8, h: 0.72, fontSize: 36, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
sl.addText("versus", { x: 0.6, y: 1.22, w: 8.8, h: 0.5, fontSize: 24, color: C.gold, fontFace: "Calibri", align: "center", italic: true, margin: 0 });
sl.addText("Fetal Growth Restriction", { x: 0.6, y: 1.72, w: 8.8, h: 0.72, fontSize: 36, bold: true, color: C.tealLt, fontFace: "Calibri", align: "center", margin: 0 });
sl.addText("Understanding the Definitions, Diagnosis & Management", { x: 0.6, y: 2.52, w: 8.8, h: 0.42, fontSize: 15, color: C.offWht, fontFace: "Calibri", align: "center", italic: true, margin: 0 });
sl.addText("Obstetrics & Maternal-Fetal Medicine", { x: 0.6, y: 4.9, w: 8.8, h: 0.3, fontSize: 11, color: C.grayLt, fontFace: "Calibri", align: "center", margin: 0 });
sl.addText("Source: Creasy & Resnik's Maternal-Fetal Medicine, 9th Ed.", { x: 0.6, y: 5.2, w: 8.8, h: 0.25, fontSize: 9, color: C.grayLt, fontFace: "Calibri", align: "center", italic: true, margin: 0 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Lecture Overview", "Topics covered in this presentation");
addFooter(sl, 2);
const topics = [
["01", "Historical Background & Evolution of Terminology"],
["02", "Definitions: SGA, FGR, AGA, IUGR"],
["03", "Key Differences: SGA vs FGR"],
["04", "Classification of FGR (Symmetric / Asymmetric)"],
["05", "Early-onset vs Late-onset FGR"],
["06", "Incidence & Epidemiology"],
["07", "Etiology — Maternal, Fetal, Placental"],
["08", "Pathophysiology"],
["09", "Diagnosis — History & Physical"],
["10", "Diagnosis — Ultrasonography"],
["11", "Doppler Velocimetry"],
["12", "Surveillance & Monitoring"],
["13", "Management Principles"],
["14", "Timing of Delivery"],
["15", "Neonatal Complications of SGA/FGR"],
["16", "Long-term Sequelae"],
["17", "Prevention & Risk Reduction"],
["18", "Customized vs Population Growth Curves"],
["19", "Case Scenarios & Clinical Pearls"],
["20", "Summary & Key Take-aways"],
];
const col1 = topics.slice(0, 10);
const col2 = topics.slice(10);
const startY = 1.22;
const rowH = 0.38;
col1.forEach(([num, text], i) => {
const y = startY + i * rowH;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.36, h: 0.28, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText(num, { x: 0.3, y, w: 0.36, h: 0.28, fontSize: 9, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(text, { x: 0.72, y, w: 4.0, h: 0.28, fontSize: 10, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 0 });
});
col2.forEach(([num, text], i) => {
const y = startY + i * rowH;
sl.addShape(pres.ShapeType.rect, { x: 5.2, y, w: 0.36, h: 0.28, fill: { color: C.navy }, line: { color: C.navy } });
sl.addText(num, { x: 5.2, y, w: 0.36, h: 0.28, fontSize: 9, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(text, { x: 5.62, y, w: 4.1, h: 0.28, fontSize: 10, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — HISTORICAL BACKGROUND
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Historical Background", "How the terminology evolved over time");
addFooter(sl, 3);
const timeline = [
{ year: "Early 20th C", event: "All small newborns were classified as premature — no distinction made" },
{ year: "Mid-20th C", event: "Concept of the 'undernourished neonate' — newborns <2500 g labeled low-birth-weight (WHO)" },
{ year: "1960s", event: "Lubchenco et al. published birth-weight-for-gestational-age curves; introduced SGA (<10th%), AGA (10–90th%), LGA (>90th%) categories" },
{ year: "1970–80s", event: "Term IUGR (intrauterine growth restriction) widely adopted to indicate pathologic process" },
{ year: "1990s–2000s", event: "Recognition that SGA ≠ FGR; up to 70% of SGA infants may be constitutionally small" },
{ year: "Current", event: "FGR preferred over IUGR; Delphi consensus criteria and Doppler-based staging introduced" },
];
timeline.forEach((item, i) => {
const y = 1.28 + i * 0.67;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.45, h: 0.44, fill: { color: i % 2 === 0 ? C.navy : C.teal }, line: { color: C.navy } });
sl.addText(item.year, { x: 0.3, y, w: 1.45, h: 0.44, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 1.75, y: y + 0.16, w: 0.18, h: 0.06, fill: { color: C.gold }, line: { color: C.gold } });
sl.addShape(pres.ShapeType.rect, { x: 1.93, y, w: 7.7, h: 0.44, fill: { color: i % 2 === 0 ? "E8F4F8" : "F5F5FF" }, line: { color: "CCDDEE" } });
sl.addText(item.event, { x: 2.0, y, w: 7.5, h: 0.44, fontSize: 10.5, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 4 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — DEFINITIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Key Definitions", "SGA • FGR • AGA • IUGR");
addFooter(sl, 4);
const defs = [
{ abbr: "SGA", full: "Small for Gestational Age", def: "Birth weight or fetal EFW/AC <10th percentile for gestational age. Includes both constitutionally small (healthy) and pathologically restricted fetuses.", color: C.teal },
{ abbr: "FGR", full: "Fetal Growth Restriction", def: "Failure to achieve genetically determined growth potential due to pathological maternal, fetal, or placental factors. Implies a pathological process.", color: C.navy },
{ abbr: "AGA", full: "Appropriate for Gestational Age", def: "Birth weight between the 10th and 90th percentile for gestational age. May still represent relative growth restriction if growth potential was high.", color: C.green },
{ abbr: "IUGR", full: "Intrauterine Growth Restriction", def: "Older synonym for FGR. Term 'FGR' is now preferred by ACOG, SMFM, and FIGO as it does not imply restriction is exclusively intrauterine.", color: C.gray },
];
defs.forEach((d, i) => {
const y = 1.25 + i * 1.0;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.1, h: 0.75, fill: { color: d.color }, line: { color: d.color } });
sl.addText(d.abbr, { x: 0.3, y, w: 1.1, h: 0.75, fontSize: 20, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 1.4, y, w: 8.3, h: 0.75, fill: { color: C.white }, line: { color: d.color } });
sl.addText([
{ text: d.full + " ", options: { bold: true, color: d.color } },
{ text: "— " + d.def, options: { color: C.navy } }
], { x: 1.52, y: y + 0.08, w: 8.1, h: 0.58, fontSize: 10.5, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — KEY DIFFERENCES: SGA vs FGR
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "SGA vs FGR: The Critical Distinction", "Not all small fetuses are growth-restricted — and not all growth-restricted fetuses are SGA");
addFooter(sl, 5);
// Table header
const cols = [2.6, 3.3, 3.7];
const xs = [0.3, 2.9, 6.2];
const headers = ["Feature", "SGA", "FGR"];
const hColors = [C.navy, C.teal, C.navy];
headers.forEach((h, i) => {
sl.addShape(pres.ShapeType.rect, { x: xs[i], y: 1.22, w: cols[i], h: 0.42, fill: { color: hColors[i] }, line: { color: hColors[i] } });
sl.addText(h, { x: xs[i], y: 1.22, w: cols[i], h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
});
const rows = [
["Nature", "Size descriptor (statistical)", "Pathological process"],
["Applies to", "Newborns primarily (birth weight)", "Fetus antenatally"],
["Criterion", "EFW/BW <10th percentile", "EFW or AC <10th% + pathological cause"],
["Includes", "Constitutionally small fetuses", "Always implies underlying etiology"],
["Doppler", "May be normal", "Often abnormal (UA, MCA, DV)"],
["Risk of perinatal morbidity", "Variable; many are normal", "Significantly elevated"],
["Prevalence overlap", "~10% of all births (by definition)", "~3–7% of all births (true FGR)"],
];
rows.forEach((row, ri) => {
const y = 1.64 + ri * 0.51;
const bg = ri % 2 === 0 ? "EAF3F8" : C.white;
row.forEach((cell, ci) => {
sl.addShape(pres.ShapeType.rect, { x: xs[ci], y, w: cols[ci], h: 0.48, fill: { color: bg }, line: { color: "BBCCDD" } });
sl.addText(cell, { x: xs[ci] + 0.08, y, w: cols[ci] - 0.16, h: 0.48, fontSize: 10, color: ci === 0 ? C.navy : C.gray, bold: ci === 0, fontFace: "Calibri", valign: "middle", margin: 0 });
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — CLASSIFICATION: SYMMETRIC vs ASYMMETRIC
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Classification of FGR", "Symmetric vs Asymmetric Growth Restriction");
addFooter(sl, 6);
// Symmetric card
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.22, w: 4.4, h: 3.9, fill: { color: "E8F4FA" }, line: { color: C.teal } });
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.22, w: 4.4, h: 0.48, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("SYMMETRIC FGR", { x: 0.3, y: 1.22, w: 4.4, h: 0.48, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText([
{ text: "~20% of FGR cases", options: { bold: true, breakLine: true } },
{ text: "Weight AND skeletal dimensions both below normal", options: { breakLine: true } },
{ text: "Head circumference reduced proportionately with AC", options: { breakLine: true } },
{ text: "Onset: early in pregnancy (first trimester / early 2nd)", options: { breakLine: true } },
{ text: "Cause: insults during hyperplastic phase (cell division)", options: { breakLine: true } },
{ text: "Associated with: aneuploidy (Trisomy 13/18/21), structural anomalies, TORCH infections", options: { breakLine: true } },
{ text: "NOT at increased risk of morbidity compared to AGA infants in most studies" },
], { x: 0.45, y: 1.78, w: 4.1, h: 3.28, fontSize: 10.5, color: C.navy, fontFace: "Calibri", valign: "top" });
// Asymmetric card
sl.addShape(pres.ShapeType.rect, { x: 5.3, y: 1.22, w: 4.4, h: 3.9, fill: { color: "FFF3E0" }, line: { color: C.gold } });
sl.addShape(pres.ShapeType.rect, { x: 5.3, y: 1.22, w: 4.4, h: 0.48, fill: { color: C.gold }, line: { color: C.gold } });
sl.addText("ASYMMETRIC FGR", { x: 5.3, y: 1.22, w: 4.4, h: 0.48, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText([
{ text: "~80% of FGR cases", options: { bold: true, breakLine: true } },
{ text: "Normal skeletal / head size — reduced AC and weight", options: { breakLine: true } },
{ text: "Brain-sparing effect: head circumference preserved", options: { breakLine: true } },
{ text: "Onset: later in pregnancy (2nd–3rd trimester)", options: { breakLine: true } },
{ text: "Cause: placental insufficiency — impaired O2 and nutrient transfer", options: { breakLine: true } },
{ text: "Associated with: hypertension, preeclampsia, poor uteroplacental perfusion", options: { breakLine: true } },
{ text: "Increased risk of intrapartum and neonatal complications" },
], { x: 5.45, y: 1.78, w: 4.1, h: 3.28, fontSize: 10.5, color: C.navy, fontFace: "Calibri", valign: "top" });
// Central divider
sl.addShape(pres.ShapeType.rect, { x: 4.7, y: 1.5, w: 0.6, h: 0.32, fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("VS", { x: 4.7, y: 1.5, w: 0.6, h: 0.32, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — EARLY vs LATE ONSET FGR
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Early-Onset vs Late-Onset FGR", "Two distinct phenotypes with different outcomes");
addFooter(sl, 7);
const categories = [
{ label: "EARLY-ONSET FGR", cut: "< 32 weeks gestation", color: C.red, items: [
"Accounts for 20–30% of all FGR cases",
"More severe, progressive deterioration",
"Umbilical artery flow deterioration in ~70% of cases",
"Perinatal death risk ~7%",
"Often associated with preeclampsia & severe placental disease",
"Requires intensive surveillance & early delivery",
]},
{ label: "LATE-ONSET FGR", cut: "≥ 32 weeks gestation", color: C.navy, items: [
"More common — ~70–80% of FGR cases",
"Less severe, Doppler changes milder",
"Umbilical artery PI may be normal; MCA Doppler useful",
"Brain-sparing and cerebroplacental redistribution common",
"Associated with subtle placental insufficiency",
"Increased risk for stillbirth and neurodevelopmental delay",
]},
];
categories.forEach((cat, ci) => {
const x = 0.3 + ci * 5.0;
sl.addShape(pres.ShapeType.rect, { x, y: 1.22, w: 4.5, h: 4.0, fill: { color: "F7FBFF" }, line: { color: cat.color } });
sl.addShape(pres.ShapeType.rect, { x, y: 1.22, w: 4.5, h: 0.52, fill: { color: cat.color }, line: { color: cat.color } });
sl.addText(cat.label, { x, y: 1.22, w: 4.5, h: 0.32, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(cat.cut, { x, y: 1.54, w: 4.5, h: 0.2, fontSize: 10, color: C.white, fontFace: "Calibri", align: "center", italic: true, margin: 0 });
sl.addText(bulletItems(cat.items), { x: x + 0.12, y: 1.82, w: 4.26, h: 3.3, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — INCIDENCE & EPIDEMIOLOGY
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Incidence & Epidemiology", "Global burden of SGA and FGR");
addFooter(sl, 8);
const stats = [
{ val: "~10%", label: "of all births are SGA\n(by statistical definition)", color: C.teal },
{ val: "3–7%", label: "of all births represent\ntrue pathological FGR", color: C.navy },
{ val: "60%", label: "of FGR cases have\nunknown etiology (idiopathic)", color: C.gold },
{ val: "#1", label: "FGR is a leading cause\nof stillbirth worldwide", color: C.red },
];
stats.forEach((s, i) => {
const x = 0.3 + i * 2.38;
sl.addShape(pres.ShapeType.rect, { x, y: 1.22, w: 2.15, h: 2.2, fill: { color: s.color }, line: { color: s.color } });
sl.addText(s.val, { x, y: 1.32, w: 2.15, h: 0.9, fontSize: 36, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(s.label, { x, y: 2.22, w: 2.15, h: 1.0, fontSize: 10.5, color: C.white, fontFace: "Calibri", align: "center", valign: "top", margin: 6 });
});
sl.addText("Key Epidemiological Facts:", { x: 0.3, y: 3.58, w: 9.4, h: 0.32, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
const facts = [
"FGR is more prevalent in lower-income countries due to higher rates of maternal malnutrition and infections",
"Risk of recurrence of FGR is highest in women with a prior history of preterm birth (PTB) or preeclampsia",
"FGR complicates ~1–5% of pregnancies; severe FGR (<3rd percentile) carries highest morbidity",
"Adverse perinatal outcomes are primarily in infants below the 3rd–5th percentile, not just the 10th percentile",
];
sl.addText(bulletItems(facts), { x: 0.3, y: 3.9, w: 9.4, h: 1.3, fontSize: 10, color: C.gray, fontFace: "Calibri" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — ETIOLOGY — 3 CATEGORIES
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Etiology of FGR", "Maternal • Fetal • Placental");
addFooter(sl, 9);
card(sl, 0.25, 1.22, 3.1, 4.02,
"MATERNAL FACTORS", [
"Hypertension / Preeclampsia",
"Chronic renal disease",
"Severe maternal anemia",
"Heavy smoking (>600 g reduction)",
"Cocaine / heroin addiction",
"Alcohol use disorder",
"Poor nutritional status",
"Antiphospholipid antibody syndrome",
"High altitude / hypoxia",
"Excessive high-intensity exercise",
], C.teal, "EAF6FA");
card(sl, 3.45, 1.22, 3.1, 4.02,
"FETAL FACTORS", [
"Chromosomal aneuploidy (T13, T18, T21)",
"Structural anomalies (cardiac, gastroschisis)",
"TORCH infections (CMV, rubella, toxoplasma)",
"Inborn errors of metabolism",
"Fetal genetic syndromes",
"Multiple gestation (esp. monochorionic)",
"Single umbilical artery (mild effect)",
"Chromosomal microdeletions (microarray yield ~4% incremental)",
], C.navy, "EEF2FA");
card(sl, 6.65, 1.22, 3.1, 4.02,
"PLACENTAL / CORD FACTORS", [
"Placental infarction / abruption",
"Chronic villitis",
"Hemorrhagic endovasculitis",
"Placental vascular thrombosis",
"Confined placental mosaicism",
"Abnormal cord insertion (velamentous)",
"Placenta previa",
"Bilobed / succenturiate placenta",
"Decreased placental mass / thin placenta",
], C.gold, "FFF8E8");
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — PATHOPHYSIOLOGY
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Pathophysiology of FGR", "Placental insufficiency and fetal adaptive responses");
addFooter(sl, 10);
const steps = [
{ num: "1", title: "Reduced Placental Mass", desc: "Decreased terminal villi growth → reduced umbilical capillary bed expansion → elevated umbilical artery PI" },
{ num: "2", title: "Reduced O₂ Permeability", desc: "Fewer vasosyncytial membranes → greater diffusion distance → placental O₂ permeability falls → fetal PO₂ drops ~12 mmHg below normal (from ~33 to ~21 mmHg)" },
{ num: "3", title: "Reduced Glucose Transfer", desc: "Transplacental glucose permeability decreases → fetal hypoglycemia → impaired fetal growth and fat deposition" },
{ num: "4", title: "Fetal Adaptive Response", desc: "Low PO₂ → enlarges transplacental gradient to draw O₂ in; slows fetal growth to reduce O₂ demand (growth deceleration as homeostatic mechanism)" },
{ num: "5", title: "Circulatory Redistribution", desc: "Blood flow redistributed: brain, heart, adrenals maintained; reduced flow to gut, kidney, skin → oligohydramnios, asymmetric growth" },
{ num: "6", title: "Decompensation", desc: "Absent/reversed UA end-diastolic flow → ductus venosus PI rises → fetal acidemia → fetal death" },
];
steps.forEach((step, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.25 + col * 3.22;
const y = 1.28 + row * 1.88;
sl.addShape(pres.ShapeType.rect, { x, y, w: 3.05, h: 1.72, fill: { color: C.white }, line: { color: C.teal } });
sl.addShape(pres.ShapeType.rect, { x, y, w: 0.44, h: 0.44, fill: { color: C.navy }, line: { color: C.navy } });
sl.addText(step.num, { x, y, w: 0.44, h: 0.44, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(step.title, { x: x + 0.5, y, w: 2.5, h: 0.44, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 0 });
sl.addText(step.desc, { x: x + 0.08, y: y + 0.48, w: 2.9, h: 1.18, fontSize: 9.5, color: C.gray, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — DIAGNOSIS: HISTORY & PHYSICAL
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Diagnosis — History & Physical Examination", "Screening and risk factor assessment");
addFooter(sl, 11);
sl.addText("Accurate gestational age dating is the single most important prerequisite for diagnosing FGR.", {
x: 0.3, y: 1.25, w: 9.4, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri",
fill: { color: C.navy }, margin: 8
});
sl.addText("Clinical Risk Factors:", { x: 0.3, y: 1.82, w: 4.5, h: 0.3, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
sl.addText(bulletItems([
"Prior history of FGR, preeclampsia, or PTB",
"Chronic hypertension or renal disease",
"Smoking, cocaine, or heroin use",
"TORCH infections (CMV, rubella) during pregnancy",
"Multiple gestation, especially monochorionic",
"Antiphospholipid antibody syndrome",
"Poor weight gain during pregnancy",
]), { x: 0.3, y: 2.14, w: 4.5, h: 3.1, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
sl.addText("Physical Examination:", { x: 5.2, y: 1.82, w: 4.5, h: 0.3, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
sl.addText(bulletItems([
"Symphysis-fundal height (SFH): useful screening tool when measured serially by same observer",
"SFH ≥ 3 cm below expected for GA warrants ultrasound evaluation",
"SFH alone misses FGR ~50% of the time — not sufficient for diagnosis",
"Assess maternal weight, blood pressure, proteinuria",
"Detection of fetal anomalies or multiple gestation",
"Note: clinical diagnosis by exam alone is unreliable",
]), { x: 5.2, y: 2.14, w: 4.5, h: 3.1, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — DIAGNOSIS: ULTRASONOGRAPHY
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Diagnosis — Ultrasonography", "Gold standard for fetal growth assessment");
addFooter(sl, 12);
sl.addText("Ultrasound Biometric Parameters:", { x: 0.3, y: 1.25, w: 9.4, h: 0.3, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
const params = [
["CRL", "Crown-Rump Length", "Most accurate for dating up to 13+6 weeks (±5–7 days)"],
["BPD", "Biparietal Diameter", "Second-trimester dating; component of Hadlock formula"],
["HC", "Head Circumference", "Key parameter; preserved in asymmetric FGR (brain sparing)"],
["AC", "Abdominal Circumference", "Most sensitive single measure for FGR; reflects liver glycogen stores and fat"],
["FL", "Femur Length", "Skeletal measure; may be reduced in symmetric FGR"],
["EFW", "Estimated Fetal Weight", "ACOG/SMFM: EFW or AC <10th % = FGR; <3rd % = severe FGR"],
];
params.forEach((row, i) => {
const y = 1.65 + i * 0.55;
const bg = i % 2 === 0 ? "EAF3F8" : C.white;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.72, h: 0.46, fill: { color: C.navy }, line: { color: C.navy } });
sl.addText(row[0], { x: 0.3, y, w: 0.72, h: 0.46, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 1.02, y, w: 2.3, h: 0.46, fill: { color: bg }, line: { color: "BBCCDD" } });
sl.addText(row[1], { x: 1.08, y, w: 2.18, h: 0.46, fontSize: 10.5, bold: true, color: C.teal, fontFace: "Calibri", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 3.32, y, w: 6.38, h: 0.46, fill: { color: bg }, line: { color: "BBCCDD" } });
sl.addText(row[2], { x: 3.42, y, w: 6.18, h: 0.46, fontSize: 10.5, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 0 });
});
sl.addText("Serial growth assessment every 2–3 weeks is recommended when FGR is suspected.", {
x: 0.3, y: 5.08, w: 9.4, h: 0.28, fontSize: 10.5, color: C.teal, fontFace: "Calibri", italic: true, bold: true, margin: 0
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — DOPPLER VELOCIMETRY
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Doppler Velocimetry in FGR", "The cornerstone of fetal surveillance in growth restriction");
addFooter(sl, 13);
const vessels = [
{ name: "Umbilical Artery (UA)", color: C.navy, findings: [
"Elevated PI: increased placental resistance (first sign of FGR)",
"Absent end-diastolic flow (AEDF): severe compromise",
"Reversed end-diastolic flow (REDF): imminent fetal demise",
"UA Doppler reduces perinatal mortality by ~29% in high-risk pregnancies",
]},
{ name: "Middle Cerebral Artery (MCA)", color: C.teal, findings: [
"Low PI or high peak systolic velocity: cerebral vasodilation (brain sparing)",
"MCA/UA ratio (Cerebroplacental Ratio): CPR <1.0 indicates redistribution",
"CPR useful in late-onset FGR where UA Doppler may be normal",
"Low CPR associated with adverse perinatal and neurodevelopmental outcomes",
]},
{ name: "Ductus Venosus (DV)", color: C.gold, findings: [
"Absent or reversed A-wave: severe fetal compromise / cardiac dysfunction",
"Indicates right heart failure and imminent fetal acidemia",
"Delivery should be considered if DV shows absent/reversed A-wave",
"Key component of Fetal Medicine Foundation staging for FGR",
]},
];
vessels.forEach((v, i) => {
const y = 1.22 + i * 1.38;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 2.0, h: 1.2, fill: { color: v.color }, line: { color: v.color } });
sl.addText(v.name, { x: 0.3, y, w: 2.0, h: 1.2, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 6 });
sl.addShape(pres.ShapeType.rect, { x: 2.3, y, w: 7.4, h: 1.2, fill: { color: "F5FAFD" }, line: { color: v.color } });
sl.addText(bulletItems(v.findings), { x: 2.42, y, w: 7.2, h: 1.2, fontSize: 10, color: C.navy, fontFace: "Calibri" });
});
sl.addText("Uterine artery (UtA) Doppler: high PI / notching → increased risk of preeclampsia and early-onset FGR. Useful first-trimester screening marker.", {
x: 0.3, y: 5.07, w: 9.4, h: 0.28, fontSize: 9.5, color: C.teal, italic: true, fontFace: "Calibri", margin: 0
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — SURVEILLANCE & MONITORING
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Fetal Surveillance & Monitoring", "Stepwise monitoring approach for SGA/FGR");
addFooter(sl, 14);
const methods = [
{ name: "Kick Counts", freq: "Daily", detail: "Maternal fetal movement counting — reduction may indicate fetal compromise" },
{ name: "Non-Stress Test (NST)", freq: "1–2×/week", detail: "Reactive NST: 2 accelerations in 20 min; reassuring fetal autonomic function" },
{ name: "Biophysical Profile (BPP)", freq: "Weekly", detail: "5 parameters (NST + US: breathing, movement, tone, AFV); score ≤ 6 warrants action" },
{ name: "Modified BPP", freq: "1–2×/week", detail: "NST + amniotic fluid index (AFI); adequate screening in most FGR cases" },
{ name: "Serial Growth US", freq: "Every 2–3 wk", detail: "Track growth velocity; growth interval < 10 days suggests severe restriction" },
{ name: "Doppler UA", freq: "Weekly–2×/week", detail: "Absent/reversed EDF = high-risk category; intensify surveillance or deliver" },
{ name: "MCA / CPR", freq: "As indicated", detail: "Especially useful in late-onset FGR with normal UA; CPR <1.0 is concerning" },
{ name: "Ductus Venosus", freq: "If UA abnormal", detail: "Reversed A-wave = imminent delivery; immediate hospital admission recommended" },
];
const rowH = 0.49;
methods.forEach((m, i) => {
const y = 1.28 + i * rowH;
const bg = i % 2 === 0 ? "EAF3F8" : C.white;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 2.1, h: rowH - 0.04, fill: { color: bg }, line: { color: "AABCCC" } });
sl.addText(m.name, { x: 0.34, y, w: 2.02, h: rowH - 0.04, fontSize: 10.5, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 2.4, y, w: 1.3, h: rowH - 0.04, fill: { color: i % 2 === 0 ? "D0EAF4" : "E8F4FB" }, line: { color: "AABCCC" } });
sl.addText(m.freq, { x: 2.44, y, w: 1.22, h: rowH - 0.04, fontSize: 9.5, color: C.teal, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 3.7, y, w: 5.98, h: rowH - 0.04, fill: { color: bg }, line: { color: "AABCCC" } });
sl.addText(m.detail, { x: 3.76, y, w: 5.86, h: rowH - 0.04, fontSize: 9.5, color: C.gray, fontFace: "Calibri", valign: "middle", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — MANAGEMENT PRINCIPLES
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Management Principles", "No proven antenatal treatment — focus on surveillance and delivery timing");
addFooter(sl, 15);
const sections = [
{ title: "General Measures", color: C.teal, items: [
"Correct modifiable risk factors (smoking cessation, nutrition optimization)",
"Treat underlying maternal conditions (hypertension, diabetes, autoimmune disease)",
"Hospitalization if severe FGR with Doppler abnormalities",
"Bed rest (left lateral decubitus) — limited evidence but reduces preterm birth in selected cases",
]},
{ title: "Pharmacological Interventions", color: C.navy, items: [
"Aspirin (60–150 mg/day from <16 wk): reduces FGR risk in high-risk women (pre-existing hypertension, prior FGR, antiphospholipid syndrome)",
"Heparin: no benefit in isolated FGR without confirmed thrombophilia",
"Betamethasone: for fetal lung maturation if delivery anticipated <34 weeks",
"No proven pharmacological agent to directly improve fetal growth in established FGR",
]},
{ title: "Obstetric Management", color: C.gold, items: [
"Serial monitoring with escalation based on Doppler and BPP findings",
"Delivery in a facility with NICU capabilities for early-onset FGR",
"Mode of delivery: vaginal birth preferred; cesarean if Doppler compromise or fetal intolerance",
"Antenatal corticosteroids for all FGR pregnancies anticipated to deliver <34 weeks",
]},
];
sections.forEach((sec, i) => {
const y = 1.22 + i * 1.38;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 2.0, h: 1.22, fill: { color: sec.color }, line: { color: sec.color } });
sl.addText(sec.title, { x: 0.3, y, w: 2.0, h: 1.22, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 4 });
sl.addShape(pres.ShapeType.rect, { x: 2.3, y, w: 7.4, h: 1.22, fill: { color: "F8FBFF" }, line: { color: sec.color } });
sl.addText(bulletItems(sec.items), { x: 2.4, y, w: 7.25, h: 1.22, fontSize: 10, color: C.navy, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 — TIMING OF DELIVERY
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Timing of Delivery in FGR", "ACOG / SMFM Guidance");
addFooter(sl, 16);
const deliveryData = [
{ ga: "24–28 wks", condition: "AEDF / REDF UA", timing: "Individualize; prolonged hospitalization; steroids; consider delivery when DV reversed A-wave", color: C.red },
{ ga: "28–32 wks", condition: "REDF UA", timing: "Deliver at 32 weeks or when DV shows reversed A-wave; antenatal corticosteroids", color: C.red },
{ ga: "32–34 wks", condition: "AEDF UA", timing: "Deliver at 33–34 weeks; corticosteroids if not completed", color: "D97706" },
{ ga: "34–37 wks", condition: "Idiopathic FGR", timing: "Deliver at 37 weeks in idiopathic FGR; earlier if Doppler deteriorates or BPP ≤4", color: C.navy },
{ ga: "≥37 wks", condition: "Any FGR", timing: "Delivery recommended to prevent stillbirth; no benefit to continuing pregnancy beyond 40 wks", color: C.teal },
];
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.22, w: 1.5, h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
sl.addShape(pres.ShapeType.rect, { x: 1.8, y: 1.22, w: 3.2, h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
sl.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.22, w: 4.7, h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
["Gestational Age", "Clinical Scenario", "Recommended Delivery Timing"].forEach((h, i) => {
const xs = [0.3, 1.8, 5.0];
const ws = [1.5, 3.2, 4.7];
sl.addText(h, { x: xs[i], y: 1.22, w: ws[i], h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
});
deliveryData.forEach((row, i) => {
const y = 1.6 + i * 0.7;
const bg = i % 2 === 0 ? "EAF3F8" : C.white;
sl.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.5, h: 0.62, fill: { color: row.color }, line: { color: row.color } });
sl.addText(row.ga, { x: 0.3, y, w: 1.5, h: 0.62, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 1.8, y, w: 3.2, h: 0.62, fill: { color: bg }, line: { color: "BBCCDD" } });
sl.addText(row.condition, { x: 1.88, y, w: 3.04, h: 0.62, fontSize: 10, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 0 });
sl.addShape(pres.ShapeType.rect, { x: 5.0, y, w: 4.7, h: 0.62, fill: { color: bg }, line: { color: "BBCCDD" } });
sl.addText(row.timing, { x: 5.08, y, w: 4.54, h: 0.62, fontSize: 9.5, color: C.gray, fontFace: "Calibri", valign: "middle", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 — NEONATAL COMPLICATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Neonatal Complications of SGA / FGR", "Immediate perinatal morbidity");
addFooter(sl, 17);
const complications = [
{ icon: "⚠", title: "Perinatal Asphyxia", desc: "Uteroplacental insufficiency → fetal hypoxia → acidemia at birth; higher risk of HIE" },
{ icon: "🌡", title: "Hypothermia", desc: "Reduced subcutaneous fat and poor thermoregulation in SGA infants" },
{ icon: "🩸", title: "Hypoglycemia", desc: "Reduced glycogen stores; most common metabolic complication; monitor BGL frequently" },
{ icon: "↑Hb", title: "Polycythemia", desc: "Chronic hypoxia → erythropoiesis; Hct >65%; risk of hyperviscosity syndrome" },
{ icon: "🫁", title: "RDS / Pulmonary", desc: "Surfactant deficiency in premature SGA; higher risk of persistent pulmonary hypertension" },
{ icon: "🦠", title: "Sepsis / Infections", desc: "Impaired immune function; higher risk of early-onset sepsis" },
{ icon: "🧪", title: "Hypocalcemia", desc: "Reduced calcium stores; present in first 72 hours post-delivery" },
{ icon: "📊", title: "NEC", desc: "Necrotizing enterocolitis risk elevated in premature, growth-restricted neonates" },
{ icon: "🧠", title: "IVH / Neurological", desc: "Intraventricular hemorrhage; neurodevelopmental impairment in severe early FGR" },
];
complications.forEach((c, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.25 + col * 3.22;
const y = 1.25 + row * 1.34;
sl.addShape(pres.ShapeType.rect, { x, y, w: 3.05, h: 1.2, fill: { color: C.white }, line: { color: C.teal } });
sl.addShape(pres.ShapeType.rect, { x, y, w: 3.05, h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
sl.addText(c.title, { x: x + 0.08, y, w: 2.9, h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
sl.addText(c.desc, { x: x + 0.1, y: y + 0.42, w: 2.88, h: 0.74, fontSize: 10, color: C.navy, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 18 — LONG-TERM SEQUELAE
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Long-Term Sequelae", "Barker Hypothesis & Developmental Programming");
addFooter(sl, 18);
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.22, w: 9.4, h: 0.52, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Barker Hypothesis (Fetal Origins of Adult Disease): In utero malnutrition programs permanent metabolic changes, predisposing to adult disease.", {
x: 0.4, y: 1.24, w: 9.2, h: 0.48, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
});
const seqs = [
{ domain: "Neurodevelopment", color: C.navy, items: [
"Cognitive impairment and learning disabilities",
"Increased risk of cerebral palsy (especially early FGR)",
"Behavioral issues: ADHD, anxiety",
"Reduced grey matter volume on MRI",
]},
{ domain: "Cardiovascular", color: C.red, items: [
"Hypertension in adult life",
"Coronary artery disease and stroke",
"Left ventricular hypertrophy",
"Structural cardiac remodeling from fetal life",
]},
{ domain: "Metabolic", color: C.gold, items: [
"Type 2 diabetes mellitus (insulin resistance)",
"Obesity and metabolic syndrome",
"Non-alcoholic fatty liver disease",
"Dyslipidemia",
]},
];
seqs.forEach((s, i) => {
const x = 0.3 + i * 3.22;
const y = 1.88;
sl.addShape(pres.ShapeType.rect, { x, y, w: 3.05, h: 3.42, fill: { color: C.white }, line: { color: s.color } });
sl.addShape(pres.ShapeType.rect, { x, y, w: 3.05, h: 0.38, fill: { color: s.color }, line: { color: s.color } });
sl.addText(s.domain, { x, y, w: 3.05, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(bulletItems(s.items), { x: x + 0.1, y: y + 0.44, w: 2.9, h: 2.9, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 19 — CUSTOMIZED vs POPULATION GROWTH CURVES + CLINICAL PEARLS
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
addBg(sl, C.offWht);
addHeader(sl, "Growth Curves & Clinical Pearls", "Customized curves and practical takeaways");
addFooter(sl, 19);
// Left panel: Growth curves
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.22, w: 4.4, h: 4.0, fill: { color: "E8F4FA" }, line: { color: C.teal } });
sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.22, w: 4.4, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Population vs Customized Curves", { x: 0.3, y: 1.22, w: 4.4, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(bulletItems([
"Population-based curves: SGA defined as <10th % based on all births — includes many healthy constitutionally small fetuses",
"Customized curves: adjust for maternal weight, height, ethnicity, parity — aim to identify fetuses truly failing to achieve individual growth potential",
"Customized approach identifies additional AGA fetuses at risk (failed to reach potential despite >10th %)",
"Recent large datasets (>391,000 infants, 1998–2006) show significant ethnic and sex-based differences in birth weight",
"Hadlock formula: most widely validated population-based reference in the US",
"Optimal standard remains debated; no universal consensus on customized vs population reference",
]), { x: 0.42, y: 1.7, w: 4.16, h: 3.46, fontSize: 10, color: C.navy, fontFace: "Calibri" });
// Right panel: Clinical Pearls
sl.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.22, w: 4.5, h: 4.0, fill: { color: "FFF8E8" }, line: { color: C.gold } });
sl.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.22, w: 4.5, h: 0.42, fill: { color: C.gold }, line: { color: C.gold } });
sl.addText("Clinical Pearls", { x: 5.2, y: 1.22, w: 4.5, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
const pearls = [
"Not all SGA fetuses are pathological — up to 70% are constitutionally small",
"Doppler is the KEY tool distinguishing FGR from constitutional SGA",
"Late-onset FGR with normal UA Doppler: use MCA and CPR",
"FGR + structural anomaly: recommend karyotype + chromosomal microarray",
"Idiopathic FGR post-34 wks: consider delivery to prevent stillbirth",
"AGA fetus with significant growth velocity drop may represent 'relative' FGR",
"Aspirin before 16 weeks reduces FGR risk by ~11% in high-risk women",
"DV reversed A-wave = delivery regardless of gestational age if viable",
];
pearls.forEach((p, i) => {
const y = 1.72 + i * 0.44;
sl.addShape(pres.ShapeType.rect, { x: 5.28, y: y + 0.06, w: 0.22, h: 0.22, fill: { color: C.gold }, line: { color: C.gold } });
sl.addText("★", { x: 5.28, y: y + 0.06, w: 0.22, h: 0.22, fontSize: 10, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(p, { x: 5.56, y, w: 4.04, h: 0.38, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 20 — SUMMARY
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.panel2 }, line: { color: C.panel2 } });
sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold }, line: { color: C.gold } });
sl.addShape(pres.ShapeType.rect, { x: 0.18, y: 1.6, w: 9.82, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("Summary & Key Take-aways", { x: 0.4, y: 0.18, w: 9.4, h: 0.55, fontSize: 28, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
sl.addText("SGA vs FGR: What every clinician must remember", { x: 0.4, y: 0.76, w: 9.4, h: 0.32, fontSize: 13, color: C.gold, fontFace: "Calibri", italic: true, margin: 0 });
const takeaways = [
["SGA ≠ FGR", "SGA is a size descriptor; FGR is a pathological process. Doppler distinguishes them."],
["Diagnosis", "Ultrasound (EFW/AC <10th%) + Doppler velocimetry is the gold standard. SFH alone is insufficient."],
["Classification", "Symmetric FGR (early, genetic/infective) vs Asymmetric FGR (late, placental insufficiency)"],
["Surveillance", "Serial growth + Doppler (UA → MCA → DV) is the ladder of escalating concern"],
["Management", "No proven therapy to improve fetal growth; aspirin prophylaxis in high-risk; steroids + delivery timing"],
["Delivery", "Timing guided by GA, Doppler findings, and BPP; DV reversed A-wave = deliver regardless of GA"],
["Long-term", "FGR programs adult cardiovascular, metabolic, and neurodevelopmental disease (Barker Hypothesis)"],
];
takeaways.forEach((t, i) => {
const y = 1.78 + i * 0.52;
sl.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 2.1, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText(t[0], { x: 0.4, y, w: 2.1, h: 0.42, fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
sl.addText(t[1], { x: 2.58, y, w: 7.1, h: 0.42, fontSize: 10.5, color: C.offWht, fontFace: "Calibri", valign: "middle", margin: 0 });
});
sl.addText("Source: Creasy & Resnik's Maternal-Fetal Medicine, 9th Ed. | Robbins Pathology | ACOG / SMFM Guidelines 2024", {
x: 0.4, y: 5.35, w: 9.4, h: 0.22, fontSize: 8, color: C.grayLt, fontFace: "Calibri", italic: true, margin: 0
});
}
// ─── WRITE FILE ──────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/sga-fgr-ppt/SGA_vs_FGR_Presentation.pptx";
pres.writeFile({ fileName: outPath })
.then(() => console.log("SUCCESS: " + outPath))
.catch(err => { console.error("ERROR:", err); process.exit(1); });
~/sga-fgr-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/sga-fgr-ppt/build.js'
~/sga-fgr-ppt/create_pptx.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "SGA vs FGR: Understanding the Difference";
pres.author = "Medical Education";
const C = {
navy: "0D2B55",
teal: "1A7A8C",
tealLt: "2EA8BE",
gold: "E8A020",
white: "FFFFFF",
offWht: "F0F6FA",
gray: "445566",
grayLt: "7A90A0",
red: "C0392B",
green: "1D7A4A",
panel2: "071A38",
accent: "F0B429",
};
function addBg(sl, color) {
sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color}, line:{color} });
}
function addHeader(sl, title, sub) {
sl.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.05, fill:{color:C.navy}, line:{color:C.navy} });
sl.addShape(pres.ShapeType.rect, { x:0, y:1.05, w:10, h:0.07, fill:{color:C.gold}, line:{color:C.gold} });
sl.addText(title, { x:0.4, y:0.08, w:9.2, h:0.7, fontSize:26, bold:true, color:C.white, fontFace:"Calibri", margin:0 });
if (sub) sl.addText(sub, { x:0.4, y:0.78, w:9.2, h:0.28, fontSize:12, color:C.gold, fontFace:"Calibri", italic:true, margin:0 });
}
function addFooter(sl, n) {
sl.addShape(pres.ShapeType.rect, { x:0, y:5.35, w:10, h:0.275, fill:{color:C.navy}, line:{color:C.navy} });
sl.addText("SGA vs FGR | Creasy & Resnik's Maternal-Fetal Medicine, 9th Ed.", { x:0.3, y:5.36, w:8, h:0.22, fontSize:8, color:C.grayLt, fontFace:"Calibri", margin:0 });
sl.addText(`${n} / 20`, { x:9.1, y:5.36, w:0.7, h:0.22, fontSize:8, color:C.grayLt, fontFace:"Calibri", align:"right", margin:0 });
}
function bul(items, extra={}) {
return items.map((t,i) => ({ text:t, options:{ bullet:{type:"bullet"}, breakLine: i<items.length-1, ...extra } }));
}
function card(sl,x,y,w,h,head,items,hc,bc) {
sl.addShape(pres.ShapeType.rect,{x,y,w,h:0.42,fill:{color:hc},line:{color:hc}});
sl.addText(head,{x:x+0.08,y:y+0.04,w:w-0.16,h:0.34,fontSize:12,bold:true,color:C.white,fontFace:"Calibri",margin:0});
const bh=h-0.42;
sl.addShape(pres.ShapeType.rect,{x,y:y+0.42,w,h:bh,fill:{color:bc},line:{color:hc}});
sl.addText(bul(items),{x:x+0.1,y:y+0.48,w:w-0.2,h:bh-0.1,fontSize:10.5,color:C.navy,fontFace:"Calibri"});
}
// ─── SLIDE 1 — TITLE ─────────────────────────────────────────────────────────
{
const sl=pres.addSlide();
sl.addShape(pres.ShapeType.rect,{x:0,y:0,w:10,h:5.625,fill:{color:C.panel2},line:{color:C.panel2}});
sl.addShape(pres.ShapeType.rect,{x:0,y:0,w:0.22,h:5.625,fill:{color:C.gold},line:{color:C.gold}});
sl.addShape(pres.ShapeType.rect,{x:0.22,y:2.25,w:9.78,h:0.1,fill:{color:C.teal},line:{color:C.teal}});
sl.addText("Small for Gestational Age",{x:0.6,y:0.38,w:8.8,h:0.78,fontSize:38,bold:true,color:C.white,fontFace:"Calibri",align:"center",margin:0});
sl.addText("versus",{x:0.6,y:1.2,w:8.8,h:0.52,fontSize:26,color:C.gold,fontFace:"Calibri",align:"center",italic:true,margin:0});
sl.addText("Fetal Growth Restriction",{x:0.6,y:1.72,w:8.8,h:0.78,fontSize:38,bold:true,color:C.tealLt,fontFace:"Calibri",align:"center",margin:0});
sl.addText("Definitions | Diagnosis | Management",{x:0.6,y:2.52,w:8.8,h:0.38,fontSize:15,color:C.offWht,fontFace:"Calibri",align:"center",italic:true,margin:0});
sl.addShape(pres.ShapeType.rect,{x:2.5,y:3.1,w:5,h:0.04,fill:{color:C.grayLt},line:{color:C.grayLt}});
sl.addText("Obstetrics & Maternal-Fetal Medicine",{x:0.6,y:3.28,w:8.8,h:0.3,fontSize:12,color:C.grayLt,fontFace:"Calibri",align:"center",margin:0});
sl.addText("Based on: Creasy & Resnik's Maternal-Fetal Medicine 9th Ed. | Robbins Pathology | ACOG/SMFM 2024",{x:0.6,y:5.08,w:8.8,h:0.26,fontSize:9,color:C.grayLt,fontFace:"Calibri",align:"center",italic:true,margin:0});
}
// ─── SLIDE 2 — OVERVIEW ──────────────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Lecture Overview","Topics covered in this presentation");
addFooter(sl,2);
const topics=[
["01","Historical Background & Evolution of Terminology"],
["02","Definitions: SGA, FGR, AGA, IUGR"],
["03","Key Differences: SGA vs FGR"],
["04","Classification of FGR — Symmetric vs Asymmetric"],
["05","Early-Onset vs Late-Onset FGR"],
["06","Incidence & Epidemiology"],
["07","Etiology — Maternal, Fetal, Placental"],
["08","Pathophysiology"],
["09","Diagnosis — History & Physical Exam"],
["10","Diagnosis — Ultrasonography"],
["11","Doppler Velocimetry"],
["12","Surveillance & Monitoring"],
["13","Management Principles"],
["14","Timing of Delivery"],
["15","Neonatal Complications"],
["16","Long-term Sequelae (Barker Hypothesis)"],
["17","Prevention & Aspirin Prophylaxis"],
["18","Customized vs Population Growth Curves"],
["19","Clinical Pearls & Case Scenarios"],
["20","Summary & Key Take-aways"],
];
const c1=topics.slice(0,10), c2=topics.slice(10);
const sy=1.22, rh=0.38;
c1.forEach(([n,t],i)=>{
const y=sy+i*rh;
sl.addShape(pres.ShapeType.rect,{x:0.3,y,w:0.36,h:0.28,fill:{color:C.teal},line:{color:C.teal}});
sl.addText(n,{x:0.3,y,w:0.36,h:0.28,fontSize:9,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(t,{x:0.72,y,w:4.0,h:0.28,fontSize:10,color:C.navy,fontFace:"Calibri",valign:"middle",margin:0});
});
c2.forEach(([n,t],i)=>{
const y=sy+i*rh;
sl.addShape(pres.ShapeType.rect,{x:5.2,y,w:0.36,h:0.28,fill:{color:C.navy},line:{color:C.navy}});
sl.addText(n,{x:5.2,y,w:0.36,h:0.28,fontSize:9,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(t,{x:5.62,y,w:4.1,h:0.28,fontSize:10,color:C.navy,fontFace:"Calibri",valign:"middle",margin:0});
});
}
// ─── SLIDE 3 — HISTORICAL BACKGROUND ────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Historical Background","How the terminology evolved over time");
addFooter(sl,3);
const tl=[
{yr:"Early 20th C", ev:"All small newborns were classified as premature — no distinction made between prematurity and growth restriction"},
{yr:"Mid-20th C", ev:"WHO concept of 'undernourished neonate' — newborns <2500 g labeled low-birth-weight infants"},
{yr:"1960s", ev:"Lubchenco et al. published birth-weight-for-gestational-age curves; introduced SGA (<10th%), AGA (10–90th%), LGA (>90th%)"},
{yr:"1970–80s", ev:"Term IUGR (intrauterine growth restriction) widely adopted to signify the pathological process"},
{yr:"1990s–2000s", ev:"Growing recognition that SGA ≠ FGR; up to 70% of SGA infants may be constitutionally small and healthy"},
{yr:"Current", ev:"FGR preferred over IUGR; Delphi consensus criteria and Doppler-based staging (FMF) introduced globally"},
];
tl.forEach((item,i)=>{
const y=1.28+i*0.67;
sl.addShape(pres.ShapeType.rect,{x:0.3,y,w:1.5,h:0.46,fill:{color:i%2===0?C.navy:C.teal},line:{color:C.navy}});
sl.addText(item.yr,{x:0.3,y,w:1.5,h:0.46,fontSize:10,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:1.8,y:y+0.18,w:0.2,h:0.06,fill:{color:C.gold},line:{color:C.gold}});
sl.addShape(pres.ShapeType.rect,{x:2.0,y,w:7.68,h:0.46,fill:{color:i%2===0?"E8F4F8":"F5F5FF"},line:{color:"CCDDEE"}});
sl.addText(item.ev,{x:2.1,y,w:7.5,h:0.46,fontSize:10.5,color:C.navy,fontFace:"Calibri",valign:"middle",margin:4});
});
}
// ─── SLIDE 4 — DEFINITIONS ───────────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Key Definitions","SGA • FGR • AGA • IUGR");
addFooter(sl,4);
const defs=[
{abbr:"SGA", full:"Small for Gestational Age", def:"Birth weight or fetal EFW/AC <10th percentile for gestational age. Encompasses both constitutionally small (healthy) and pathologically growth-restricted fetuses.", col:C.teal},
{abbr:"FGR", full:"Fetal Growth Restriction", def:"Failure to achieve genetically determined growth potential due to pathological maternal, fetal, or placental factors. Always implies a pathological process.", col:C.navy},
{abbr:"AGA", full:"Appropriate for Gestational Age", def:"Birth weight between the 10th and 90th percentile. An AGA fetus may still have 'relative' FGR if its genetic growth potential was above average.", col:C.green},
{abbr:"IUGR",full:"Intrauterine Growth Restriction", def:"Older synonym for FGR. ACOG, SMFM, and FIGO now prefer 'FGR' as the term does not imply restriction is exclusively intrauterine or confined to a specific time.",col:C.gray},
];
defs.forEach((d,i)=>{
const y=1.26+i*1.0;
sl.addShape(pres.ShapeType.rect,{x:0.3,y,w:1.1,h:0.78,fill:{color:d.col},line:{color:d.col}});
sl.addText(d.abbr,{x:0.3,y,w:1.1,h:0.78,fontSize:20,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:1.4,y,w:8.3,h:0.78,fill:{color:C.white},line:{color:d.col}});
sl.addText([{text:d.full+" ",options:{bold:true,color:d.col}},{text:"— "+d.def,options:{color:C.navy}}],
{x:1.52,y:y+0.1,w:8.1,h:0.58,fontSize:10.5,fontFace:"Calibri"});
});
}
// ─── SLIDE 5 — SGA vs FGR COMPARISON TABLE ───────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"SGA vs FGR: The Critical Distinction","Not all small fetuses are growth-restricted — and not all FGR fetuses are SGA");
addFooter(sl,5);
const xs=[0.28,2.9,6.2], ws=[2.6,3.28,3.72];
const hdrs=["Feature","SGA","FGR"], hc=[C.navy,C.teal,C.navy];
hdrs.forEach((h,i)=>{
sl.addShape(pres.ShapeType.rect,{x:xs[i],y:1.22,w:ws[i],h:0.42,fill:{color:hc[i]},line:{color:hc[i]}});
sl.addText(h,{x:xs[i],y:1.22,w:ws[i],h:0.42,fontSize:13,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
});
const rows=[
["Nature","Size descriptor — statistical","Pathological process — clinical"],
["Definition","EFW or birth weight <10th percentile","EFW or AC <10th% due to pathological cause"],
["Applies to","Primarily the newborn (birth weight)","The fetus antenatally"],
["Includes","Constitutionally small fetuses (healthy)","Always implies underlying etiology"],
["Doppler studies","Usually normal in constitutional SGA","Often abnormal: elevated UA PI, MCA redistribution"],
["Perinatal morbidity","Variable; many SGA infants are healthy","Significantly elevated morbidity & mortality"],
["True prevalence","~10% by definition (arbitrary cut-off)","~3–7% of births (true pathological FGR)"],
];
rows.forEach((row,ri)=>{
const y=1.64+ri*0.51;
const bg=ri%2===0?"EAF3F8":C.white;
row.forEach((cell,ci)=>{
sl.addShape(pres.ShapeType.rect,{x:xs[ci],y,w:ws[ci],h:0.48,fill:{color:bg},line:{color:"BBCCDD"}});
sl.addText(cell,{x:xs[ci]+0.08,y,w:ws[ci]-0.16,h:0.48,fontSize:10,color:ci===0?C.navy:C.gray,bold:ci===0,fontFace:"Calibri",valign:"middle",margin:0});
});
});
}
// ─── SLIDE 6 — SYMMETRIC vs ASYMMETRIC FGR ───────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Classification of FGR","Symmetric vs Asymmetric Growth Restriction");
addFooter(sl,6);
const panels=[
{x:0.28,title:"SYMMETRIC FGR",color:C.teal,bg:"E8F4FA",items:[
"~20% of all FGR cases",
"Weight AND skeletal dimensions both reduced",
"Head circumference proportionately small (no brain sparing)",
"Onset: early pregnancy — insult during hyperplastic phase (cell division)",
"Causes: chromosomal aneuploidy (T13, T18, T21), structural anomalies, TORCH infections (CMV, rubella)",
"NOT consistently at increased risk of morbidity vs AGA infants",
"Requires chromosomal microarray — incremental yield ~4% in isolated FGR",
]},
{x:5.32,title:"ASYMMETRIC FGR",color:C.gold,bg:"FFF3E0",items:[
"~80% of all FGR cases",
"Normal skeletal / head size — reduced abdominal circumference & weight",
"Brain-sparing: blood flow redistributed to CNS, heart, adrenals",
"Onset: later pregnancy (2nd–3rd trimester) — hypertrophic phase",
"Causes: placental insufficiency, hypertension, preeclampsia",
"Reduced liver glycogen → small AC; reduced fetal fat stores",
"Higher risk for intrapartum hypoxia and neonatal complications",
]},
];
panels.forEach(p=>{
sl.addShape(pres.ShapeType.rect,{x:p.x,y:1.22,w:4.4,h:4.0,fill:{color:p.bg},line:{color:p.color}});
sl.addShape(pres.ShapeType.rect,{x:p.x,y:1.22,w:4.4,h:0.46,fill:{color:p.color},line:{color:p.color}});
sl.addText(p.title,{x:p.x,y:1.22,w:4.4,h:0.46,fontSize:13,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(bul(p.items),{x:p.x+0.12,y:1.74,w:4.16,h:3.42,fontSize:10.5,color:C.navy,fontFace:"Calibri"});
});
sl.addShape(pres.ShapeType.rect,{x:4.68,y:1.5,w:0.64,h:0.34,fill:{color:C.navy},line:{color:C.navy}});
sl.addText("VS",{x:4.68,y:1.5,w:0.64,h:0.34,fontSize:13,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
}
// ─── SLIDE 7 — EARLY vs LATE FGR ─────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Early-Onset vs Late-Onset FGR","Two phenotypes with different severity and surveillance needs");
addFooter(sl,7);
const cats=[
{label:"EARLY-ONSET FGR",cut:"Diagnosed < 32 weeks",color:C.red,items:[
"Accounts for 20–30% of FGR cases",
"More severe and progressive deterioration",
"UA Doppler deterioration occurs in ~70% of cases",
"Perinatal death risk approximately 7%",
"Strongly associated with preeclampsia and severe placental disease",
"Requires intensive surveillance and early delivery planning",
"Antenatal corticosteroids essential if delivery anticipated <34 wks",
]},
{label:"LATE-ONSET FGR",cut:"Diagnosed ≥ 32 weeks",color:C.navy,items:[
"More common — represents ~70–80% of all FGR cases",
"Milder; UA Doppler may be normal despite placental insufficiency",
"MCA and cerebroplacental ratio (CPR) are the key Doppler tools",
"CPR <1.0 = cerebral redistribution; associated with adverse outcomes",
"Brain-sparing detected; subtle cardiovascular remodeling present",
"Significant risk for stillbirth if unrecognized or under-monitored",
"Delivery at 37 weeks recommended to avoid unexpected stillbirth",
]},
];
cats.forEach((c,i)=>{
const x=0.28+i*5.0;
sl.addShape(pres.ShapeType.rect,{x,y:1.22,w:4.5,h:4.0,fill:{color:"F7FBFF"},line:{color:c.color}});
sl.addShape(pres.ShapeType.rect,{x,y:1.22,w:4.5,h:0.52,fill:{color:c.color},line:{color:c.color}});
sl.addText(c.label,{x,y:1.22,w:4.5,h:0.32,fontSize:12,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(c.cut,{x,y:1.54,w:4.5,h:0.2,fontSize:10,color:C.white,fontFace:"Calibri",align:"center",italic:true,margin:0});
sl.addText(bul(c.items),{x:x+0.12,y:1.8,w:4.26,h:3.36,fontSize:10.5,color:C.navy,fontFace:"Calibri"});
});
}
// ─── SLIDE 8 — INCIDENCE ─────────────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Incidence & Epidemiology","Global burden of fetal growth problems");
addFooter(sl,8);
const stats=[
{val:"~10%", label:"of all births\nare SGA", color:C.teal},
{val:"3–7%", label:"of all births\nare true FGR", color:C.navy},
{val:"~60%", label:"of FGR cases\nare idiopathic", color:C.gold},
{val:"#1", label:"leading cause of\nstillbirth worldwide", color:C.red},
];
stats.forEach((s,i)=>{
const x=0.3+i*2.38;
sl.addShape(pres.ShapeType.rect,{x,y:1.22,w:2.15,h:2.22,fill:{color:s.color},line:{color:s.color}});
sl.addText(s.val,{x,y:1.3,w:2.15,h:0.9,fontSize:38,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(s.label,{x,y:2.2,w:2.15,h:1.0,fontSize:10.5,color:C.white,fontFace:"Calibri",align:"center",valign:"top",margin:6});
});
sl.addText("Additional Epidemiological Points:",{x:0.3,y:3.6,w:9.4,h:0.3,fontSize:12,bold:true,color:C.navy,fontFace:"Calibri",margin:0});
sl.addText(bul([
"Most adverse perinatal outcomes are concentrated in infants below the 3rd–5th percentile (not just 10th)",
"FGR prevalence is higher in low- and middle-income countries due to maternal malnutrition and endemic infections",
"Risk of recurrence is highest in women with prior PTB, preeclampsia, or chronic hypertension",
"Severe FGR (<3rd percentile) carries the highest morbidity; mild SGA (5th–10th%) may have minimal added risk",
]),{x:0.3,y:3.9,w:9.4,h:1.3,fontSize:10,color:C.gray,fontFace:"Calibri"});
}
// ─── SLIDE 9 — ETIOLOGY ──────────────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Etiology of FGR","Maternal • Fetal • Placental/Cord");
addFooter(sl,9);
card(sl,0.22,1.22,3.12,4.04,"MATERNAL FACTORS",[
"Hypertension / Preeclampsia",
"Chronic renal disease",
"Severe maternal anemia",
"Heavy smoking (>10 cigarettes/day)",
"Cocaine / heroin addiction",
"Alcohol use disorder",
"Poor nutritional status",
"Antiphospholipid antibody syndrome",
"High altitude / chronic hypoxia",
"Excessive high-intensity exercise",
],C.teal,"EAF6FA");
card(sl,3.44,1.22,3.12,4.04,"FETAL FACTORS",[
"Chromosomal aneuploidy (T13, T18, T21)",
"Structural anomalies (cardiac, gastroschisis)",
"TORCH infections (CMV, rubella, toxoplasma)",
"Inborn errors of metabolism",
"Genetic syndromes",
"Multiple gestation (esp. monochorionic)",
"Microarray abnormalities in isolated FGR (~4% incremental yield)",
],C.navy,"EEF2FA");
card(sl,6.66,1.22,3.12,4.04,"PLACENTAL / CORD FACTORS",[
"Placental infarction / abruption",
"Chronic villitis",
"Hemorrhagic endovasculitis",
"Placental vascular thrombosis",
"Confined placental mosaicism",
"Velamentous cord insertion",
"Placenta previa",
"Decreased placental mass",
"Bilobed or succenturiate placenta",
],C.gold,"FFF8E8");
}
// ─── SLIDE 10 — PATHOPHYSIOLOGY ──────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Pathophysiology of FGR","Placental insufficiency cascade and fetal adaptive responses");
addFooter(sl,10);
const steps=[
{n:"1",title:"Reduced Placental Mass",desc:"Decreased terminal villi growth → reduced umbilical capillary bed → elevated umbilical artery pulsatility index (PI)"},
{n:"2",title:"Reduced O₂ Permeability",desc:"Fewer vasosyncytial membranes → lower placental O₂ permeability → fetal umbilical venous PO₂ drops ~12 mmHg below normal (to ~21 mmHg)"},
{n:"3",title:"Reduced Glucose Transfer",desc:"Decreased transplacental glucose permeability → fetal hypoglycemia → impaired fat deposition; reduced abdominal circumference"},
{n:"4",title:"Fetal Adaptive Response",desc:"Low PO₂ enlarges transplacental O₂ gradient to compensate; growth rate slows to reduce O₂ demand — protective homeostasis"},
{n:"5",title:"Circulatory Redistribution",desc:"Blood preferentially directed to brain, heart, adrenals; gut and kidney blood flow reduced → oligohydramnios, asymmetric FGR pattern"},
{n:"6",title:"Decompensation",desc:"Absent then reversed UA end-diastolic flow → ductus venosus abnormality → fetal acidemia → stillbirth if undelivered"},
];
steps.forEach((s,i)=>{
const col=i%3, row=Math.floor(i/3);
const x=0.22+col*3.25, y=1.28+row*1.92;
sl.addShape(pres.ShapeType.rect,{x,y,w:3.06,h:1.76,fill:{color:C.white},line:{color:C.teal}});
sl.addShape(pres.ShapeType.rect,{x,y,w:0.44,h:0.44,fill:{color:C.navy},line:{color:C.navy}});
sl.addText(s.n,{x,y,w:0.44,h:0.44,fontSize:14,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(s.title,{x:x+0.5,y,w:2.5,h:0.44,fontSize:11,bold:true,color:C.navy,fontFace:"Calibri",valign:"middle",margin:0});
sl.addText(s.desc,{x:x+0.08,y:y+0.5,w:2.9,h:1.2,fontSize:9.5,color:C.gray,fontFace:"Calibri"});
});
}
// ─── SLIDE 11 — DIAGNOSIS: HISTORY & PHYSICAL ────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Diagnosis — History & Physical Examination","Screening and maternal risk factor assessment");
addFooter(sl,11);
sl.addShape(pres.ShapeType.rect,{x:0.3,y:1.24,w:9.4,h:0.44,fill:{color:C.navy},line:{color:C.navy}});
sl.addText("Accurate gestational age dating is the single most critical prerequisite for diagnosing FGR.",
{x:0.3,y:1.24,w:9.4,h:0.44,fontSize:12,bold:true,color:C.white,fontFace:"Calibri",valign:"middle",margin:8});
sl.addText("Clinical Risk Factors:",{x:0.3,y:1.84,w:4.5,h:0.3,fontSize:12,bold:true,color:C.navy,fontFace:"Calibri",margin:0});
sl.addText(bul([
"Prior history of FGR, preeclampsia, or preterm birth",
"Chronic hypertension or renal disease",
"Smoking (>10 cigarettes/day), cocaine, or heroin use",
"TORCH infections during pregnancy (CMV, rubella, toxoplasmosis)",
"Multiple gestation, especially monochorionic twins",
"Antiphospholipid antibody syndrome",
"Poor prenatal weight gain or pre-pregnancy malnutrition",
]),{x:0.3,y:2.18,w:4.5,h:3.0,fontSize:10.5,color:C.navy,fontFace:"Calibri"});
sl.addText("Physical Examination:",{x:5.2,y:1.84,w:4.5,h:0.3,fontSize:12,bold:true,color:C.navy,fontFace:"Calibri",margin:0});
sl.addText(bul([
"Symphysis-fundal height (SFH): useful when measured serially by same observer",
"SFH ≥ 3 cm below expected for GA → ultrasound evaluation warranted",
"SFH alone misses FGR approximately 50% of the time",
"Assess maternal blood pressure and proteinuria (preeclampsia screen)",
"Identify multiple gestation on clinical examination",
"Clinical diagnosis by exam alone is unreliable — ultrasound required",
]),{x:5.2,y:2.18,w:4.5,h:3.0,fontSize:10.5,color:C.navy,fontFace:"Calibri"});
}
// ─── SLIDE 12 — DIAGNOSIS: ULTRASONOGRAPHY ───────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Diagnosis — Ultrasonography","Gold standard for fetal growth assessment");
addFooter(sl,12);
sl.addText("Ultrasound Biometric Parameters:",{x:0.3,y:1.24,w:9.4,h:0.3,fontSize:12,bold:true,color:C.navy,fontFace:"Calibri",margin:0});
const params=[
["CRL","Crown-Rump Length", "Most accurate for dating up to 13+6 weeks (±5–7 days); earlier = more accurate"],
["BPD","Biparietal Diameter", "Second-trimester dating parameter; component of Hadlock weight formula"],
["HC", "Head Circumference", "Key parameter; preserved in asymmetric FGR (brain sparing); reflects fetal neurological health"],
["AC", "Abdominal Circumference","Most sensitive single measure for FGR; reflects liver glycogen stores and subcutaneous fat"],
["FL", "Femur Length", "Skeletal measure; reduced in symmetric FGR; part of all standard EFW formulae"],
["EFW","Estimated Fetal Weight","ACOG/SMFM: EFW or AC <10th% = FGR; EFW <3rd% = severe FGR; re-assess every 2–3 weeks"],
];
params.forEach((row,i)=>{
const y=1.62+i*0.55;
const bg=i%2===0?"EAF3F8":C.white;
sl.addShape(pres.ShapeType.rect,{x:0.3,y,w:0.72,h:0.46,fill:{color:C.navy},line:{color:C.navy}});
sl.addText(row[0],{x:0.3,y,w:0.72,h:0.46,fontSize:13,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:1.02,y,w:2.3,h:0.46,fill:{color:bg},line:{color:"BBCCDD"}});
sl.addText(row[1],{x:1.08,y,w:2.2,h:0.46,fontSize:10.5,bold:true,color:C.teal,fontFace:"Calibri",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:3.32,y,w:6.38,h:0.46,fill:{color:bg},line:{color:"BBCCDD"}});
sl.addText(row[2],{x:3.42,y,w:6.18,h:0.46,fontSize:10.5,color:C.navy,fontFace:"Calibri",valign:"middle",margin:0});
});
sl.addText("Serial growth assessment every 2–3 weeks is recommended when FGR is suspected. Growth velocity <10-day interval suggests severe restriction.",
{x:0.3,y:5.06,w:9.4,h:0.28,fontSize:10,color:C.teal,fontFace:"Calibri",italic:true,bold:true,margin:0});
}
// ─── SLIDE 13 — DOPPLER VELOCIMETRY ──────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Doppler Velocimetry in FGR","Cornerstone of fetal surveillance in growth restriction");
addFooter(sl,13);
const vessels=[
{name:"Umbilical Artery (UA)",color:C.navy,items:[
"Elevated PI: increased placental vascular resistance — first Doppler sign of FGR",
"Absent end-diastolic flow (AEDF): severe placental insufficiency; deliver if ≥34 wks",
"Reversed end-diastolic flow (REDF): imminent fetal demise; urgent management",
"UA Doppler reduces perinatal mortality by ~29% when used in high-risk pregnancies",
]},
{name:"Middle Cerebral Artery (MCA)",color:C.teal,items:[
"Low PI: cerebral vasodilation = brain-sparing response to fetal hypoxia",
"Cerebroplacental Ratio (CPR) = MCA PI / UA PI; CPR <1.0 = blood flow redistribution",
"Particularly useful in late-onset FGR where UA Doppler may appear normal",
"Low CPR associated with adverse perinatal and long-term neurodevelopmental outcomes",
]},
{name:"Ductus Venosus (DV)",color:C.gold,items:[
"Absent or reversed A-wave: severe cardiac compromise / right heart failure",
"Indicates imminent fetal acidemia; strongly predicts adverse outcome",
"Delivery should be considered immediately when DV shows reversed A-wave",
"Key endpoint in FMF (Fetal Medicine Foundation) staging model for FGR",
]},
];
vessels.forEach((v,i)=>{
const y=1.22+i*1.38;
sl.addShape(pres.ShapeType.rect,{x:0.3,y,w:2.0,h:1.22,fill:{color:v.color},line:{color:v.color}});
sl.addText(v.name,{x:0.3,y,w:2.0,h:1.22,fontSize:11,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:4});
sl.addShape(pres.ShapeType.rect,{x:2.3,y,w:7.4,h:1.22,fill:{color:"F5FAFD"},line:{color:v.color}});
sl.addText(bul(v.items),{x:2.42,y,w:7.2,h:1.22,fontSize:10,color:C.navy,fontFace:"Calibri"});
});
sl.addText("Uterine artery (UtA) Doppler: elevated PI or notching at 11–13 weeks predicts preeclampsia and early-onset FGR — key first-trimester screening tool.",
{x:0.3,y:5.08,w:9.4,h:0.26,fontSize:9.5,color:C.teal,italic:true,fontFace:"Calibri",margin:0});
}
// ─── SLIDE 14 — SURVEILLANCE ─────────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Fetal Surveillance & Monitoring","Stepwise escalation approach for SGA/FGR");
addFooter(sl,14);
const methods=[
{name:"Kick Counts", freq:"Daily", detail:"Maternal fetal movement counting; reduction may indicate fetal compromise — warrants same-day evaluation"},
{name:"Non-Stress Test (NST)",freq:"1–2×/week", detail:"Reactive NST: ≥2 accelerations in 20 min; reassures fetal autonomic function; non-reactive triggers BPP"},
{name:"Biophysical Profile", freq:"Weekly", detail:"5 parameters: NST + breathing, movement, tone, amniotic fluid; score ≤6 of 10 warrants delivery or further evaluation"},
{name:"Modified BPP", freq:"1–2×/week", detail:"NST + amniotic fluid index (AFI); adequate first-line test for most FGR surveillance scenarios"},
{name:"Serial Growth US", freq:"Every 2–3 wk", detail:"Track growth velocity; interval <10 days between measurements suggests severe, rapid progression"},
{name:"Doppler UA", freq:"Weekly–2×/wk", detail:"AEDF/REDF = high-risk category; escalate surveillance or proceed to delivery depending on gestational age"},
{name:"MCA / CPR", freq:"As indicated", detail:"Especially valuable in late-onset FGR with normal UA; CPR <1.0 is an independent marker of fetal compromise"},
{name:"Ductus Venosus", freq:"If UA abnormal",detail:"Reversed DV A-wave = imminent delivery; immediate hospitalization; consider corticosteroids if <34 wks"},
];
const rh=0.49;
methods.forEach((m,i)=>{
const y=1.28+i*rh;
const bg=i%2===0?"EAF3F8":C.white;
sl.addShape(pres.ShapeType.rect,{x:0.3,y,w:2.1,h:rh-0.04,fill:{color:bg},line:{color:"AABCCC"}});
sl.addText(m.name,{x:0.34,y,w:2.02,h:rh-0.04,fontSize:10.5,bold:true,color:C.navy,fontFace:"Calibri",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:2.4,y,w:1.32,h:rh-0.04,fill:{color:i%2===0?"D0EAF4":"E8F4FB"},line:{color:"AABCCC"}});
sl.addText(m.freq,{x:2.44,y,w:1.24,h:rh-0.04,fontSize:9.5,color:C.teal,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:3.72,y,w:5.96,h:rh-0.04,fill:{color:bg},line:{color:"AABCCC"}});
sl.addText(m.detail,{x:3.78,y,w:5.84,h:rh-0.04,fontSize:9.5,color:C.gray,fontFace:"Calibri",valign:"middle",margin:0});
});
}
// ─── SLIDE 15 — MANAGEMENT ───────────────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Management Principles","No proven agent to improve fetal growth — surveillance and delivery timing are key");
addFooter(sl,15);
const secs=[
{title:"General Measures",color:C.teal,items:[
"Smoking cessation — single most effective modifiable intervention",
"Optimize nutrition and maternal weight gain",
"Treat underlying conditions: hypertension, autoimmune disease, diabetes",
"Hospital admission for severe FGR with Doppler abnormalities",
"Bed rest (left lateral decubitus): limited evidence; may reduce preterm birth in selected cases",
]},
{title:"Pharmacological Interventions",color:C.navy,items:[
"Aspirin (60–150 mg/day before 16 weeks): reduces FGR and preeclampsia risk in high-risk women",
"Low-molecular-weight heparin: no benefit in isolated FGR without confirmed thrombophilia",
"Betamethasone: lung maturation if delivery anticipated at <34 weeks",
"No proven pharmacological agent directly improves fetal growth in established FGR",
]},
{title:"Obstetric / Delivery Planning",color:C.gold,items:[
"Serial monitoring with stepwise escalation (see surveillance slide)",
"Deliver in a centre with appropriate NICU capacity for early-onset FGR",
"Mode: vaginal delivery preferred; cesarean for fetal intolerance or Doppler compromise",
"Antenatal steroids for all FGR pregnancies expected to deliver <34 weeks",
]},
];
secs.forEach((s,i)=>{
const y=1.22+i*1.38;
sl.addShape(pres.ShapeType.rect,{x:0.3,y,w:2.1,h:1.22,fill:{color:s.color},line:{color:s.color}});
sl.addText(s.title,{x:0.3,y,w:2.1,h:1.22,fontSize:11,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:4});
sl.addShape(pres.ShapeType.rect,{x:2.4,y,w:7.3,h:1.22,fill:{color:"F8FBFF"},line:{color:s.color}});
sl.addText(bul(s.items),{x:2.5,y,w:7.14,h:1.22,fontSize:10,color:C.navy,fontFace:"Calibri"});
});
}
// ─── SLIDE 16 — TIMING OF DELIVERY ───────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Timing of Delivery in FGR","ACOG / SMFM Guidance — balancing fetal maturity against stillbirth risk");
addFooter(sl,16);
const xs=[0.28,1.8,5.0], ws=[1.5,3.18,4.72];
["Gestational Age","Clinical Scenario","Recommended Delivery Timing"].forEach((h,i)=>{
sl.addShape(pres.ShapeType.rect,{x:xs[i],y:1.22,w:ws[i],h:0.38,fill:{color:C.navy},line:{color:C.navy}});
sl.addText(h,{x:xs[i],y:1.22,w:ws[i],h:0.38,fontSize:11,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
});
const rows=[
{ga:"24–28 wks", cond:"AEDF / REDF UA + compromised BPP", timing:"Individualize; prolonged hospitalization; steroids; deliver when DV reversed A-wave or BPP ≤4", color:C.red},
{ga:"28–32 wks", cond:"REDF UA", timing:"Aim for 32 weeks; deliver sooner if DV reversed A-wave or BPP ≤4; antenatal corticosteroids essential", color:C.red},
{ga:"32–34 wks", cond:"AEDF UA", timing:"Deliver at 33–34 weeks; administer corticosteroids if not yet completed", color:"D97706"},
{ga:"34–37 wks", cond:"Idiopathic FGR, normal Doppler", timing:"Deliver at 37 weeks; earlier if Doppler deteriorates, BPP ≤4, or non-reassuring NST", color:C.navy},
{ga:"≥37 wks", cond:"Any FGR (established)", timing:"Delivery recommended to prevent stillbirth; no benefit to extending beyond 40 weeks in any FGR case", color:C.teal},
];
rows.forEach((row,i)=>{
const y=1.6+i*0.72;
const bg=i%2===0?"EAF3F8":C.white;
sl.addShape(pres.ShapeType.rect,{x:xs[0],y,w:ws[0],h:0.64,fill:{color:row.color},line:{color:row.color}});
sl.addText(row.ga,{x:xs[0],y,w:ws[0],h:0.64,fontSize:10.5,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:xs[1],y,w:ws[1],h:0.64,fill:{color:bg},line:{color:"BBCCDD"}});
sl.addText(row.cond,{x:xs[1]+0.08,y,w:ws[1]-0.16,h:0.64,fontSize:10,color:C.navy,fontFace:"Calibri",valign:"middle",margin:0});
sl.addShape(pres.ShapeType.rect,{x:xs[2],y,w:ws[2],h:0.64,fill:{color:bg},line:{color:"BBCCDD"}});
sl.addText(row.timing,{x:xs[2]+0.08,y,w:ws[2]-0.16,h:0.64,fontSize:9.5,color:C.gray,fontFace:"Calibri",valign:"middle",margin:0});
});
}
// ─── SLIDE 17 — NEONATAL COMPLICATIONS ───────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Neonatal Complications of SGA / FGR","Immediate perinatal morbidity");
addFooter(sl,17);
const comps=[
{title:"Perinatal Asphyxia", desc:"Uteroplacental insufficiency → fetal hypoxia → acidemia at birth; risk of HIE and multi-organ failure"},
{title:"Hypoglycemia", desc:"Reduced glycogen stores in liver; most common metabolic complication; monitor blood glucose closely post-delivery"},
{title:"Hypothermia", desc:"Reduced subcutaneous fat and poor thermoregulation; vital to maintain warm environment at delivery"},
{title:"Polycythemia", desc:"Chronic hypoxia → erythropoiesis; Hct >65%; risk of hyperviscosity syndrome"},
{title:"RDS / Pulmonary Issues", desc:"Surfactant deficiency in premature SGA; persistent pulmonary hypertension of the newborn (PPHN)"},
{title:"Sepsis / Infection", desc:"Impaired immune function; higher susceptibility to early-onset neonatal sepsis"},
{title:"Hypocalcemia", desc:"Reduced calcium stores; presents within first 72 hours post-delivery"},
{title:"NEC", desc:"Necrotizing enterocolitis risk elevated in premature, severely growth-restricted neonates"},
{title:"IVH / Neurology", desc:"Intraventricular hemorrhage; long-term neurodevelopmental impairment in severe early-onset FGR"},
];
comps.forEach((c,i)=>{
const col=i%3, row=Math.floor(i/3);
const x=0.22+col*3.25, y=1.24+row*1.36;
sl.addShape(pres.ShapeType.rect,{x,y,w:3.06,h:1.22,fill:{color:C.white},line:{color:C.teal}});
sl.addShape(pres.ShapeType.rect,{x,y,w:3.06,h:0.38,fill:{color:C.navy},line:{color:C.navy}});
sl.addText(c.title,{x:x+0.08,y,w:2.9,h:0.38,fontSize:10.5,bold:true,color:C.white,fontFace:"Calibri",valign:"middle",margin:0});
sl.addText(c.desc,{x:x+0.1,y:y+0.42,w:2.88,h:0.76,fontSize:9.5,color:C.navy,fontFace:"Calibri"});
});
}
// ─── SLIDE 18 — LONG-TERM SEQUELAE ───────────────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Long-Term Sequelae","Barker Hypothesis — Developmental Origins of Health and Disease (DOHaD)");
addFooter(sl,18);
sl.addShape(pres.ShapeType.rect,{x:0.3,y:1.22,w:9.4,h:0.52,fill:{color:C.teal},line:{color:C.teal}});
sl.addText("Barker Hypothesis: In utero malnutrition programs permanent metabolic and cardiovascular adaptations, predisposing to adult-onset disease.",
{x:0.4,y:1.24,w:9.2,h:0.48,fontSize:11,bold:true,color:C.white,fontFace:"Calibri",valign:"middle",margin:0});
const seqs=[
{domain:"Neurodevelopment",color:C.navy,items:[
"Cognitive impairment and learning disabilities",
"Increased risk of cerebral palsy (early-onset FGR)",
"Behavioral issues: ADHD, anxiety, depression",
"Reduced grey matter volume on MRI studies",
]},
{domain:"Cardiovascular",color:C.red,items:[
"Hypertension in adult life",
"Coronary artery disease and stroke",
"Left ventricular hypertrophy",
"Structural cardiac remodeling from fetal life",
]},
{domain:"Metabolic",color:C.gold,items:[
"Type 2 diabetes mellitus (insulin resistance)",
"Obesity and metabolic syndrome",
"Non-alcoholic fatty liver disease",
"Dyslipidemia",
]},
];
seqs.forEach((s,i)=>{
const x=0.3+i*3.22;
sl.addShape(pres.ShapeType.rect,{x,y:1.88,w:3.06,h:3.44,fill:{color:C.white},line:{color:s.color}});
sl.addShape(pres.ShapeType.rect,{x,y:1.88,w:3.06,h:0.4,fill:{color:s.color},line:{color:s.color}});
sl.addText(s.domain,{x,y:1.88,w:3.06,h:0.4,fontSize:12,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(bul(s.items),{x:x+0.1,y:2.32,w:2.9,h:2.94,fontSize:10.5,color:C.navy,fontFace:"Calibri"});
});
}
// ─── SLIDE 19 — GROWTH CURVES & PREVENTION ───────────────────────────────────
{
const sl=pres.addSlide();
addBg(sl,C.offWht);
addHeader(sl,"Growth Curves, Prevention & Clinical Pearls","Customized curves and evidence-based prevention strategies");
addFooter(sl,19);
// Left: Growth curves comparison
sl.addShape(pres.ShapeType.rect,{x:0.28,y:1.22,w:4.42,h:4.04,fill:{color:"E8F4FA"},line:{color:C.teal}});
sl.addShape(pres.ShapeType.rect,{x:0.28,y:1.22,w:4.42,h:0.42,fill:{color:C.teal},line:{color:C.teal}});
sl.addText("Population vs Customized Curves",{x:0.28,y:1.22,w:4.42,h:0.42,fontSize:12,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(bul([
"Population-based (Hadlock): SGA = <10th % based on all births; includes many healthy constitutionally small fetuses",
"Customized curves: adjust for maternal weight, height, ethnicity, parity to determine individual growth potential",
"Identifies additional AGA fetuses who failed to achieve their potential ('relative FGR')",
"Recent datasets (>391,000 US infants, 1998–2006) show significant ethnic and sex differences",
"GROW software (Gardosi): widely used customized growth curve tool",
"Universal adoption remains debated; no international consensus yet",
]),{x:0.4,y:1.7,w:4.18,h:3.5,fontSize:10,color:C.navy,fontFace:"Calibri"});
// Right: Prevention
sl.addShape(pres.ShapeType.rect,{x:5.28,y:1.22,w:4.44,h:4.04,fill:{color:"FFF8E8"},line:{color:C.gold}});
sl.addShape(pres.ShapeType.rect,{x:5.28,y:1.22,w:4.44,h:0.42,fill:{color:C.gold},line:{color:C.gold}});
sl.addText("Prevention & Risk Reduction",{x:5.28,y:1.22,w:4.44,h:0.42,fontSize:12,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(bul([
"Aspirin 60–150 mg/day from <16 weeks: reduces FGR risk ~11% and preeclampsia in high-risk women",
"Smoking cessation: most effective single modifiable intervention",
"Optimize pre-pregnancy BMI and nutritional status",
"Uterine artery Doppler + PAPP-A + MAP at 11–13 weeks: first-trimester FGR screening",
"Early referral of high-risk pregnancies for MFM surveillance",
"No evidence for bed rest, calcium, or fish oil as prevention in isolated FGR",
"Management of antiphospholipid syndrome with aspirin ± LMWH reduces adverse outcomes",
]),{x:5.4,y:1.7,w:4.2,h:3.5,fontSize:10,color:C.navy,fontFace:"Calibri"});
}
// ─── SLIDE 20 — SUMMARY ──────────────────────────────────────────────────────
{
const sl=pres.addSlide();
sl.addShape(pres.ShapeType.rect,{x:0,y:0,w:10,h:5.625,fill:{color:C.panel2},line:{color:C.panel2}});
sl.addShape(pres.ShapeType.rect,{x:0,y:0,w:0.22,h:5.625,fill:{color:C.gold},line:{color:C.gold}});
sl.addShape(pres.ShapeType.rect,{x:0.22,y:1.62,w:9.78,h:0.07,fill:{color:C.teal},line:{color:C.teal}});
sl.addText("Summary & Key Take-aways",{x:0.4,y:0.18,w:9.4,h:0.56,fontSize:28,bold:true,color:C.white,fontFace:"Calibri",margin:0});
sl.addText("SGA vs FGR — What Every Clinician Must Remember",{x:0.4,y:0.78,w:9.4,h:0.32,fontSize:13,color:C.gold,fontFace:"Calibri",italic:true,margin:0});
const ta=[
["SGA ≠ FGR", "SGA is a size descriptor. FGR is a pathological process. Doppler velocimetry is the key to distinguishing them."],
["Diagnosis", "Ultrasound (EFW/AC <10th%) + Doppler is gold standard. Symphysis-fundal height alone misses ~50% of cases."],
["Classification", "Symmetric (early, genetic/infective) vs Asymmetric (late, placental insufficiency = brain sparing)"],
["Surveillance", "Serial growth + escalating Doppler (UA → MCA/CPR → DV) based on gestational age and severity"],
["Management", "No proven fetal growth therapy; aspirin prophylaxis + corticosteroids + optimized delivery timing"],
["Delivery", "Timing guided by GA, Doppler findings, and BPP. DV reversed A-wave = deliver regardless of GA."],
["Long-term", "FGR programs adult cardiovascular, metabolic, and neurodevelopmental disease (Barker / DOHaD)"],
];
ta.forEach((t,i)=>{
const y=1.78+i*0.52;
sl.addShape(pres.ShapeType.rect,{x:0.4,y,w:2.0,h:0.43,fill:{color:C.teal},line:{color:C.teal}});
sl.addText(t[0],{x:0.4,y,w:2.0,h:0.43,fontSize:10.5,bold:true,color:C.white,fontFace:"Calibri",align:"center",valign:"middle",margin:0});
sl.addText(t[1],{x:2.5,y,w:7.1,h:0.43,fontSize:10.5,color:C.offWht,fontFace:"Calibri",valign:"middle",margin:0});
});
sl.addText("Sources: Creasy & Resnik's Maternal-Fetal Medicine 9th Ed. | Robbins Pathology | ACOG Practice Bulletin | SMFM Guidelines",
{x:0.4,y:5.35,w:9.3,h:0.22,fontSize:8,color:C.grayLt,fontFace:"Calibri",italic:true,margin:0});
}
// ─── WRITE FILE ───────────────────────────────────────────────────────────────
const out="/home/daytona/workspace/sga-fgr-ppt/SGA_vs_FGR_Presentation.pptx";
pres.writeFile({fileName:out})
.then(()=>console.log("SUCCESS: "+out))
.catch(err=>{console.error("ERROR:",err);process.exit(1);});