Make a ppt of 20 slides on topic endometriosis in adolescent from this article and standard text books

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

cd /home/daytona/workspace && python3 -c " from docx import Document doc = Docum…

Reading File
Reading File
Running Command

cd /home/daytona/workspace && python3 -c " import zipfile, os docx_path = '/home…

Reading File
Running Command

cd /home/daytona/workspace && python3 -c " import zipfile, re docx_path = '/home…

Running Command

mkdir -p /home/daytona/workspace/endometriosis-adolescent-ppt && ls /home/dayton…

Writing File

~/endometriosis-adolescent-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");

let pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.author = 'Medical Education';
pres.title = 'Endometriosis in Adolescents';

// ── COLOUR PALETTE ──────────────────────────────────────────────
const COL = {
  deepPlum:   "4A1C40",   // dominant dark background
  roseDark:   "8B2252",   // accent headings
  roseLight:  "C45C8A",   // sub-headings / icons
  cream:      "FDF6F0",   // body text on dark bg
  white:      "FFFFFF",
  lightPink:  "F9DDE9",   // light panel background
  gold:       "D4A843",   // highlight accent
  slate:      "2D2D3E",   // dark body panel
};

// ── HELPERS ──────────────────────────────────────────────────────
function darkSlide(slide) {
  slide.background = { color: COL.deepPlum };
}
function lightSlide(slide) {
  slide.background = { color: COL.cream };
}
function midSlide(slide) {
  slide.background = { color: "F5EDF3" };
}

function sectionBanner(slide, text) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.55, fill: { color: COL.roseDark } });
  slide.addText(text, { x: 0.3, y: 0.05, w: 9.4, h: 0.45, fontSize: 13, bold: true, color: COL.white, valign: "middle" });
}

function slideTitle(slide, text, color, y) {
  slide.addText(text, {
    x: 0.4, y: y !== undefined ? y : 0.62, w: 9.2, h: 0.65,
    fontSize: 26, bold: true, color: color || COL.roseDark, fontFace: "Calibri",
    valign: "middle",
  });
}

function divider(slide, y, color) {
  slide.addShape(pres.ShapeType.line, {
    x: 0.4, y: y, w: 9.2, h: 0,
    line: { color: color || COL.roseLight, width: 1.5 },
  });
}

function bulletBox(slide, items, opts) {
  const defaults = { x: 0.45, y: 1.4, w: 9.1, h: 3.7, fontSize: 15, color: COL.slate, fontFace: "Calibri" };
  const o = Object.assign({}, defaults, opts);
  const arr = items.map((item, i) => ({
    text: item,
    options: { bullet: { type: "bullet", indent: 15 }, breakLine: i < items.length - 1, color: o.color, fontSize: o.fontSize, fontFace: o.fontFace, paraSpaceAfter: 4 }
  }));
  slide.addText(arr, { x: o.x, y: o.y, w: o.w, h: o.h, valign: "top" });
}

function twoColBullets(slide, leftTitle, leftItems, rightTitle, rightItems, opts) {
  const o = Object.assign({ titleColor: COL.roseDark, bodyColor: COL.slate, yStart: 1.45 }, opts);
  // Left column
  slide.addText(leftTitle, { x: 0.45, y: o.yStart, w: 4.4, h: 0.4, fontSize: 15, bold: true, color: o.titleColor });
  const lArr = leftItems.map((it, i) => ({
    text: it,
    options: { bullet: { type: "bullet", indent: 12 }, breakLine: i < leftItems.length - 1, color: o.bodyColor, fontSize: 13.5, paraSpaceAfter: 3 }
  }));
  slide.addText(lArr, { x: 0.45, y: o.yStart + 0.42, w: 4.3, h: 3.5, valign: "top" });
  // Right column
  slide.addText(rightTitle, { x: 5.2, y: o.yStart, w: 4.4, h: 0.4, fontSize: 15, bold: true, color: o.titleColor });
  const rArr = rightItems.map((it, i) => ({
    text: it,
    options: { bullet: { type: "bullet", indent: 12 }, breakLine: i < rightItems.length - 1, color: o.bodyColor, fontSize: 13.5, paraSpaceAfter: 3 }
  }));
  slide.addText(rArr, { x: 5.2, y: o.yStart + 0.42, w: 4.4, h: 3.5, valign: "top" });
  // Vertical divider
  slide.addShape(pres.ShapeType.line, { x: 5.0, y: o.yStart, w: 0, h: 3.8, line: { color: COL.roseLight, width: 1 } });
}

// ════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ════════════════════════════════════════════════════════════════
let slide = pres.addSlide();
darkSlide(slide);
// Decorative top stripe
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.18, fill: { color: COL.gold } });
// Large decorative circle
slide.addShape(pres.ShapeType.ellipse, { x: 6.8, y: 0.3, w: 3.5, h: 3.5, fill: { color: "6B2060", transparency: 40 }, line: { color: "6B2060" } });
slide.addShape(pres.ShapeType.ellipse, { x: 7.2, y: 0.7, w: 2.7, h: 2.7, fill: { color: COL.roseDark, transparency: 30 }, line: { color: COL.roseDark } });
// Main title
slide.addText("Endometriosis in Adolescents", {
  x: 0.5, y: 1.1, w: 6.8, h: 1.5,
  fontSize: 36, bold: true, color: COL.white, fontFace: "Calibri",
  wrap: true,
});
slide.addText("Epidemiology · Clinical Features · Diagnosis · Management", {
  x: 0.5, y: 2.7, w: 6.5, h: 0.55,
  fontSize: 15, color: COL.lightPink, italic: true,
});
divider(slide, 3.38, COL.gold);
slide.addText("Based on UpToDate Clinical Review & Standard Medical Textbooks", {
  x: 0.5, y: 3.5, w: 7.0, h: 0.4,
  fontSize: 12, color: COL.cream, italic: true,
});
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.18, w: 10, h: 0.44, fill: { color: COL.roseDark } });
slide.addText("Robbins Pathology  |  Bailey & Love  |  Grainger & Allison  |  UpToDate 2025", {
  x: 0.3, y: 5.2, w: 9.4, h: 0.38,
  fontSize: 10.5, color: COL.lightPink, align: "center",
});

