Make a ppt on puberty and primary amenorrhea

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

mkdir -p /home/daytona/workspace/puberty-amenorrhea-ppt && ls /home/daytona/workspace/puberty-amenorrhea-ppt

Writing File

~/puberty-amenorrhea-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");

let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Puberty and Primary Amenorrhea";
pres.author = "Medical Education";

// ─── COLOR PALETTE ────────────────────────────────────────────────────────────
const C = {
  deepPurple: "3D1A78",   // dominant dark
  midPurple:  "6B35A8",   // supporting
  lilac:      "B08FD9",   // accent light
  teal:       "1A7B78",   // second accent
  tealLight:  "4DBDB9",
  coral:      "E05A4E",   // alert / highlight
  amber:      "F0A500",   // warm accent
  offWhite:   "F5F0FF",   // light bg
  white:      "FFFFFF",
  darkText:   "1C1035",
  grayText:   "5A5472",
};

// ─── HELPER: dark slide background ───────────────────────────────────────────
function darkBg(slide) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.deepPurple }, line: { color: C.deepPurple } });
}

function lightBg(slide) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offWhite }, line: { color: C.offWhite } });
}

// ─── HELPER: left accent bar ──────────────────────────────────────────────────
function leftBar(slide, color) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625,
    fill: { color: color || C.teal }, line: { color: color || C.teal } });
}

// ─── HELPER: section header band ─────────────────────────────────────────────
function headerBand(slide, color) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.1,
    fill: { color: color || C.midPurple }, line: { color: color || C.midPurple } });
}

// ─── HELPER: slide number ────────────────────────────────────────────────────
function slideNum(slide, n, total) {
  slide.addText(`${n} / ${total}`, {
    x: 8.8, y: 5.3, w: 1, h: 0.25,
    fontSize: 9, color: C.grayText, align: "right"
  });
}

// ─── HELPER: source tag ──────────────────────────────────────────────────────
function source(slide, text) {
  slide.addText(text, {
    x: 0.15, y: 5.3, w: 8.5, h: 0.25,
    fontSize: 8, color: C.grayText, italic: true
  });
}

// ─── HELPER: bullet list ─────────────────────────────────────────────────────
function bullets(slide, items, opts) {
  const defaults = { x: 0.35, y: 1.2, w: 9.3, h: 4.2, fontSize: 16,
    color: C.darkText, bullet: { type: "bullet" }, paraSpaceBefore: 6 };
  const merged = Object.assign({}, defaults, opts);
  slide.addText(
    items.map((item, i) => ({
      text: item,
      options: { bullet: true, breakLine: i < items.length - 1, paraSpaceBefore: 5 }
    })),
    merged
  );
}

