A case Presentation on heavy menstrual bleeding
"heavy menstrual bleeding" AND management
mkdir -p /home/daytona/workspace/hmb-presentation && ls /home/daytona/workspace/…
~/hmb-presentation/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Heavy Menstrual Bleeding – Case Presentation";
pres.author = "Residency Education";
// ─── COLOUR PALETTE ───
const DEEP_RED = "7B0D1E"; // dominant dark accent
const BURGUNDY = "9C2E3D"; // supporting
const CREAM = "FAF5EF"; // light bg
const OFF_WHITE = "F5EDE3";
const DARK_TEXT = "1A1A1A";
const MID_GREY = "555555";
const LIGHT_GREY = "E8DDD4";
const ACCENT_GOLD= "C8922A";
const WHITE = "FFFFFF";
const SLIDE_BG = "F9F4EE";
// ─── HELPERS ───
function addSlideBg(slide, color) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: color || SLIDE_BG }, line: { width: 0 }
});
}
function addTopBar(slide, title, subtitle) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: 1.1,
fill: { color: DEEP_RED }, line: { width: 0 }
});
slide.addText(title, {
x: 0.35, y: 0.1, w: 9, h: 0.6,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri",
margin: 0, valign: "middle"
});
if (subtitle) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 1.1, w: "100%", h: 0.05,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
slide.addText(subtitle, {
x: 0.35, y: 1.18, w: 9.3, h: 0.35,
fontSize: 11, italic: true, color: BURGUNDY, fontFace: "Calibri",
margin: 0
});
}
}
function bullet(text, level, bold) {
return {
text: text,
options: {
bullet: { indent: 15 + (level || 0) * 20 },
breakLine: true,
fontSize: level === 1 ? 13.5 : 15,
color: level === 1 ? MID_GREY : DARK_TEXT,
bold: bold || false,
fontFace: "Calibri",
indentLevel: level || 0
}
};
}
function addFooter(slide, text) {
slide.addText(text || "Heavy Menstrual Bleeding | Case Presentation", {
x: 0, y: 5.35, w: "100%", h: 0.27,
fontSize: 8.5, color: MID_GREY, align: "center",
fontFace: "Calibri", margin: 0
});
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 5.32, w: "100%", h: 0.01,
fill: { color: LIGHT_GREY }, line: { width: 0 }
});
}
function sectionBox(slide, label, x, y, w, h, colorBg) {
slide.addShape(pres.ShapeType.rect, {
x, y, w, h, r: 4,
fill: { color: colorBg || OFF_WHITE },
line: { color: ACCENT_GOLD, width: 1.5 }
});
if (label) {
slide.addText(label, {
x: x + 0.1, y: y + 0.05, w: w - 0.2, h: 0.3,
fontSize: 10, bold: true, color: BURGUNDY, fontFace: "Calibri", margin: 0
});
}
}
// ════════════════════════════════════════════
// SLIDE 1 – TITLE
// ════════════════════════════════════════════
{
const s = pres.addSlide();
// Full dark background
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: DEEP_RED }, line: { width: 0 }
});
// Gold band
s.addShape(pres.ShapeType.rect, {
x: 0, y: 2.9, w: "100%", h: 0.07,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
// Decorative circle top-right
s.addShape(pres.ShapeType.ellipse, {
x: 8.2, y: -0.8, w: 2.8, h: 2.8,
fill: { color: BURGUNDY }, line: { width: 0 }
});
s.addShape(pres.ShapeType.ellipse, {
x: 8.6, y: -0.4, w: 1.8, h: 1.8,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
s.addText("CASE PRESENTATION", {
x: 0.6, y: 0.8, w: 8, h: 0.5,
fontSize: 13, charSpacing: 5, color: ACCENT_GOLD, bold: true,
fontFace: "Calibri", margin: 0
});
s.addText("Heavy Menstrual\nBleeding", {
x: 0.6, y: 1.25, w: 8.5, h: 1.55,
fontSize: 44, bold: true, color: WHITE, fontFace: "Calibri",
margin: 0, valign: "middle"
});
s.addText("FIGO PALM-COEIN Classification | Evaluation | Evidence-Based Management", {
x: 0.6, y: 3.1, w: 9, h: 0.4,
fontSize: 12, color: CREAM, fontFace: "Calibri", margin: 0
});
s.addText("For Residents & Postgraduates | Obstetrics & Gynecology", {
x: 0.6, y: 3.6, w: 9, h: 0.35,
fontSize: 11, color: LIGHT_GREY, italic: true, fontFace: "Calibri", margin: 0
});
// Small tag
s.addShape(pres.ShapeType.rect, {
x: 0.6, y: 4.2, w: 3.5, h: 0.38, r: 3,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
s.addText("Berek & Novak / Tintinalli / Rosen / Bailey & Love", {
x: 0.65, y: 4.24, w: 3.4, h: 0.3,
fontSize: 8.5, bold: true, color: DEEP_RED, fontFace: "Calibri", margin: 0
});
}
// ════════════════════════════════════════════
// SLIDE 2 – CASE PRESENTATION
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Case Presentation", "A 34-year-old woman referred by her GP with a 14-month history of worsening menstrual bleeding");
addFooter(s);
// Two columns
sectionBox(s, "PRESENTING COMPLAINT", 0.3, 1.65, 4.55, 3.65, WHITE);
sectionBox(s, "OBSTETRIC & GYNAECOLOGY HISTORY", 5.12, 1.65, 4.55, 3.65, WHITE);
s.addText([
bullet("Mrs. S.A., 34 years old, G2P2", 0, true),
bullet("14-month history of progressively heavier periods", 0),
bullet("Cycles: regular, every 26-28 days", 0),
bullet("Duration: 8-10 days (was 5 days)", 0),
bullet("Flooding through pads/tampons hourly for first 3 days", 0),
bullet("Passing large clots (>2.5 cm) frequently", 0),
bullet("Associated symptoms:", 0, true),
bullet("Fatigue, lethargy, dyspnoea on exertion", 1),
bullet("Pelvic pressure/bloating", 1),
bullet("No intermenstrual or post-coital bleeding", 1),
bullet("No post-menopausal symptoms", 1),
], {
x: 0.38, y: 2.0, w: 4.35, h: 3.2,
fontFace: "Calibri", fontSize: 14, color: DARK_TEXT, valign: "top"
});
s.addText([
bullet("LMP: 10 days ago (just ending)", 0),
bullet("Menarche: age 13, regular cycles", 0),
bullet("Pregnancies: 2 SVDs, no complications", 0),
bullet("No prior gynaecological surgery", 0),
bullet("Contraception: barrier method", 0),
bullet("Smear: up to date – no abnormality", 0),
bullet("Relevant medical history:", 0, true),
bullet("No known coagulopathy", 1),
bullet("No thyroid disease", 1),
bullet("No diabetes or hypertension", 1),
bullet("Drug history: NSAIDs prn", 1),
bullet("Family history: sister with uterine fibroids", 1),
], {
x: 5.2, y: 2.0, w: 4.35, h: 3.2,
fontFace: "Calibri", fontSize: 14, color: DARK_TEXT, valign: "top"
});
}
// ════════════════════════════════════════════
// SLIDE 3 – DEFINITION & EPIDEMIOLOGY
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Definition & Epidemiology of HMB", "Previously termed 'menorrhagia' — now aligned with FIGO/ACOG terminology");
addFooter(s);
// Definition box
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 1.55, w: 9.4, h: 1.05, r: 4,
fill: { color: DEEP_RED }, line: { width: 0 }
});
s.addText([
{ text: "HMB is defined as ", options: { color: CREAM, fontSize: 15 } },
{ text: "excessive menstrual blood loss >80 mL/cycle or lasting >7-8 days", options: { color: ACCENT_GOLD, bold: true, fontSize: 15 } },
{ text: " that interferes with a woman's physical, emotional, social and material quality of life.", options: { color: CREAM, fontSize: 15 } }
], {
x: 0.5, y: 1.58, w: 9.1, h: 0.95,
fontFace: "Calibri", align: "center", valign: "middle", margin: 4
});
// Three stat boxes
const statsData = [
{ val: "1 in 5", desc: "women of reproductive age affected" },
{ val: "50%", desc: "of heavy bleeding is due to ovulatory dysfunction (COEIN)" },
{ val: "30-70%", desc: "incidence of uterine leiomyomas; most common structural cause" },
];
statsData.forEach((st, i) => {
const bx = 0.3 + i * 3.2;
s.addShape(pres.ShapeType.rect, {
x: bx, y: 2.78, w: 3.0, h: 1.55, r: 5,
fill: { color: OFF_WHITE }, line: { color: ACCENT_GOLD, width: 1.5 }
});
s.addText(st.val, {
x: bx, y: 2.88, w: 3.0, h: 0.65,
fontSize: 30, bold: true, color: DEEP_RED, fontFace: "Calibri",
align: "center", margin: 0
});
s.addText(st.desc, {
x: bx + 0.1, y: 3.55, w: 2.8, h: 0.7,
fontSize: 11.5, color: MID_GREY, fontFace: "Calibri",
align: "center", margin: 0
});
});
s.addText([
bullet("Normal: cycle 24-38 days; flow 4-8 days; average blood loss ~35 mL", 0),
bullet("Abnormal: blood loss >80 mL/cycle; flow >7 days; OR significant QoL impairment", 0),
bullet("Term 'dysfunctional uterine bleeding' is NO LONGER recommended (replaced by AUB/HMB)", 0),
bullet("5-20% of women with HMB have an undiagnosed bleeding disorder (primarily von Willebrand disease)", 0),
], {
x: 0.3, y: 4.38, w: 9.4, h: 0.95,
fontFace: "Calibri", fontSize: 13, color: DARK_TEXT, valign: "top"
});
}
// ════════════════════════════════════════════
// SLIDE 4 – PALM-COEIN CLASSIFICATION
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "FIGO PALM-COEIN Classification (2011)", "Structural vs. Non-structural causes of Abnormal Uterine Bleeding");
addFooter(s);
// PALM column
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: 1.55, w: 4.6, h: 0.45, r: 4,
fill: { color: DEEP_RED }, line: { width: 0 }
});
s.addText("PALM — Structural Causes", {
x: 0.3, y: 1.57, w: 4.5, h: 0.38,
fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", margin: 0
});
const palmItems = [
{ letter: "P", term: "Polyp (AUB-P)", detail: "Endometrial/cervical polyps; diagnosed on TVUS/hysteroscopy" },
{ letter: "A", term: "Adenomyosis (AUB-A)", detail: "Endometrial glands in myometrium; enlarged boggy uterus" },
{ letter: "L", term: "Leiomyoma (AUB-L)", detail: "Submucosal (SM-leiomyoma) most likely to cause HMB" },
{ letter: "M", term: "Malignancy & Hyperplasia (AUB-M)", detail: "Rule out endometrial Ca especially in risk groups" },
];
palmItems.forEach((item, i) => {
const yy = 2.1 + i * 0.75;
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: yy, w: 4.6, h: 0.68, r: 3,
fill: { color: WHITE }, line: { color: LIGHT_GREY, width: 1 }
});
s.addShape(pres.ShapeType.ellipse, {
x: 0.3, y: yy + 0.09, w: 0.45, h: 0.45,
fill: { color: DEEP_RED }, line: { width: 0 }
});
s.addText(item.letter, {
x: 0.3, y: yy + 0.09, w: 0.45, h: 0.45,
fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText(item.term, {
x: 0.85, y: yy + 0.04, w: 3.9, h: 0.26,
fontSize: 12, bold: true, color: DEEP_RED, fontFace: "Calibri", margin: 0
});
s.addText(item.detail, {
x: 0.85, y: yy + 0.31, w: 3.9, h: 0.32,
fontSize: 10.5, color: MID_GREY, fontFace: "Calibri", margin: 0
});
});
// COEIN column
s.addShape(pres.ShapeType.rect, {
x: 5.15, y: 1.55, w: 4.6, h: 0.45, r: 4,
fill: { color: BURGUNDY }, line: { width: 0 }
});
s.addText("COEIN — Non-structural Causes", {
x: 5.2, y: 1.57, w: 4.5, h: 0.38,
fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", margin: 0
});
const coeinItems = [
{ letter: "C", term: "Coagulopathy (AUB-C)", detail: "vWD in 5-20%; consider if HMB since menarche" },
{ letter: "O", term: "Ovulatory Dysfunction (AUB-O)", detail: "Most common (50%); PCOS, thyroid disease, hyperprolactinaemia" },
{ letter: "E", term: "Endometrial (AUB-E)", detail: "Primary endometrial haemostatic defects; normal ovulation" },
{ letter: "I", term: "Iatrogenic (AUB-I)", detail: "Anticoagulants, copper IUD, SSRIs, antipsychotics" },
{ letter: "N", term: "Not otherwise classified (AUB-N)", detail: "Rare/poorly understood entities (AVM, CSP)" },
];
coeinItems.forEach((item, i) => {
const yy = 2.1 + i * 0.61;
s.addShape(pres.ShapeType.rect, {
x: 5.15, y: yy, w: 4.6, h: 0.54, r: 3,
fill: { color: WHITE }, line: { color: LIGHT_GREY, width: 1 }
});
s.addShape(pres.ShapeType.ellipse, {
x: 5.2, y: yy + 0.06, w: 0.4, h: 0.4,
fill: { color: BURGUNDY }, line: { width: 0 }
});
s.addText(item.letter, {
x: 5.2, y: yy + 0.06, w: 0.4, h: 0.4,
fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
s.addText(item.term, {
x: 5.7, y: yy + 0.03, w: 3.95, h: 0.24,
fontSize: 11, bold: true, color: BURGUNDY, fontFace: "Calibri", margin: 0
});
s.addText(item.detail, {
x: 5.7, y: yy + 0.27, w: 3.95, h: 0.24,
fontSize: 10, color: MID_GREY, fontFace: "Calibri", margin: 0
});
});
}
// ════════════════════════════════════════════
// SLIDE 5 – PHYSICAL EXAMINATION
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Physical Examination Findings", "Mrs. S.A. — Findings on presentation");
addFooter(s);
const examData = [
{ sys: "General", findings: "Pallor (conjunctival, palmar) | Mild tachycardia (HR 96 bpm) | BP 108/70 mmHg | No jaundice or lymphadenopathy" },
{ sys: "Abdomen", findings: "Soft, non-tender | Palpable pelvic-abdominal mass arising from pelvis (~16 weeks size) | No ascites" },
{ sys: "Speculum", findings: "No post-coital/intermenstrual bleeding | Cervix appears normal | Smear up to date" },
{ sys: "Bimanual", findings: "Uterus enlarged (~16-wk size), irregular contour, firm, non-tender | Bilateral adnexa not separately palpable | No cervical excitation" },
{ sys: "Vital Signs", findings: "SpO₂ 98% on air | RR 16 | Temp 36.8°C | BMI 27 kg/m²" },
];
examData.forEach((row, i) => {
const yy = 1.6 + i * 0.77;
s.addShape(pres.ShapeType.rect, {
x: 0.28, y: yy, w: 9.44, h: 0.68, r: 3,
fill: { color: i % 2 === 0 ? WHITE : OFF_WHITE },
line: { color: LIGHT_GREY, width: 0.8 }
});
s.addText(row.sys, {
x: 0.35, y: yy + 0.13, w: 1.55, h: 0.42,
fontSize: 12, bold: true, color: DEEP_RED, fontFace: "Calibri",
valign: "middle", margin: 0
});
s.addShape(pres.ShapeType.rect, {
x: 1.9, y: yy + 0.18, w: 0.025, h: 0.3,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
s.addText(row.findings, {
x: 1.98, y: yy + 0.1, w: 7.5, h: 0.5,
fontSize: 12.5, color: DARK_TEXT, fontFace: "Calibri",
valign: "middle", margin: 0
});
});
s.addShape(pres.ShapeType.rect, {
x: 0.28, y: 5.45, w: 9.44, h: 0.0, // just spacing
fill: { color: "transparent" }, line: { width: 0 }
});
}
// ════════════════════════════════════════════
// SLIDE 6 – INVESTIGATIONS
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Investigations", "Systematic approach — first-line to specialist");
addFooter(s);
const cols = [
{
title: "1st Line (All Patients)",
color: DEEP_RED,
items: [
"FBC → Hb 9.2 g/dL (iron-deficiency anaemia)",
"Urine pregnancy test → Negative",
"Cervical smear (if due)",
"TSH → Normal (3.1 mIU/L)",
"Prolactin → Normal",
"Coagulation screen (PT/APTT)",
"Ferritin → 6 µg/L (low)",
"Blood group & save",
]
},
{
title: "2nd Line (Based on History)",
color: BURGUNDY,
items: [
"TVUS → Multiple intramural & submucosal fibroids; largest 6 cm",
"Endometrial thickness: 8 mm (secretory phase)",
"No endometrial polyp on US",
"Ovaries appear normal bilaterally",
"vWD screen (if HMB since menarche)",
"Pelvic MRI if TVUS inadequate or pre-op",
"Prolactin if anovulatory pattern",
"Androgens / DHEAS if PCOS suspected",
]
},
{
title: "Endometrial Assessment",
color: ACCENT_GOLD,
items: [
"Endometrial biopsy indicated if:",
"Age ≥ 45 yrs with AUB",
"Failed medical management",
"Risk factors: obesity, PCOS, unopposed oestrogen",
"Hysteroscopy: direct visualisation + guided biopsy",
"Pipelle biopsy: 90% sensitivity for endometrial Ca",
"Saline infusion sonography (SIS) for polyps",
"Our patient: Pipelle biopsy → benign proliferative endometrium",
]
}
];
cols.forEach((col, i) => {
const cx = 0.25 + i * 3.25;
s.addShape(pres.ShapeType.rect, {
x: cx, y: 1.55, w: 3.1, h: 0.42, r: 3,
fill: { color: col.color }, line: { width: 0 }
});
s.addText(col.title, {
x: cx + 0.05, y: 1.57, w: 3.0, h: 0.38,
fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", margin: 0
});
s.addShape(pres.ShapeType.rect, {
x: cx, y: 2.0, w: 3.1, h: 3.25, r: 3,
fill: { color: WHITE }, line: { color: LIGHT_GREY, width: 1 }
});
const textItems = col.items.map((t, j) => ({
text: t,
options: {
bullet: { indent: 10 },
breakLine: j < col.items.length - 1,
fontSize: 11.5,
color: j === 0 && col.color === ACCENT_GOLD ? BURGUNDY : DARK_TEXT,
bold: j === 0 && col.color === ACCENT_GOLD,
fontFace: "Calibri"
}
}));
s.addText(textItems, {
x: cx + 0.1, y: 2.06, w: 2.88, h: 3.1,
fontFace: "Calibri", valign: "top"
});
});
}
// ════════════════════════════════════════════
// SLIDE 7 – DIAGNOSIS
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Working Diagnosis", "Integrating history, examination & investigations");
addFooter(s);
// Big diagnosis banner
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.5, w: 9.2, h: 1.2, r: 5,
fill: { color: DEEP_RED }, line: { width: 0 }
});
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.5, w: 9.2, h: 0.06, r: 5,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
s.addText("DIAGNOSIS: Heavy Menstrual Bleeding (AUB-L)", {
x: 0.5, y: 1.58, w: 9, h: 0.5,
fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", margin: 0
});
s.addText("Uterine Leiomyomata (Fibroids) — FIGO Classification: AUB-L (SM-leiomyoma + intramural) | Secondary Iron-Deficiency Anaemia", {
x: 0.5, y: 2.1, w: 9, h: 0.5,
fontSize: 12, color: CREAM, fontFace: "Calibri",
align: "center", margin: 0
});
// Supporting evidence + differentials
sectionBox(s, "SUPPORTING EVIDENCE", 0.3, 2.85, 5.5, 2.55, WHITE);
sectionBox(s, "DIFFERENTIAL DIAGNOSIS", 6.05, 2.85, 3.7, 2.55, WHITE);
s.addText([
bullet("Regular cycles with progressive HMB — structural cause likely", 0),
bullet("Palpable irregular uterine mass (~16 wk size)", 0),
bullet("TVUS confirms multiple fibroids; largest 6 cm submucosal", 0),
bullet("Hb 9.2 g/dL with ferritin 6 µg/L → iron-deficiency anaemia", 0),
bullet("Benign proliferative endometrium on Pipelle biopsy", 0),
bullet("Family history: sister with fibroids", 0),
bullet("No post-coital/intermenstrual bleeding → low cancer risk", 0),
], {
x: 0.38, y: 3.2, w: 5.3, h: 2.12,
fontFace: "Calibri", fontSize: 13, color: DARK_TEXT, valign: "top"
});
s.addText([
bullet("Adenomyosis (AUB-A)", 0),
bullet("Endometrial polyp (AUB-P)", 0),
bullet("Coagulopathy / vWD (AUB-C)", 0),
bullet("Ovulatory dysfunction (AUB-O)", 0),
bullet("Endometrial hyperplasia/Ca (AUB-M)", 0),
bullet("Thyroid dysfunction", 0),
], {
x: 6.12, y: 3.2, w: 3.5, h: 2.12,
fontFace: "Calibri", fontSize: 13, color: DARK_TEXT, valign: "top"
});
}
// ════════════════════════════════════════════
// SLIDE 8 – MANAGEMENT OVERVIEW
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Management: Stepwise Approach", "Medical → Minimally Invasive → Surgical");
addFooter(s);
const steps = [
{
no: "1",
title: "Acute Stabilisation",
color: DEEP_RED,
items: ["Correct anaemia: IV iron infusion (Ferric carboxymaltose) or oral iron", "Consider transfusion if Hb <7 or haemodynamic instability", "Tranexamic acid 1–1.3 g q6-8h for 5 days (antifibrinolytic)", "High-dose conjugated oestrogen 25 mg IV q4-6h for severe acute haemorrhage", "Hormonal haemostasis: combined OCP or progestin-only pill"]
},
{
no: "2",
title: "Medical (Long-Term)",
color: BURGUNDY,
items: ["Levonorgestrel IUS (Mirena®): first-line — 71–95% reduction in MBL; ~50% amenorrhoea", "Tranexamic acid 1.3 g TDS × 3–5 days per cycle (non-hormonal)", "NSAIDs: mefenamic acid 500 mg TDS or ibuprofen 400 mg q6h — 20–52% reduction", "Combined OCP: 35–69% reduction in MBL; also treats dysmenorrhoea", "GnRH agonists (e.g. leuprolide): induces hypo-oestrogenic state; pre-op shrinkage; limited to 3–6 months (bone loss)"]
},
{
no: "3",
title: "Surgical / Interventional",
color: ACCENT_GOLD,
items: ["Hysteroscopic polypectomy / transcervical resection of fibroid (TCRF)", "Myomectomy (laparoscopic or open): fertility-preserving", "Uterine artery embolisation (UAE): if single large fibroid; post-embolisation syndrome risk", "Endometrial ablation: >90% reduction in MBL; not for fertility wishes", "Hysterectomy: definitive cure; preferred if family complete"]
}
];
steps.forEach((step, i) => {
const yy = 1.55 + i * 1.28;
// Number badge
s.addShape(pres.ShapeType.ellipse, {
x: 0.25, y: yy + 0.05, w: 0.55, h: 0.55,
fill: { color: step.color }, line: { width: 0 }
});
s.addText(step.no, {
x: 0.25, y: yy + 0.05, w: 0.55, h: 0.55,
fontSize: 16, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
// Title
s.addText(step.title, {
x: 0.9, y: yy + 0.08, w: 2.5, h: 0.42,
fontSize: 14, bold: true, color: step.color, fontFace: "Calibri",
valign: "middle", margin: 0
});
// Content box
s.addShape(pres.ShapeType.rect, {
x: 3.5, y: yy, w: 6.3, h: 1.15, r: 3,
fill: { color: WHITE }, line: { color: LIGHT_GREY, width: 0.8 }
});
s.addText(step.items.join(" • "), {
x: 3.6, y: yy + 0.07, w: 6.1, h: 1.02,
fontSize: 10.5, color: DARK_TEXT, fontFace: "Calibri",
valign: "middle", margin: 2, wrap: true
});
});
}
// ════════════════════════════════════════════
// SLIDE 9 – MANAGEMENT: OUR PATIENT
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Management Plan for Mrs. S.A.", "Tailored to her diagnosis: AUB-L + Iron-Deficiency Anaemia");
addFooter(s);
// Patient context
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 1.55, w: 9.4, h: 0.5, r: 3,
fill: { color: OFF_WHITE }, line: { color: ACCENT_GOLD, width: 1.5 }
});
s.addText("Patient: 34-year-old, family not yet complete, Hb 9.2 g/dL, uterus 16-wk size with multiple SM-fibroids → GOAL: symptom control, uterine preservation, correct anaemia", {
x: 0.4, y: 1.58, w: 9.2, h: 0.44,
fontSize: 11.5, italic: true, color: BURGUNDY, fontFace: "Calibri",
valign: "middle", margin: 0
});
const planCols = [
{
title: "Immediate",
color: DEEP_RED,
items: [
"IV Ferric carboxymaltose 1 g (correct IDA)",
"Oral iron + vitamin C while awaiting LNG-IUS",
"Tranexamic acid 1.3 g TDS × 5 days at next cycle",
"Ibuprofen 400 mg q6h for dysmenorrhoea",
"Refer haematology if coagulopathy screen positive",
]
},
{
title: "Short-Term (1-3 months)",
color: BURGUNDY,
items: [
"Insert Levonorgestrel IUS (Mirena 52 mg) — FDA-approved for HMB",
"71-95% reduction in MBL expected",
"~50% amenorrhoea at 12 months",
"GnRH agonist (Goserelin 3.6 mg/4 wk) for pre-op fibroid shrinkage if surgery planned",
"Repeat FBC at 8 weeks",
]
},
{
title: "Long-Term / If Medical Fails",
color: ACCENT_GOLD,
items: [
"Hysteroscopic resection of submucosal fibroid (TCRF) — fertility-preserving",
"Laparoscopic myomectomy for intramural fibroids",
"UAE: discuss risks (post-embolisation syndrome, ovarian reserve)",
"If family complete in future: hysterectomy is definitive",
"Annual surveillance ultrasound for fibroid growth",
]
}
];
planCols.forEach((col, i) => {
const cx = 0.28 + i * 3.25;
s.addShape(pres.ShapeType.rect, {
x: cx, y: 2.18, w: 3.1, h: 0.38, r: 3,
fill: { color: col.color }, line: { width: 0 }
});
s.addText(col.title, {
x: cx + 0.05, y: 2.2, w: 3.0, h: 0.33,
fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri",
align: "center", margin: 0
});
s.addShape(pres.ShapeType.rect, {
x: cx, y: 2.59, w: 3.1, h: 2.7, r: 3,
fill: { color: WHITE }, line: { color: LIGHT_GREY, width: 1 }
});
const textItems = col.items.map((t, j) => ({
text: t,
options: {
bullet: { indent: 10 },
breakLine: j < col.items.length - 1,
fontSize: 11,
color: DARK_TEXT,
fontFace: "Calibri"
}
}));
s.addText(textItems, {
x: cx + 0.1, y: 2.65, w: 2.88, h: 2.56,
fontFace: "Calibri", valign: "top"
});
});
}
// ════════════════════════════════════════════
// SLIDE 10 – PHARMACOLOGY SUMMARY
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Pharmacological Options — Summary", "Evidence-based drug therapy for HMB");
addFooter(s);
const drugs = [
{ drug: "LNG-IUS (Mirena®)", class: "Progestogen IUD", dose: "52 mg, releases 20 µg/24h", reduction: "71–95%", notes: "1st line if contraception needed; FDA approved for HMB" },
{ drug: "Tranexamic Acid", class: "Antifibrinolytic", dose: "1–1.3 g PO q6-8h × 5 days", reduction: "40–60%", notes: "Non-hormonal; no thromboembolic risk with PO route" },
{ drug: "NSAIDs (mefenamic acid)", class: "COX inhibitor", dose: "500 mg TDS from day 1", reduction: "10–52%", notes: "Reduces pain + bleeding; less useful in fibroids" },
{ drug: "Combined OCP", class: "Oestrogen + Progestogen", dose: "Daily cyclic/continuous", reduction: "35–69%", notes: "Reduces MBL + dysmenorrhoea; off-label for HMB" },
{ drug: "Medroxyprogesterone", class: "Progestogen", dose: "20 mg TDS × 10 days (acute)", reduction: "Moderate", notes: "Alternative if oestrogen contraindicated; oral or IM" },
{ drug: "GnRH agonist (Goserelin)", class: "GnRH analogue", dose: "3.6 mg SC q4wk", reduction: ">90% (amenorrhoea)", notes: "Pre-op use ≤6 months; add-back HRT if prolonged" },
];
// Headers
const headers = ["Drug", "Class", "Dose", "MBL Reduction", "Notes"];
const widths = [1.7, 1.6, 1.9, 1.3, 3.1];
const xStarts = [0.25, 1.97, 3.59, 5.51, 6.83];
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: 1.52, w: 9.5, h: 0.38, r: 0,
fill: { color: DEEP_RED }, line: { width: 0 }
});
headers.forEach((h, i) => {
s.addText(h, {
x: xStarts[i] + 0.05, y: 1.54, w: widths[i] - 0.1, h: 0.34,
fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri",
valign: "middle", margin: 0
});
});
drugs.forEach((row, ri) => {
const yy = 1.92 + ri * 0.57;
const bg = ri % 2 === 0 ? WHITE : OFF_WHITE;
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: yy, w: 9.5, h: 0.54,
fill: { color: bg }, line: { color: LIGHT_GREY, width: 0.5 }
});
const rowVals = [row.drug, row.class, row.dose, row.reduction, row.notes];
rowVals.forEach((v, ci) => {
s.addText(v, {
x: xStarts[ci] + 0.05, y: yy + 0.04, w: widths[ci] - 0.1, h: 0.46,
fontSize: ci === 0 ? 11 : 10.5,
bold: ci === 0,
color: ci === 0 ? DEEP_RED : DARK_TEXT,
fontFace: "Calibri", valign: "middle", margin: 0, wrap: true
});
});
});
}
// ════════════════════════════════════════════
// SLIDE 11 – SURGICAL OPTIONS
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Surgical & Minimally Invasive Options", "Uterus-preserving vs. Definitive Procedures");
addFooter(s);
const procs = [
{ name: "Hysteroscopic Polypectomy / TCRF", preserve: "YES", indication: "Submucosal fibroid, polyps", benefit: "Direct removal; outpatient", risk: "Uterine perforation; hyponatraemia (fluid overload); thermal injury" },
{ name: "Laparoscopic / Open Myomectomy", preserve: "YES", indication: "Intramural / subserosal fibroids, fertility wish", benefit: "Fertility-preserving; good symptom relief", risk: "Bleeding; conversion to hysterectomy <1%; fibroid recurrence" },
{ name: "Uterine Artery Embolisation (UAE)", preserve: "YES", indication: "Large/multiple fibroids; declines surgery", benefit: "Avoids GA; effective for bulk symptoms", risk: "Post-embolisation syndrome; impaired ovarian reserve; regrowth" },
{ name: "Endometrial Ablation", preserve: "YES*", indication: "AUB-O/E, completed family, normal cavity", benefit: ">90% MBL reduction; 25-35% amenorrhoea at 2 yrs", risk: "Not for fertility; thermal injury; NOT if malignancy suspected" },
{ name: "Hysterectomy (Total)", preserve: "NO", indication: "Completed family; failed/declined other options", benefit: "Definitive cure; 100% resolution of HMB", risk: "Surgical risk; menopause if bilateral salpingo-oophorectomy added" },
];
const hdrs = ["Procedure", "Uterus Preserved?", "Indication", "Benefit", "Key Risks"];
const ws2 = [2.1, 0.9, 2.0, 1.8, 2.9];
const xs2 = [0.22, 2.35, 3.28, 5.3, 7.12];
s.addShape(pres.ShapeType.rect, {
x: 0.22, y: 1.52, w: 9.56, h: 0.35,
fill: { color: DEEP_RED }, line: { width: 0 }
});
hdrs.forEach((h, i) => {
s.addText(h, {
x: xs2[i] + 0.03, y: 1.54, w: ws2[i] - 0.06, h: 0.3,
fontSize: 10.5, bold: true, color: WHITE, fontFace: "Calibri",
valign: "middle", margin: 0
});
});
procs.forEach((row, ri) => {
const yy = 1.89 + ri * 0.7;
const bg = ri % 2 === 0 ? WHITE : OFF_WHITE;
s.addShape(pres.ShapeType.rect, {
x: 0.22, y: yy, w: 9.56, h: 0.65,
fill: { color: bg }, line: { color: LIGHT_GREY, width: 0.5 }
});
const rowVals = [row.name, row.preserve, row.indication, row.benefit, row.risk];
rowVals.forEach((v, ci) => {
s.addText(v, {
x: xs2[ci] + 0.03, y: yy + 0.04, w: ws2[ci] - 0.06, h: 0.58,
fontSize: ci === 1 ? 11 : 10,
bold: ci === 0 || ci === 1,
color: ci === 1 ? (row.preserve === "YES" ? BURGUNDY : DEEP_RED) : (ci === 0 ? DEEP_RED : DARK_TEXT),
fontFace: "Calibri", valign: "middle", margin: 0, wrap: true
});
});
});
}
// ════════════════════════════════════════════
// SLIDE 12 – KEY LEARNING POINTS
// ════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBg(s);
addTopBar(s, "Key Learning Points", "Summary for clinical practice");
addFooter(s);
const points = [
{ icon: "①", title: "Always use AUB/HMB terminology", body: "Avoid 'DUB' — use FIGO PALM-COEIN classification to guide investigation and management systematically." },
{ icon: "②", title: "Exclude malignancy first", body: "Endometrial biopsy is mandatory in women ≥45 yrs, or younger with risk factors (obesity, PCOS, unopposed oestrogen, family history)." },
{ icon: "③", title: "LNG-IUS is first-line medical therapy", body: "Levonorgestrel IUS gives 71-95% reduction in MBL. It is the most effective medical option and is FDA-approved for HMB." },
{ icon: "④", title: "Screen for coagulopathy", body: "5-20% of women with HMB have an undiagnosed bleeding disorder (vWD). Screen if HMB since menarche or family history." },
{ icon: "⑤", title: "Treat concurrent iron-deficiency anaemia", body: "IV iron (ferric carboxymaltose) corrects IDA faster than oral iron and avoids GI side effects — essential before any surgery." },
{ icon: "⑥", title: "Tailor management to fertility wishes", body: "Always discuss fertility plans. Uterus-preserving options (myomectomy, UAE, TCRF, LNG-IUS) must be offered before hysterectomy." },
];
points.forEach((pt, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const cx = 0.3 + col * 4.88;
const cy = 1.55 + row * 1.28;
s.addShape(pres.ShapeType.rect, {
x: cx, y: cy, w: 4.68, h: 1.18, r: 5,
fill: { color: WHITE }, line: { color: LIGHT_GREY, width: 1 }
});
s.addShape(pres.ShapeType.rect, {
x: cx, y: cy, w: 0.08, h: 1.18, r: 0,
fill: { color: i < 2 ? DEEP_RED : i < 4 ? BURGUNDY : ACCENT_GOLD },
line: { width: 0 }
});
s.addText(pt.icon, {
x: cx + 0.15, y: cy + 0.1, w: 0.45, h: 0.45,
fontSize: 18, bold: true, color: DEEP_RED, fontFace: "Calibri",
margin: 0, valign: "middle"
});
s.addText(pt.title, {
x: cx + 0.65, y: cy + 0.08, w: 3.9, h: 0.32,
fontSize: 12, bold: true, color: DEEP_RED, fontFace: "Calibri", margin: 0
});
s.addText(pt.body, {
x: cx + 0.65, y: cy + 0.4, w: 3.95, h: 0.7,
fontSize: 11, color: MID_GREY, fontFace: "Calibri", margin: 0, wrap: true
});
});
}
// ════════════════════════════════════════════
// SLIDE 13 – REFERENCES / CLOSER
// ════════════════════════════════════════════
{
const s = pres.addSlide();
// Dark close
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: DEEP_RED }, line: { width: 0 }
});
s.addShape(pres.ShapeType.rect, {
x: 0, y: 4.2, w: "100%", h: 0.06,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
// Decorative
s.addShape(pres.ShapeType.ellipse, {
x: -0.5, y: 3.8, w: 2.5, h: 2.5,
fill: { color: BURGUNDY }, line: { width: 0 }
});
s.addShape(pres.ShapeType.ellipse, {
x: 8.8, y: -0.8, w: 2.5, h: 2.5,
fill: { color: BURGUNDY }, line: { width: 0 }
});
s.addText("References & Further Reading", {
x: 0.6, y: 0.22, w: 8.8, h: 0.5,
fontSize: 18, bold: true, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0
});
const refs = [
"1. Munro MG et al. FIGO Classification System (PALM-COEIN) for causes of AUB in non-gravid women. Int J Gynaecol Obstet 2011;113:3–13.",
"2. Berek & Novak's Gynecology, 16th ed. Chapter 10: Abnormal Uterine Bleeding & PALM-COEIN.",
"3. Tintinalli's Emergency Medicine, 9th ed. Chapter 96: Heavy & Anovulatory Menstrual Bleeding.",
"4. Bailey & Love's Short Practice of Surgery, 28th ed. Table 87.7: Investigation and Management of HMB.",
"5. Rosen's Emergency Medicine, 9th ed. Chapter 30: Abnormal Uterine Bleeding — PALM-COEIN.",
"6. ACOG Practice Bulletin No. 128: Diagnosis of Abnormal Uterine Bleeding. Obstet Gynecol 2012.",
"7. Goodman & Gilman's Pharmacological Basis of Therapeutics, 13th ed. Tranexamic acid for HMB.",
"8. Comishen KJ et al. Etiology and diagnosis of HMB — Systematic Review & Meta-Analysis. J Thromb Haemost 2025.",
];
refs.forEach((ref, i) => {
s.addText(ref, {
x: 0.6, y: 0.82 + i * 0.42, w: 8.8, h: 0.38,
fontSize: 10.5, color: i < 4 ? CREAM : LIGHT_GREY, fontFace: "Calibri",
margin: 0, wrap: true
});
});
s.addShape(pres.ShapeType.rect, {
x: 0.6, y: 4.35, w: 5, h: 0.42, r: 3,
fill: { color: ACCENT_GOLD }, line: { width: 0 }
});
s.addText("Questions & Discussion | Heavy Menstrual Bleeding", {
x: 0.65, y: 4.38, w: 4.9, h: 0.34,
fontSize: 12, bold: true, color: DEEP_RED, fontFace: "Calibri",
align: "center", margin: 0
});
}
// ── WRITE FILE ──
pres.writeFile({ fileName: "/home/daytona/workspace/hmb-presentation/HMB_Case_Presentation.pptx" })
.then(() => console.log("SUCCESS: file written"))
.catch(e => console.error("ERROR:", e));
cd /home/daytona/workspace/hmb-presentation && node build.js 2>&1
ls -lh /home/daytona/workspace/hmb-presentation/HMB_Case_Presentation.pptx
HMB Case Presentation
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide — bold, professional dark background with case details |
| 2 | Case Presentation — Mrs. S.A., 34F, 14-month HMB history; full presenting complaint + Gyn history in two columns |
| 3 | Definition & Epidemiology — FIGO definition (>80 mL/cycle), stat boxes (1 in 5 women; 50% ovulatory dysfunction; 30-70% leiomyoma prevalence) |
| 4 | PALM-COEIN Classification — full FIGO 2011 framework, each category explained with clinical pearl |
| 5 | Physical Examination Findings — structured row-by-row: General/Abdomen/Speculum/Bimanual/Vitals |
| 6 | Investigations — 3 columns: 1st line, 2nd line, endometrial assessment; patient's results embedded |
| 7 | Working Diagnosis — AUB-L (submucosal + intramural fibroids) + iron-deficiency anaemia; supporting evidence vs. differentials |
| 8 | Management Overview — stepwise approach: Acute → Medical (long-term) → Surgical/Interventional |
| 9 | Tailored Management Plan for Mrs. S.A. — Immediate / Short-term / Long-term options |
| 10 | Pharmacology Table — LNG-IUS, Tranexamic acid, NSAIDs, Combined OCP, Medroxyprogesterone, GnRH agonists with doses and % MBL reduction |
| 11 | Surgical Options Table — TCRF, Myomectomy, UAE, Endometrial ablation, Hysterectomy; indication/benefit/risks |
| 12 | 6 Key Learning Points — PALM-COEIN, malignancy exclusion, LNG-IUS first-line, coagulopathy screen, anaemia correction, fertility-tailored approach |
| 13 | References — Berek & Novak, Tintinalli, Rosen, Bailey & Love, FIGO 2011, ACOG, Comishen 2025 meta-analysis |