// ════════════════════════════════════════════════════════════════
// SLIDE 2 – OVERVIEW / AGENDA
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
lightSlide(slide);
sectionBanner(slide, "OVERVIEW");
slideTitle(slide, "Presentation Outline");
divider(slide, 1.35);

const topics = [
  "01  Definition & Classification",
  "02  Epidemiology & Prevalence in Adolescents",
  "03  Pathogenesis – Theories",
  "04  Risk Factors Unique to Adolescents",
  "05  Diagnostic Delay",
  "06  Clinical Features & Symptoms",
  "07  Associated Diagnoses & Alarm Findings",
  "08  Initial Evaluation – History",
  "09  Physical Examination & Laboratory Tests",
  "10  Imaging Modalities",
  "11  Definitive Diagnosis & Disease Staging",
  "12  Presumptive Clinical Diagnosis",
  "13  Differential Diagnosis",
  "14  Unique Adolescent Populations",
  "15  Quality of Life & Psychosocial Impact",
  "16  Initial Medical Management",
  "17  Hormonal Treatment Options",
  "18  GnRH Agonists/Antagonists & Add-back Therapy",
  "19  Surgical Management & Decision-making",
  "20  Multidisciplinary Approach & Summary",
];

// Two-column layout
const leftTopics = topics.slice(0, 10);
const rightTopics = topics.slice(10, 20);

const leftArr = leftTopics.map((t, i) => ({
  text: t, options: { breakLine: i < leftTopics.length - 1, color: COL.slate, fontSize: 12.5, paraSpaceAfter: 2 }
}));
const rightArr = rightTopics.map((t, i) => ({
  text: t, options: { breakLine: i < rightTopics.length - 1, color: COL.slate, fontSize: 12.5, paraSpaceAfter: 2 }
}));

slide.addText(leftArr, { x: 0.45, y: 1.5, w: 4.5, h: 4.0, valign: "top" });
slide.addText(rightArr, { x: 5.2, y: 1.5, w: 4.5, h: 4.0, valign: "top" });
slide.addShape(pres.ShapeType.line, { x: 5.05, y: 1.5, w: 0, h: 3.9, line: { color: COL.roseLight, width: 1 } });

// ════════════════════════════════════════════════════════════════
// SLIDE 3 – DEFINITION & CLASSIFICATION
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
midSlide(slide);
sectionBanner(slide, "DEFINITION & CLASSIFICATION");
slideTitle(slide, "What is Endometriosis?");
divider(slide, 1.35);

slide.addText("Definition", { x: 0.45, y: 1.45, w: 9.1, h: 0.38, fontSize: 16, bold: true, color: COL.roseDark });
slide.addShape(pres.ShapeType.rect, { x: 0.45, y: 1.9, w: 9.1, h: 1.1, fill: { color: "EDD0E4" }, line: { color: COL.roseLight, width: 0.5 } });
slide.addText("Presence of endometrial glands and stroma outside the endometrial cavity and uterine musculature. These ectopic implants are usually located in the pelvis but can occur anywhere in the body.", {
  x: 0.6, y: 1.95, w: 8.8, h: 1.0, fontSize: 14, color: COL.deepPlum, italic: true,
});

slide.addText("Three Main Types (Robbins Pathology)", { x: 0.45, y: 3.15, w: 9.1, h: 0.38, fontSize: 15, bold: true, color: COL.roseDark });
const typeItems = [
  [{ text: "Superficial Peritoneal Endometriosis", options: { bold: true, color: COL.roseDark, fontSize: 13.5 } }, { text: " – Most common in adolescents; red-brown nodules on serosal surfaces", options: { color: COL.slate, fontSize: 13.5 } }],
  [{ text: "Ovarian Endometriosis (Endometrioma)", options: { bold: true, color: COL.roseDark, fontSize: 13.5 } }, { text: " – 'Chocolate cysts' filled with old blood; 3–5 cm; less common in adolescents", options: { color: COL.slate, fontSize: 13.5 } }],
  [{ text: "Deep Infiltrating Endometriosis (DIE)", options: { bold: true, color: COL.roseDark, fontSize: 13.5 } }, { text: " – Tissue >5 mm beneath peritoneum; involves uterosacral ligaments, bowel, bladder, ureters", options: { color: COL.slate, fontSize: 13.5 } }],
];
const typeArr = typeItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet", indent: 15 }, breakLine: i < typeItems.length - 1, paraSpaceAfter: 5 } }));

// Flatten for addText rich text
let flatArr = [];
typeItems.forEach((item, i) => {
  item.forEach(seg => { flatArr.push({ text: seg.text, options: { ...seg.options } }); });
  if (i < typeItems.length - 1) flatArr.push({ text: "\n", options: { breakLine: true } });
});
slide.addText(flatArr, { x: 0.55, y: 3.58, w: 9.0, h: 1.9, valign: "top", fontSize: 13.5, paraSpaceAfter: 6 });

// ════════════════════════════════════════════════════════════════
// SLIDE 4 – EPIDEMIOLOGY
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
darkSlide(slide);
sectionBanner(slide, "EPIDEMIOLOGY");
slideTitle(slide, "Prevalence in Adolescents", COL.white);
divider(slide, 1.35, COL.gold);