// ─── HELPER: two-column layout ───────────────────────────────────────────────
function twoCol(slide, leftItems, rightItems, opts = {}) {
  const base = { fontSize: 15, color: C.darkText, paraSpaceBefore: 5 };
  slide.addText(
    leftItems.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < leftItems.length - 1, paraSpaceBefore: 5 } })),
    Object.assign({}, base, { x: 0.2, y: opts.y || 1.25, w: 4.7, h: opts.h || 4.0 }, opts.left || {})
  );
  slide.addText(
    rightItems.map((t, i) => ({ text: t, options: { bullet: true, breakLine: i < rightItems.length - 1, paraSpaceBefore: 5 } })),
    Object.assign({}, base, { x: 5.1, y: opts.y || 1.25, w: 4.7, h: opts.h || 4.0 }, opts.right || {})
  );
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkBg(s);

  // Decorative circles
  s.addShape(pres.ShapeType.ellipse, { x: -0.6, y: -0.6, w: 2.8, h: 2.8,
    fill: { color: C.midPurple, transparency: 60 }, line: { color: C.midPurple, transparency: 60 } });
  s.addShape(pres.ShapeType.ellipse, { x: 7.8, y: 3.5, w: 3.5, h: 3.5,
    fill: { color: C.teal, transparency: 70 }, line: { color: C.teal, transparency: 70 } });
  s.addShape(pres.ShapeType.ellipse, { x: 8.5, y: -0.3, w: 1.5, h: 1.5,
    fill: { color: C.lilac, transparency: 60 }, line: { color: C.lilac, transparency: 60 } });

  // Horizontal rule
  s.addShape(pres.ShapeType.rect, { x: 1.0, y: 2.85, w: 8.0, h: 0.04,
    fill: { color: C.tealLight }, line: { color: C.tealLight } });

  s.addText("Puberty &", {
    x: 1.0, y: 0.9, w: 8, h: 0.9,
    fontSize: 44, bold: true, color: C.white, fontFace: "Calibri"
  });
  s.addText("Primary Amenorrhea", {
    x: 1.0, y: 1.75, w: 8, h: 0.9,
    fontSize: 44, bold: true, color: C.tealLight, fontFace: "Calibri"
  });
  s.addText("Physiology · Causes · Evaluation · Management", {
    x: 1.0, y: 3.05, w: 8, h: 0.5,
    fontSize: 17, color: C.lilac, italic: true
  });
  s.addText("Based on Berek & Novak's Gynecology, Medical Physiology (Boron & Boulpaep)", {
    x: 1.0, y: 4.85, w: 8, h: 0.35,
    fontSize: 10, color: C.grayText, italic: true
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / OUTLINE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.midPurple);
  headerBand(s);

  s.addText("Overview", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  const topics = [
    "1.  What is Puberty?",
    "2.  Hormonal Regulation of Puberty",
    "3.  Stages of Puberty (Tanner Stages)",
    "4.  Timeline of Pubertal Events",
    "5.  Definition of Primary Amenorrhea",
    "6.  Causes — Hypergonadotropic vs. Hypogonadotropic",
    "7.  Anatomic & Outflow Tract Causes",
    "8.  Key Syndromes (Turner, MRKH, Androgen Insensitivity)",
    "9.  Diagnostic Evaluation Algorithm",
    "10. Management Principles",
  ];
  bullets(s, topics, { fontSize: 15, color: C.darkText, y: 1.2 });
  slideNum(s, 2, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — WHAT IS PUBERTY
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.teal);
  headerBand(s, C.deepPurple);

  s.addText("What is Puberty?", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  // Definition box
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.1, w: 9.6, h: 1.0,
    fill: { color: C.midPurple, transparency: 88 }, line: { color: C.midPurple, transparency: 60 } });
  s.addText("Puberty is the transition between the juvenile and adult states when an individual becomes capable of reproducing — driven by sex steroid hormones from the gonads and adrenals.", {
    x: 0.35, y: 1.15, w: 9.3, h: 0.9,
    fontSize: 14, color: C.darkText, italic: true
  });

  s.addText("Two Core Physiological Processes:", {
    x: 0.2, y: 2.25, w: 9.6, h: 0.4,
    fontSize: 15, bold: true, color: C.deepPurple
  });

  // Two cards
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 2.7, w: 4.55, h: 1.5,
    fill: { color: C.teal }, line: { color: C.teal } });
  s.addText([
    { text: "Gonadarche\n", options: { bold: true, breakLine: false } },
    { text: "Maturation of gonads → production of gametes & sex steroids (estrogen / testosterone)", options: {} }
  ], { x: 0.3, y: 2.75, w: 4.3, h: 1.4, fontSize: 14, color: C.white });

  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 2.7, w: 4.7, h: 1.5,
    fill: { color: C.midPurple }, line: { color: C.midPurple } });
  s.addText([
    { text: "Adrenarche\n", options: { bold: true, breakLine: false } },
    { text: "↑ DHEA, DHEAS, Androstenedione from adrenal cortex → pubarche (pubic hair) — ages 6-8 yrs", options: {} }
  ], { x: 5.2, y: 2.75, w: 4.5, h: 1.4, fontSize: 14, color: C.white });

  source(s, "Medical Physiology, Boron & Boulpaep");
  slideNum(s, 3, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — HORMONAL REGULATION
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.teal);
  headerBand(s, C.deepPurple);

  s.addText("Hormonal Regulation of Puberty", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  // HPG axis diagram — text-based
  const boxes = [
    { x: 3.5, y: 1.1, w: 3.0, h: 0.7, color: C.midPurple, label: "Hypothalamus" },
    { x: 3.5, y: 2.4, w: 3.0, h: 0.7, color: C.teal,      label: "Anterior Pituitary" },
    { x: 3.5, y: 3.7, w: 3.0, h: 0.7, color: C.deepPurple, label: "Ovaries / Testes" },
  ];
  const arrows = [
    { x: 4.9, y: 1.82, label: "Pulsatile GnRH" },
    { x: 4.9, y: 3.12, label: "FSH & LH" },
  ];

  boxes.forEach(b => {
    s.addShape(pres.ShapeType.rect, { x: b.x, y: b.y, w: b.w, h: b.h,
      fill: { color: b.color }, line: { color: b.color }, rectRadius: 0.1 });
    s.addText(b.label, { x: b.x, y: b.y, w: b.w, h: b.h,
      fontSize: 15, bold: true, color: C.white, align: "center", valign: "middle" });
  });

  arrows.forEach(a => {
    s.addText("▼  " + a.label, { x: a.x - 1.0, y: a.y, w: 3.0, h: 0.4,
      fontSize: 12, color: C.amber, align: "center", bold: true });
  });

  // Feedback arrow label
  s.addText("← Negative feedback (sex steroids / inhibin)", {
    x: 0.1, y: 2.4, w: 3.3, h: 0.7,
    fontSize: 11, color: C.coral, italic: true
  });

  // Key facts
  const facts = [
    "Before puberty: HPG axis is highly sensitive to negative feedback — even low steroids suppress GnRH",
    "At puberty onset: sensitivity decreases → pulsatile GnRH release (first during REM sleep, then daytime)",
    "↑ FSH & LH → folliculogenesis / spermatogenesis → sex steroid production → secondary sex characteristics",
    "Kisspeptin neurons and leptin are key modulators of GnRH pulse generator onset",
  ];
  bullets(s, facts, { x: 0.2, y: 1.1, w: 3.1, h: 3.5, fontSize: 13, color: C.darkText });

  source(s, "Medical Physiology, Boron & Boulpaep; Berek & Novak's Gynecology");
  slideNum(s, 4, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — TANNER STAGES (female)
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.midPurple);
  headerBand(s, C.teal);

  s.addText("Tanner Stages of Female Puberty", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  const stages = [
    { stage: "Stage I\n(Prepubertal)", breast: "No glandular tissue", pubic: "No hair", age: "< 8 yrs", bg: C.deepPurple },
    { stage: "Stage II\n(Early)", breast: "Breast budding (thelarche)", pubic: "Sparse, fine hair along labia", age: "8-13 yrs", bg: C.midPurple },
    { stage: "Stage III\n(Mid)", breast: "Breast/areola enlargement, no contour separation", pubic: "Coarser, extends over pubis", age: "10-14 yrs", bg: C.teal },
    { stage: "Stage IV\n(Late)", breast: "Areola/papilla form secondary mound", pubic: "Adult type, not to thighs", age: "11-15 yrs", bg: C.tealLight },
    { stage: "Stage V\n(Adult)", breast: "Adult contour, only papilla projects", pubic: "Adult, spread to medial thighs", age: "12-18 yrs", bg: C.lilac },
  ];

  stages.forEach((st, i) => {
    const x = 0.1 + i * 1.96;
    s.addShape(pres.ShapeType.rect, { x, y: 1.1, w: 1.85, h: 0.65,
      fill: { color: st.bg }, line: { color: st.bg } });
    s.addText(st.stage, { x, y: 1.1, w: 1.85, h: 0.65,
      fontSize: 11.5, bold: true, color: C.white, align: "center", valign: "middle" });

    s.addShape(pres.ShapeType.rect, { x, y: 1.78, w: 1.85, h: 0.8,
      fill: { color: st.bg, transparency: 80 }, line: { color: st.bg, transparency: 50 } });
    s.addText("Breast:\n" + st.breast, { x: x + 0.05, y: 1.82, w: 1.75, h: 0.75,
      fontSize: 10, color: C.darkText });

    s.addShape(pres.ShapeType.rect, { x, y: 2.61, w: 1.85, h: 0.8,
      fill: { color: st.bg, transparency: 85 }, line: { color: st.bg, transparency: 50 } });
    s.addText("Pubic:\n" + st.pubic, { x: x + 0.05, y: 2.65, w: 1.75, h: 0.75,
      fontSize: 10, color: C.darkText });

    s.addShape(pres.ShapeType.rect, { x, y: 3.44, w: 1.85, h: 0.5,
      fill: { color: C.amber, transparency: 75 }, line: { color: C.amber, transparency: 50 } });
    s.addText("Age: " + st.age, { x, y: 3.44, w: 1.85, h: 0.5,
      fontSize: 11, bold: true, color: C.deepPurple, align: "center", valign: "middle" });
  });

  s.addText("Menarche typically occurs at Tanner Stage III-IV (mean age ~12.5 years in the US)", {
    x: 0.2, y: 4.1, w: 9.6, h: 0.45,
    fontSize: 13, color: C.coral, bold: true, italic: true
  });

  source(s, "Berek & Novak's Gynecology; Medical Physiology, Boron & Boulpaep");
  slideNum(s, 5, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — TIMELINE OF PUBERTAL EVENTS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.amber);
  headerBand(s, C.deepPurple);

  s.addText("Timeline of Pubertal Events in Females", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  // Horizontal timeline arrow
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.75, w: 9.4, h: 0.08,
    fill: { color: C.midPurple }, line: { color: C.midPurple } });
  s.addText("►", { x: 9.5, y: 2.65, w: 0.4, h: 0.28,
    fontSize: 18, color: C.midPurple, align: "center" });

  const events = [
    { x: 0.3, label: "Adrenarche\n↑ DHEA, DHEAS", age: "~6-8 y", top: true },
    { x: 2.1, label: "Thelarche\n(Breast budding)", age: "~8-13 y", top: false },
    { x: 4.0, label: "Pubarche\n(Pubic hair)", age: "~9-10 y", top: true },
    { x: 5.9, label: "Peak height\nvelocity", age: "~11-12 y", top: false },
    { x: 7.6, label: "Menarche\n(1st period)", age: "~12-13 y", top: true },
  ];

  events.forEach(ev => {
    // dot
    s.addShape(pres.ShapeType.ellipse, { x: ev.x + 0.3, y: 2.66, w: 0.22, h: 0.22,
      fill: { color: C.amber }, line: { color: C.deepPurple } });

    if (ev.top) {
      s.addText(ev.label, { x: ev.x, y: 1.5, w: 1.8, h: 0.9,
        fontSize: 12, color: C.darkText, align: "center" });
      s.addText(ev.age, { x: ev.x, y: 2.38, w: 1.8, h: 0.3,
        fontSize: 11, bold: true, color: C.coral, align: "center" });
      s.addShape(pres.ShapeType.rect, { x: ev.x + 0.7, y: 2.3, w: 0.02, h: 0.36,
        fill: { color: C.grayText }, line: { color: C.grayText } });
    } else {
      s.addShape(pres.ShapeType.rect, { x: ev.x + 0.7, y: 2.88, w: 0.02, h: 0.38,
        fill: { color: C.grayText }, line: { color: C.grayText } });
      s.addText(ev.age, { x: ev.x, y: 3.28, w: 1.8, h: 0.3,
        fontSize: 11, bold: true, color: C.coral, align: "center" });
      s.addText(ev.label, { x: ev.x, y: 3.58, w: 1.8, h: 0.9,
        fontSize: 12, color: C.darkText, align: "center" });
    }
  });

  source(s, "Medical Physiology, Boron & Boulpaep; Berek & Novak's Gynecology");
  slideNum(s, 6, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — DEFINITION OF PRIMARY AMENORRHEA
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkBg(s);

  s.addShape(pres.ShapeType.ellipse, { x: 7.5, y: -0.5, w: 3.5, h: 3.5,
    fill: { color: C.teal, transparency: 80 }, line: { color: C.teal, transparency: 80 } });

  s.addText("Primary Amenorrhea", { x: 0.4, y: 0.25, w: 9.2, h: 0.7,
    fontSize: 30, bold: true, color: C.tealLight });

  s.addText("Definition", { x: 0.4, y: 1.05, w: 3.0, h: 0.45,
    fontSize: 16, bold: true, color: C.amber });

  // Two definition cards
  const cards = [
    {
      title: "No Secondary Sexual Characteristics",
      body: "Absence of menses by age 13 years\n(2 SD above mean age of secondary sex characteristic development)",
      color: C.midPurple
    },
    {
      title: "Normal Secondary Sexual Characteristics",
      body: "Absence of menses by age 15 years\n(includes normal breast development and pubic hair)",
      color: C.teal
    }
  ];
  cards.forEach((c, i) => {
    const y = 1.55 + i * 1.5;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 1.3,
      fill: { color: c.color, transparency: 20 }, line: { color: c.color } });
    s.addText(c.title, { x: 0.5, y: y + 0.05, w: 9.0, h: 0.4,
      fontSize: 15, bold: true, color: C.white });
    s.addText(c.body, { x: 0.5, y: y + 0.48, w: 9.0, h: 0.75,
      fontSize: 14, color: C.white });
  });

  s.addText([
    { text: "Key rule: ", options: { bold: true } },
    { text: "Failure to begin breast development by age 13 ", options: { color: C.coral, bold: true } },
    { text: "always warrants investigation (first sign of estrogen exposure in puberty)", options: {} }
  ], { x: 0.3, y: 4.7, w: 9.4, h: 0.55, fontSize: 13, color: C.white });

  source(s, "Berek & Novak's Gynecology, p.1856");
  slideNum(s, 7, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — CAUSES: WHO CLASSIFICATION & OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.coral);
  headerBand(s, C.deepPurple);

  s.addText("Causes of Primary Amenorrhea — Overview", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 24, bold: true, color: C.white });

  // Three WHO group boxes
  const groups = [
    { title: "WHO Group I\nHypogonadotropic Hypogonadism", body: "No endogenous estrogen, normal/low FSH & prolactin\nNo HPG lesion on imaging", color: C.teal },
    { title: "WHO Group II\nNormogonadotropic Anovulation", body: "Evidence of estrogen production\nNormal FSH & prolactin levels (e.g. PCOS)", color: C.midPurple },
    { title: "WHO Group III\nHypergonadotropic Hypogonadism", body: "Elevated FSH → gonadal insufficiency / failure\n(e.g. Turner syndrome, gonadal dysgenesis)", color: C.coral },
  ];

  groups.forEach((g, i) => {
    const x = 0.15 + i * 3.28;
    s.addShape(pres.ShapeType.rect, { x, y: 1.1, w: 3.1, h: 1.5,
      fill: { color: g.color }, line: { color: g.color } });
    s.addText(g.title, { x: x + 0.1, y: 1.12, w: 2.9, h: 0.65,
      fontSize: 12, bold: true, color: C.white, align: "center" });
    s.addText(g.body, { x: x + 0.1, y: 1.77, w: 2.9, h: 0.8,
      fontSize: 11, color: C.white });
  });

  s.addText("Common causes by anatomic compartment:", {
    x: 0.2, y: 2.75, w: 9.5, h: 0.35,
    fontSize: 14, bold: true, color: C.deepPurple
  });

  twoCol(s,
    [
      "Outflow tract: Imperforate hymen, vaginal atresia, MRKH syndrome (Mullerian agenesis)",
      "Uterine: Congenital absence of uterus",
      "Ovarian: Turner syndrome, gonadal dysgenesis (45,X), XX gonadal dysgenesis",
    ],
    [
      "Ovarian: 17α-Hydroxylase deficiency, POI, resistant ovary syndrome, PCOS",
      "Pituitary/Hypothalamic: Hypopituitarism, Kallmann syndrome, constitutional delay",
      "Adrenal/Thyroid: CAH, hypothyroidism",
    ],
    { y: 3.15, h: 2.2, left: { fontSize: 13, color: C.darkText }, right: { fontSize: 13, color: C.darkText } }
  );

  source(s, "Tietz Laboratory Medicine 7e; Berek & Novak's Gynecology");
  slideNum(s, 8, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — HYPERGONADOTROPIC CAUSES (Turner, Gonadal Dysgenesis)
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.coral);
  headerBand(s, C.coral);

  s.addText("Hypergonadotropic Causes — Turner & Gonadal Dysgenesis", {
    x: 0.25, y: 0.2, w: 9.5, h: 0.7, fontSize: 21, bold: true, color: C.white
  });

  const cards = [
    {
      title: "Turner Syndrome (45,X)",
      points: [
        "Most common cause of primary amenorrhea from gonadal dysgenesis",
        "Streak gonads → no estrogen → no breast development",
        "Features: short stature, webbed neck, shield chest, coarctation of aorta",
        "High FSH & LH (hypergonadotropic), low estradiol",
        "Karyotype: 45,X (or mosaic 45,X/46,XX)",
      ],
      color: C.coral, x: 0.15, y: 1.1
    },
    {
      title: "46,XX Gonadal Dysgenesis",
      points: [
        "Normal female phenotype but streak gonads",
        "Elevated FSH — ovaries cannot produce estrogen",
        "May have associated hearing loss (Perrault syndrome)",
        "Karyotype: 46,XX — no Turner features",
      ],
      color: C.midPurple, x: 5.1, y: 1.1
    }
  ];

  cards.forEach(c => {
    s.addShape(pres.ShapeType.rect, { x: c.x, y: c.y, w: 4.75, h: 0.45,
      fill: { color: c.color }, line: { color: c.color } });
    s.addText(c.title, { x: c.x + 0.1, y: c.y, w: 4.55, h: 0.45,
      fontSize: 14, bold: true, color: C.white, valign: "middle" });
    s.addText(
      c.points.map((p, i) => ({ text: p, options: { bullet: true, breakLine: i < c.points.length - 1, paraSpaceBefore: 4 } })),
      { x: c.x + 0.1, y: c.y + 0.5, w: 4.55, h: 3.5, fontSize: 12.5, color: C.darkText }
    );
  });

  s.addText("Note: When gonadal failure occurs with primary amenorrhea, there is a HIGH incidence of abnormal karyotype — karyotyping is essential.", {
    x: 0.2, y: 4.9, w: 9.6, h: 0.4,
    fontSize: 12, color: C.coral, italic: true, bold: true
  });

  source(s, "Berek & Novak's Gynecology, p.1858");
  slideNum(s, 9, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — ANATOMIC CAUSES (MRKH, Outflow Tract)
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.teal);
  headerBand(s, C.teal);

  s.addText("Anatomic & Outflow Tract Causes", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  const cols = [
    {
      title: "MRKH Syndrome",
      subtitle: "(Müllerian Agenesis)",
      points: [
        "Mayer-Rokitansky-Küster-Hauser syndrome",
        "Congenital absence of vagina ± uterus",
        "46,XX karyotype — normal ovarian function",
        "Normal secondary sex characteristics (breast, pubic hair)",
        "Normal estrogen levels; FSH normal",
        "2nd most common cause of primary amenorrhea (~15%)",
        "Rx: vaginal dilators or surgical creation of neovagina",
      ],
      color: C.teal, x: 0.15
    },
    {
      title: "Imperforate Hymen",
      subtitle: "(Cryptomenorrhea)",
      points: [
        "Obstruction of outflow tract — blood accumulates",
        "Normal internal anatomy (uterus, ovaries present)",
        "Presents with cyclic pelvic pain but no visible blood",
        "Hematocolpos / hematometra on ultrasound",
        "Rx: surgical hymenotomy",
      ],
      color: C.midPurple, x: 5.1
    }
  ];

  cols.forEach(c => {
    s.addShape(pres.ShapeType.rect, { x: c.x, y: 1.1, w: 4.75, h: 0.55,
      fill: { color: c.color }, line: { color: c.color } });
    s.addText(c.title + " " + c.subtitle, { x: c.x + 0.1, y: 1.1, w: 4.55, h: 0.55,
      fontSize: 13.5, bold: true, color: C.white, valign: "middle" });
    s.addText(
      c.points.map((p, i) => ({ text: p, options: { bullet: true, breakLine: i < c.points.length - 1, paraSpaceBefore: 4 } })),
      { x: c.x + 0.1, y: 1.7, w: 4.55, h: 3.65, fontSize: 13, color: C.darkText }
    );
  });

  source(s, "Tietz Laboratory Medicine 7e; Berek & Novak's Gynecology");
  slideNum(s, 10, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — ANDROGEN INSENSITIVITY SYNDROME
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.amber);
  headerBand(s, C.deepPurple);

  s.addText("Androgen Insensitivity Syndrome (AIS)", {
    x: 0.25, y: 0.2, w: 9.5, h: 0.7, fontSize: 26, bold: true, color: C.white
  });

  // Info boxes
  const info = [
    { label: "Karyotype", val: "46,XY — testes present (intra-abdominal or inguinal)", color: C.midPurple },
    { label: "Mechanism", val: "Androgen receptor defect → cells unable to respond to testosterone", color: C.teal },
    { label: "Phenotype", val: "Normal female external genitalia; normal breast development (aromatized estrogen from testes)", color: C.deepPurple },
    { label: "Absent structures", val: "No uterus, no upper vagina (Müllerian regression by AMH); blind vaginal pouch", color: C.coral },
    { label: "Hormones", val: "High testosterone (male range), high LH, normal/high estradiol", color: C.midPurple },
    { label: "Gonad management", val: "Gonadectomy recommended after puberty (risk of gonadoblastoma) or preventively; hormone replacement therapy needed", color: C.teal },
  ];

  info.forEach((item, i) => {
    const row = Math.floor(i / 2);
    const col = i % 2;
    const x = 0.15 + col * 4.95;
    const y = 1.1 + row * 1.35;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.75, h: 1.2,
      fill: { color: item.color, transparency: 88 }, line: { color: item.color, transparency: 40 } });
    s.addShape(pres.ShapeType.rect, { x, y, w: 1.4, h: 0.32,
      fill: { color: item.color }, line: { color: item.color } });
    s.addText(item.label, { x: x + 0.05, y: y + 0.01, w: 1.3, h: 0.3,
      fontSize: 11, bold: true, color: C.white, valign: "middle" });
    s.addText(item.val, { x: x + 0.1, y: y + 0.35, w: 4.55, h: 0.8,
      fontSize: 12, color: C.darkText });
  });

  source(s, "Berek & Novak's Gynecology; Tietz Laboratory Medicine 7e");
  slideNum(s, 11, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — HYPOGONADOTROPIC CAUSES (Kallmann, etc.)
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.midPurple);
  headerBand(s, C.midPurple);

  s.addText("Hypogonadotropic Causes", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  const left = [
    "Kallmann Syndrome:",
    "  • GnRH neuron migration failure from olfactory placode",
    "  • Low/absent GnRH → low FSH & LH → no gonadarche",
    "  • Classic feature: anosmia (absent sense of smell)",
    "  • 46,XX; normal female anatomy; no breast development",
    "  • Rx: pulsatile GnRH or gonadotropin therapy",
    "",
    "Constitutional Delay:",
    "  • Physiologic — delayed but normal puberty",
    "  • Bone age < chronological age",
    "  • Family history often positive",
    "  • No intervention usually needed",
  ];

  const right = [
    "Hypopituitarism:",
    "  • Deficiency of FSH/LH (± other pituitary hormones)",
    "  • Causes: craniopharyngioma, pituitary adenoma, radiation",
    "  • MRI pituitary required",
    "",
    "Functional Hypothalamic Amenorrhea:",
    "  • Extreme weight loss, excessive exercise, stress",
    "  • Low leptin → decreased GnRH pulsatility",
    "  • Low estrogen → bone loss risk",
    "  • Rx: treat underlying cause; nutritional rehabilitation",
    "",
    "Other: Nutritional disorders, chronic illness",
  ];

  s.addText(
    left.map((t, i) => ({ text: t, options: { bullet: t.startsWith("  •"), breakLine: i < left.length - 1, paraSpaceBefore: 3 } })),
    { x: 0.2, y: 1.1, w: 4.7, h: 4.3, fontSize: 12.5, color: C.darkText }
  );
  s.addText(
    right.map((t, i) => ({ text: t, options: { bullet: t.startsWith("  •"), breakLine: i < right.length - 1, paraSpaceBefore: 3 } })),
    { x: 5.1, y: 1.1, w: 4.7, h: 4.3, fontSize: 12.5, color: C.darkText }
  );

  source(s, "Tietz Laboratory Medicine 7e; Berek & Novak's Gynecology");
  slideNum(s, 12, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — DIAGNOSTIC EVALUATION ALGORITHM
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightBg(s);
  leftBar(s, C.tealLight);
  headerBand(s, C.deepPurple);

  s.addText("Diagnostic Evaluation Algorithm", { x: 0.25, y: 0.2, w: 9.5, h: 0.7,
    fontSize: 26, bold: true, color: C.white });

  // Step 1: History & PE
  s.addShape(pres.ShapeType.rect, { x: 3.6, y: 1.05, w: 3.2, h: 0.55,
    fill: { color: C.deepPurple }, line: { color: C.deepPurple } });
  s.addText("1. History + Physical Exam\n(secondary sex chars? pelvic anatomy?)", {
    x: 3.6, y: 1.05, w: 3.2, h: 0.55, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle"
  });

  // Arrow down
  s.addText("▼", { x: 4.85, y: 1.62, w: 0.6, h: 0.3, fontSize: 14, color: C.midPurple, align: "center" });

  // Step 2: Initial labs
  s.addShape(pres.ShapeType.rect, { x: 3.6, y: 1.93, w: 3.2, h: 0.55,
    fill: { color: C.teal }, line: { color: C.teal } });
  s.addText("2. Initial Labs: β-hCG, TSH, Prolactin, FSH, LH, Estradiol, ± AMH", {
    x: 3.6, y: 1.93, w: 3.2, h: 0.55, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle"
  });

  // Branch down
  s.addText("▼", { x: 4.85, y: 2.5, w: 0.6, h: 0.3, fontSize: 14, color: C.midPurple, align: "center" });

  // Three branches
  const branches = [
    { x: 0.15, label: "↑ FSH\n(Hypergonadotropic)", outcome: "Gonadal dysgenesis\n→ Karyotype", color: C.coral },
    { x: 3.6, label: "↓ FSH + ↓ LH\n(Hypogonadotropic)", outcome: "Kallmann / Hypo-\npituitarism → MRI", color: C.midPurple },
    { x: 7.05, label: "Normal FSH\nAnatomy normal?", outcome: "Outflow obstruction\nMüllerian anomaly → US / MRI pelvis", color: C.teal },
  ];

  branches.forEach(b => {
    s.addShape(pres.ShapeType.rect, { x: b.x, y: 2.82, w: 2.75, h: 0.7,
      fill: { color: b.color }, line: { color: b.color } });
    s.addText(b.label, { x: b.x + 0.05, y: 2.82, w: 2.65, h: 0.7,
      fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle" });
    s.addText("▼", { x: b.x + 1.1, y: 3.55, w: 0.6, h: 0.3, fontSize: 14, color: b.color, align: "center" });
    s.addShape(pres.ShapeType.rect, { x: b.x, y: 3.85, w: 2.75, h: 0.75,
      fill: { color: b.color, transparency: 82 }, line: { color: b.color, transparency: 50 } });
    s.addText(b.outcome, { x: b.x + 0.05, y: 3.87, w: 2.65, h: 0.7,
      fontSize: 12, color: C.darkText, align: "center", valign: "middle" });
  });

  s.addText("Key labs: FSH, LH, Estradiol, β-hCG, Prolactin, TSH, Karyotype, Pelvic US/MRI", {
    x: 0.2, y: 4.8, w: 9.6, h: 0.4, fontSize: 12, color: C.grayText, italic: true
  });

  source(s, "Berek & Novak's Gynecology, p.1860; Tietz Laboratory Medicine 7e");
  slideNum(s, 13, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — MANAGEMENT
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkBg(s);

  s.addShape(pres.ShapeType.ellipse, { x: -0.5, y: 3.5, w: 3.5, h: 3.5,
    fill: { color: C.teal, transparency: 80 }, line: { color: C.teal, transparency: 80 } });

  s.addText("Management Principles", { x: 0.4, y: 0.2, w: 9.2, h: 0.65,
    fontSize: 30, bold: true, color: C.tealLight });

  const mgmt = [
    {
      icon: "①",
      title: "Treat the Underlying Cause",
      body: "Surgical: hymenotomy (imperforate hymen), vaginal reconstruction (MRKH), gonadectomy (AIS/dysgenesis)\nMedical: thyroid or prolactin disorder treatment",
      color: C.teal
    },
    {
      icon: "②",
      title: "Hormone Replacement Therapy",
      body: "Initiate and maintain secondary sexual characteristics in hypogonadal patients\nEstrogen ± progesterone; titrate to adult female physiology; protect bone density",
      color: C.midPurple
    },
    {
      icon: "③",
      title: "Bone Health",
      body: "Low estrogen → osteoporosis risk\nHRT + calcium 1000-1200 mg/day + Vitamin D 600-800 IU/day",
      color: C.coral
    },
    {
      icon: "④",
      title: "Fertility Considerations",
      body: "Functional hypothalamic: pulsatile GnRH or FSH/LH therapy for ovulation induction\nTurner syndrome: oocyte donation for IVF\nMRKH: surrogacy (own oocytes possible if ovaries present)",
      color: C.amber
    }
  ];

  mgmt.forEach((m, i) => {
    const y = 1.0 + i * 1.08;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.5, h: 0.7,
      fill: { color: m.color }, line: { color: m.color } });
    s.addText(m.icon, { x: 0.3, y, w: 0.5, h: 0.7,
      fontSize: 16, bold: true, color: C.white, align: "center", valign: "middle" });
    s.addText(m.title, { x: 0.9, y: y + 0.02, w: 8.8, h: 0.3,
      fontSize: 14, bold: true, color: m.color });
    s.addText(m.body, { x: 0.9, y: y + 0.32, w: 8.8, h: 0.68,
      fontSize: 12, color: C.white });
  });

  source(s, "Berek & Novak's Gynecology, p.1861-1865");
  slideNum(s, 14, 14);
}

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/puberty-amenorrhea-ppt/Puberty_and_Primary_Amenorrhea.pptx" })
  .then(() => console.log("PPT created successfully!"))
  .catch(err => console.error("Error:", err));
Running Command

cd /home/daytona/workspace/puberty-amenorrhea-ppt && node create_ppt.js

Running Command

ls -lh /home/daytona/workspace/puberty-amenorrhea-ppt/

Your presentation is ready! Here is the download link:

Puberty and Primary Amenorrhea

Presentation · PPTX


The PPT has 14 slides with a rich purple/teal clinical color palette, sourced from Berek & Novak's Gynecology, Medical Physiology (Boron & Boulpaep), and Tietz Laboratory Medicine 7e:
SlideContent
1Title slide
2Overview / Table of contents
3What is Puberty? (gonadarche vs. adrenarche)
4Hormonal regulation - HPG axis diagram
5Tanner Stages I-V (breast + pubic hair + age)
6Visual timeline of pubertal events in females
7Definition of Primary Amenorrhea (age 13 / 15 criteria)
8WHO Classification (Groups I, II, III) + causes by compartment
9Hypergonadotropic causes - Turner syndrome & 46,XX gonadal dysgenesis
10Anatomic causes - MRKH syndrome & imperforate hymen
11Androgen Insensitivity Syndrome (AIS)
12Hypogonadotropic causes - Kallmann syndrome, constitutional delay, functional hypothalamic
13Diagnostic evaluation algorithm (FSH-branched flowchart)
14Management principles (4 pillars: cause, HRT, bone health, fertility)

Give me detailed ppt and in black and white format

Finding Sources
Finding Sources
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

Give me detailed ppt and in white format with times roman font

Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.