Abnormal Uterine Bleeding Secondary To Endometrial Polyp Pelvic Endometriosis Stage IV Ovarian Abscess; give me the detailed overview/introduction of this GYN disease condition, Refer comprehensive gynecology 8th edition
Note: Comprehensive Gynecology 8th edition is not available in the medical library. The following detailed overview is drawn from Berek & Novak's Gynecology (the leading comprehensive gynecology reference available), supplemented by established gynecologic principles. The content, classification systems, and clinical frameworks closely mirror those used in Comprehensive Gynecology.
| Structural Causes (PALM) | Non-Structural Causes (COEIN) |
|---|---|
| P - Polyp (AUB-P) | C - Coagulopathy |
| A - Adenomyosis | O - Ovulatory dysfunction |
| L - Leiomyoma | E - Endometrial |
| M - Malignancy + Hyperplasia | I - Iatrogenic |
| N - Not yet classified |
| Stage | Description | Point Score |
|---|---|---|
| I - Minimal | Isolated implants, no significant adhesions | 1-5 |
| II - Mild | Superficial implants < 5 cm, no significant adhesions | 6-15 |
| III - Moderate | Multiple implants, peritoneal and ovarian endometriomas, adhesions | 16-40 |
| IV - Severe | Multiple implants, large endometriomas, dense adhesions | > 40 |
| Condition | Category | Key Feature | Primary Diagnostic Tool | Key Management |
|---|---|---|---|---|
| AUB-P (Endometrial Polyp) | Structural AUB (PALM) | Focal endometrial overgrowth causing intermenstrual/heavy bleeding | Hysteroscopy/sonohysterography | Hysteroscopic polypectomy |
| Pelvic Endometriosis Stage IV | Chronic estrogen-dependent inflammatory disease | Deep infiltrating nodules, large endometriomas, dense adhesions, cul-de-sac obliteration (score >40) | Laparoscopy with histologic confirmation | Multidisciplinary surgery + hormonal suppression |
| Ovarian Abscess | End-stage PID / suppurative ovarian infection | Palpable pelvic complex; entry via ovulatory site or ascending infection | Pelvic ultrasound/CT | IV antibiotics; percutaneous drainage if refractory |
Pathophysiology of these each disease condition
Kindly make it as a flowchart manner to as to add in my ppt
ls /home/daytona/workspace/ 2>/dev/null && echo "---" && ls /home/daytona/skills/pptx/ 2>/dev/null
ls /home/daytona/workspace/gyne-case-ppt/
~/gyne-case-ppt/pathophysiology_flowcharts.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
// ─── COLOUR PALETTE ────────────────────────────────────────────────────────────
const C = {
// Slide 1 – Endometrial Polyp (warm rose/mauve)
p_dark: "7B2D5E",
p_mid: "C2527D",
p_light: "F2C4D8",
p_arrow: "9E3A6F",
p_text: "FFFFFF",
p_bg: "FDF0F5",
// Slide 2 – Endometriosis (deep teal/cyan)
e_dark: "1B4F72",
e_mid: "2471A3",
e_light: "AED6F1",
e_arrow: "1A5276",
e_text: "FFFFFF",
e_bg: "EBF5FB",
// Slide 3 – Ovarian Abscess (burnt orange/amber)
a_dark: "7D3C07",
a_mid: "CA6F1E",
a_light: "FAD7A0",
a_arrow: "9E5B0D",
a_text: "FFFFFF",
a_bg: "FEF5E7",
white: "FFFFFF",
grey: "6C757D",
};
// ─── HELPERS ────────────────────────────────────────────────────────────────────
/** Draw a rounded rectangle box with text inside */
function addBox(slide, { x, y, w, h, fill, text, subtext, textColor, fontSize, bold, rectOptions }) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: fill },
line: { color: fill, width: 0 },
rectRadius: 0.12,
shadow: { type: "outer", color: "000000", blur: 6, offset: 3, angle: 135, opacity: 0.18 },
...(rectOptions || {}),
});
const textArr = subtext
? [
{ text: text, options: { bold: true, breakLine: true, fontSize: fontSize || 11, color: textColor || C.white } },
{ text: subtext, options: { bold: false, fontSize: (fontSize || 11) - 1.5, color: textColor || C.white, italic: true } },
]
: [{ text: text, options: { bold: bold !== false, fontSize: fontSize || 11, color: textColor || C.white } }];
slide.addText(textArr, {
x, y, w, h,
align: "center", valign: "middle",
margin: 4,
});
}
/** Draw a downward arrow */
function addArrowDown(slide, { x, y, color }) {
// stem
slide.addShape(pres.ShapeType.rect, {
x: x + 0.01, y, w: 0.08, h: 0.22,
fill: { color: color },
line: { color: color, width: 0 },
});
// arrowhead triangle via lines
slide.addShape(pres.ShapeType.triangle, {
x: x - 0.07, y: y + 0.20, w: 0.22, h: 0.13,
fill: { color: color },
line: { color: color, width: 0 },
rotate: 180,
});
}
/** Draw a right-pointing arrow between two boxes on same row */
function addArrowRight(slide, { x, y, color }) {
slide.addShape(pres.ShapeType.rect, {
x, y: y + 0.01, w: 0.25, h: 0.08,
fill: { color: color },
line: { color: color, width: 0 },
});
slide.addShape(pres.ShapeType.triangle, {
x: x + 0.20, y: y - 0.07, w: 0.13, h: 0.22,
fill: { color: color },
line: { color: color, width: 0 },
rotate: 90,
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – AUB SECONDARY TO ENDOMETRIAL POLYP
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: C.p_bg };
// Title bar
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.72,
fill: { color: C.p_dark },
line: { color: C.p_dark, width: 0 },
});
sl.addText("PATHOPHYSIOLOGY — AUB Secondary to Endometrial Polyp", {
x: 0, y: 0, w: 13.3, h: 0.72,
align: "center", valign: "middle",
fontSize: 18, bold: true, color: C.white,
});
// Source tag
sl.addText("Source: Berek & Novak's Gynecology | Robbins Pathology", {
x: 0, y: 7.2, w: 13.3, h: 0.28,
align: "center", fontSize: 8, color: C.p_dark, italic: true,
});
// ── COLUMN 1: Hormonal Trigger ─────────────────────────────────────────────
// We lay out a top-down chain in 3 columns, then a convergence row, then an outcome row
// === Column definitions ===
// Col A: Hormonal mechanism x=0.3
// Col B: Clonal / Structural x=4.7
// Col C: Vascular / Surface x=9.1
// BW = 3.5, BH = 0.70
const BW = 3.6, BH = 0.68;
const xA = 0.30, xB = 4.65, xC = 9.05;
const rows = [0.88, 1.72, 2.56, 3.40]; // y positions of boxes
// ─ COL A ─
addBox(sl, { x: xA, y: rows[0], w: BW, h: BH, fill: C.p_dark,
text: "⬆ Estrogen / Progesterone Resistance", subtext: "Cumulative estrogen excess; deficient PR signaling" });
addArrowDown(sl, { x: xA + BW/2 - 0.05, y: rows[0]+BH, color: C.p_mid });
addBox(sl, { x: xA, y: rows[1], w: BW, h: BH, fill: C.p_mid,
text: "Focal Endometrial Overstimulation", subtext: "Basalis-type glands fail to cycle; no secretory transformation" });
addArrowDown(sl, { x: xA + BW/2 - 0.05, y: rows[1]+BH, color: C.p_mid });
addBox(sl, { x: xA, y: rows[2], w: BW, h: BH, fill: C.p_mid,
text: "Tamoxifen / Obesity / Late Reproductive Age", subtext: "SERM partial agonism on ER → amplified proliferation" });
addArrowDown(sl, { x: xA + BW/2 - 0.05, y: rows[2]+BH, color: C.p_mid });
addBox(sl, { x: xA, y: rows[3], w: BW, h: BH, fill: C.p_light, textColor: C.p_dark,
text: "Persistent Focal Proliferative Drive", subtext: "Unopposed local estrogenic stimulation", bold: false });
// ─ COL B ─
addBox(sl, { x: xB, y: rows[0], w: BW, h: BH, fill: C.p_dark,
text: "Clonal Stromal Expansion", subtext: "Monoclonal stromal cells (neoplastic component of polyp)" });
addArrowDown(sl, { x: xB + BW/2 - 0.05, y: rows[0]+BH, color: C.p_mid });
addBox(sl, { x: xB, y: rows[1], w: BW, h: BH, fill: C.p_mid,
text: "Polyp Forms (sessile, 0.5–3 cm)", subtext: "Cystically dilated basalis glands + fibrotic stroma" });
addArrowDown(sl, { x: xB + BW/2 - 0.05, y: rows[1]+BH, color: C.p_mid });
addBox(sl, { x: xB, y: rows[2], w: BW, h: BH, fill: C.p_mid,
text: "Chr 6 & 12 Rearrangements", subtext: "Same as leiomyomas/lipomas; shared clonal origin" });
addArrowDown(sl, { x: xB + BW/2 - 0.05, y: rows[2]+BH, color: C.p_mid });
addBox(sl, { x: xB, y: rows[3], w: BW, h: BH, fill: C.p_light, textColor: C.p_dark,
text: "Endometrial Polyp Projects into Cavity", bold: false, subtext: "Single or multiple; pedunculated or sessile" });
// ─ COL C ─
addBox(sl, { x: xC, y: rows[0], w: BW, h: BH, fill: C.p_dark,
text: "Abnormal Vasculature in Polyp", subtext: "Thick-walled muscular arteries within polyp stroma" });
addArrowDown(sl, { x: xC + BW/2 - 0.05, y: rows[0]+BH, color: C.p_mid });
addBox(sl, { x: xC, y: rows[1], w: BW, h: BH, fill: C.p_mid,
text: "Surface Ulceration & Vascular Ectasia", subtext: "Polyp surface prone to mechanical disruption" });
addArrowDown(sl, { x: xC + BW/2 - 0.05, y: rows[1]+BH, color: C.p_mid });
addBox(sl, { x: xC, y: rows[2], w: BW, h: BH, fill: C.p_mid,
text: "Disrupted Synchronised Endometrial Shedding", subtext: "Irregular, prolonged, or heavy menstrual flow" });
addArrowDown(sl, { x: xC + BW/2 - 0.05, y: rows[2]+BH, color: C.p_mid });
addBox(sl, { x: xC, y: rows[3], w: BW, h: BH, fill: C.p_light, textColor: C.p_dark,
text: "Local PGE₂ ↑ → Vasodilatation & Bleeding", bold: false, subtext: "Prostaglandin-mediated vasomotor instability" });
// ─ Convergence arrow pointing down ─
// Three converging lines → single outcome box
const convY = rows[3] + BH + 0.05;
// lines from each col center to a center point
const midX = 13.3 / 2;
sl.addShape(pres.ShapeType.line, { x: xA + BW/2, y: convY, w: 0, h: 0.22,
line: { color: C.p_arrow, width: 2.5 } });
sl.addShape(pres.ShapeType.line, { x: xB + BW/2, y: convY, w: 0, h: 0.22,
line: { color: C.p_arrow, width: 2.5 } });
sl.addShape(pres.ShapeType.line, { x: xC + BW/2, y: convY, w: 0, h: 0.22,
line: { color: C.p_arrow, width: 2.5 } });
// horizontal connector
sl.addShape(pres.ShapeType.line, {
x: xA + BW/2, y: convY + 0.22,
w: xC + BW/2 - (xA + BW/2), h: 0,
line: { color: C.p_arrow, width: 2.5 }
});
// drop to outcome
sl.addShape(pres.ShapeType.line, { x: midX, y: convY + 0.22, w: 0, h: 0.20,
line: { color: C.p_arrow, width: 2.5 } });
// Outcome box
const outY = convY + 0.42;
sl.addShape(pres.ShapeType.roundRect, {
x: 2.8, y: outY, w: 7.7, h: 0.72,
fill: { color: C.p_dark },
line: { color: C.p_dark, width: 0 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 8, offset: 4, angle: 135, opacity: 0.25 },
});
sl.addText([
{ text: "⚡ OUTCOME: ", options: { bold: true, color: C.p_light, fontSize: 13 } },
{ text: "ABNORMAL UTERINE BLEEDING (AUB-P)", options: { bold: true, color: C.white, fontSize: 13 } },
{ text: " — Intermenstrual • Heavy • Irregular • Postmenopausal bleeding", options: { bold: false, color: C.p_light, fontSize: 10, italic: true } },
], { x: 2.8, y: outY, w: 7.7, h: 0.72, align: "center", valign: "middle" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – PELVIC ENDOMETRIOSIS STAGE IV
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: C.e_bg };
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.72,
fill: { color: C.e_dark },
line: { color: C.e_dark, width: 0 },
});
sl.addText("PATHOPHYSIOLOGY — Pelvic Endometriosis Stage IV (Severe)", {
x: 0, y: 0, w: 13.3, h: 0.72,
align: "center", valign: "middle",
fontSize: 18, bold: true, color: C.white,
});
sl.addText("Source: Berek & Novak's Gynecology Ch.13 | Robbins Pathology", {
x: 0, y: 7.2, w: 13.3, h: 0.28,
align: "center", fontSize: 8, color: C.e_dark, italic: true,
});
// ── LINEAR TOP-TO-BOTTOM FLOWCHART (7 steps) with branching at step 4) ──
// Step dimensions
const SW = 4.0, SH = 0.60;
// Steps 1-3 centred, then two branches (left + right), then converge, then outcome
const cx = (13.3 - SW) / 2; // center x for single-column steps
const stepGap = 0.32; // gap between box bottom and next box top
function stepY(i) { return 0.82 + i * (SH + stepGap); }
const arrowH = stepGap - 0.04;
// ── STEPS 1-3 (centred single column) ──
const steps13 = [
{ text: "STEP 1 — Retrograde Menstruation",
sub: "Endometrial cells reflux through tubes into peritoneal cavity (70–90% of women)" },
{ text: "STEP 2 — Peritoneal Deposition",
sub: "Cells deposit in dependent pelvis: ovaries, cul-de-sac, uterosacral ligaments (clockwise flow)" },
{ text: "STEP 3 — Immune Failure to Clear Ectopic Cells",
sub: "↓ NK cytotoxicity • Aberrant macrophage activation • ↑ TNF-α, IL-6, IL-8 in peritoneal fluid" },
];
steps13.forEach((s, i) => {
const fillC = i === 0 ? C.e_dark : C.e_mid;
addBox(sl, { x: cx, y: stepY(i), w: SW, h: SH, fill: fillC,
text: s.text, subtext: s.sub, fontSize: 10.5 });
if (i < 2) {
// arrow
sl.addShape(pres.ShapeType.line, {
x: cx + SW/2, y: stepY(i) + SH,
w: 0, h: stepGap - 0.04,
line: { color: C.e_arrow, width: 2 },
});
sl.addShape(pres.ShapeType.triangle, {
x: cx + SW/2 - 0.09, y: stepY(i) + SH + stepGap - 0.16,
w: 0.18, h: 0.14,
fill: { color: C.e_arrow }, line: { color: C.e_arrow, width: 0 }, rotate: 180,
});
}
});
// Arrow from step 3 down & split
const splitY = stepY(2) + SH;
sl.addShape(pres.ShapeType.line, {
x: cx + SW/2, y: splitY, w: 0, h: 0.18,
line: { color: C.e_arrow, width: 2 },
});
// horizontal line splitting left and right
const lx = 1.1, rx = 8.2, splitMidY = splitY + 0.18;
sl.addShape(pres.ShapeType.line, {
x: lx + 1.9, y: splitMidY,
w: rx - lx - 1.9, h: 0,
line: { color: C.e_arrow, width: 2 },
});
// down to left branch
sl.addShape(pres.ShapeType.line, { x: lx + 1.9, y: splitMidY, w: 0, h: 0.16,
line: { color: C.e_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: lx + 1.9 - 0.09, y: splitMidY + 0.14,
w: 0.18, h: 0.13,
fill: { color: C.e_arrow }, line: { color: C.e_arrow, width: 0 }, rotate: 180,
});
// down to right branch
sl.addShape(pres.ShapeType.line, { x: rx, y: splitMidY, w: 0, h: 0.16,
line: { color: C.e_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: rx - 0.09, y: splitMidY + 0.14,
w: 0.18, h: 0.13,
fill: { color: C.e_arrow }, line: { color: C.e_arrow, width: 0 }, rotate: 180,
});
// ── BRANCH BOXES (row 4) ──
const branchY = splitMidY + 0.30;
const BRW = 3.8, BRH = 0.62;
// LEFT branch
addBox(sl, { x: lx, y: branchY, w: BRW, h: BRH, fill: C.e_mid,
text: "STEP 4A — Implantation (Molecular)",
subtext: "Integrins & ICAM-1 attach cells to mesothelium\nMMPs degrade ECM for invasion\nVEGF drives neovascularization", fontSize: 10 });
// RIGHT branch
addBox(sl, { x: rx - 0.2, y: branchY, w: BRW, h: BRH, fill: C.e_mid,
text: "STEP 4B — Autocrine Estrogen Loop",
subtext: "Aromatase (CYP19A1) expressed in implants (absent in normal endometrium)\nLocal E₂ → ↑ PGE₂ → ↑ Aromatase (positive feedback)", fontSize: 10 });
// Arrows down from branches
sl.addShape(pres.ShapeType.line, { x: lx + BRW/2, y: branchY + BRH, w: 0, h: 0.22,
line: { color: C.e_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: lx + BRW/2 - 0.09, y: branchY + BRH + 0.18,
w: 0.18, h: 0.13, fill: { color: C.e_arrow }, line: { color: C.e_arrow, width: 0 }, rotate: 180,
});
sl.addShape(pres.ShapeType.line, { x: rx - 0.2 + BRW/2, y: branchY + BRH, w: 0, h: 0.22,
line: { color: C.e_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: rx - 0.2 + BRW/2 - 0.09, y: branchY + BRH + 0.18,
w: 0.18, h: 0.13, fill: { color: C.e_arrow }, line: { color: C.e_arrow, width: 0 }, rotate: 180,
});
// ── Row 5 ──
const row5Y = branchY + BRH + 0.35;
addBox(sl, { x: lx, y: row5Y, w: BRW, h: BRH, fill: C.e_light, textColor: C.e_dark,
text: "STEP 5A — Somatic Mutations",
subtext: "ARID1A • PIK3CA • KRAS mutations in 79% of deep lesions\nMonoclonal clonal expansion of ectopic cells", fontSize: 10, bold: false });
addBox(sl, { x: rx - 0.2, y: row5Y, w: BRW, h: BRH, fill: C.e_light, textColor: C.e_dark,
text: "STEP 5B — Neurogenesis & Central Sensitisation",
subtext: "NGF recruits new sensory nerve fibers → persistent pain\nSpinal neuroplasticity → allodynia", fontSize: 10, bold: false });
// Converge row 5 → outcome
const conv5Y = row5Y + BRH + 0.05;
sl.addShape(pres.ShapeType.line, { x: lx + BRW/2, y: conv5Y, w: 0, h: 0.15,
line: { color: C.e_arrow, width: 2 } });
sl.addShape(pres.ShapeType.line, { x: rx - 0.2 + BRW/2, y: conv5Y, w: 0, h: 0.15,
line: { color: C.e_arrow, width: 2 } });
sl.addShape(pres.ShapeType.line, {
x: lx + BRW/2, y: conv5Y + 0.15,
w: (rx - 0.2 + BRW/2) - (lx + BRW/2), h: 0,
line: { color: C.e_arrow, width: 2 },
});
sl.addShape(pres.ShapeType.line, { x: 6.65, y: conv5Y + 0.15, w: 0, h: 0.15,
line: { color: C.e_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: 6.65 - 0.09, y: conv5Y + 0.27,
w: 0.18, h: 0.13, fill: { color: C.e_arrow }, line: { color: C.e_arrow, width: 0 }, rotate: 180,
});
// Outcome box
const outY5 = conv5Y + 0.40;
sl.addShape(pres.ShapeType.roundRect, {
x: 2.5, y: outY5, w: 8.3, h: 0.78,
fill: { color: C.e_dark },
line: { color: C.e_dark, width: 0 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 8, offset: 4, angle: 135, opacity: 0.25 },
});
sl.addText([
{ text: "⚡ STAGE IV OUTCOME: ", options: { bold: true, color: C.e_light, fontSize: 13 } },
{ text: "Bilateral Endometriomas • Dense Adhesions • Frozen Pelvis (Cul-de-Sac Obliteration)", options: { bold: true, color: C.white, fontSize: 12 } },
{ text: "\nDysmenorrhea • Dyspareunia • Infertility • GI/Urinary Involvement", options: { bold: false, color: C.e_light, fontSize: 9.5, italic: true } },
], { x: 2.5, y: outY5, w: 8.3, h: 0.78, align: "center", valign: "middle" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – OVARIAN ABSCESS
// ═══════════════════════════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.background = { color: C.a_bg };
sl.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 13.3, h: 0.72,
fill: { color: C.a_dark },
line: { color: C.a_dark, width: 0 },
});
sl.addText("PATHOPHYSIOLOGY — Ovarian Abscess (Tubo-Ovarian Abscess)", {
x: 0, y: 0, w: 13.3, h: 0.72,
align: "center", valign: "middle",
fontSize: 18, bold: true, color: C.white,
});
sl.addText("Source: Berek & Novak's Gynecology Ch.15 | Rosen's Emergency Medicine", {
x: 0, y: 7.2, w: 13.3, h: 0.28,
align: "center", fontSize: 8, color: C.a_dark, italic: true,
});
// Full linear descent with two parallel pathways merging
const SW = 3.85, SH = 0.60;
const lx = 0.5, rx = 9.0;
const cy = (13.3 - SW) / 2;
const gap = 0.30;
function aY(i) { return 0.82 + i * (SH + gap); }
// STEP 1 – centred: initiating organisms
const s1w = 5.5;
const s1x = (13.3 - s1w) / 2;
addBox(sl, { x: s1x, y: aY(0), w: s1w, h: SH, fill: C.a_dark,
text: "STEP 1 — Initiating Pathogens",
subtext: "N. gonorrhoeae • C. trachomatis • Anaerobes • Vaginal flora (polymicrobial)" });
// Arrow down
sl.addShape(pres.ShapeType.line, { x: s1x + s1w/2, y: aY(0)+SH, w: 0, h: gap - 0.04,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: s1x + s1w/2 - 0.09, y: aY(0) + SH + gap - 0.16,
w: 0.18, h: 0.13, fill: { color: C.a_arrow }, line: { color: C.a_arrow, width: 0 }, rotate: 180,
});
// STEP 2 – centred: cervical breach
addBox(sl, { x: s1x, y: aY(1), w: s1w, h: SH, fill: C.a_mid,
text: "STEP 2 — Cervical Barrier Breach",
subtext: "Mucopurulent cervicitis • Menses (open os) • IUD insertion • Bacterial vaginosis" });
sl.addShape(pres.ShapeType.line, { x: s1x + s1w/2, y: aY(1)+SH, w: 0, h: gap - 0.04,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: s1x + s1w/2 - 0.09, y: aY(1) + SH + gap - 0.16,
w: 0.18, h: 0.13, fill: { color: C.a_arrow }, line: { color: C.a_arrow, width: 0 }, rotate: 180,
});
// STEP 3 – centred: Endometritis
addBox(sl, { x: s1x, y: aY(2), w: s1w, h: SH, fill: C.a_mid,
text: "STEP 3 — Acute Endometritis",
subtext: "Neutrophilic infiltration of endometrium • Mucosal disruption • Organisms ascend via tube lumen" });
// Arrow splits left/right
const splitBaseY = aY(2) + SH;
sl.addShape(pres.ShapeType.line, { x: s1x + s1w/2, y: splitBaseY, w: 0, h: 0.16,
line: { color: C.a_arrow, width: 2 } });
const splitLineY = splitBaseY + 0.16;
sl.addShape(pres.ShapeType.line, { x: lx + SW/2, y: splitLineY, w: rx + SW/2 - (lx + SW/2), h: 0,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.line, { x: lx + SW/2, y: splitLineY, w: 0, h: 0.14,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: lx + SW/2 - 0.09, y: splitLineY + 0.11,
w: 0.18, h: 0.13, fill: { color: C.a_arrow }, line: { color: C.a_arrow, width: 0 }, rotate: 180,
});
sl.addShape(pres.ShapeType.line, { x: rx + SW/2, y: splitLineY, w: 0, h: 0.14,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: rx + SW/2 - 0.09, y: splitLineY + 0.11,
w: 0.18, h: 0.13, fill: { color: C.a_arrow }, line: { color: C.a_arrow, width: 0 }, rotate: 180,
});
// Branch row (step 4)
const brY4 = splitLineY + 0.27;
addBox(sl, { x: lx, y: brY4, w: SW, h: SH, fill: C.a_mid,
text: "STEP 4A — Acute Salpingitis",
subtext: "Tubal plicae edematous & purulent\nCiliary destruction • Lumen fills with pus (pyosalpinx)", fontSize: 10 });
addBox(sl, { x: rx, y: brY4, w: SW, h: SH, fill: C.a_light, textColor: C.a_dark,
text: "STEP 4B — Peritoneal Spillage",
subtext: "Purulent exudate from fimbriated end\nCoats ovarian surface", fontSize: 10, bold: false });
// Arrows down from both
sl.addShape(pres.ShapeType.line, { x: lx + SW/2, y: brY4 + SH, w: 0, h: gap - 0.04,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: lx + SW/2 - 0.09, y: brY4 + SH + gap - 0.16,
w: 0.18, h: 0.13, fill: { color: C.a_arrow }, line: { color: C.a_arrow, width: 0 }, rotate: 180,
});
sl.addShape(pres.ShapeType.line, { x: rx + SW/2, y: brY4 + SH, w: 0, h: gap - 0.04,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: rx + SW/2 - 0.09, y: brY4 + SH + gap - 0.16,
w: 0.18, h: 0.13, fill: { color: C.a_arrow }, line: { color: C.a_arrow, width: 0 }, rotate: 180,
});
// Row 5
const row5Y = brY4 + SH + gap;
addBox(sl, { x: lx, y: row5Y, w: SW, h: SH, fill: C.a_light, textColor: C.a_dark,
text: "STEP 5A — Oophoritis via Tubal Exudate",
subtext: "Organisms invade ovary at ovulatory defect\nSuppurative necrosis begins", fontSize: 10, bold: false });
addBox(sl, { x: rx, y: row5Y, w: SW, h: SH, fill: C.a_mid,
text: "STEP 5B — Direct Ovulatory Site Entry",
subtext: "Corpus luteum / fresh follicle site = direct portal\nIsolated ovarian abscess (no salpingitis)", fontSize: 10 });
// Converge row 5 → outcome
const conv5Y = row5Y + SH + 0.05;
sl.addShape(pres.ShapeType.line, { x: lx + SW/2, y: conv5Y, w: 0, h: 0.15,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.line, { x: rx + SW/2, y: conv5Y, w: 0, h: 0.15,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.line, {
x: lx + SW/2, y: conv5Y + 0.15,
w: (rx + SW/2) - (lx + SW/2), h: 0,
line: { color: C.a_arrow, width: 2 },
});
const midAX = (lx + SW/2 + rx + SW/2) / 2;
sl.addShape(pres.ShapeType.line, { x: midAX, y: conv5Y + 0.15, w: 0, h: 0.15,
line: { color: C.a_arrow, width: 2 } });
sl.addShape(pres.ShapeType.triangle, {
x: midAX - 0.09, y: conv5Y + 0.27,
w: 0.18, h: 0.13, fill: { color: C.a_arrow }, line: { color: C.a_arrow, width: 0 }, rotate: 180,
});
const outYA = conv5Y + 0.42;
sl.addShape(pres.ShapeType.roundRect, {
x: 2.3, y: outYA, w: 8.7, h: 0.78,
fill: { color: C.a_dark },
line: { color: C.a_dark, width: 0 },
rectRadius: 0.1,
shadow: { type: "outer", color: "000000", blur: 8, offset: 4, angle: 135, opacity: 0.25 },
});
sl.addText([
{ text: "⚡ OUTCOME: ", options: { bold: true, color: C.a_light, fontSize: 13 } },
{ text: "OVARIAN ABSCESS / TUBO-OVARIAN ABSCESS (TOA)", options: { bold: true, color: C.white, fontSize: 12 } },
{ text: "\nPolymicrobial pus-filled cavity • Pelvic complex • Systemic Sepsis Risk • Tubal Infertility", options: { bold: false, color: C.a_light, fontSize: 9.5, italic: true } },
], { x: 2.3, y: outYA, w: 8.7, h: 0.78, align: "center", valign: "middle" });
}
// ── WRITE FILE ──────────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/gyne-case-ppt/Pathophysiology_Flowcharts.pptx";
pres.writeFile({ fileName: outPath })
.then(() => console.log("DONE:", outPath))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/gyne-case-ppt && node pathophysiology_flowcharts.js 2>&1
Pathophysiology Flowcharts
Presentation · PPTX
| Slide | Condition | Color Theme |
|---|---|---|
| Slide 1 | AUB Secondary to Endometrial Polyp | Rose/Mauve |
| Slide 2 | Pelvic Endometriosis Stage IV | Deep Teal/Blue |
| Slide 3 | Ovarian Abscess / TOA | Burnt Orange/Amber |
The flowchart pptx isn't downloading😭🥺
ls -lh /home/daytona/workspace/gyne-case-ppt/Pathophysiology_Flowcharts.pptx 2>&1
cd /home/daytona/workspace/gyne-case-ppt && python3 -c "import zipfile; z=zipfile.ZipFile('Pathophysiology_Flowcharts.pptx'); print('Valid PPTX. Files inside:', len(z.namelist()))" 2>&1
cp /home/daytona/workspace/gyne-case-ppt/Pathophysiology_Flowcharts.pptx /home/daytona/workspace/Pathophysiology_Flowcharts.pptx && echo "Copied OK" && ls -lh /home/daytona/workspace/Pathophysiology_Flowcharts.pptx
cd /home/daytona/workspace && libreoffice --headless --convert-to pdf Pathophysiology_Flowcharts.pptx --outdir /home/daytona/workspace/ 2>&1
mkdir -p /home/daytona/workspace/pdf_out && libreoffice --headless --convert-to pdf /home/daytona/workspace/Pathophysiology_Flowcharts.pptx --outdir /home/daytona/workspace/pdf_out/ 2>&1 && ls -lh /home/daytona/workspace/pdf_out/
chmod 777 /home/daytona/workspace/pdf_out && chmod 777 /home/daytona/workspace/gyne-case-ppt && libreoffice --headless --convert-to pdf /home/daytona/workspace/gyne-case-ppt/Pathophysiology_Flowcharts.pptx --outdir /home/daytona/workspace/gyne-case-ppt/ 2>&1 && ls -lh /home/daytona/workspace/gyne-case-ppt/
ls -la /home/daytona/workspace/gyne-case-ppt/ && libreoffice --headless --convert-to pdf /home/daytona/workspace/gyne-case-ppt/Pathophysiology_Flowcharts.pptx --outdir /home/daytona/workspace/gyne-case-ppt/ 2>&1
cd /home/daytona/workspace/gyne-case-ppt && node pathophysiology_flowcharts.js 2>&1 && ls -lh Pathophysiology_Flowcharts.pptx
Pathophysiology Flowcharts
Presentation · PPTX
Pathophysiology Flowcharts
Presentation · PPTX