// Stat boxes
const stats = [
  { num: "~10%", label: "of all reproductive-age females globally" },
  { num: "60–75%", label: "of adolescents with moderate-to-severe pelvic pain" },
  { num: "62%", label: "visually-confirmed at laparoscopy for pain/dysmenorrhea" },
  { num: "64%", label: "mean prevalence (laparoscopy + imaging combined)" },
];
stats.forEach((s, i) => {
  const x = 0.35 + (i % 2) * 4.85;
  const y = 1.55 + Math.floor(i / 2) * 2.0;
  slide.addShape(pres.ShapeType.roundRect, { x, y, w: 4.45, h: 1.65, fill: { color: COL.roseDark }, line: { color: COL.gold, width: 1 }, rectRadius: 0.12 });
  slide.addText(s.num, { x, y: y + 0.12, w: 4.45, h: 0.75, fontSize: 34, bold: true, color: COL.gold, align: "center" });
  slide.addText(s.label, { x, y: y + 0.85, w: 4.45, h: 0.7, fontSize: 13, color: COL.lightPink, align: "center", wrap: true });
});

slide.addText("Two-thirds of adults with endometriosis report symptoms started before age 20 · ~20% had pain before age 15", {
  x: 0.35, y: 5.1, w: 9.3, h: 0.38, fontSize: 11.5, color: COL.cream, italic: true, align: "center",
});

// ════════════════════════════════════════════════════════════════
// SLIDE 5 – PATHOGENESIS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
midSlide(slide);
sectionBanner(slide, "PATHOGENESIS");
slideTitle(slide, "Theories of Pathogenesis");
divider(slide, 1.35);

const theories = [
  { name: "Retrograde Menstruation", desc: "Endometrial tissue implants via retrograde flow through fallopian tubes (Sampson theory) — predominant mechanism; supported by higher rates with outflow obstruction" },
  { name: "Coelomic Metaplasia", desc: "Endometrium arises directly from coelomic epithelium (mesothelium) — explains premenarchal and extra-pelvic cases" },
  { name: "Lymphatic / Hematologic Spread", desc: "Endometrial tissue spreads to distant sites via blood vessels & lymphatics (benign metastasis theory)" },
  { name: "Extrauterine Stem/Progenitor Cells", desc: "Bone marrow-derived stem cells differentiate into endometrial tissue at ectopic sites" },
  { name: "Aberrant Cellular Immunity", desc: "Impaired immune clearance of retrograde menstrual debris allows implantation and persistence" },
];

theories.forEach((t, i) => {
  const y = 1.5 + i * 0.78;
  slide.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 0.28, h: 0.55, fill: { color: COL.roseDark }, line: { color: COL.roseDark } });
  slide.addText(String(i + 1), { x: 0.4, y, w: 0.28, h: 0.55, fontSize: 14, bold: true, color: COL.white, align: "center", valign: "middle" });
  slide.addText(t.name + ":  ", { x: 0.78, y: y + 0.04, w: 2.3, h: 0.48, fontSize: 13, bold: true, color: COL.roseDark, valign: "middle" });
  slide.addText(t.desc, { x: 3.0, y: y + 0.04, w: 6.6, h: 0.48, fontSize: 12.5, color: COL.slate, valign: "middle", wrap: true });
});

slide.addText("Endometriotic implants overexpress PGE2, VEGF, aromatase (↑local estrogen), and MMPs — perpetuating inflammation and growth", {
  x: 0.4, y: 5.45, w: 9.2, h: 0.38,
  fontSize: 11, color: COL.roseDark, italic: true, align: "center",
});

// ════════════════════════════════════════════════════════════════
// SLIDE 6 – RISK FACTORS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
lightSlide(slide);
sectionBanner(slide, "RISK FACTORS UNIQUE TO ADOLESCENTS");
slideTitle(slide, "Who is at Increased Risk?");
divider(slide, 1.35);

twoColBullets(slide,
  "Anatomical / Structural",
  [
    "Obstructive congenital anomalies (imperforate hymen, vaginal agenesis, transverse vaginal septum)",
    "Endometriosis found in ~50% undergoing surgery for reproductive tract anomalies",
    "Highest incidence with cervical aplasia",
    "Correction of obstruction may cause regression — but disease can persist",
  ],
  "Genetic & Early-Life Factors",
  [
    "First-degree relative with endometriosis → 7× greater risk",
    "Estimated heritability ~50%; 26% due to common genetic variants",
    "42 loci identified in GWAS meta-analysis (60,674 cases)",
    "Earlier menarche & shorter cycle length → greater incidence",
    "Secondhand smoke in childhood (associated)",
    "Dietary exposures (dairy intake in adolescence — inverse association)",
  ],
  { yStart: 1.5 }
);

// ════════════════════════════════════════════════════════════════
// SLIDE 7 – DIAGNOSTIC DELAY
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
darkSlide(slide);
sectionBanner(slide, "DIAGNOSTIC DELAY");
slideTitle(slide, "A Major Clinical Challenge", COL.white);
divider(slide, 1.35, COL.gold);

slide.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.5, w: 9.2, h: 0.88, fill: { color: COL.roseDark }, line: { color: COL.gold } });
slide.addText("Average diagnostic delay of 4–9 YEARS from symptom onset to diagnosis in adolescent patients", {
  x: 0.5, y: 1.55, w: 9.0, h: 0.76, fontSize: 16, bold: true, color: COL.gold, align: "center", valign: "middle",
});

slide.addText("Patient Factors", { x: 0.4, y: 2.55, w: 4.4, h: 0.38, fontSize: 14, bold: true, color: COL.lightPink });
const patFact = [
  "Embarrassment & reluctance to discuss pain",
  "Fear of stigmatization",
  "Lack of endometriosis knowledge",
  "Younger patients (<17 yrs) especially vulnerable",
];
slide.addText(patFact.map((t, i) => ({ text: t, options: { bullet: { type: "bullet", indent: 14 }, breakLine: i < patFact.length - 1, color: COL.cream, fontSize: 13, paraSpaceAfter: 4 } })), {
  x: 0.4, y: 2.95, w: 4.4, h: 2.1, valign: "top",
});

