~/reproductive-health-pptx/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// ── Colour palette ──────────────────────────────────────────────
// Deep navy dominant + warm coral accent + soft lavender highlight
const C = {
navy: "0D1B2A", // dominant background
navyMid: "1A2E45", // card / panel background
navyLight:"223354", // lighter panel
coral: "E8503A", // accent / heading bar
corallg: "F07A67", // lighter coral for sub-headings
gold: "F5A623", // data / highlight
white: "FFFFFF",
off: "D6E4F0", // body text on dark bg
slate: "8BA7C4", // muted text
teal: "2ABFBF", // secondary accent (tables, icons)
};
// ── Image fetch helper ──────────────────────────────────────────
function fetchImages(urls) {
const json = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`
).toString();
return JSON.parse(json);
}
// Pre-fetch the three key diagrams used in the notes
const IMG_URLS = [
"https://cdn.orris.care/cdss_images/9e9e325242f7f80ca26e1eb4bdfc1997008f88c8586a392e1d62c76ce021c264.png", // hormonal cycle
"https://cdn.orris.care/cdss_images/ea19901fe49dafcdfc83f44c2a624d54255962bafb5a3f6bf3b95f4c3410ae38.png", // ovulation mechanism
"https://cdn.orris.care/cdss_images/61f47b0929f1842175c20af1b4fd581ee6efb443b874f2f934f4d9fc23583ee4.png", // fertilisation stages
];
console.log("Fetching images...");
const imgs = fetchImages(IMG_URLS);
const [imgCycle, imgOvMech, imgFert] = imgs;
console.log("Images fetched:", imgs.map(i => i.error || "OK"));
// ── Presentation setup ──────────────────────────────────────────
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Ovulation, Fertilisation & Implantation";
pres.author = "Reproductive Health Notes";
// ── Reusable helpers ────────────────────────────────────────────
function addSlideBg(slide) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy }
});
}
function addHeaderBar(slide, label) {
// coral left accent stripe
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 0.22, h: 5.625, fill: { color: C.coral }, line: { color: C.coral }
});
// topic label top-right pill
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 7.8, y: 0.18, w: 2.0, h: 0.36, fill: { color: C.coral }, line: { color: C.coral }, rectRadius: 0.05
});
slide.addText(label, {
x: 7.8, y: 0.18, w: 2.0, h: 0.36, fontSize: 9, color: C.white, bold: true, align: "center", valign: "middle", margin: 0
});
}
function sectionTitle(slide, title, subtitle) {
slide.addText(title, {
x: 0.5, y: 0.22, w: 7.1, h: 0.55, fontSize: 22, bold: true, color: C.white, align: "left", valign: "middle"
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.5, y: 0.82, w: 7.1, h: 0.3, fontSize: 11, color: C.slate, align: "left", italic: true
});
}
}
function addDivider(slide, y) {
slide.addShape(pres.shapes.RECTANGLE, {
x: 0.5, y, w: 9.0, h: 0.025, fill: { color: C.corallg }, line: { color: C.corallg }
});
}
function card(slide, x, y, w, h, color) {
slide.addShape(pres.shapes.RECTANGLE, {
x, y, w, h,
fill: { color: color || C.navyMid },
line: { color: C.navyLight, pt: 1 },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.2 }
});
}
function bullets(slide, items, x, y, w, h, opts) {
const o = opts || {};
slide.addText(
items.map((t, i) => ({ text: t, options: { bullet: { code: "25B8", color: o.bulletColor || C.teal }, breakLine: i < items.length - 1 } })),
{ x, y, w, h, fontSize: o.fontSize || 11.5, color: o.color || C.off, lineSpacingMultiple: 1.25 }
);
}
// ════════════════════════════════════════════════════════════════
// SLIDE 1 — Cover
// ════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
// large coral accent block left
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.55, h: 5.625, fill: { color: C.coral }, line: { color: C.coral } });
// decorative circle top-right
s.addShape(pres.shapes.OVAL, { x: 7.8, y: -1.2, w: 3.5, h: 3.5, fill: { color: C.navyMid }, line: { color: C.navyLight, pt: 2 } });
s.addShape(pres.shapes.OVAL, { x: 8.2, y: -0.8, w: 2.7, h: 2.7, fill: { color: C.navyLight }, line: { color: C.coral, pt: 1 } });
s.addText("REPRODUCTIVE HEALTH", {
x: 0.75, y: 1.15, w: 8.5, h: 0.5, fontSize: 13, bold: true, color: C.teal,
charSpacing: 4, align: "left"
});
s.addText("Ovulation,\nFertilisation &\nImplantation", {
x: 0.75, y: 1.65, w: 8.5, h: 2.1, fontSize: 36, bold: true, color: C.white, align: "left", lineSpacingMultiple: 1.1
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.75, y: 3.8, w: 2.2, h: 0.06, fill: { color: C.coral }, line: { color: C.coral } });
s.addText("Comprehensive Topic Summary • Three Modules", {
x: 0.75, y: 3.95, w: 8.5, h: 0.35, fontSize: 11, color: C.slate, align: "left"
});
// module tags bottom
const tags = ["MODULE 1 — OVULATION", "MODULE 2 — FERTILISATION", "MODULE 3 — IMPLANTATION"];
tags.forEach((tag, i) => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.75 + i * 3.05, y: 4.9, w: 2.85, h: 0.45, fill: { color: C.navyMid }, line: { color: C.teal, pt: 1 }, rectRadius: 0.06 });
s.addText(tag, { x: 0.75 + i * 3.05, y: 4.9, w: 2.85, h: 0.45, fontSize: 8.5, bold: true, color: C.teal, align: "center", valign: "middle", margin: 0 });
});
}
// ════════════════════════════════════════════════════════════════
// ── MODULE 1: OVULATION ──────────────────────────────────────
// ════════════════════════════════════════════════════════════════
// SLIDE 2 — Module 1 Section Title
{
const s = pres.addSlide();
addSlideBg(s);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 2.3, w: 10, h: 1.05, fill: { color: C.coral }, line: { color: C.coral } });
s.addText("MODULE 1", { x: 0.6, y: 0.6, w: 8.8, h: 0.5, fontSize: 14, bold: true, color: C.teal, charSpacing: 5 });
s.addText("OVULATION", { x: 0.6, y: 2.3, w: 8.8, h: 1.05, fontSize: 48, bold: true, color: C.white, align: "left", valign: "middle" });
s.addText("Hormonal control • Follicular development • Mechanism of rupture • Corpus luteum", {
x: 0.6, y: 3.55, w: 8.8, h: 0.4, fontSize: 12, color: C.off, italic: true
});
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: C.navyMid }, line: { color: C.navyMid } });
s.addText("The Developing Human • Langman's Medical Embryology • Guyton & Hall", {
x: 0, y: 5.3, w: 10, h: 0.325, fontSize: 8, color: C.slate, align: "center", valign: "middle"
});
}
// SLIDE 3 — HPO Axis & Hormonal Events
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 1 — OVULATION");
sectionTitle(s, "Hormonal Control — The HPO Axis", "Hypothalamic-Pituitary-Ovarian feedback loop drives the menstrual cycle");
addDivider(s, 1.15);
// Left: hormonal steps
card(s, 0.32, 1.25, 4.6, 3.95, C.navyMid);
s.addText("Key Hormonal Events", { x: 0.45, y: 1.3, w: 4.35, h: 0.38, fontSize: 12, bold: true, color: C.teal });
bullets(s, [
"GnRH (hypothalamus) → pulsatile release → drives FSH & LH",
"FSH stimulates follicular development and estrogen production",
"Rising estrogen → negative feedback initially suppresses FSH/LH",
"Pre-ovulatory estrogen peak (≥200 pg/mL for ≥50 hrs) → positive feedback → LH surge",
"LH rises 6–10× ; peaks ~16 hrs before ovulation",
"FSH rises 2–3× synergistically with LH",
"Ovulation occurs 24–36 hrs after LH peak",
"Post-ovulation: corpus luteum secretes progesterone → prepares endometrium",
], 0.45, 1.72, 4.35, 3.3, { fontSize: 10.5 });
// Right: diagram
if (!imgCycle.error) {
s.addImage({ data: imgCycle.base64, x: 5.2, y: 1.22, w: 4.55, h: 4.0 });
}
s.addText("Fig: Hormonal fluctuations & endometrial changes — The Developing Human", {
x: 5.2, y: 5.26, w: 4.55, h: 0.2, fontSize: 6.5, color: C.slate, align: "center", italic: true
});
}
// SLIDE 4 — Follicular Maturation
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 1 — OVULATION");
sectionTitle(s, "Follicular Maturation to Ovulation", "Sequential stages from primordial follicle to Graafian follicle");
addDivider(s, 1.15);
const stages = [
["Primordial", "Oocyte arrested in prophase I\nFlat granulosa cells around oocyte"],
["Primary", "Cuboidal granulosa cells\nZona pellucida forms"],
["Secondary (Antral)", "Fluid-filled antrum develops\nTheca interna & externa appear"],
["Mature Graafian", "Grows to ~25 mm\nLH surge → meiosis I completes\nOocyte arrested in metaphase II"],
];
stages.forEach(([title, body], i) => {
const x = 0.32 + i * 2.38;
const isLast = i === 3;
card(s, x, 1.28, 2.2, 3.65, isLast ? C.coral : C.navyMid);
if (isLast) {
s.addShape(pres.shapes.RECTANGLE, { x: x + 0.06, y: 1.34, w: 2.08, h: 0.44, fill: { color: "A83020" }, line: { color: "A83020" } });
}
s.addText(`${i + 1}. ${title}`, {
x: x + 0.1, y: 1.34, w: 2.05, h: 0.44, fontSize: 10.5, bold: true,
color: isLast ? C.white : C.gold, valign: "middle"
});
s.addText(body, {
x: x + 0.1, y: 1.82, w: 2.0, h: 3.0, fontSize: 10, color: isLast ? "FFD9D3" : C.off,
lineSpacingMultiple: 1.3
});
});
// Arrow connectors between cards
for (let i = 0; i < 3; i++) {
const ax = 2.48 + i * 2.38;
s.addText("▶", { x: ax, y: 2.75, w: 0.3, h: 0.3, fontSize: 12, color: C.teal, align: "center" });
}
// LH surge callout bottom
card(s, 0.32, 5.05, 9.35, 0.46, "1A2E45");
s.addText("⚡ LH surge triggers: Meiosis I completion • Metaphase II arrest • Collagenase ↑ • Prostaglandins ↑ • Follicle rupture", {
x: 0.45, y: 5.05, w: 9.1, h: 0.46, fontSize: 10, color: C.gold, bold: true, valign: "middle"
});
}
// SLIDE 5 — Mechanism of Follicle Rupture
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 1 — OVULATION");
sectionTitle(s, "Mechanism of Follicle Rupture", "LH-driven cascade leading to oocyte expulsion");
addDivider(s, 1.15);
// Mechanism diagram (left)
if (!imgOvMech.error) {
s.addImage({ data: imgOvMech.base64, x: 0.32, y: 1.22, w: 3.5, h: 4.0 });
}
s.addText("Fig: Postulated mechanism of ovulation — Guyton & Hall", {
x: 0.32, y: 5.26, w: 3.5, h: 0.2, fontSize: 6.5, color: C.slate, align: "center", italic: true
});
// Right: Step-by-step
card(s, 4.1, 1.22, 5.6, 3.95, C.navyMid);
s.addText("Step-by-Step Sequence", { x: 4.25, y: 1.28, w: 5.3, h: 0.38, fontSize: 12, bold: true, color: C.teal });
const steps = [
["1", "Stigma", "Small avascular spot appears at apex of bulging follicle"],
["2", "Enzymatic", "Proteolytic enzymes (collagenase, MMP, plasmin) dissolve follicle capsule"],
["3", "Vascular", "Prostaglandins → vasodilation, hyperemia, plasma transudation into follicle"],
["4", "Swelling", "Follicle swells; stigma balloons outward then ruptures (~2 min)"],
["5", "Expulsion", "Oocyte-cumulus complex expelled: secondary oocyte + corona radiata + zona pellucida"],
["6", "Regulators", "MAPK3/1 (ERK1/2) signaling; smooth muscle in theca externa contracts"],
];
steps.forEach(([num, label, desc], i) => {
const y = 1.7 + i * 0.6;
s.addShape(pres.shapes.OVAL, { x: 4.2, y: y + 0.04, w: 0.28, h: 0.28, fill: { color: C.coral }, line: { color: C.coral } });
s.addText(num, { x: 4.2, y: y + 0.04, w: 0.28, h: 0.28, fontSize: 8, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
s.addText(`${label}: `, { x: 4.55, y, w: 1.3, h: 0.36, fontSize: 10, bold: true, color: C.corallg, valign: "top" });
s.addText(desc, { x: 5.7, y, w: 3.85, h: 0.36, fontSize: 10, color: C.off, valign: "top" });
});
}
// SLIDE 6 — Corpus Luteum
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 1 — OVULATION");
sectionTitle(s, "Corpus Luteum & Post-Ovulatory Events", "The ruptured follicle transforms; two possible outcomes");
addDivider(s, 1.15);
// Formation (left card)
card(s, 0.32, 1.28, 4.3, 2.6, C.navyMid);
s.addText("Formation & Function", { x: 0.45, y: 1.33, w: 4.1, h: 0.38, fontSize: 12, bold: true, color: C.teal });
bullets(s, [
"Granulosa + theca interna cells luteinize under LH",
"Cells enlarge 2×, fill with lipid → yellow appearance",
"Secretes progesterone (primary) and estrogen",
"Progesterone → secretory endometrium for implantation",
"Also raises basal body temperature (BBT) by 0.3–0.5°C",
], 0.45, 1.75, 4.1, 2.0, { fontSize: 10.5 });
// Two outcomes (right)
// No fertilisation
card(s, 4.82, 1.28, 4.85, 1.2, "1A2E45");
s.addShape(pres.shapes.RECTANGLE, { x: 4.82, y: 1.28, w: 4.85, h: 0.38, fill: { color: C.navyLight }, line: { color: C.navyLight } });
s.addText("❌ No Fertilisation", { x: 4.95, y: 1.28, w: 4.6, h: 0.38, fontSize: 11, bold: true, color: C.corallg, valign: "middle" });
bullets(s, [
"Corpus luteum involutes after 10–12 days",
"Called corpus luteum of menstruation",
"Becomes corpus albicans (white scar)",
"Progesterone/estrogen fall → menstruation",
], 4.95, 1.7, 4.6, 0.8, { fontSize: 10 });
// Fertilisation outcome
card(s, 4.82, 2.6, 4.85, 1.28, "1A2E45");
s.addShape(pres.shapes.RECTANGLE, { x: 4.82, y: 2.6, w: 4.85, h: 0.38, fill: { color: C.navyLight }, line: { color: C.navyLight } });
s.addText("✅ Fertilisation Occurs", { x: 4.95, y: 2.6, w: 4.6, h: 0.38, fontSize: 11, bold: true, color: C.teal, valign: "middle" });
bullets(s, [
"hCG (from syncytiotrophoblast) rescues corpus luteum",
"Corpus luteum of pregnancy; hCG peaks at ~10 wks",
"Maintains progesterone/estrogen for first 20 weeks",
"Placenta takes over steroidogenesis thereafter",
], 4.95, 3.02, 4.6, 0.8, { fontSize: 10 });
// Clinical bottom
card(s, 0.32, 4.0, 9.35, 1.2, "1A2E45");
s.addText("Clinical Notes", { x: 0.45, y: 4.05, w: 9.1, h: 0.35, fontSize: 10.5, bold: true, color: C.gold });
bullets(s, [
"Mittelschmerz — mid-cycle pain from peritoneal irritation by follicular fluid",
"Anovulation — inadequate gonadotropins; treated with clomiphene citrate (risk: multiple gestation ×10)",
"OCP — E+P suppress GnRH/FSH/LH → no dominant follicle → no ovulation",
], 0.45, 4.42, 9.1, 0.75, { fontSize: 10 });
}
// ════════════════════════════════════════════════════════════════
// ── MODULE 2: FERTILISATION ──────────────────────────────────
// ════════════════════════════════════════════════════════════════
// SLIDE 7 — Module 2 Section Title
{
const s = pres.addSlide();
addSlideBg(s);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 2.3, w: 10, h: 1.05, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("MODULE 2", { x: 0.6, y: 0.6, w: 8.8, h: 0.5, fontSize: 14, bold: true, color: C.teal, charSpacing: 5 });
s.addText("FERTILISATION", { x: 0.6, y: 2.3, w: 8.8, h: 1.05, fontSize: 42, bold: true, color: C.white, align: "left", valign: "middle" });
s.addText("Sperm transport • Capacitation • Acrosome reaction • Three phases • Zygote formation", {
x: 0.6, y: 3.55, w: 8.8, h: 0.4, fontSize: 12, color: C.off, italic: true
});
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: C.navyMid }, line: { color: C.navyMid } });
s.addText("Langman's Medical Embryology • The Developing Human • Ganong's Review of Medical Physiology", {
x: 0, y: 5.3, w: 10, h: 0.325, fontSize: 8, color: C.slate, align: "center", valign: "middle"
});
}
// SLIDE 8 — Sperm Transport & Capacitation
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 2 — FERTILISATION");
sectionTitle(s, "Sperm Transport & Capacitation", "From ejaculation to the site of fertilisation in the ampulla");
addDivider(s, 1.15);
// Transport card
card(s, 0.32, 1.28, 4.5, 2.5, C.navyMid);
s.addText("Sperm Transport", { x: 0.45, y: 1.33, w: 4.25, h: 0.38, fontSize: 12, bold: true, color: C.teal });
bullets(s, [
"~200–300 million sperm deposited; only 300–500 reach ampulla",
"~1% of sperm enter the cervix; survive many hours there",
"Transport via uterine smooth muscle contractions (not sperm motility)",
"Journey: cervix → isthmus: 30 min to 6 days",
"At isthmus: sperm pause, become less motile",
"At ovulation: cumulus cell chemoattractants re-activate sperm",
"Oocyte viable for 12–24 hrs; sperm viable for up to 5–7 days",
], 0.45, 1.75, 4.25, 1.9, { fontSize: 10.5 });
// Capacitation card
card(s, 5.0, 1.28, 4.65, 2.5, C.navyMid);
s.addText("Capacitation (~7 hours)", { x: 5.12, y: 1.33, w: 4.4, h: 0.38, fontSize: 12, bold: true, color: C.gold });
bullets(s, [
"Conditioning in the female reproductive tract (uterine tube epithelium)",
"Glycoprotein coat + seminal plasma proteins removed from acrosomal plasma membrane",
"Membrane destabilized → primed for acrosome reaction",
"Only capacitated sperm can penetrate corona radiata",
"Speeding to the ampulla confers NO advantage — capacitation must complete first",
], 5.12, 1.75, 4.4, 1.9, { fontSize: 10.5 });
// Acrosome reaction
card(s, 0.32, 3.9, 9.35, 1.38, C.navyMid);
s.addText("Acrosome Reaction", { x: 0.45, y: 3.95, w: 9.1, h: 0.38, fontSize: 12, bold: true, color: C.corallg });
s.addText("Triggered when capacitated sperm bind to ZP3 (zona pellucida glycoprotein). Outer acrosomal membrane fuses with plasma membrane → releases acrosomal enzymes: hyaluronidase (corona dispersal), acrosin (serine protease — zona lysis), esterase, neuraminidase. These digest a path through the zona pellucida.", {
x: 0.45, y: 4.35, w: 9.1, h: 0.85, fontSize: 10.5, color: C.off, lineSpacingMultiple: 1.25
});
}
// SLIDE 9 — Three Phases of Fertilisation
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 2 — FERTILISATION");
sectionTitle(s, "Three Phases of Fertilisation", "Sequential events from corona penetration to zygote formation");
addDivider(s, 1.15);
// Diagram left
if (!imgFert.error) {
s.addImage({ data: imgFert.base64, x: 0.32, y: 1.22, w: 3.35, h: 4.05 });
}
s.addText("Fig: A–E Fertilisation stages — The Developing Human", {
x: 0.32, y: 5.3, w: 3.35, h: 0.2, fontSize: 6.5, color: C.slate, align: "center", italic: true
});
// Phase cards right
const phases = [
{
num: "Phase 1", label: "Penetration of Corona Radiata",
color: C.navyMid, accent: C.coral,
points: ["Capacitated sperm pass freely through corona cells", "Hyaluronidase + tubal enzymes disperse follicular cells", "Sperm tail movements aid mechanical penetration"],
},
{
num: "Phase 2", label: "Penetration of Zona Pellucida",
color: C.navyMid, accent: C.gold,
points: ["Acrosin + enzymes lyse zona, form a pathway", "Zona reaction: cortical granules release lysosomal enzymes", "Zona becomes impermeable → blocks polyspermy (primary block)"],
},
{
num: "Phase 3", label: "Fusion of Plasma Membranes",
color: C.navyMid, accent: C.teal,
points: ["Posterior sperm head membrane fuses with oocyte membrane", "Sperm head + tail enter cytoplasm; sperm membrane stays on surface", "Oocyte responds: ① cortical/zona reaction ② meiosis II resumes → 2nd polar body + female pronucleus ③ metabolic activation"],
},
];
phases.forEach((p, i) => {
const y = 1.22 + i * 1.35;
card(s, 3.87, y, 5.78, 1.22, p.color);
s.addShape(pres.shapes.RECTANGLE, { x: 3.87, y, w: 5.78, h: 0.38, fill: { color: C.navyLight }, line: { color: C.navyLight } });
s.addText(`${p.num}: ${p.label}`, { x: 4.0, y, w: 5.5, h: 0.38, fontSize: 10.5, bold: true, color: p.accent, valign: "middle" });
bullets(s, p.points, 4.0, y + 0.4, 5.5, 0.8, { fontSize: 9.5 });
});
}
// SLIDE 10 — Pronuclei & Results of Fertilisation
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 2 — FERTILISATION");
sectionTitle(s, "Pronuclei, Syngamy & Results", "Formation of the zygote and significance of fertilisation");
addDivider(s, 1.15);
// Left: pronuclei steps
card(s, 0.32, 1.28, 4.6, 2.95, C.navyMid);
s.addText("Pronuclear Development → Zygote", { x: 0.45, y: 1.33, w: 4.35, h: 0.38, fontSize: 11.5, bold: true, color: C.teal });
bullets(s, [
"Sperm nucleus decondenses → male pronucleus (22+X or 22+Y)",
"Oocyte completes meiosis II → female pronucleus (22+X) + 2nd polar body",
"Both pronuclei are haploid; each replicates DNA independently",
"Nuclear envelopes break down (syngamy)",
"Chromosomes align on first mitotic spindle",
"Centromeres split; sister chromatids move to opposite poles",
"Deep cleavage furrow → 2-cell zygote (46 chromosomes, diploid)",
"Total fertilisation duration: ~24 hours",
], 0.45, 1.74, 4.35, 2.4, { fontSize: 10 });
// Right: results table
card(s, 5.1, 1.28, 4.55, 2.95, C.navyMid);
s.addText("Key Results of Fertilisation", { x: 5.22, y: 1.33, w: 4.3, h: 0.38, fontSize: 11.5, bold: true, color: C.gold });
const results = [
["Diploid restoration", "46 chromosomes; new maternal-paternal combination"],
["Sex determination", "X sperm → 46,XX (♀); Y sperm → 46,XY (♂)"],
["Meiosis II completion", "Mature ovum + second polar body formed"],
["Cleavage initiation", "Metabolic activation → embryonic development begins"],
["Genetic variability", "Novel combination of parental chromosomes"],
];
results.forEach(([key, val], i) => {
const y = 1.75 + i * 0.48;
s.addText(`${key}:`, { x: 5.22, y, w: 1.85, h: 0.38, fontSize: 9.5, bold: true, color: C.corallg, valign: "middle" });
s.addText(val, { x: 7.1, y, w: 2.4, h: 0.38, fontSize: 9.5, color: C.off, valign: "middle" });
if (i < results.length - 1)
s.addShape(pres.shapes.RECTANGLE, { x: 5.22, y: y + 0.38, w: 4.3, h: 0.01, fill: { color: C.navyLight }, line: { color: C.navyLight } });
});
// Polyspermy block summary
card(s, 0.32, 4.35, 9.35, 0.95, "1A2E45");
s.addText("Prevention of Polyspermy", { x: 0.45, y: 4.4, w: 9.1, h: 0.32, fontSize: 10.5, bold: true, color: C.corallg });
s.addText("Primary block: Zona reaction (cortical granule release → zona modification → impermeable to further sperm). Secondary: Cortical reaction modifies oocyte plasma membrane.", {
x: 0.45, y: 4.74, w: 9.1, h: 0.5, fontSize: 10, color: C.off
});
}
// ════════════════════════════════════════════════════════════════
// ── MODULE 3: IMPLANTATION ───────────────────────────────────
// ════════════════════════════════════════════════════════════════
// SLIDE 11 — Module 3 Section Title
{
const s = pres.addSlide();
addSlideBg(s);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 2.3, w: 10, h: 1.05, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("MODULE 3", { x: 0.6, y: 0.6, w: 8.8, h: 0.5, fontSize: 14, bold: true, color: C.gold, charSpacing: 5 });
s.addText("IMPLANTATION", { x: 0.6, y: 2.3, w: 8.8, h: 1.05, fontSize: 40, bold: true, color: C.navy, align: "left", valign: "middle" });
s.addText("Blastocyst development • Endometrial receptivity • Stages of implantation • Trophoblast differentiation", {
x: 0.6, y: 3.55, w: 8.8, h: 0.4, fontSize: 12, color: C.off, italic: true
});
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: C.navyMid }, line: { color: C.navyMid } });
s.addText("Creasy & Resnik's Maternal-Fetal Medicine • The Developing Human • Langman's Medical Embryology", {
x: 0, y: 5.3, w: 10, h: 0.325, fontSize: 8, color: C.slate, align: "center", valign: "middle"
});
}
// SLIDE 12 — Pre-implantation Development
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 3 — IMPLANTATION");
sectionTitle(s, "Pre-Implantation Development", "Zygote → Blastocyst: cleavage, compaction, and hatching");
addDivider(s, 1.15);
const timeline = [
["Day 0", "Zygote", "Fertilisation in ampulla; diploid (46 chr)"],
["Day 1–2", "2–4 Cell", "First cleavage divisions (cells = blastomeres)"],
["Day 3–4", "Morula", "16+ cells; compaction; enters uterine cavity"],
["Day 4–5", "Blastocyst", "Cavitation; zona pellucida hatching begins"],
["Day 6–7", "Hatched", "Zona shed; polar TE attaches to endometrium"],
];
timeline.forEach(([day, stage, desc], i) => {
const x = 0.32 + i * 1.88;
card(s, x, 1.28, 1.76, 3.6, C.navyMid);
s.addShape(pres.shapes.RECTANGLE, { x, y: 1.28, w: 1.76, h: 0.42, fill: { color: i === 4 ? C.coral : C.navyLight }, line: { color: C.navyLight } });
s.addText(day, { x, y: 1.28, w: 1.76, h: 0.42, fontSize: 9.5, bold: true, color: i === 4 ? C.white : C.teal, align: "center", valign: "middle", margin: 0 });
s.addText(stage, { x: x + 0.08, y: 1.74, w: 1.6, h: 0.42, fontSize: 11.5, bold: true, color: i === 4 ? C.gold : C.corallg, align: "center" });
s.addText(desc, { x: x + 0.08, y: 2.2, w: 1.6, h: 2.5, fontSize: 9.5, color: C.off, align: "center", lineSpacingMultiple: 1.3 });
if (i < timeline.length - 1)
s.addText("▶", { x: x + 1.76, y: 2.8, w: 0.12, h: 0.3, fontSize: 10, color: C.teal, align: "center" });
});
// Blastocyst structure
card(s, 0.32, 4.98, 9.35, 0.5, C.navyMid);
s.addText("Blastocyst Structure: ", { x: 0.45, y: 4.98, w: 2.0, h: 0.5, fontSize: 10.5, bold: true, color: C.teal, valign: "middle" });
s.addText("Trophectoderm (TE) — outer layer → placenta/membranes | Inner Cell Mass (ICM) — embryo proper | Blastocoel — fluid cavity | Polar TE — over ICM → initiates implantation", {
x: 2.3, y: 4.98, w: 7.2, h: 0.5, fontSize: 10, color: C.off, valign: "middle"
});
}
// SLIDE 13 — Endometrial Receptivity
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 3 — IMPLANTATION");
sectionTitle(s, "Endometrial Receptivity — Window of Implantation", "Days 20–24 of a 28-day cycle; estrogen + progesterone priming required");
addDivider(s, 1.15);
// Left: key molecular mediators
card(s, 0.32, 1.28, 5.0, 3.95, C.navyMid);
s.addText("Key Molecular Mediators", { x: 0.45, y: 1.33, w: 4.75, h: 0.38, fontSize: 12, bold: true, color: C.teal });
const meds = [
["HB-EGF", "Endometrial epithelium/pinopodia", "Critical attachment signal; binds ErbB1/ErbB4 on polar TE"],
["LIF", "Luminal epithelium", "Signals blastocyst and endometrium for receptivity"],
["IHH", "Epithelium", "Paracrine epithelial-stromal interaction"],
["HOXA10/11", "Stroma", "Crucial for decidualization"],
["HAND2", "Stroma", "Decidualization; suppresses epithelial differentiation"],
["BMP2", "Stroma", "Required for decidualization; embryo spacing"],
["WNT", "Endometrial epithelium", "Blastocyst attachment signaling"],
];
meds.forEach(([factor, loc, role], i) => {
const y = 1.75 + i * 0.49;
s.addText(factor, { x: 0.45, y, w: 1.1, h: 0.38, fontSize: 9.5, bold: true, color: C.gold, valign: "middle" });
s.addText(loc, { x: 1.58, y, w: 1.55, h: 0.38, fontSize: 8.5, color: C.slate, valign: "middle", italic: true });
s.addText(role, { x: 3.16, y, w: 2.0, h: 0.38, fontSize: 8.5, color: C.off, valign: "middle" });
if (i < meds.length - 1)
s.addShape(pres.shapes.RECTANGLE, { x: 0.45, y: y + 0.38, w: 4.65, h: 0.01, fill: { color: C.navyLight }, line: { color: C.navyLight } });
});
// Right: hormone requirements + pinopodia
card(s, 5.52, 1.28, 4.12, 1.8, C.navyMid);
s.addText("Hormonal Requirements", { x: 5.65, y: 1.33, w: 3.85, h: 0.38, fontSize: 11.5, bold: true, color: C.corallg });
bullets(s, [
"Both E2 (estradiol) AND P4 (progesterone) are required",
"E2 + P4 → HB-EGF expression on pinopodia",
"Pinopodia appear only during implantation window",
"Progesterone from corpus luteum drives decidualization",
], 5.65, 1.74, 3.85, 1.2, { fontSize: 10 });
card(s, 5.52, 3.18, 4.12, 2.05, C.navyMid);
s.addText("Pinopodia", { x: 5.65, y: 3.23, w: 3.85, h: 0.38, fontSize: 11.5, bold: true, color: C.gold });
bullets(s, [
"Finger-like projections on luminal endometrial surface",
"Appear exclusively during the window of implantation",
"Express HB-EGF in both soluble and membrane-bound forms",
"HB-EGF receptors (ErbB1/ErbB4) on polar TE microvilli mediate first contact",
], 5.65, 3.65, 3.85, 1.45, { fontSize: 10 });
}
// SLIDE 14 — Three Stages of Implantation
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 3 — IMPLANTATION");
sectionTitle(s, "Three Stages of Implantation", "Apposition → Adhesion → Invasion; complete by Day 10–12");
addDivider(s, 1.15);
const stageData = [
{
num: "1", name: "Apposition",
color: C.navyMid, accent: C.teal,
points: ["Loose, initial contact of polar TE with luminal endometrium", "Typically on posterior uterine wall", "Reversible at this stage", "Blastocyst orientates ICM toward endometrium"],
},
{
num: "2", name: "Adhesion",
color: C.navyMid, accent: C.corallg,
points: ["Firm, irreversible attachment", "HB-EGF (endometrium) binds ErbB1/ErbB4 (polar TE)", "TE integrins bind endometrial fibronectin/laminin", "LIF + blastocyst-to-endometrium cross-signals", "TE microvilli interdigitate with endometrial surface"],
},
{
num: "3", name: "Invasion",
color: C.navyMid, accent: C.gold,
points: ["Polar TE cells break through endometrial epithelium", "Cytotrophoblast (CTB) shell forms around embryo", "CTB differentiates → primitive syncytiotrophoblast (STB)", "STB: invasive + secretory (begins hCG secretion)", "Embryo fully embedded by Day 10–12"],
},
];
stageData.forEach((st, i) => {
const x = 0.32 + i * 3.18;
card(s, x, 1.28, 3.0, 3.95, st.color);
s.addShape(pres.shapes.OVAL, { x: x + 1.12, y: 1.34, w: 0.76, h: 0.76, fill: { color: st.accent }, line: { color: st.accent } });
s.addText(st.num, { x: x + 1.12, y: 1.34, w: 0.76, h: 0.76, fontSize: 22, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
s.addText(st.name, { x: x + 0.1, y: 2.2, w: 2.8, h: 0.42, fontSize: 13, bold: true, color: st.accent, align: "center" });
bullets(s, st.points, x + 0.15, 2.65, 2.7, 2.45, { fontSize: 9.8 });
});
// Arrow connectors
for (let i = 0; i < 2; i++) {
s.addText("▶", { x: 3.27 + i * 3.18, y: 3.15, w: 0.3, h: 0.35, fontSize: 14, color: C.coral, align: "center" });
}
}
// SLIDE 15 — Trophoblast Differentiation
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 3 — IMPLANTATION");
sectionTitle(s, "Trophoblast Differentiation & Decidualization", "Post-implantation: two lineages with distinct roles");
addDivider(s, 1.15);
// Central node: CTB
card(s, 3.9, 1.28, 2.2, 0.68, C.coral);
s.addText("CTB Progenitor Cell", { x: 3.9, y: 1.28, w: 2.2, h: 0.68, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
// Arrow down-left (STB)
s.addText("↙", { x: 2.5, y: 1.95, w: 0.5, h: 0.5, fontSize: 20, color: C.teal, align: "center" });
// Arrow down-right (EVT)
s.addText("↘", { x: 7.0, y: 1.95, w: 0.5, h: 0.5, fontSize: 20, color: C.gold, align: "center" });
// STB card
card(s, 0.32, 2.5, 4.3, 2.7, C.navyMid);
s.addShape(pres.shapes.RECTANGLE, { x: 0.32, y: 2.5, w: 4.3, h: 0.4, fill: { color: C.teal }, line: { color: C.teal } });
s.addText("Syncytiotrophoblast (STB)", { x: 0.32, y: 2.5, w: 4.3, h: 0.4, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
bullets(s, [
"Multi-nucleated; covers the placental surface",
"Transport and endocrine functions throughout pregnancy",
"Produces hCG, hPL, estrogens, progesterone",
"hCG rescues corpus luteum; forms basis of pregnancy test",
"Placenta takes over steroidogenesis by week 20",
], 0.45, 2.95, 4.05, 2.1, { fontSize: 10 });
// EVT card
card(s, 5.35, 2.5, 4.32, 2.7, C.navyMid);
s.addShape(pres.shapes.RECTANGLE, { x: 5.35, y: 2.5, w: 4.32, h: 0.4, fill: { color: C.gold }, line: { color: C.gold } });
s.addText("Extravillous Cytotrophoblast (EVT)", { x: 5.35, y: 2.5, w: 4.32, h: 0.4, fontSize: 11, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
bullets(s, [
"iEVT: invades endometrial stroma + superficial 1/3 myometrium",
"eEVT: invades arterioles → replaces endothelium → vascular remodeling",
"Driven by hypoxia (HIF) + ASCL2 + WNT/β-catenin signaling",
"Integrin switch: α6/β4 → α5/α1 (fibronectin receptors)",
"MMP-9 and plasminogen activators enable stromal invasion",
], 5.48, 2.95, 4.05, 2.1, { fontSize: 10 });
// Decidualization footer
card(s, 0.32, 5.3, 9.35, 0.2, "1A2E45");
s.addText("Decidualization: Stromal cells enlarge under progesterone influence → glycogen-rich decidua (HOXA10/11, HAND2, BMP2). Provides nutrition and immune tolerance for embryo.", {
x: 0.45, y: 5.2, w: 9.1, h: 0.3, fontSize: 8.5, color: C.slate, valign: "middle"
});
}
// SLIDE 16 — Clinical Correlates of Implantation
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "MODULE 3 — IMPLANTATION");
sectionTitle(s, "Clinical Correlates of Implantation", "When implantation goes wrong — and ART solutions");
addDivider(s, 1.15);
const conditions = [
{
name: "Ectopic Pregnancy",
color: C.coral,
points: ["Implantation outside uterine cavity (most often fallopian tube)", "Risk factors: PID, tubal scarring, previous ectopic, IUD", "Life-threatening if tube ruptures → surgical/medical (methotrexate) management"],
},
{
name: "Placenta Previa",
color: C.gold,
points: ["Implantation over or near internal cervical os", "Defect in embryo spacing mechanisms (BMP2 pathway)", "Painless antepartum haemorrhage; managed by C-section"],
},
{
name: "Preeclampsia",
color: C.teal,
points: ["Defective eEVT vascular remodeling → high-resistance circulation", "Shallow EVT invasion; spiral arteries not adequately remodeled", "Associated with HB-EGF pathway defects; new-onset hypertension + proteinuria"],
},
{
name: "Recurrent Miscarriage",
color: C.corallg,
points: ["Defects in HB-EGF/LIF signaling, decidualization, or EVT invasion", "Genetic (aneuploidies), anatomical, immunological or thrombophilic causes", "Investigated from ≥3 consecutive losses"],
},
{
name: "IVF / ART",
color: C.slate,
points: ["Stimulated follicles → oocyte retrieval; fertilised in Petri dish", "4–8 cell or blastocyst stage transferred to uterus via catheter", "Excess embryos cryopreserved; multiple pregnancy risk monitored"],
},
];
conditions.forEach((c, i) => {
const col = i < 3 ? 0 : 1;
const row = i < 3 ? i : i - 3;
const x = col === 0 ? 0.32 : 5.18;
const y = 1.28 + row * 1.43;
card(s, x, y, 4.62, 1.3, C.navyMid);
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.22, h: 1.3, fill: { color: c.color }, line: { color: c.color } });
s.addText(c.name, { x: x + 0.32, y: y + 0.06, w: 4.2, h: 0.34, fontSize: 11, bold: true, color: c.color });
bullets(s, c.points, x + 0.32, y + 0.42, 4.2, 0.85, { fontSize: 9.2 });
});
}
// SLIDE 17 — Integrated Timeline
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "INTEGRATED SUMMARY");
sectionTitle(s, "Integrated Timeline: Ovulation → Implantation", "Key events mapped to days relative to ovulation");
addDivider(s, 1.15);
const events = [
{ day: "−2 to −1", event: "LH Surge", desc: "6–10× rise; FSH also rises 2–3×", color: C.coral },
{ day: "Day 0", event: "Ovulation", desc: "Oocyte expelled; corpus luteum forms", color: C.corallg },
{ day: "Day 0–1", event: "Fertilisation", desc: "Capacitation → acrosome reaction → zygote in ampulla", color: C.gold },
{ day: "Day 2–4", event: "Cleavage", desc: "2-cell → morula; enters uterine cavity", color: C.teal },
{ day: "Day 4–5", event: "Blastocyst", desc: "Cavitation; zona hatching", color: C.slate },
{ day: "Day 6–7", event: "Implantation Begins", desc: "Polar TE adheres to endometrium (apposition → adhesion)", color: C.coral },
{ day: "Day 8–9", event: "Invasion", desc: "CTB shell; STB forms; hCG secretion starts", color: C.corallg },
{ day: "Day 10–12", event: "Fully Embedded", desc: "Embryo completely within endometrium", color: C.gold },
{ day: "~Day 28+", event: "Pregnancy Test +ve", desc: "hCG detectable in blood/urine", color: C.teal },
];
// Timeline bar
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.0, w: 9.0, h: 0.08, fill: { color: C.navyLight }, line: { color: C.navyLight } });
events.forEach((ev, i) => {
const x = 0.45 + i * 1.02;
const above = i % 2 === 0;
// dot on timeline
s.addShape(pres.shapes.OVAL, { x: x + 0.2, y: 2.96, w: 0.18, h: 0.18, fill: { color: ev.color }, line: { color: ev.color } });
if (above) {
// card above timeline
card(s, x, 1.28, 0.95, 1.6, C.navyMid);
s.addShape(pres.shapes.RECTANGLE, { x, y: 1.28, w: 0.95, h: 0.28, fill: { color: ev.color }, line: { color: ev.color } });
s.addText(ev.day, { x, y: 1.28, w: 0.95, h: 0.28, fontSize: 7, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
s.addText(ev.event, { x: x + 0.05, y: 1.58, w: 0.85, h: 0.38, fontSize: 8.5, bold: true, color: ev.color, align: "center" });
s.addText(ev.desc, { x: x + 0.04, y: 1.98, w: 0.88, h: 0.7, fontSize: 7, color: C.off, align: "center", lineSpacingMultiple: 1.2 });
// connector line
s.addShape(pres.shapes.RECTANGLE, { x: x + 0.45, y: 2.88, w: 0.02, h: 0.1, fill: { color: ev.color }, line: { color: ev.color } });
} else {
// card below timeline
s.addShape(pres.shapes.RECTANGLE, { x: x + 0.45, y: 3.12, w: 0.02, h: 0.1, fill: { color: ev.color }, line: { color: ev.color } });
card(s, x, 3.22, 0.95, 1.6, C.navyMid);
s.addShape(pres.shapes.RECTANGLE, { x, y: 3.22, w: 0.95, h: 0.28, fill: { color: ev.color }, line: { color: ev.color } });
s.addText(ev.day, { x, y: 3.22, w: 0.95, h: 0.28, fontSize: 7, bold: true, color: C.navy, align: "center", valign: "middle", margin: 0 });
s.addText(ev.event, { x: x + 0.05, y: 3.52, w: 0.85, h: 0.38, fontSize: 8.5, bold: true, color: ev.color, align: "center" });
s.addText(ev.desc, { x: x + 0.04, y: 3.92, w: 0.88, h: 0.7, fontSize: 7, color: C.off, align: "center", lineSpacingMultiple: 1.2 });
}
});
}
// SLIDE 18 — Hormone Summary Table
{
const s = pres.addSlide();
addSlideBg(s);
addHeaderBar(s, "INTEGRATED SUMMARY");
sectionTitle(s, "Key Hormones — Integrated Summary", "Role of each hormone across ovulation, fertilisation, and implantation");
addDivider(s, 1.15);
const rows = [
["GnRH", "Hypothalamus", "Pulsatile release drives FSH & LH secretion from anterior pituitary"],
["FSH", "Anterior pituitary", "Follicular development; estrogen production from granulosa cells"],
["LH", "Anterior pituitary", "Triggers ovulation (surge); corpus luteum maintenance"],
["Estradiol (E2)", "Granulosa / corpus luteum / STB", "Follicular growth; positive feedback → LH surge; endometrial proliferation; HB-EGF expression"],
["Progesterone (P4)", "Corpus luteum / STB", "Secretory endometrium; inhibits new follicle development; thermogenic (BBT); decidualization"],
["hCG", "Syncytiotrophoblast", "Rescues corpus luteum; maintains P4/E2 in early pregnancy; basis of pregnancy tests"],
["Inhibin", "Granulosa cells", "Suppresses FSH; dominant follicle selection"],
["Prostaglandins", "Follicular cells", "Follicular wall smooth muscle contraction; vasodilation; facilitate oocyte expulsion"],
];
// Header row
s.addShape(pres.shapes.RECTANGLE, { x: 0.32, y: 1.28, w: 9.35, h: 0.4, fill: { color: C.coral }, line: { color: C.coral } });
const headers = ["Hormone", "Source", "Role"];
const colW = [1.7, 2.5, 5.0];
const colX = [0.42, 2.15, 4.68];
headers.forEach((h, i) => {
s.addText(h, { x: colX[i], y: 1.28, w: colW[i], h: 0.4, fontSize: 10.5, bold: true, color: C.white, valign: "middle" });
});
rows.forEach((row, ri) => {
const y = 1.72 + ri * 0.47;
const bg = ri % 2 === 0 ? C.navyMid : C.navyLight;
s.addShape(pres.shapes.RECTANGLE, { x: 0.32, y, w: 9.35, h: 0.44, fill: { color: bg }, line: { color: bg } });
row.forEach((cell, ci) => {
s.addText(cell, {
x: colX[ci], y: y + 0.02, w: colW[ci] - 0.1, h: 0.4, fontSize: ci === 0 ? 10 : 9.5,
color: ci === 0 ? C.gold : C.off, bold: ci === 0, valign: "middle"
});
});
});
}
// SLIDE 19 — Summary & Sources
{
const s = pres.addSlide();
addSlideBg(s);
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.55, h: 5.625, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(pres.shapes.OVAL, { x: 7.5, y: 3.5, w: 3.2, h: 3.2, fill: { color: C.navyMid }, line: { color: C.teal, pt: 1 } });
s.addText("Key Takeaways", { x: 0.75, y: 0.3, w: 8.5, h: 0.5, fontSize: 22, bold: true, color: C.white });
addDivider(s, 0.9);
const takeaways = [
"OVULATION is triggered by the LH surge (24–36 hrs prior); the secondary oocyte is arrested in metaphase II until fertilisation",
"CORPUS LUTEUM is maintained by hCG after fertilisation; its progesterone output is critical for the first 20 weeks",
"FERTILISATION occurs in the ampulla; requires capacitation (~7 hrs) + acrosome reaction; takes ~24 hours; restores diploidy and determines sex",
"POLYSPERMY is prevented by the zona reaction (primary block) — cortical granules modify the zona pellucida immediately after sperm entry",
"IMPLANTATION begins Day 6–7; requires a receptive endometrium (Days 20–24); HB-EGF/ErbB signaling mediates initial attachment",
"TROPHOBLAST differentiates into STB (endocrine/transport) and EVT (iEVT invades stroma; eEVT remodels spiral arteries)",
"Defective EVT invasion → preeclampsia; ectopic implantation → ectopic pregnancy — both are clinical emergencies",
];
takeaways.forEach((t, i) => {
const y = 1.0 + i * 0.59;
s.addShape(pres.shapes.RECTANGLE, { x: 0.75, y: y + 0.1, w: 0.22, h: 0.22, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(t, { x: 1.05, y, w: 6.7, h: 0.54, fontSize: 10, color: C.off, lineSpacingMultiple: 1.2 });
});
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: C.navyMid }, line: { color: C.navyMid } });
s.addText("Sources: The Developing Human (Moore) • Langman's Medical Embryology • Guyton & Hall Medical Physiology • Creasy & Resnik's Maternal-Fetal Medicine • Berek & Novak's Gynecology", {
x: 0, y: 5.3, w: 10, h: 0.325, fontSize: 7.5, color: C.slate, align: "center", valign: "middle"
});
}
// ── Write file ──────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/reproductive-health-pptx/Ovulation_Fertilisation_Implantation.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("✅ Written to:", outPath);
}).catch(err => {
console.error("Error:", err);
process.exit(1);
});