Make presentation on topic SGS vs FGR with definitions clinical presentation investigations diagnosis differentiating features complete detailed discription
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 prs = new pptxgen();
prs.layout = "LAYOUT_WIDE";
prs.title = "SGA vs FGR";
prs.author = "Orris Medical";
// ─── THEME ───────────────────────────────────────────────────────────────────
const C = {
navy: "0D2137",
teal: "1A7A8A",
tealLt: "2BA3B5",
gold: "E8A634",
goldLt: "F5C870",
slate: "3B5068",
white: "FFFFFF",
offWhite:"F2F7FB",
textDark:"1C2B3A",
red: "C0392B",
green: "1E8449",
lilac: "7B5EA7",
};
const FONT = "Calibri";
// ─── HELPERS ─────────────────────────────────────────────────────────────────
function titleSlide(prs, title, subtitle) {
let sl = prs.addSlide();
// full background
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
// accent bar left
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.teal} });
// gold accent
sl.addShape(prs.ShapeType.rect, { x:0.18, y:2.7, w:6, h:0.06, fill:{color:C.gold} });
sl.addText(title, {
x:0.45, y:1.3, w:12.4, h:1.5,
fontFace: FONT, fontSize:44, bold:true, color:C.white, align:"left", valign:"middle"
});
sl.addText(subtitle, {
x:0.45, y:2.9, w:11, h:0.9,
fontFace: FONT, fontSize:20, color:C.goldLt, align:"left", italic:true
});
sl.addText("Based on Creasy & Resnik's Maternal-Fetal Medicine | Robbins Pathology", {
x:0.45, y:6.5, w:12.3, h:0.4,
fontFace: FONT, fontSize:12, color:"7FA8C9", align:"left"
});
}
function sectionDivider(prs, label) {
let sl = prs.addSlide();
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.teal} });
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:0.12, fill:{color:C.gold} });
sl.addShape(prs.ShapeType.rect, { x:0, y:7.38, w:"100%", h:0.12, fill:{color:C.gold} });
sl.addText(label, {
x:1, y:2.5, w:11, h:2.5,
fontFace: FONT, fontSize:46, bold:true, color:C.white, align:"center", valign:"middle"
});
}
function contentSlide(prs, title, bullets, opts={}) {
let sl = prs.addSlide();
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.offWhite} });
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:1.05, fill:{color:C.navy} });
sl.addShape(prs.ShapeType.rect, { x:0, y:1.05, w:"100%", h:0.07, fill:{color:C.teal} });
sl.addText(title, {
x:0.4, y:0.1, w:12.5, h:0.85,
fontFace: FONT, fontSize:26, bold:true, color:C.white, valign:"middle"
});
const bodyItems = bullets.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 36 } : true,
color: b.sub ? C.slate : C.textDark,
fontSize: b.sub ? 15 : (opts.small ? 16 : 17),
bold: b.bold || false,
breakLine: i < bullets.length - 1
}
}));
sl.addText(bodyItems, {
x:0.4, y:1.25, w:opts.wide ? 12.6 : (opts.col ? 6.0 : 12.6),
h:5.9, fontFace: FONT, valign:"top"
});
if (opts.col) {
const bodyItems2 = opts.col.map((b, i) => ({
text: b.text,
options: {
bullet: b.sub ? { indent: 36 } : true,
color: b.sub ? C.slate : C.textDark,
fontSize: b.sub ? 15 : 17,
bold: b.bold || false,
breakLine: i < opts.col.length - 1
}
}));
sl.addText(bodyItems2, {
x:6.8, y:1.25, w:6.0, h:5.9, fontFace: FONT, valign:"top"
});
sl.addShape(prs.ShapeType.line, {
x:6.65, y:1.3, w:0, h:5.7, line:{color:C.teal, width:1.5, dashType:"dash"}
});
}
return sl;
}
function comparisonSlide(prs, title, rows, headers) {
let sl = prs.addSlide();
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.offWhite} });
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:1.05, fill:{color:C.navy} });
sl.addShape(prs.ShapeType.rect, { x:0, y:1.05, w:"100%", h:0.07, fill:{color:C.teal} });
sl.addText(title, {
x:0.4, y:0.1, w:12.5, h:0.85,
fontFace: FONT, fontSize:24, bold:true, color:C.white, valign:"middle"
});
const tableData = [
headers.map(h => ({ text: h, options: { bold:true, color:C.white, fontFace:FONT, fontSize:14 } })),
...rows.map(row => row.map((cell, ci) => ({
text: cell,
options: { color: ci===0 ? C.navy : C.textDark, fontFace:FONT, fontSize:13, bold: ci===0 }
})))
];
sl.addTable(tableData, {
x:0.3, y:1.2, w:13.0, h:5.9,
rowH: 0.47,
border: { type:"solid", color:"CADBE8", pt:1 },
fill: C.white,
colW: [3.2, 4.9, 4.9],
fontFace: FONT,
});
return sl;
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ════════════════════════════════════════════════════════════════════════════
titleSlide(prs, "SGA vs FGR", "Small for Gestational Age vs Fetal Growth Restriction\nDefinitions · Classification · Clinical Features · Investigations · Diagnosis · Key Differences");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – OVERVIEW / AGENDA
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Overview & Agenda", [
{ text:"Why the distinction matters", bold:true },
{ text:"SGA and FGR are frequently used interchangeably — but they are NOT the same entity", sub:true },
{ text:"Topics covered", bold:true },
{ text:"1. Definitions & Terminology", sub:true },
{ text:"2. Classification of FGR (Symmetric vs Asymmetric; Early vs Late)", sub:true },
{ text:"3. Etiology & Pathogenesis", sub:true },
{ text:"4. Clinical Presentation", sub:true },
{ text:"5. Investigations & Monitoring", sub:true },
{ text:"6. Diagnosis Criteria", sub:true },
{ text:"7. SGA vs FGR — Differentiating Features (comparison table)", sub:true },
{ text:"8. Management Principles", sub:true },
{ text:"9. Complications & Prognosis", sub:true },
{ text:"10. Key Takeaways", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 1: Definitions & Terminology");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – DEFINITIONS
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Definitions: SGA & FGR", [
{ text:"Small for Gestational Age (SGA)", bold:true },
{ text:"Birth weight < 10th percentile for gestational age based on population-based growth curves (Lubchenco, 1963)", sub:true },
{ text:"A statistical definition based on weight at birth — does NOT imply pathology", sub:true },
{ text:"Many SGA infants are constitutionally small and entirely normal", sub:true },
{ text:"WHO: neonates weighing < 2500 g were historically called low-birth-weight infants", sub:true },
{ text:"Fetal Growth Restriction (FGR)", bold:true },
{ text:"A fetus that does not achieve its biologically determined growth potential", sub:true },
{ text:"Implies a pathological process — most often placental insufficiency", sub:true },
{ text:"ACOG: sonographic EFW or AC < 10th percentile used to diagnose FGR antenatally", sub:true },
{ text:"Better defined with additional criteria: abnormal Doppler + falling growth velocity", sub:true },
{ text:"The Confusion", bold:true },
{ text:"SGA is used for the neonate; FGR should refer to the fetus — yet both terms are used interchangeably in literature", sub:true },
{ text:"Large intercountry variability in FGR definitions (ACOG vs ISUOG vs Delphi consensus)", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – HISTORICAL CONTEXT & PERCENTILE CLASSIFICATION
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Historical Context & Percentile Classification", [
{ text:"Historical Milestone", bold:true },
{ text:"Early 20th century: all small neonates were thought to be premature", sub:true },
{ text:"Mid-20th century: concept of the 'undernourished neonate' arose", sub:true },
{ text:"1960s: Lubchenco et al. published birth weight percentile charts by gestational age", sub:true },
{ text:"Birth Weight Percentile Categories", bold:true },
{ text:"SGA — Birth weight < 10th percentile for gestational age", sub:true },
{ text:"AGA — Birth weight 10th–90th percentile", sub:true },
{ text:"LGA — Birth weight > 90th percentile", sub:true },
{ text:"Modern Perspective", bold:true },
{ text:"Most adverse perinatal outcomes are primarily confined to infants < 3rd or 5th percentile", sub:true },
{ text:"Customised growth curves (accounting for race, maternal size, parity) identify FGR more accurately than population-based curves", sub:true },
{ text:"Fetuses between 10th–90th percentile can still be growth-restricted if they have not met their individual growth potential", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 2: Classification of FGR");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – SYMMETRIC vs ASYMMETRIC FGR
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Classification: Symmetric vs Asymmetric FGR",
[
{ text:"SYMMETRIC FGR (20–30% of FGR)", bold:true },
{ text:"All fetal body parts equally reduced", sub:true },
{ text:"HC/AC ratio normal; head circumference, body, and limbs all small", sub:true },
{ text:"Caused by early insult: aneuploidy, structural anomalies, fetal infection (TORCH)", sub:true },
{ text:"Prognosis: generally poorer — intrinsic defect", sub:true },
],
{
col: [
{ text:"ASYMMETRIC FGR (70–80% of FGR)", bold:true },
{ text:"'Head-sparing' pattern — brain and head protected at expense of trunk", sub:true },
{ text:"Abdominal circumference (AC) reduced; HC relatively normal", sub:true },
{ text:"Caused by late insult: placental insufficiency, maternal hypertension, malnutrition", sub:true },
{ text:"Brain-sparing via redistribution of cardiac output to vital organs", sub:true },
{ text:"Prognosis: better if delivered before end-organ damage occurs", sub:true },
]
}
);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – EARLY vs LATE FGR
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Classification: Early vs Late FGR",
[
{ text:"Early FGR (< 32 weeks)", bold:true },
{ text:"Small percentage of all FGR cases", sub:true },
{ text:"Strong association with preeclampsia", sub:true },
{ text:"High morbidity and mortality", sub:true },
{ text:"Cardiovascular, CTG, and biophysical profile changes well documented", sub:true },
{ text:"Reversed umbilical artery flow (UARF) → delivery expected within 2 weeks", sub:true },
{ text:"94% of perinatal deaths in FGR with abnormal UA Doppler occurred before 29 weeks", sub:true },
{ text:"No fetus survived when delivered before 25 weeks in severe FGR", sub:true },
],
{
col: [
{ text:"Late FGR (≥ 32 weeks)", bold:true },
{ text:"Majority of FGR cases (up to 70–80%)", sub:true },
{ text:"Lower morbidity and mortality than early FGR", sub:true },
{ text:"Less frequently associated with preeclampsia", sub:true },
{ text:"Doppler changes less dramatic; MCA PI changes more common", sub:true },
{ text:"Still at increased risk: stillbirth, neonatal complications, long-term neurodevelopment issues", sub:true },
{ text:"Periviable FGR classification: < 25 wk, 25–28 wk, > 28–<32 wk, ≥ 32 wk", sub:true },
]
}
);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 3: Etiology & Pathogenesis");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – ETIOLOGY
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Etiology of FGR / SGA",
[
{ text:"MATERNAL FACTORS", bold:true },
{ text:"Chronic hypertension, preeclampsia, autoimmune disease (SLE, APS)", sub:true },
{ text:"Severe anemia, cardiac disease, chronic renal disease", sub:true },
{ text:"Malnutrition (inflammatory bowel disease, severe weight restriction)", sub:true },
{ text:"Smoking, alcohol, illicit drugs (cocaine, heroin)", sub:true },
{ text:"Thrombophilias, high altitude", sub:true },
{ text:"Beta-blockers and other teratogenic medications", sub:true },
],
{
col: [
{ text:"FETAL FACTORS", bold:true },
{ text:"Aneuploidy: Trisomy 13, 18, 21 (birth weight progressively less affected)", sub:true },
{ text:"Structural abnormalities (22.3% incidence of FGR in malformed infants)", sub:true },
{ text:"Viral infections: CMV, rubella, toxoplasma, varicella", sub:true },
{ text:"Multiple gestation", sub:true },
{ text:"PLACENTAL FACTORS", bold:true },
{ text:"Placental insufficiency — most common cause of asymmetric FGR", sub:true },
{ text:"Placental infarction, chronic villitis, hemorrhagic endovasculitis, thromboses", sub:true },
{ text:"Placenta previa, placental mosaicism, partial abruption", sub:true },
{ text:"Etiology unknown in ~60% of cases (idiopathic FGR)", sub:true },
]
}
);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – PATHOGENESIS
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Pathogenesis of FGR", [
{ text:"Normal Fetal Growth Phases", bold:true },
{ text:"Phase 1 (first half): Cellular hyperplasia — cell division dominates", sub:true },
{ text:"Phase 2 (mid): Both hyperplasia and hypertrophy", sub:true },
{ text:"Phase 3 (last 6–8 wk): Hypertrophic growth — fat deposition, weight gain peaks at 230–285 g/wk at 32–34 weeks", sub:true },
{ text:"Placental Mechanism in FGR", bold:true },
{ text:"Reduction in placental mass → reduced terminal villi growth → reduced umbilical capillary bed expansion", sub:true },
{ text:"↓ Vasosyncytial membrane production → ↓ oxygen permeability across placental barrier", sub:true },
{ text:"↓ Transplacental glucose diffusion", sub:true },
{ text:"Fetal Response to Hypoxia", bold:true },
{ text:"↓ PO2 in umbilical venous blood (from ~30 mmHg normal to ~21.7 mmHg in FGR)", sub:true },
{ text:"O2 saturation drops from 81% (normal) to ~50% in severe FGR", sub:true },
{ text:"Fetal redistribution of blood flow: ↑ to brain, heart, adrenals; ↓ to gut, kidneys, muscle", sub:true },
{ text:"Elevated umbilical artery pulsatility index — reflects placental resistance", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 4: Clinical Presentation");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – CLINICAL PRESENTATION
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Clinical Presentation", [
{ text:"Antenatal (In Utero — FGR)", bold:true },
{ text:"Often ASYMPTOMATIC — detected on routine USS", sub:true },
{ text:"Reduced fundal height on symphysis-fundal height (SFH) measurement", sub:true },
{ text:"Reduced fetal movements reported by mother (late sign)", sub:true },
{ text:"Abnormal liquor volume (oligohydramnios — a/w placental insufficiency)", sub:true },
{ text:"Abnormal CTG — late decelerations, reduced variability (advanced compromise)", sub:true },
{ text:"Neonatal (SGA at birth)", bold:true },
{ text:"Weight < 10th percentile for gestational age", sub:true },
{ text:"Asymmetric: loose, wrinkled skin; thin limbs; relatively large head", sub:true },
{ text:"Symmetric: globally small; proportionate head, trunk, limbs", sub:true },
{ text:"Reduced subcutaneous fat and muscle mass — 'wasted' appearance", sub:true },
{ text:"Features of Fetal Compromise / Complications", bold:true },
{ text:"Polycythemia (chronic hypoxia → ↑ EPO → ↑ RBCs)", sub:true },
{ text:"Hypoglycemia (depleted glycogen stores)", sub:true },
{ text:"Hypothermia (reduced fat stores), Hypocalcemia", sub:true },
{ text:"Respiratory distress, meconium aspiration (fetal distress)", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 5: Investigations");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – INVESTIGATIONS (PART 1)
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Investigations — Ultrasound & Biometry", [
{ text:"Ultrasound Biometry (Primary Investigation)", bold:true },
{ text:"Estimated fetal weight (EFW) — uses HC, AC, FL, BPD", sub:true },
{ text:"EFW or AC < 10th percentile → FGR", sub:true },
{ text:"AC is the most sensitive single parameter for FGR", sub:true },
{ text:"HC/AC ratio: elevated in asymmetric FGR (head-sparing)", sub:true },
{ text:"Serial growth scans every 2–4 weeks to assess growth velocity", sub:true },
{ text:"Amniotic Fluid", bold:true },
{ text:"AFI (amniotic fluid index) or maximum pool depth", sub:true },
{ text:"Oligohydramnios (AFI < 5 cm): a marker of reduced renal perfusion and uteroplacental insufficiency", sub:true },
{ text:"Placental Assessment", bold:true },
{ text:"Placental grade, morphology, location, echogenicity", sub:true },
{ text:"Abnormal placentation: infarcts, calcification, abnormal texture", sub:true },
{ text:"Fetal Anatomy Scan", bold:true },
{ text:"Structural anomalies — if early-onset FGR with structural defect, karyotype recommended", sub:true },
{ text:"Exclude congenital anomalies (e.g., cardiac, CNS, renal)", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – INVESTIGATIONS (PART 2)
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Investigations — Doppler Velocimetry", [
{ text:"Umbilical Artery (UA) Doppler — CORNERSTONE", bold:true },
{ text:"Reflects placental vascular resistance", sub:true },
{ text:"Normal UA: continuous forward diastolic flow", sub:true },
{ text:"Abnormal: elevated resistance → ↓ end-diastolic velocity → absent end-diastolic flow (AEDF) → reversed end-diastolic flow (REDF)", sub:true },
{ text:"UA AEDF/REDF: associated with significantly increased perinatal mortality", sub:true },
{ text:"Middle Cerebral Artery (MCA) Doppler", bold:true },
{ text:"Low PI: vasodilation of fetal cerebral circulation = brain-sparing (cerebrovascular redistribution)", sub:true },
{ text:"Cerebroplacental ratio (CPR) = MCA PI / UA PI: CPR < 1 → adverse outcome", sub:true },
{ text:"Ductus Venosus (DV) Doppler", bold:true },
{ text:"Reflects right heart preload and venous pressure", sub:true },
{ text:"Absent/reversed 'a' wave in DV → imminent fetal decompensation, acidosis", sub:true },
{ text:"Used in early FGR to time delivery (ISUOG/Delphi guidelines)", sub:true },
{ text:"Uterine Artery Doppler", bold:true },
{ text:"High PI, bilateral notching → impaired uteroplacental perfusion", sub:true },
{ text:"Useful as screening tool in 1st/2nd trimester for FGR prediction", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – INVESTIGATIONS (PART 3) — Genetic, Infection, Lab
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Investigations — Genetic, Infection & Laboratory", [
{ text:"Genetic / Chromosomal", bold:true },
{ text:"Karyotype: recommended when early FGR + structural defect", sub:true },
{ text:"Chromosomal microarray: 18.8% detection of abnormalities in FGR (vs 9.3% by karyotype alone)", sub:true },
{ text:"NIPT (non-invasive prenatal testing) for aneuploidies", sub:true },
{ text:"Infection Screen (TORCH)", bold:true },
{ text:"CMV, Rubella, Toxoplasmosis, Herpes, Varicella serology / PCR", sub:true },
{ text:"Especially in symmetric FGR presenting early", sub:true },
{ text:"Maternal Blood Tests", bold:true },
{ text:"Full blood count, renal function, LFTs, uric acid (preeclampsia screen)", sub:true },
{ text:"Antiphospholipid antibodies (APS association with FGR)", sub:true },
{ text:"Thrombophilia screen (factor V Leiden, protein C/S, ATIII)", sub:true },
{ text:"PlGF (placental growth factor): low PlGF < 100 pg/mL at 20–34 wks confirms placental FGR", sub:true },
{ text:"Fetal Monitoring", bold:true },
{ text:"Non-stress test (NST) / cardiotocography (CTG)", sub:true },
{ text:"Biophysical profile (BPP): tone, movement, breathing, AFI, NST — max score 10", sub:true },
{ text:"Computerised CTG (cCTG): used in ISUOG protocol for late FGR", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 6: Diagnosis");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – DIAGNOSTIC CRITERIA
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Diagnostic Criteria", [
{ text:"SGA — Diagnosis", bold:true },
{ text:"Birth weight < 10th percentile for gestational age", sub:true },
{ text:"Diagnosed at or after birth — retrospective statistical label", sub:true },
{ text:"No requirement to demonstrate pathological process", sub:true },
{ text:"FGR — Antenatal Diagnosis (ACOG / SMFM criteria)", bold:true },
{ text:"Sonographic EFW or AC < 10th percentile for gestational age", sub:true },
{ text:"AND/OR: abnormal fetal growth velocity (crossing percentiles)", sub:true },
{ text:"AND/OR: abnormal umbilical artery Doppler (elevated PI, AEDF, REDF)", sub:true },
{ text:"FGR — Tighter / High-Risk Definition", bold:true },
{ text:"EFW < 3rd percentile (significantly elevated risk)", sub:true },
{ text:"EFW 3rd–10th percentile with any of: abnormal UA Doppler, MCA Doppler, absent growth, oligohydramnios, or maternal preeclampsia", sub:true },
{ text:"ISUOG / Delphi Consensus Criteria (Europe)", bold:true },
{ text:"EFW or AC < 3rd percentile OR EFW/AC < 10th + UA PI > 95th / CPR < 5th / bilateral uterine artery notching — regardless of gestational age at diagnosis", sub:true },
]);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – FGR STAGING SYSTEM
// ════════════════════════════════════════════════════════════════════════════
{
let sl = prs.addSlide();
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.offWhite} });
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:1.05, fill:{color:C.navy} });
sl.addShape(prs.ShapeType.rect, { x:0, y:1.05, w:"100%", h:0.07, fill:{color:C.teal} });
sl.addText("FGR Staging System (Doppler-Based)", {
x:0.4, y:0.1, w:12.5, h:0.85,
fontFace: FONT, fontSize:24, bold:true, color:C.white, valign:"middle"
});
const rows = [
["Stage 0", "EFW or AC < 10th percentile\nNormal UA Doppler", "Constitutionally small or mild FGR\nLow risk"],
["Stage 1", "EFW/AC < 10th percentile\nUA PI > 95th percentile\nAFI normal or reduced", "Impaired placental function\nModerate risk"],
["Stage 2", "UA AEDF\n±Oligohydramnios", "Significant placental insufficiency\nHigh risk of perinatal compromise"],
["Stage 3", "UA REDF\nOR DV PI > 95th\nOR MCA PI < 5th", "Severe placental failure\nImminent fetal compromise"],
["Stage 4", "Abnormal CTG\nDV absent/reversed 'a' wave\nBiophysical profile < 4", "Critical — immediate delivery indicated"],
];
const tdata = [
[
{ text:"Stage", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13} },
{ text:"Doppler / Criteria", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13} },
{ text:"Clinical Significance", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13} },
],
...rows.map(r => r.map((c,i) => ({
text:c,
options:{color:i===0?C.navy:C.textDark,fontFace:FONT,fontSize:12,bold:i===0}
})))
];
sl.addTable(tdata, {
x:0.3, y:1.2, w:13.0, h:5.85,
rowH:0.95,
border:{type:"solid",color:"CADBE8",pt:1},
fill:C.white,
colW:[2.0,5.5,5.5],
fontFace:FONT,
});
}
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 7: SGA vs FGR — Key Differences");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – COMPARISON TABLE 1
// ════════════════════════════════════════════════════════════════════════════
comparisonSlide(prs, "SGA vs FGR: Core Differences",
[
["Definition", "Birth weight < 10th percentile at birth (statistical)", "Fetus fails to achieve its growth potential (pathological)"],
["Timing of Diagnosis", "Postnatal — at birth", "Antenatal — via serial USS"],
["Pathology required?", "No — many are constitutionally normal", "Yes — implies underlying pathological process"],
["Prevalence", "~10% of births by definition", "~5–7% of pregnancies (true pathological FGR)"],
["Growth Velocity", "Normal or unknown", "Reduced or crossing percentiles (abnormal)"],
["Doppler", "Not required / not relevant", "Abnormal UA, MCA, DV Doppler in true FGR"],
["Placental Function", "Normal in constitutionally small", "Often impaired — ↑ placental resistance"],
["Chromosomal Anomaly", "Usually absent", "Present in subset (9–19%) especially early FGR"],
],
[
{ text:"Parameter", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13} },
{ text:"SGA", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13,fill:C.teal} },
{ text:"FGR", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13,fill:C.gold} },
]
);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – COMPARISON TABLE 2
// ════════════════════════════════════════════════════════════════════════════
comparisonSlide(prs, "SGA vs FGR: Clinical & Outcome Differences",
[
["Fetal Risk", "Low if constitutionally small", "High — stillbirth, acidosis, perinatal death"],
["CTG / BPP", "Usually normal", "Abnormal in advanced FGR"],
["Oligohydramnios", "Usually absent", "Common — marker of renal hypoperfusion"],
["Customized Growth Curve", "May plot above 10th", "May remain pathological even above 10th"],
["Association with Preeclampsia", "Not necessarily associated", "Strong association — esp. early-onset FGR"],
["Delivery Timing", "At term unless other indication", "Guided by gestational age + Doppler stage"],
["Long-term Outcome", "Generally normal", "Increased risk: metabolic syndrome, CVD, hypertension (Barker hypothesis)"],
["Management Intensity", "Standard antenatal care", "Intensive surveillance, timed delivery, NICU"],
],
[
{ text:"Parameter", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13} },
{ text:"SGA", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13} },
{ text:"FGR", options:{bold:true,color:C.white,fontFace:FONT,fontSize:13} },
]
);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 8: Management");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 17 – MANAGEMENT
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Management Principles",
[
{ text:"SGA (Constitutionally Small, Normal Doppler)", bold:true },
{ text:"Confirm gestational age accurately", sub:true },
{ text:"Serial growth scans every 2–4 weeks", sub:true },
{ text:"Doppler velocimetry — UA ± MCA if indicated", sub:true },
{ text:"Deliver at term; no indication for early delivery if all monitoring normal", sub:true },
{ text:"FGR — Antenatal Management", bold:true },
{ text:"Treat underlying cause (control BP in hypertension, treat infections)", sub:true },
{ text:"Aspirin prophylaxis in high-risk patients from 12–16 wks (prevents ~25% of preeclampsia-related FGR)", sub:true },
{ text:"Corticosteroids if < 34 weeks and early delivery anticipated", sub:true },
{ text:"Magnesium sulfate for neuroprotection if < 32 weeks", sub:true },
],
{
col:[
{ text:"FGR — Delivery Timing", bold:true },
{ text:"Stage 1 (UA PI elevated only): deliver ≥ 37 wks", sub:true },
{ text:"Stage 2 (UA AEDF): deliver at 34 wks", sub:true },
{ text:"Stage 3 (UA REDF or DV changes): deliver at 30–32 wks", sub:true },
{ text:"Stage 4 (abnormal CTG/DV): immediate delivery", sub:true },
{ text:"Idiopathic FGR > 34 wks: provider-initiated delivery to avoid stillbirth", sub:true },
{ text:"SMFM vs ISUOG — Different Protocols", bold:true },
{ text:"SMFM: emphasizes EFW/AC + UA Doppler + CTG", sub:true },
{ text:"ISUOG: also includes MCA, DV Doppler, computerized CTG", sub:true },
]
}
);
// ════════════════════════════════════════════════════════════════════════════
// SECTION DIVIDER
// ════════════════════════════════════════════════════════════════════════════
sectionDivider(prs, "Section 9: Complications & Prognosis");
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 18 – COMPLICATIONS
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "Complications & Long-term Prognosis",
[
{ text:"IMMEDIATE / PERINATAL COMPLICATIONS", bold:true },
{ text:"Stillbirth (risk ↑ 28x if FGR < 34 weeks with abnormal Doppler)", sub:true },
{ text:"Perinatal asphyxia, birth acidosis", sub:true },
{ text:"Hypoglycemia, hypothermia, hypocalcemia", sub:true },
{ text:"Polycythemia, hyperbilirubinemia", sub:true },
{ text:"Meconium aspiration syndrome", sub:true },
{ text:"Necrotizing enterocolitis (NEC)", sub:true },
{ text:"Intraventricular hemorrhage (IVH) — especially in preterm FGR", sub:true },
],
{
col:[
{ text:"LONG-TERM OUTCOMES (Barker / DOHaD Hypothesis)", bold:true },
{ text:"Increased risk of: hypertension, type 2 diabetes, metabolic syndrome, CVD in adulthood", sub:true },
{ text:"Programming of neuroendocrine stress axis in fetal life", sub:true },
{ text:"Neurodevelopmental: ↑ risk of CP, learning disabilities, cognitive impairment", sub:true },
{ text:"Catch-up growth in SGA: ~80–90% achieve normal height by age 2", sub:true },
{ text:"Persistent short stature in ~10% SGA → growth hormone therapy indicated", sub:true },
{ text:"FGR Recurrence Risk", bold:true },
{ text:"History of preterm birth is the highest risk factor for FGR recurrence", sub:true },
{ text:"FGR recurrence rate ~20–25% in subsequent pregnancies", sub:true },
]
}
);
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 19 – KEY TAKEAWAYS
// ════════════════════════════════════════════════════════════════════════════
{
let sl = prs.addSlide();
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:"100%", h:"100%", fill:{color:C.navy} });
sl.addShape(prs.ShapeType.rect, { x:0, y:0, w:0.18, h:"100%", fill:{color:C.teal} });
sl.addShape(prs.ShapeType.rect, { x:0.18, y:1.0, w:6.5, h:0.06, fill:{color:C.gold} });
sl.addText("Key Takeaways", {
x:0.45, y:0.2, w:12.5, h:0.75,
fontFace:FONT, fontSize:30, bold:true, color:C.white, valign:"middle"
});
const points = [
"SGA = statistical label (birth weight < 10th percentile) — many are constitutionally normal",
"FGR = pathological — fetus fails to reach its growth potential — requires Doppler evidence",
"Not all SGA fetuses are FGR; not all FGR fetuses are born SGA",
"AC (abdominal circumference) is the most sensitive single USS parameter for FGR",
"UA Doppler is the cornerstone of FGR monitoring — AEDF/REDF indicates critical compromise",
"Early FGR (< 32 wks) carries highest morbidity; closely linked to preeclampsia",
"Delivery timing is guided by gestational age + Doppler stage — not by weight alone",
"FGR has lifelong consequences: Barker hypothesis — metabolic syndrome, CVD risk in adulthood",
"Customised growth curves outperform population-based curves in identifying true FGR",
];
const bItems = points.map((p, i) => ({
text: p,
options: {
bullet: { code: "25CF", color: C.gold },
color: C.white,
fontSize: 16,
breakLine: i < points.length - 1
}
}));
sl.addText(bItems, {
x:0.45, y:1.15, w:12.7, h:6.0, fontFace:FONT, valign:"top"
});
}
// ════════════════════════════════════════════════════════════════════════════
// SLIDE 20 – REFERENCES
// ════════════════════════════════════════════════════════════════════════════
contentSlide(prs, "References", [
{ text:"1. Creasy & Resnik's Maternal-Fetal Medicine: Principles and Practice, 9th ed. (ISBN 9780323828499)", sub:false },
{ text:" Chapter 44: Fetal Growth Restriction — Definition, Classification, Etiology, Staging System, Management", sub:true },
{ text:"2. Robbins & Kumar Basic Pathology (Robbins Pathology, ISBN 9780323790185)", sub:false },
{ text:" Chapter: Prematurity and Fetal Growth Restriction — Symmetric vs Asymmetric FGR", sub:true },
{ text:"3. Robbins, Cotran & Kumar: Pathologic Basis of Disease (ISBN 9780443264528)", sub:false },
{ text:" Fetal Growth Restriction — Pathology", sub:true },
{ text:"4. ACOG Practice Bulletin: Fetal Growth Restriction (Committee on Practice Bulletins — Obstetrics)", sub:false },
{ text:"5. ISUOG Practice Guidelines: Ultrasound assessment of fetal biometry and growth", sub:false },
{ text:"6. Gordijn SJ et al. Consensus definition of fetal growth restriction: a Delphi procedure. Ultrasound Obstet Gynecol. 2016", sub:false },
{ text:"7. Marsal K. Physiological aspects of placental blood flow. Creasy & Resnik Chapter 14", sub:false },
], {small:true});
// ════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ════════════════════════════════════════════════════════════════════════════
prs.writeFile({ fileName: "/home/daytona/workspace/sga-fgr-ppt/SGA_vs_FGR_Presentation.pptx" })
.then(() => console.log("Done: SGA_vs_FGR_Presentation.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/sga-fgr-ppt && node build.js 2>&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/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/sga-fgr-ppt/build.js'
cd /home/daytona/workspace/sga-fgr-ppt && node build.js 2>&1
cd /home/daytona/workspace/sga-fgr-ppt && node -e " const pptxgen = require('pptxgenjs'); const prs = new pptxgen(); let sl = prs.addSlide(); // Test simple table const tdata = [ [ { text:'Parameter', options:{bold:true,color:'FFFFFF',fontFace:'Calibri',fontSize:13} }, { text:'SGA', options:{bold:true,color:'FFFFFF',fontFace:'Calibri',fontSize:13} }, ], [ { text:'Test row', options:{color:'000000',fontFace:'Calibri',fontSize:12,bold:true} }, { text:'Val', options:{color:'000000',fontFace:'Calibri',fontSize:12,bold:false} }, ] ]; sl.addTable(tdata, {x:0.3,y:1.2,w:10,h:4,rowH:0.5,border:{type:'solid',color:'CADBE8',pt:1},fill:'FFFFFF',colW:[4,6]}); prs.writeFile({fileName:'/tmp/test_table.pptx'}).then(()=>console.log('OK')).catch(e=>console.error(e)); " 2>&1
cd /home/daytona/workspace/sga-fgr-ppt && node -e " const pptxgen = require('pptxgenjs'); const prs = new pptxgen(); let sl = prs.addSlide(); const rows = [ ['Stage 0', 'EFW or AC < 10th percentile\nNormal UA Doppler', 'Low risk'], ]; const tdata = [ [{text:'Stage',options:{bold:true,color:'FFFFFF',fontFace:'Calibri',fontSize:13}},{text:'Criteria',options:{bold:true,color:'FFFFFF',fontFace:'Calibri',fontSize:13}},{text:'Significance',options:{bold:true,color:'FFFFFF',fontFace:'Calibri',fontSize:13}}], ...rows.map(r => r.map((c,i) => ({text:c,options:{color:i===0?'0D2137':'1C2B3A',fontFace:'Calibri',fontSize:12,bold:i===0}}))) ]; sl.addTable(tdata, {x:0.3,y:1.2,w:13.0,h:5.85,rowH:0.95,border:{type:'solid',color:'CADBE8',pt:1},fill:'FFFFFF',colW:[2.0,5.5,5.5]}); prs.writeFile({fileName:'/tmp/test2.pptx'}).then(()=>console.log('OK')).catch(e=>console.error(e)); " 2>&1
grep -n "indent: 36" /home/daytona/workspace/sga-fgr-ppt/build.js
~/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/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/sga-fgr-ppt/build.js'
cd /home/daytona/workspace/sga-fgr-ppt && node build.js 2>&1
# Fix: replace bullet: {indent:40} with bullet:true and paraSpaceBefore for sub-items, also remove indentLevel sed -i 's/bullet: b\.sub ? { indent: 40 } : true,/bullet: true,/g' /home/daytona/workspace/sga-fgr-ppt/build.js sed -i '/indentLevel: b\.sub ? 1 : 0,/d' /home/daytona/workspace/sga-fgr-ppt/build.js cd /home/daytona/workspace/sga-fgr-ppt && node build.js 2>&1