slide.addText("Clinician Factors", { x: 5.2, y: 2.55, w: 4.4, h: 0.38, fontSize: 14, bold: true, color: COL.lightPink });
const clinFact = [
  "Lack of disease knowledge specific to adolescents",
  "Normalization of dysmenorrhea",
  "Reluctance to perform surgery",
  "Subtle appearance of adolescent lesions",
  "Symptom overlap with IBS, primary dysmenorrhea",
];
slide.addText(clinFact.map((t, i) => ({ text: t, options: { bullet: { type: "bullet", indent: 14 }, breakLine: i < clinFact.length - 1, color: COL.cream, fontSize: 13, paraSpaceAfter: 4 } })), {
  x: 5.2, y: 2.95, w: 4.4, h: 2.1, valign: "top",
});

slide.addShape(pres.ShapeType.line, { x: 5.05, y: 2.55, w: 0, h: 2.1, line: { color: COL.roseLight, width: 1 } });

// ════════════════════════════════════════════════════════════════
// SLIDE 8 – CLINICAL FEATURES
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
midSlide(slide);
sectionBanner(slide, "CLINICAL FEATURES");
slideTitle(slide, "Symptoms in Adolescents");
divider(slide, 1.35);

// Main symptom callout
slide.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.45, w: 9.2, h: 0.62, fill: { color: "EDD0E4" }, line: { color: COL.roseDark }, rectRadius: 0.1 });
slide.addText("Pelvic pain is the most common presenting symptom — both CYCLIC and NON-CYCLIC (64% noncyclic vs 58% dysmenorrhea in one observational study)", {
  x: 0.55, y: 1.48, w: 8.9, h: 0.56, fontSize: 13.5, color: COL.deepPlum, bold: true, align: "center", valign: "middle",
});

twoColBullets(slide,
  "Pain Characteristics",
  [
    "Dysmenorrhea (cyclic pain)",
    "Non-menstrual / acyclic pelvic pain",
    "Gradual or acute onset",
    "Pain that worsens over time",
    "Dyspareunia (in sexually active teens)",
    "Non-cyclic pain as primary symptom in ~30%",
  ],
  "Coexisting Symptoms",
  [
    "Heavy menstrual bleeding / premenstrual spotting",
    "Nausea, dizziness/headache during menses",
    "Rectal pain, constipation, dyschezia",
    "Dysuria, urinary urgency/nocturia/hematuria",
    "60% report ≥2 additional pain conditions",
    "School absenteeism, exercise avoidance",
  ],
  { yStart: 2.2 }
);

// ════════════════════════════════════════════════════════════════
// SLIDE 9 – ASSOCIATED DIAGNOSES & ALARM FINDINGS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
lightSlide(slide);
sectionBanner(slide, "ASSOCIATED DIAGNOSES & ALARM FINDINGS");
slideTitle(slide, "Beyond the Pelvic Pain");
divider(slide, 1.35);

slide.addText("Associated Conditions", { x: 0.45, y: 1.45, w: 9.1, h: 0.38, fontSize: 15, bold: true, color: COL.roseDark });
bulletBox(slide, [
  "Autoimmune conditions (higher-than-expected rate)",
  "Migraine, tension headaches",
  "Uterine fibroids, ovarian cancer subtypes (shared genetic pathways)",
  "Asthma, GI reflux disease, osteoarthritis, depression — genetic correlations",
  "Comorbid chronic pain syndromes: IBS, interstitial cystitis, fibromyalgia, vulvodynia",
  "Anxiety and depression requiring medication/therapy are more prevalent",
], { y: 1.87, h: 1.9, fontSize: 13.5 });

divider(slide, 3.85, COL.roseLight);

slide.addText("⚠  Alarm Findings — Seek Emergency Evaluation", { x: 0.45, y: 3.92, w: 9.1, h: 0.38, fontSize: 14, bold: true, color: "CC0000" });
bulletBox(slide, [
  "Unstable vital signs → exclude ovarian torsion or ruptured ectopic pregnancy",
  "New asymmetric pain with nausea/vomiting unresponsive to typical measures",
  "Acute severe pelvic pain — emergency department presentation is common in adolescents",
], { y: 4.33, h: 1.2, fontSize: 13.5, color: "441111" });

// ════════════════════════════════════════════════════════════════
// SLIDE 10 – INITIAL EVALUATION: HISTORY
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
darkSlide(slide);
sectionBanner(slide, "INITIAL EVALUATION");
slideTitle(slide, "Taking the History", COL.white);
divider(slide, 1.35, COL.gold);

const histItems = [
  ["Pain Characteristics", "Location · timing · cyclicity · quality · associated symptoms (nausea, bowel/bladder changes) — Pain diary highly recommended"],
  ["Functional Impact", "School & work absenteeism · avoidance of activities · emergency department visits"],
  ["Other Pain Syndromes", "Painful bladder syndrome · IBS · migraine · vulvar pain · fibromyalgia"],
  ["GI & Urologic Overlap", "Degree of GI/urologic symptoms guides specialist referral"],
  ["Family History", "First-degree relative with endometriosis = 7× greater personal risk"],
  ["Shared Diagnoses", "Autoimmune conditions · migraine · asthma"],
  ["Mental Health Screening", "↑ risk of anxiety & depression in adolescents with chronic pelvic pain"],
  ["Exposure to Abuse", "Screen all patients; evaluation for endometriosis continues regardless"],
];

