Create presentation on following topics - abortion, MTP, ectopic pregnancy
mkdir -p /home/daytona/workspace/abortion-mtp-ectopic && ls /home/daytona/workspace/abortion-mtp-ectopic/
~/abortion-mtp-ectopic/build.js
const pptxgen = require("pptxgenjs");
const prs = new pptxgen();
prs.layout = "LAYOUT_16x9";
prs.title = "Abortion, MTP & Ectopic Pregnancy";
prs.author = "Clinical Residency Education";
// ─── COLOUR PALETTE ──────────────────────────────────────────────
const C = {
navy: "1A2E52", // dominant background
teal: "1F6B75", // section headers
cyan: "3EC9C4", // accent / highlights
white: "FFFFFF",
offwhite:"EEF4F7",
slate: "2C4A6E", // body bg cards
amber: "F5A623", // callout / warning
crimson: "C0392B", // danger / emergency
ltGray: "B0C4D8",
darkText:"1A2E52",
};
// ─── HELPER: section divider ─────────────────────────────────────
function sectionSlide(prs, num, title, subtitle) {
const s = prs.addSlide();
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.teal } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 4.5, w: 10, h: 1.125, fill: { color: C.navy } });
s.addText(`SECTION ${num}`, {
x: 0.5, y: 1.1, w: 9, h: 0.5,
fontSize: 14, bold: true, color: C.cyan, charSpacing: 6, align: "center",
});
s.addText(title, {
x: 0.5, y: 1.7, w: 9, h: 1.2,
fontSize: 38, bold: true, color: C.white, align: "center",
});
if (subtitle) {
s.addText(subtitle, {
x: 1, y: 3.1, w: 8, h: 0.7,
fontSize: 18, color: C.offwhite, align: "center", italic: true,
});
}
}
// ─── HELPER: content slide ────────────────────────────────────────
function contentSlide(prs, title, bullets, opts = {}) {
const s = prs.addSlide();
// header band
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.navy } });
// accent bar
s.addShape(prs.ShapeType.rect, { x: 0, y: 0.85, w: 10, h: 0.06, fill: { color: C.cyan } });
// body bg
s.addShape(prs.ShapeType.rect, { x: 0, y: 0.91, w: 10, h: 4.715, fill: { color: C.offwhite } });
s.addText(title, {
x: 0.3, y: 0.08, w: 9.4, h: 0.7, margin: 0,
fontSize: 22, bold: true, color: C.white,
});
const items = bullets.map((b, i) => {
const isSubBullet = typeof b === "object" && b.sub;
const text = typeof b === "object" ? b.text : b;
return {
text,
options: {
bullet: isSubBullet ? { indent: 30 } : true,
breakLine: i < bullets.length - 1,
fontSize: isSubBullet ? 14 : (opts.fontSize || 17),
color: isSubBullet ? "3A4A5A" : C.darkText,
bold: typeof b === "object" && b.bold ? true : false,
indentLevel: isSubBullet ? 1 : 0,
},
};
});
s.addText(items, {
x: 0.35, y: 1.05, w: 9.3, h: 4.3,
valign: "top", lineSpacingMultiple: 1.3,
});
return s;
}
// ─── HELPER: two-column slide ────────────────────────────────────
function twoColSlide(prs, title, leftTitle, leftBullets, rightTitle, rightBullets, leftColor = C.slate, rightColor = C.teal) {
const s = prs.addSlide();
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.navy } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 0.85, w: 10, h: 0.06, fill: { color: C.cyan } });
s.addText(title, {
x: 0.3, y: 0.08, w: 9.4, h: 0.7, margin: 0,
fontSize: 22, bold: true, color: C.white,
});
// left column
s.addShape(prs.ShapeType.roundRect, { x: 0.2, y: 0.98, w: 4.6, h: 0.44, fill: { color: leftColor }, rectRadius: 0.05 });
s.addText(leftTitle, { x: 0.2, y: 0.98, w: 4.6, h: 0.44, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle" });
const leftItems = leftBullets.map((b, i) => ({
text: b,
options: { bullet: true, breakLine: i < leftBullets.length - 1, fontSize: 14, color: C.darkText },
}));
s.addText(leftItems, { x: 0.25, y: 1.48, w: 4.5, h: 3.9, valign: "top", lineSpacingMultiple: 1.3 });
// right column
s.addShape(prs.ShapeType.roundRect, { x: 5.2, y: 0.98, w: 4.6, h: 0.44, fill: { color: rightColor }, rectRadius: 0.05 });
s.addText(rightTitle, { x: 5.2, y: 0.98, w: 4.6, h: 0.44, fontSize: 14, bold: true, color: C.white, align: "center", valign: "middle" });
const rightItems = rightBullets.map((b, i) => ({
text: b,
options: { bullet: true, breakLine: i < rightBullets.length - 1, fontSize: 14, color: C.darkText },
}));
s.addText(rightItems, { x: 5.25, y: 1.48, w: 4.5, h: 3.9, valign: "top", lineSpacingMultiple: 1.3 });
}
// ─── HELPER: table slide ─────────────────────────────────────────
function tableSlide(prs, title, headers, rows, colW) {
const s = prs.addSlide();
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.navy } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 0.85, w: 10, h: 0.06, fill: { color: C.cyan } });
s.addText(title, {
x: 0.3, y: 0.08, w: 9.4, h: 0.7, margin: 0,
fontSize: 22, bold: true, color: C.white,
});
const tableRows = [
headers.map(h => ({ text: h, options: { bold: true, color: C.white, fill: C.teal, fontSize: 13, align: "center" } })),
...rows.map((row, ri) =>
row.map(cell => ({ text: cell, options: { fontSize: 12, color: C.darkText, fill: ri % 2 === 0 ? "FFFFFF" : "E8F4F7", align: "center" } }))
),
];
s.addTable(tableRows, {
x: 0.2, y: 1.0, w: 9.6,
colW: colW || Array(headers.length).fill(9.6 / headers.length),
border: { pt: 0.5, color: C.ltGray },
autoPage: false,
});
return s;
}
// ─── SLIDE 1 — TITLE ─────────────────────────────────────────────
{
const s = prs.addSlide();
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
// decorative circles
s.addShape(prs.ShapeType.ellipse, { x: 7.5, y: -0.5, w: 4, h: 4, fill: { color: C.teal }, line: { color: C.teal } });
s.addShape(prs.ShapeType.ellipse, { x: -1, y: 3.2, w: 3, h: 3, fill: { color: C.slate }, line: { color: C.slate } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 4.7, w: 10, h: 0.06, fill: { color: C.cyan } });
s.addText("OBSTETRICS & GYNAECOLOGY", {
x: 0.5, y: 0.8, w: 9, h: 0.5,
fontSize: 12, bold: true, color: C.cyan, charSpacing: 5, align: "center",
});
s.addText([
{ text: "Abortion", options: { breakLine: true } },
{ text: "MTP", options: { breakLine: true } },
{ text: "& Ectopic Pregnancy", options: {} },
], {
x: 0.5, y: 1.4, w: 9, h: 2.1,
fontSize: 40, bold: true, color: C.white, align: "center",
});
s.addShape(prs.ShapeType.rect, { x: 3.5, y: 3.6, w: 3, h: 0.06, fill: { color: C.amber } });
s.addText("Clinical Management for Residents & Clinicians", {
x: 0.5, y: 3.8, w: 9, h: 0.5,
fontSize: 16, color: C.offwhite, align: "center", italic: true,
});
s.addText("Sources: Berek & Novak's Gynecology • Park's Preventive Medicine • Tintinalli's Emergency Medicine", {
x: 0.5, y: 5.1, w: 9, h: 0.4,
fontSize: 9, color: C.ltGray, align: "center",
});
}
// ─── SLIDE 2 — OVERVIEW / AGENDA ─────────────────────────────────
{
const s = prs.addSlide();
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offwhite } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.navy } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 0.85, w: 10, h: 0.06, fill: { color: C.cyan } });
s.addText("Agenda", {
x: 0.3, y: 0.08, w: 9.4, h: 0.7, margin: 0,
fontSize: 22, bold: true, color: C.white,
});
const sections = [
{ num: "01", title: "Abortion", sub: "Definition · Classification · Types · Risk Factors · Management", col: C.slate },
{ num: "02", title: "MTP (Medical Termination of Pregnancy)", sub: "MTP Act 1971 (amended 2021) · Indications · Methods · Complications", col: C.teal },
{ num: "03", title: "Ectopic Pregnancy", sub: "Epidemiology · Sites · Diagnosis · Medical & Surgical Management", col: C.crimson },
];
sections.forEach((sec, i) => {
const y = 1.1 + i * 1.4;
s.addShape(prs.ShapeType.roundRect, { x: 0.3, y, w: 9.4, h: 1.2, fill: { color: sec.col }, rectRadius: 0.1 });
s.addText(sec.num, { x: 0.5, y: y + 0.15, w: 1, h: 0.9, fontSize: 32, bold: true, color: C.cyan, align: "center" });
s.addText(sec.title, { x: 1.6, y: y + 0.1, w: 8, h: 0.5, fontSize: 18, bold: true, color: C.white });
s.addText(sec.sub, { x: 1.6, y: y + 0.6, w: 8, h: 0.5, fontSize: 12, color: C.offwhite, italic: true });
});
}
// ═══════════════════════════════════════════════════════════════
// SECTION 1 — ABORTION
// ═══════════════════════════════════════════════════════════════
sectionSlide(prs, "01", "ABORTION", "Definition, Classification, Types & Management");
// Slide 3 — Definition
contentSlide(prs, "Abortion — Definition & Epidemiology", [
"Termination of pregnancy before the fetus becomes viable (< 20 weeks or < 500 g)",
"Viability administratively fixed at 28 weeks (~1000 g) by some definitions",
"~8–20% of known pregnancies terminate in spontaneous abortion",
"~80% of pregnancy losses occur in the first trimester",
"Risk of loss with confirmed fetal cardiac activity at 10–13 weeks: ~0.96%",
{ text: "Globally: ~56 million induced abortions/year (2010–2014)", bold: true },
"25 million unsafe abortions annually — almost all in developing world",
"4.7–13.2% of maternal deaths attributable to unsafe abortion (WHO)",
]);
// Slide 4 — Classification
twoColSlide(prs, "Classification of Abortion",
"Spontaneous", [
"Occurs without deliberate interference",
"~1 in 15 pregnancies",
"\"Nature's method of birth control\"",
"Threatened, inevitable, incomplete,\ncomplete, missed, recurrent",
],
"Induced", [
"Deliberate termination",
"Legal (MTP Act provisions)",
"Illegal — hazardous, last resort",
"Medical (pharmacological)",
"Surgical (vacuum aspiration,\nD&E, D&C)",
],
C.slate, C.teal
);
// Slide 5 — Types of Spontaneous Abortion
tableSlide(prs, "Types of Spontaneous Abortion",
["Type", "Cervical Os", "Fetal Tissue", "Bleeding", "Key Feature"],
[
["Threatened", "Closed", "In situ", "Mild", "Viable pregnancy; may continue"],
["Inevitable", "Open", "In situ", "Moderate–heavy", "Cannot be saved; expulsion imminent"],
["Incomplete", "Open", "Partially expelled", "Heavy", "Retained products of conception"],
["Complete", "Closed", "Fully expelled", "Ceasing", "Uterus empty on US"],
["Missed", "Closed", "Retained", "Minimal/absent", "Non-viable fetus, no expulsion"],
["Recurrent", "Varies", "Varies", "Varies", "≥3 consecutive losses"],
["Septic", "Often open", "May be retained", "Variable", "Infection; systemic signs"],
],
[2.2, 1.4, 1.6, 1.6, 2.8]
);
// Slide 6 — Missed Abortion (detail)
contentSlide(prs, "Missed Abortion — Diagnostic Criteria (TVUS)", [
{ text: "Anembryonic Gestation (blighted ovum):", bold: true },
{ text: "Mean gestational sac diameter > 25 mm with no embryonic pole", sub: true },
{ text: "Embryonic Demise:", bold: true },
{ text: "CRL > 7 mm with no fetal cardiac activity", sub: true },
"Cervix remains closed; minimal cramping or bleeding",
"US guidelines are conservative — eliminate risk of false positive intervention",
{ text: "Anembryonic gestation = embryo failed to develop (≠ embryo died)", bold: true },
"Diagnosis must be combined with clinical judgment and patient preferences",
"Missed abortion can be subdivided: anembryonic gestation vs. embryonic demise",
], { fontSize: 16 });
// Slide 7 — Risk Factors
contentSlide(prs, "Risk Factors for Spontaneous Abortion", [
"Increasing maternal age (dose-dependent: >36 yrs → 10%; >40 yrs → ~30%)",
"History of prior spontaneous abortion (1 prior: 13–20% recurrence; 3 consecutive: 33–43%)",
"Closely spaced pregnancies (< 3–6 months apart)",
"Chromosomal / embryologic abnormalities — most common cause in first trimester",
"Uterine anomalies (septate uterus, submucous fibroids, adhesions)",
"Maternal systemic disease (diabetes mellitus, thrombophilias, infections)",
"Maternal smoking, moderate–high alcohol consumption, amphetamine use",
"Anembryonic gestation, placental anomalies",
"IUD in place, severe maternal trauma, extremes of maternal weight",
]);
// Slide 8 — Management of Spontaneous Abortion
twoColSlide(prs, "Management — Spontaneous Abortion",
"Expectant / Medical", [
"Threatened: bed rest, avoid coitus,\nprogesterone support if indicated",
"Missed / Incomplete:\nMisoprostol 800 mcg vaginally",
"Expectant management for\ncomplete abortion",
"Follow-up US to confirm\nuterine emptiness",
"Rh-negative women: Rh(D)\nimmunoglobulin 300 mcg IM",
],
"Surgical", [
"MVA (Manual Vacuum Aspiration)\nor EVA — preferred for incomplete",
"D&C (Dilation & Curettage) —\nfor missed / septic abortion",
"Septic abortion: IV antibiotics\nfirst, then evacuation",
"Broad-spectrum antibiotics:\nampicillin + gentamicin + metronidazole",
"ICU support if septic shock",
]
);
// ═══════════════════════════════════════════════════════════════
// SECTION 2 — MTP
// ═══════════════════════════════════════════════════════════════
sectionSlide(prs, "02", "MTP", "Medical Termination of Pregnancy — Act, Methods & Complications");
// Slide 9 — MTP Act India
contentSlide(prs, "MTP Act — Legal Framework (India)", [
"MTP Act 1971: came into force April 1, 1972",
"Prior to 1971: abortion governed by Indian Penal Code 1860 — considered a crime except to save life",
{ text: "Original Act: termination allowed up to 20 weeks", bold: true },
{ text: "MTP Amendment 2021: upper limit extended to 24 weeks for special categories", bold: true },
"Act governs: conditions, providers, and approved places for MTP",
"Goals: reduce maternal morbidity & mortality from illegal abortions",
"Also provides opportunity for contraceptive counselling post-procedure",
]);
// Slide 10 — Conditions under MTP Act
tableSlide(prs, "Conditions for MTP under the Act",
["Gestational Age", "Opinions Required", "Grounds for MTP"],
[
["Up to 12 weeks", "1 Registered Medical Practitioner", "Any of the below grounds"],
["12–20 weeks", "2 Registered Medical Practitioners", "Any of the below grounds"],
["20–24 weeks (2021 amendment)", "2 RMPs — for special categories", "Rape survivors, minors, disability, fetal abnormality, contraceptive failure"],
["Any gestation", "Approved facility + specialists", "Grave risk to life of woman / substantial fetal abnormality"],
],
[2, 2.5, 5.1]
);
// Slide 11 — Methods of MTP
twoColSlide(prs, "Methods of MTP",
"Medical (Pharmacological)", [
"≤9 weeks: Mifepristone 200 mg PO\n+ Misoprostol 800 mcg vaginally\n(after 24–48 h)",
"~95% success rate up to 9 weeks",
"Alternative: Mifepristone 600 mg +\nMisoprostol 400 mcg PO (day 3)",
"Methotrexate + Misoprostol (if\nmifepristone unavailable)",
"Misoprostol alone regimens also\nvalidated",
"F/U at 14 days to confirm complete\ntermination",
],
"Surgical", [
"Vacuum aspiration (MVA/EVA)\n— up to 12 weeks",
"D&E (Dilation & Evacuation)\n— 13–20 weeks",
"Hysterotomy (rarely, > 20 weeks)",
"Intact D&E / labour induction\nfor late terminations",
"Surgical tx recommended for\nmedical abortion failure",
"Optimal timing: 7–8 weeks\n(risk of death 7x higher if\ndelayed to 2nd trimester)",
]
);
// Slide 12 — Mifepristone mechanism
contentSlide(prs, "Mifepristone + Misoprostol — Pharmacology", [
{ text: "Mifepristone (RU-486):", bold: true },
{ text: "Selective progesterone receptor modulator (SPRM)", sub: true },
{ text: "Blocks progesterone → decidual breakdown → sensitises uterus to prostaglandins", sub: true },
{ text: "Misoprostol:", bold: true },
{ text: "Prostaglandin E1 analogue → cervical ripening + uterine contractions", sub: true },
{ text: "After administration: sustained contraction (~7 min) then cyclic contractions for 3–4 h; bleeding for 7–8 days", sub: true },
{ text: "Commercial formulation:", bold: true },
{ text: "MTP Kit — mifepristone 200 mg (1 tab) + misoprostol 200 mcg × 4 tabs (800 mcg)", sub: true },
"Efficacy: 99.6% at ≤9 weeks (mifepristone 200 mg + buccal misoprostol 800 mcg)",
], { fontSize: 16 });
// Slide 13 — Contraindications to Medical MTP
contentSlide(prs, "Contraindications to Mifepristone/Misoprostol (Medical MTP)", [
{ text: "ABSOLUTE CONTRAINDICATIONS:", bold: true },
{ text: "Confirmed/suspected ectopic pregnancy or undiagnosed adnexal mass", sub: true },
{ text: "IUD in situ", sub: true },
{ text: "Chronic adrenal failure", sub: true },
{ text: "Haemorrhagic disorder or concurrent anticoagulant therapy", sub: true },
{ text: "Known hypersensitivity to mifepristone, misoprostol, or prostaglandins", sub: true },
{ text: "Inherited porphyria", sub: true },
{ text: "No access to emergency services (blood transfusion, incomplete abortion management)", sub: true },
{ text: "RELATIVE / CLINICAL CAUTION:", bold: true },
{ text: "Severe anaemia, hepatic or renal impairment, active asthma", sub: true },
], { fontSize: 15 });
// Slide 14 — Complications of MTP
twoColSlide(prs, "Complications of MTP",
"Early Complications", [
"Haemorrhage / shock",
"Sepsis / endometritis",
"Uterine perforation (0.1–3/1000)",
"Cervical laceration",
"Incomplete abortion / retained\nproducts of conception (0.5%\nmedical; 0.29–1.96% all)",
"Anaesthetic complications",
"Thromboembolism",
],
"Late Sequelae", [
"Infertility",
"Ectopic pregnancy (subsequent)",
"Increased risk of future\nspontaneous abortion",
"Reduced birth weight",
"Asherman syndrome\n(intrauterine adhesions)",
"Psychological complications",
"Rh sensitisation (if Rh-ve not\ntreated with anti-D Ig)",
],
C.crimson, C.slate
);
// ═══════════════════════════════════════════════════════════════
// SECTION 3 — ECTOPIC PREGNANCY
// ═══════════════════════════════════════════════════════════════
sectionSlide(prs, "03", "ECTOPIC PREGNANCY", "Diagnosis, Investigation & Management");
// Slide 15 — Definition & epidemiology
contentSlide(prs, "Ectopic Pregnancy — Overview", [
"Implantation of fertilised ovum outside the uterine cavity",
"Incidence: 0.64–2.0% of all pregnancies (surveillance data imprecise)",
"Most common obstetric cause of maternal death in the FIRST TRIMESTER",
"In 300 consecutive cases: 50% received evaluation ≥2 times before correct diagnosis",
{ text: "Sites of implantation:", bold: true },
{ text: "Ampullary (55–80%) > Isthmic (12%) > Fimbrial (5%) > Interstitial (2–3%) > Ovarian (0.5%) > Abdominal (1%) > Cervical (< 1%)", sub: true },
"Heterotopic pregnancy: simultaneous intrauterine + ectopic (rate 1:30,000 spontaneous; higher with ART)",
]);
// Slide 16 — Risk factors & clinical features
twoColSlide(prs, "Risk Factors & Clinical Presentation",
"Risk Factors", [
"Previous salpingitis / PID",
"Previous ectopic pregnancy",
"IUD in place",
"Previous tubal surgery / ligation",
"Assisted reproductive technology",
"Endometriosis",
"Previous pelvic/abdominal surgery",
"Cigarette smoking",
"DES exposure in utero",
],
"Clinical Features (Classic Triad)", [
"Amenorrhoea",
"Pelvic / abdominal pain (may be\nisolated rectal or shoulder tip pain)",
"Vaginal bleeding (abnormal menses)",
"Cervical motion tenderness",
"Adnexal tenderness / mass",
"Syncope, vascular collapse (rupture)",
"Bradycardia despite significant\nintraperitoneal bleeding — NOT uncommon",
"NOTE: classic triad present in\nonly ~50% of cases",
]
);
// Slide 17 — Investigations
contentSlide(prs, "Investigations — Ectopic Pregnancy", [
{ text: "β-hCG (serum quantitative):", bold: true },
{ text: "Rises ~53% every 48 h in viable IUP; <53% rise or falling suggests ectopic/failed IUP", sub: true },
{ text: "Discriminatory zone: 1,500–2,000 mIU/mL (IUP should be visible on TVUS at this level)", sub: true },
{ text: "Transvaginal Ultrasound (TVUS) — imaging of choice:", bold: true },
{ text: "Double decidual sac sign (DDSS): differentiates true sac from pseudosac (sens. 64–95%)", sub: true },
{ text: "Adnexal ring (echogenic thick ring) — seen in < 50% of ectopics", sub: true },
{ text: "Absence of IUP + adnexal mass + free fluid → strongly suspicious", sub: true },
{ text: "Yolk sac within extrauterine sac = diagnostic of ectopic", sub: true },
"Other: CBC (anaemia, leukocytosis), blood group & crossmatch, culdocentesis (historical — non-clotting blood)",
], { fontSize: 15 });
// Slide 18 — Management overview
twoColSlide(prs, "Management of Ectopic Pregnancy",
"Medical — Methotrexate", [
"~35% of ectopic pregnancies are\ncandidates for medical Rx",
"MOA: Inhibits dihydrofolate\nreductase → arrests trophoblastic\nDNA synthesis",
"Indication: haemodynamically stable,\nunruptured, no contraindications",
"Single-dose: MTX 50 mg/m² IM\n(most common regimen)",
"β-hCG monitored days 4 & 7;\n>15% drop = success",
"Multidose: MTX alternating with\nleucovorin (higher efficacy,\nmore side effects)",
],
"Surgical", [
"Laparoscopy preferred over\nlaparotomy (shorter stay, less\nblood loss, fewer adhesions)",
"Laparotomy: haemodynamic\ninstability, no laparoscopic\naccess",
"Salpingostomy (linear incision,\nconserve tube) vs.\nSalpingectomy (tube removal)",
"Salpingostomy if: unruptured,\nfertility desired, contralateral\ntube damaged",
"Salpingectomy: lower recurrent\nectopic rate (4% vs. 10%)",
"Post-salpingostomy: weekly β-hCG\nto detect persistent ectopic",
]
);
// Slide 19 — MTX contraindications
tableSlide(prs, "Methotrexate — Criteria & Contraindications",
["Category", "Criteria / Contraindications"],
[
["Absolute Contraindications", "Intrauterine pregnancy, haemodynamic instability, ruptured ectopic, breastfeeding, immunodeficiency, moderate-severe anaemia/leukopenia/thrombocytopenia, known MTX sensitivity, active pulmonary disease, active peptic ulcer disease, clinically important hepatic or renal dysfunction"],
["Relative Contraindications", "Ectopic mass > 4 cm on TVUS, embryonic cardiac motion on TVUS, high initial β-hCG (> 5,000 mIU/mL)"],
["Pre-treatment Workup", "CBC, blood group, LFTs, electrolytes, creatinine, CXR (if pulmonary history); repeat at 1 week post-MTX"],
["Patient Counselling", "Avoid folic acid supplements, NSAIDs, alcohol, sun exposure; no intercourse until β-hCG < 5; report worsening pain immediately"],
],
[2.5, 7.1]
);
// Slide 20 — Reproductive outcomes
contentSlide(prs, "Reproductive Outcomes After Ectopic Pregnancy", [
"Tubal patency (ipsilateral) after conservative laparoscopic management: ~84%",
{ text: "Subsequent IUP rate:", bold: true },
{ text: "Laparoscopic salpingostomy: ~60% | Laparoscopic salpingectomy: ~54% (not significantly different)", sub: true },
{ text: "With tubal damage: pregnancy rate falls to ~42% vs. 79% (no damage)", sub: true },
{ text: "Recurrent ectopic rate:", bold: true },
{ text: "Salpingostomy: ~10% | Salpingectomy: ~4% (RCT data — salpingostomy OR 2.27 higher repeat ectopic)", sub: true },
"Salpingostomy slightly superior for subsequent IUP rate (RR 1.24, CI 1.08–1.42)",
"Rh-negative patients: Rh(D) immunoglobulin 300 mcg IM — required post-surgery",
"Expectant management: only for asymptomatic, declining β-hCG, very small ectopic",
], { fontSize: 15 });
// ─── SLIDE 21 — SUMMARY / KEY POINTS ─────────────────────────────
{
const s = prs.addSlide();
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.85, fill: { color: C.teal } });
s.addShape(prs.ShapeType.rect, { x: 0, y: 0.85, w: 10, h: 0.06, fill: { color: C.cyan } });
s.addText("Key Clinical Takeaways", {
x: 0.3, y: 0.08, w: 9.4, h: 0.7, margin: 0,
fontSize: 22, bold: true, color: C.white,
});
const cards = [
{ title: "Abortion", text: "80% of losses in T1 · Missed abortion: CRL >7mm, no FCA · Rh-ve: anti-D Ig always", col: C.slate },
{ title: "MTP Act", text: "India 2021: up to 24 wks for special categories · Medical: mifepristone + misoprostol 95% effective ≤9 wks", col: C.teal },
{ title: "Ectopic", text: "#1 obstetric cause of T1 maternal death · β-hCG + TVUS = gold standard · MTX for stable unruptured; surgery for rupture", col: C.crimson },
];
cards.forEach((c, i) => {
const x = 0.2 + i * 3.27;
s.addShape(prs.ShapeType.roundRect, { x, y: 1.05, w: 3.1, h: 4.35, fill: { color: c.col }, rectRadius: 0.12 });
s.addShape(prs.ShapeType.rect, { x, y: 1.05, w: 3.1, h: 0.55, fill: { color: C.cyan } });
s.addText(c.title, { x, y: 1.05, w: 3.1, h: 0.55, fontSize: 16, bold: true, color: C.navy, align: "center", valign: "middle" });
s.addText(c.text, { x: x + 0.1, y: 1.65, w: 2.9, h: 3.6, fontSize: 13, color: C.white, valign: "top", lineSpacingMultiple: 1.4 });
});
}
// ─── WRITE ────────────────────────────────────────────────────────
prs.writeFile({ fileName: "/home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pptx" })
.then(() => console.log("DONE: Abortion_MTP_Ectopic.pptx"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/abortion-mtp-ectopic && node build.js 2>&1
cd /home/daytona/workspace/abortion-mtp-ectopic && libreoffice --headless --convert-to pdf Abortion_MTP_Ectopic.pptx 2>&1
mkdir -p /home/daytona/workspace/abortion-mtp-ectopic/output && libreoffice --headless --convert-to pdf /home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pptx --outdir /home/daytona/workspace/abortion-mtp-ectopic/output/ 2>&1
ls -la /home/daytona/workspace/abortion-mtp-ectopic/ && ls -la /home/daytona/workspace/abortion-mtp-ectopic/output/ 2>/dev/null || echo "output dir empty"
cp /home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pptx /tmp/test_convert.pptx && libreoffice --headless --convert-to pdf /tmp/test_convert.pptx --outdir /tmp/ 2>&1 && ls -la /tmp/test_convert.pdf 2>&1
cp /tmp/test_convert.pdf /home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pdf && ls -lh /home/daytona/workspace/abortion-mtp-ectopic/
Abortion MTP Ectopic
Presentation · PPTX
Abortion MTP Ectopic
PDF Document · PDF