histItems.forEach((item, i) => {
  const y = 1.5 + i * 0.5;
  slide.addShape(pres.ShapeType.rect, { x: 0.38, y, w: 0.08, h: 0.38, fill: { color: COL.gold }, line: { color: COL.gold } });
  slide.addText(item[0] + ": ", { x: 0.55, y, w: 2.5, h: 0.38, fontSize: 12.5, bold: true, color: COL.gold, valign: "middle" });
  slide.addText(item[1], { x: 3.1, y, w: 6.55, h: 0.38, fontSize: 12, color: COL.cream, valign: "middle", wrap: true });
});

// ════════════════════════════════════════════════════════════════
// SLIDE 11 – PHYSICAL EXAM & LABS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
midSlide(slide);
sectionBanner(slide, "PHYSICAL EXAMINATION & LABORATORY EVALUATION");
slideTitle(slide, "Examination & Lab Workup");
divider(slide, 1.35);

twoColBullets(slide,
  "Physical Examination",
  [
    "Shared decision-making — pelvic exam is NOT required to proceed with evaluation",
    "Abdominal exam: tenderness, masses, myofascial trigger points, erythema ab igne",
    "Visual inspection: confirm patent vaginal outlet, exclude imperforate hymen",
    "Bimanual exam (if acceptable): adnexal enlargement, uterosacral nodularity, pelvic floor tenderness",
    "Speculum (if acceptable): vaginal anomalies, STI testing",
    "Rectal exam: if obstructive anomaly suspected & vaginal exam declined",
  ],
  "Laboratory Tests",
  [
    "Urinalysis + urine culture — exclude UTI/stones",
    "Pregnancy test — exclude ectopic",
    "STI testing (gonorrhea, chlamydia) when appropriate",
    "CBC + ESR — if fever/infection suspected",
    "CA-125: NOT recommended — low sensitivity/specificity for endometriosis diagnosis",
  ],
  { yStart: 1.48 }
);

// ════════════════════════════════════════════════════════════════
// SLIDE 12 – IMAGING
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
lightSlide(slide);
sectionBanner(slide, "IMAGING IN ADOLESCENT ENDOMETRIOSIS");
slideTitle(slide, "Role & Limitations of Imaging");
divider(slide, 1.35);

slide.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.45, w: 9.2, h: 0.62, fill: { color: "EDD0E4" }, line: { color: COL.roseDark }, rectRadius: 0.1 });
slide.addText("IMPORTANT: Normal imaging does NOT exclude endometriosis in adolescents — superficial peritoneal lesions are invisible on imaging", {
  x: 0.55, y: 1.48, w: 8.9, h: 0.56, fontSize: 13, color: COL.deepPlum, bold: true, align: "center", valign: "middle",
});

const imgData = [
  {
    title: "Ultrasound (First-line)", 
    items: [
      "Transvaginal — preferred (best visualization)",
      "Transabdominal — if vaginal approach declined",
      "Transperineal — lower uterine/vaginal anomalies",
      "Detects endometriomas (ground-glass, avascular, thick-walled cyst)",
      "Low cost, no radiation, widely available",
    ]
  },
  {
    title: "MRI", 
    items: [
      "When ultrasound is inadequate or indeterminate",
      "Detects endometriomas & DIE (typically post age 18)",
      "NOT first-line — expensive, poor sensitivity for superficial lesions",
      "Useful to define anatomy before complex surgery",
    ]
  },
  {
    title: "CT Scan", 
    items: [
      "Generally NOT helpful for endometriosis diagnosis",
      "Low sensitivity + ionizing radiation",
      "May incidentally detect endometrioma",
    ]
  },
];

imgData.forEach((col, i) => {
  const x = 0.38 + i * 3.24;
  slide.addShape(pres.ShapeType.rect, { x, y: 2.18, w: 3.08, h: 0.42, fill: { color: COL.roseDark }, line: { color: COL.roseDark } });
  slide.addText(col.title, { x, y: 2.2, w: 3.08, h: 0.38, fontSize: 12.5, bold: true, color: COL.white, align: "center", valign: "middle" });
  const arr = col.items.map((t, j) => ({ text: t, options: { bullet: { type: "bullet", indent: 10 }, breakLine: j < col.items.length - 1, color: COL.slate, fontSize: 12, paraSpaceAfter: 4 } }));
  slide.addText(arr, { x: x + 0.05, y: 2.65, w: 2.98, h: 2.85, valign: "top" });
});

// ════════════════════════════════════════════════════════════════
// SLIDE 13 – DEFINITIVE DIAGNOSIS & STAGING
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
darkSlide(slide);
sectionBanner(slide, "DIAGNOSIS & STAGING");
slideTitle(slide, "Definitive Diagnosis & Disease Staging", COL.white);
divider(slide, 1.35, COL.gold);

slide.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.5, w: 9.2, h: 0.7, fill: { color: COL.roseDark }, line: { color: COL.gold }, rectRadius: 0.1 });
slide.addText("Gold Standard: Laparoscopy with tissue biopsy confirming ectopic endometrial tissue (histology)", {
  x: 0.55, y: 1.55, w: 8.9, h: 0.6, fontSize: 15, bold: true, color: COL.gold, align: "center", valign: "middle",
});

slide.addText("ASRM Surgical Staging System", { x: 0.4, y: 2.35, w: 9.2, h: 0.38, fontSize: 14, bold: true, color: COL.lightPink });

const stages = [
  { s: "Stage I – Minimal", d: "Few superficial implants; no significant adhesions" },
  { s: "Stage II – Mild", d: "More implants; slight adhesions involving ovary/tubes" },
  { s: "Stage III – Moderate", d: "Endometriomas, more extensive adhesions" },
  { s: "Stage IV – Severe", d: "Large endometriomas, dense adhesions, obliterated pouch of Douglas" },
];
stages.forEach((st, i) => {
  const y = 2.82 + i * 0.64;
  slide.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 2.6, h: 0.52, fill: { color: "6B2060" }, line: { color: COL.roseLight } });
  slide.addText(st.s, { x: 0.4, y, w: 2.6, h: 0.52, fontSize: 12.5, bold: true, color: COL.white, align: "center", valign: "middle" });
  slide.addText(st.d, { x: 3.2, y: y + 0.08, w: 6.4, h: 0.38, fontSize: 13, color: COL.cream, valign: "middle" });
});

slide.addText("Note: In adolescents — case series show progression from Stage I to Stage IV over 5–10 yrs without postoperative hormonal therapy", {
  x: 0.4, y: 5.45, w: 9.2, h: 0.38, fontSize: 11, color: COL.lightPink, italic: true,
});

// ════════════════════════════════════════════════════════════════
// SLIDE 14 – PRESUMPTIVE CLINICAL DIAGNOSIS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
midSlide(slide);
sectionBanner(slide, "PRESUMPTIVE CLINICAL DIAGNOSIS");
slideTitle(slide, "Treating Before Surgical Confirmation");
divider(slide, 1.35);

slide.addText("When is Presumptive Diagnosis Appropriate?", { x: 0.45, y: 1.44, w: 9.1, h: 0.38, fontSize: 15, bold: true, color: COL.roseDark });
bulletBox(slide, [
  "Adolescent with dysmenorrhea and/or acyclic pelvic pain not responding to NSAIDs",
  "Patient who prefers to avoid surgery or has contraindications",
  "Other causes of pain have been reasonably excluded",
  "Consistent with ACOG (2018, reaffirmed 2025), ESHRE (2022), NICE (2024) guidelines",
], { y: 1.87, h: 1.45, fontSize: 13.5 });

divider(slide, 3.38, COL.roseLight);

slide.addText("Benefits vs. Limitations", { x: 0.45, y: 3.44, w: 9.1, h: 0.38, fontSize: 15, bold: true, color: COL.roseDark });
twoColBullets(slide,
  "Benefits",
  [
    "Earlier start of treatment",
    "Avoids surgical risk and anesthesia",
    "Similar treatment efficacy to post-surgical management",
    "Low-risk medical therapy",
  ],
  "Limitations",
  [
    "Not always diagnostically accurate",
    "Surgery still needed if medical therapy fails",
    "Some patients prefer definitive histological diagnosis",
    "Must educate patients on uncertainty",
  ],
  { yStart: 3.85, titleColor: COL.roseLight }
);

// ════════════════════════════════════════════════════════════════
// SLIDE 15 – DIFFERENTIAL DIAGNOSIS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
lightSlide(slide);
sectionBanner(slide, "DIFFERENTIAL DIAGNOSIS");
slideTitle(slide, "Other Causes of Pelvic Pain in Adolescents");
divider(slide, 1.35);

const ddx = [
  { cat: "Gynecologic", color: COL.roseDark, items: ["Primary dysmenorrhea", "Ovarian cyst / torsion", "Ectopic pregnancy", "PID / STI", "Müllerian anomalies with obstruction", "Uterine fibroid"] },
  { cat: "Gastrointestinal", color: "5B8A3C", items: ["Appendicitis", "Irritable bowel syndrome", "Crohn disease / IBD", "Celiac disease", "Constipation", "Bowel hernia"] },
  { cat: "Urologic", color: "2A6589", items: ["Cystitis / UTI", "Interstitial cystitis", "Kidney stones", "Vesicoureteral reflux", "Urethral diverticulum"] },
  { cat: "Musculoskeletal / Neurologic", color: "7B5EA7", items: ["Pelvic floor myalgia", "Myofascial trigger points", "Abdominal migraine", "Nerve entrapment"] },
];

ddx.forEach((d, i) => {
  const x = 0.38 + (i % 2) * 4.82;
  const y = 1.5 + Math.floor(i / 2) * 2.05;
  slide.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 0.38, fill: { color: d.color }, line: { color: d.color } });
  slide.addText(d.cat, { x, y, w: 4.6, h: 0.38, fontSize: 13, bold: true, color: COL.white, align: "center", valign: "middle" });
  const arr = d.items.map((it, j) => ({ text: it, options: { bullet: { type: "bullet", indent: 10 }, breakLine: j < d.items.length - 1, color: COL.slate, fontSize: 12, paraSpaceAfter: 3 } }));
  slide.addText(arr, { x: x + 0.08, y: y + 0.42, w: 4.45, h: 1.55, valign: "top" });
});

// ════════════════════════════════════════════════════════════════
// SLIDE 16 – UNIQUE POPULATIONS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
darkSlide(slide);
sectionBanner(slide, "UNIQUE ADOLESCENT POPULATIONS");
slideTitle(slide, "Special Considerations", COL.white);
divider(slide, 1.35, COL.gold);

twoColBullets(slide,
  "Endometrioma / Deep Infiltrating Disease",
  [
    "Less common but possible — 11% ovarian endometriomas in one series of 270 adolescents aged 12–20",
    "Advanced-stage more common at older adolescent age",
    "Endometriomas cause more frequent pain than other age groups",
    "23% of those undergoing surgery for endo had advanced-stage disease",
  ],
  "Gender-Diverse Individuals",
  [
    "Endometriosis presents in transmasculine adolescents even on testosterone therapy",
    "Laparoscopically confirmed in transmasculine teens with pelvic pain",
    "Symptoms can exacerbate gender dysphoria",
    "Counseling must be individualized and gender-affirming",
  ],
  { yStart: 1.5, titleColor: COL.lightPink, bodyColor: COL.cream }
);

slide.addText("Disease Progression:", { x: 0.4, y: 4.5, w: 2.2, h: 0.4, fontSize: 13.5, bold: true, color: COL.gold });
slide.addText("Without postoperative hormonal therapy, adolescents may progress from Stage I to Stage IV over 5–10 years. Older adolescents within cohorts tend to have more advanced-stage disease.", {
  x: 2.65, y: 4.5, w: 7.0, h: 0.75, fontSize: 12.5, color: COL.cream, wrap: true,
});

// ════════════════════════════════════════════════════════════════
// SLIDE 17 – QoL & PSYCHOSOCIAL IMPACT
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
midSlide(slide);
sectionBanner(slide, "QUALITY OF LIFE & PSYCHOSOCIAL IMPACT");
slideTitle(slide, "The Broader Burden of Disease");
divider(slide, 1.35);

// Three impact boxes
const impacts = [
  {
    icon: "📚",
    title: "Academic & Social",
    items: ["School absenteeism", "Avoidance of extracurricular activities", "~50% skip exercise during menstruation", "Difficulty with physical education & sports"],
  },
  {
    icon: "🧠",
    title: "Mental Health",
    items: ["Higher prevalence of anxiety & depression requiring treatment", "Association with somatic disorders", "Chronic pain ↔ mood disorders: shared genetic, inflammatory & neurobiological pathways", "Pain is real — not a manifestation of psychological distress"],
  },
  {
    icon: "🌸",
    title: "Fertility Concerns",
    items: ["72% successful pregnancy in retrospective cohort of adolescents", "Fecundability correlated with initial disease stage", "Impact may be limited given majority have early-stage disease", "Long-term data are still needed"],
  },
];

impacts.forEach((box, i) => {
  const x = 0.38 + i * 3.24;
  slide.addShape(pres.ShapeType.roundRect, { x, y: 1.48, w: 3.1, h: 4.1, fill: { color: "F0E2EC" }, line: { color: COL.roseLight, width: 1 }, rectRadius: 0.12 });
  slide.addText(box.icon + " " + box.title, { x: x + 0.08, y: 1.55, w: 2.94, h: 0.5, fontSize: 14, bold: true, color: COL.roseDark, align: "center" });
  const arr = box.items.map((t, j) => ({ text: t, options: { bullet: { type: "bullet", indent: 10 }, breakLine: j < box.items.length - 1, color: COL.slate, fontSize: 12, paraSpaceAfter: 5 } }));
  slide.addText(arr, { x: x + 0.1, y: 2.12, w: 2.9, h: 3.3, valign: "top" });
});

// ════════════════════════════════════════════════════════════════
// SLIDE 18 – INITIAL MEDICAL MANAGEMENT
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
lightSlide(slide);
sectionBanner(slide, "INITIAL MEDICAL MANAGEMENT");
slideTitle(slide, "First-Line Treatment Approach");
divider(slide, 1.35);

// Algorithm-like flow
slide.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.47, w: 9.2, h: 0.58, fill: { color: COL.roseDark }, line: { color: COL.roseDark }, rectRadius: 0.1 });
slide.addText("STEP 1:  Clinical Diagnosis (suspected endometriosis with pelvic pain / dysmenorrhea)", {
  x: 0.5, y: 1.5, w: 9.0, h: 0.52, fontSize: 14, bold: true, color: COL.white, align: "center", valign: "middle",
});

slide.addShape(pres.ShapeType.downArrow, { x: 4.6, y: 2.1, w: 0.8, h: 0.38, fill: { color: COL.roseDark }, line: { color: COL.roseDark } });

slide.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 2.52, w: 9.2, h: 0.65, fill: { color: "EDD0E4" }, line: { color: COL.roseLight }, rectRadius: 0.1 });
slide.addText("STEP 2:  First-line = NSAIDs + Hormonal Therapy (combined, not sequential)", {
  x: 0.5, y: 2.55, w: 9.0, h: 0.58, fontSize: 14, bold: true, color: COL.deepPlum, align: "center", valign: "middle",
});

twoColBullets(slide,
  "NSAIDs",
  [
    "Ibuprofen, Naproxen, Mefenamic acid",
    "Start 1–2 days before expected pain onset",
    "Weight-based dosing for <60 kg",
    "3-month trial reasonable",
    "Naproxen preferred for school (longer acting)",
  ],
  "Hormonal Therapy",
  [
    "Combined estrogen-progestin (pill, patch, ring)",
    "Progestin-only (norethindrone acetate, DMPA, implant, LNG IUD)",
    "Continuous > cyclic dosing",
    "Reassess after 3–4 months",
    "Symptom diary + pain tracker",
  ],
  { yStart: 3.28 }
);

// ════════════════════════════════════════════════════════════════
// SLIDE 19 – GnRH AGONISTS / ANTAGONISTS
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
darkSlide(slide);
sectionBanner(slide, "GnRH AGONISTS / ANTAGONISTS & ADD-BACK THERAPY");
slideTitle(slide, "Second-Line Hormonal Therapy", COL.white);
divider(slide, 1.35, COL.gold);

slide.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.5, w: 9.2, h: 0.6, fill: { color: "5C1848" }, line: { color: COL.gold } });
slide.addText("Generally NOT first-line in adolescents ≤18 yrs — risk of reduced bone mineral density (most bone mass accrued by age 18)", {
  x: 0.5, y: 1.54, w: 9.0, h: 0.52, fontSize: 13, bold: true, color: COL.gold, align: "center", valign: "middle",
});

twoColBullets(slide,
  "GnRH Agonists (leuprolide, nafarelin, goserelin)",
  [
    "Reserve for confirmed endometriosis with refractory pain",
    "Down-regulate GnRH receptor → hypoestrogenic state",
    "Add-back therapy MANDATORY: norethindrone acetate 5 mg/day",
    "6–9 months then switch to OCP",
    "Side effects: hot flashes, bone loss, mood changes",
    "Bone density preserved with add-back therapy",
  ],
  "GnRH Antagonists (elagolix, relugolix)",
  [
    "Patients ≥18 yrs with refractory/recurrent pain",
    "Oral dosing, rapid onset, dose-titratable",
    "Elagolix: 150 mg OD (up to 24 months) or 200 mg BD (6 months)",
    "Relugolix combination: includes estradiol + norethindrone",
    "Bone loss <1% over 2 years with combination therapy",
    "Preferred over agonists due to oral route & less bone loss",
  ],
  { yStart: 2.25, titleColor: COL.lightPink, bodyColor: COL.cream }
);

slide.addText("Add-back rationale: High-dose progestin (norethindrone acetate 5 mg) with or without low-dose estrogen preserves bone density and reduces vasomotor symptoms without reducing efficacy", {
  x: 0.4, y: 5.4, w: 9.2, h: 0.4, fontSize: 11, color: COL.lightPink, italic: true,
});

// ════════════════════════════════════════════════════════════════
// SLIDE 20 – SURGICAL MANAGEMENT & SUMMARY
// ════════════════════════════════════════════════════════════════
slide = pres.addSlide();
midSlide(slide);
sectionBanner(slide, "SURGICAL MANAGEMENT & MULTIDISCIPLINARY APPROACH");
slideTitle(slide, "When Surgery & Summary of Key Points");
divider(slide, 1.35);

twoColBullets(slide,
  "Indications for Surgery",
  [
    "Symptoms not controlled after 3–6 month trial of hormonal + NSAID therapy",
    "Patient declines or has contraindications to medical therapy",
    "Large endometrioma, bowel/ureteral obstruction (uncommon in adolescents)",
    "Laparoscopy is gold standard — excise all visible lesions",
    "No diagnostic laparoscopy without surgical treatment",
    "Avoid repeat surgery — endometriosis is chronic; medical therapy preferred",
  ],
  "Multidisciplinary & Adjuvant Care",
  [
    "Pelvic floor physical therapy (tailored for teens — external techniques if needed)",
    "Cognitive behavioral therapy / virtual mindfulness",
    "Acupuncture (auricular for dysmenorrhea)",
    "TENS, exercise — adjuvant pain management",
    "Social work support for mental health resources",
    "Referral: GYN · GI (cyclic GI symptoms) · Urology (hematuria, bladder pain)",
    "Gender-affirming care for transmasculine patients",
  ],
  { yStart: 1.5 }
);

// Key summary box at bottom
slide.addShape(pres.ShapeType.rect, { x: 0, y: 4.72, w: 10, h: 0.9, fill: { color: COL.roseDark }, line: { color: COL.roseDark } });
slide.addText([
  { text: "Key Message: ", options: { bold: true, color: COL.gold, fontSize: 13 } },
  { text: "Endometriosis is a chronic, estrogen-driven disease in adolescents. Early recognition, clinical diagnosis, combined NSAID + hormonal suppression, shared decision-making, and a multidisciplinary pain management approach are the cornerstones of care.", options: { color: COL.white, fontSize: 12 } },
], { x: 0.3, y: 4.74, w: 9.4, h: 0.86, valign: "middle", wrap: true });

// ── WRITE FILE ────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/endometriosis-adolescent-ppt/Endometriosis_in_Adolescents.pptx" })
  .then(() => console.log("SUCCESS: File written"))
  .catch(e => console.error("ERROR:", e));
Running Command

cd /home/daytona/workspace/endometriosis-adolescent-ppt && node create_ppt.js 2>…

Running Command

ls -lh /home/daytona/workspace/endometriosis-adolescent-ppt/

The presentation is ready. Here's your download link:

Endometriosis in Adolescents

Presentation · PPTX


Presentation Overview — 20 Slides

The deck uses a deep plum/rose/gold medical color palette and is structured as follows:
#Slide TitleContent Source
1Title SlideOverview
2Presentation OutlineAll 20 topics listed
3Definition & ClassificationThree types: superficial, endometrioma, DIE — Robbins Pathology
4EpidemiologyKey statistics (60–75% in adolescents with pain) — UpToDate article
5Pathogenesis5 theories: retrograde menstruation, metaplasia, lymphatic spread, stem cells, immune aberration
6Risk Factors Unique to AdolescentsCongenital anomalies, genetic factors, family history (7× risk)
7Diagnostic Delay4–9 year delays; patient vs. clinician contributing factors
8Clinical Features & SymptomsCyclic/acyclic pain, bowel/bladder symptoms, comorbidities
9Associated Diagnoses & Alarm FindingsAutoimmune, migraine; ovarian torsion red flags
10Initial Evaluation – History8 key history domains including abuse screening
11Physical Exam & Lab TestsExam approach; CA-125 NOT recommended
12Imaging ModalitiesUS (first-line), MRI, CT — with limitations
13Definitive Diagnosis & ASRM StagingStages I–IV; laparoscopy as gold standard
14Presumptive Clinical DiagnosisWhen to treat without surgery; ACOG/ESHRE guidelines
15Differential DiagnosisGynecologic, GI, urologic, neurologic, musculoskeletal
16Unique PopulationsEndometrioma/DIE in teens; gender-diverse adolescents
17QoL & Psychosocial ImpactAcademic, mental health, fertility outcomes
18Initial Medical ManagementNSAIDs + hormonal therapy algorithm
19GnRH Agonists/Antagonists & Add-backDosing, bone considerations, elagolix/relugolix
20Surgical Management & SummarySurgical indications, multidisciplinary approach, key message
This is a shared conversation. Sign in to Orris to start your own chat.