Create presentation on following topics - abortion, MTP, ectopic pregnancy

Asking for Preferences
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/abortion-mtp-ectopic && ls /home/daytona/workspace/abortion-mtp-ectopic/

Writing File

~/abortion-mtp-ectopic/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Abortion, MTP & Ectopic Pregnancy";
pres.author = "Medical Education";

// ─── Color Palette ───────────────────────────────────────────
const C = {
  navy:    "0A2342",   // dominant dark
  teal:    "1A6B72",   // section accent
  tealLt:  "24919A",
  red:     "C0392B",   // danger/warning
  gold:    "D4A017",   // highlight
  white:   "FFFFFF",
  offWhite:"F4F6F9",
  gray:    "6C757D",
  ltGray:  "DEE2E6",
  slate:   "2C3E50",
};

// ─── Helpers ──────────────────────────────────────────────────
function titleSlide(title, subtitle) {
  const s = pres.addSlide();
  // Full background
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.navy } });
  // Teal accent bar
  s.addShape(pres.ShapeType.rect, { x:0, y:4.5, w:10, h:1.125, fill:{ color:C.teal } });
  // Left accent line
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.15, h:5.625, fill:{ color:C.gold } });
  s.addText(title, { x:0.4, y:1.2, w:9.2, h:1.8, fontSize:40, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" });
  if (subtitle) {
    s.addText(subtitle, { x:0.4, y:3.1, w:9.2, h:0.7, fontSize:20, color:"B0C4DE", fontFace:"Calibri", align:"left" });
  }
  s.addText("For Postgraduate Residents | Obstetrics & Gynecology", { x:0.4, y:4.6, w:9.2, h:0.4, fontSize:13, color:C.white, fontFace:"Calibri", align:"left" });
}

function sectionDivider(title, subtitle, color) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color: color || C.teal } });
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.2, h:5.625, fill:{ color:C.gold } });
  s.addShape(pres.ShapeType.rect, { x:0, y:4.8, w:10, h:0.825, fill:{ color:C.navy } });
  s.addText(title, { x:0.5, y:1.5, w:9, h:1.8, fontSize:38, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" });
  if (subtitle) {
    s.addText(subtitle, { x:0.5, y:3.4, w:9, h:0.8, fontSize:18, color:"D0EEF0", fontFace:"Calibri", align:"left" });
  }
}

function contentSlide(title, bullets, opts = {}) {
  const s = pres.addSlide();
  // Background
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.offWhite } });
  // Header bar
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.0, fill:{ color:C.navy } });
  s.addShape(pres.ShapeType.rect, { x:0, y:0.95, w:10, h:0.08, fill:{ color:C.gold } });
  s.addText(title, { x:0.3, y:0.08, w:9.4, h:0.84, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle", margin:0 });
  // Content
  const items = bullets.map((b, i) => {
    if (typeof b === "string") {
      return { text: b, options: { bullet:{ type:"bullet", characterCode:"25CF", color:C.teal }, fontSize:17, color:C.slate, fontFace:"Calibri", breakLine: i < bullets.length-1 } };
    }
    return b;
  });
  s.addText(items, { x:0.35, y:1.15, w:9.3, h:4.3, valign:"top", margin:4 });
  return s;
}

function twoColSlide(title, leftHead, leftItems, rightHead, rightItems) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.offWhite } });
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.0, fill:{ color:C.navy } });
  s.addShape(pres.ShapeType.rect, { x:0, y:0.95, w:10, h:0.08, fill:{ color:C.gold } });
  s.addText(title, { x:0.3, y:0.08, w:9.4, h:0.84, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle", margin:0 });

  // Left col header
  s.addShape(pres.ShapeType.rect, { x:0.3, y:1.1, w:4.4, h:0.45, fill:{ color:C.teal }, line:{ color:C.teal } });
  s.addText(leftHead, { x:0.3, y:1.1, w:4.4, h:0.45, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
  const li = leftItems.map((b, i) => ({ text:b, options:{ bullet:{ type:"bullet", characterCode:"25CF", color:C.teal }, fontSize:15, color:C.slate, fontFace:"Calibri", breakLine: i < leftItems.length-1 } }));
  s.addText(li, { x:0.3, y:1.62, w:4.4, h:3.8, valign:"top", margin:4 });

  // Right col header
  s.addShape(pres.ShapeType.rect, { x:5.2, y:1.1, w:4.4, h:0.45, fill:{ color:C.red }, line:{ color:C.red } });
  s.addText(rightHead, { x:5.2, y:1.1, w:4.4, h:0.45, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
  const ri = rightItems.map((b, i) => ({ text:b, options:{ bullet:{ type:"bullet", characterCode:"25CF", color:C.red }, fontSize:15, color:C.slate, fontFace:"Calibri", breakLine: i < rightItems.length-1 } }));
  s.addText(ri, { x:5.2, y:1.62, w:4.4, h:3.8, valign:"top", margin:4 });

  // Divider
  s.addShape(pres.ShapeType.rect, { x:4.85, y:1.05, w:0.05, h:4.4, fill:{ color:C.ltGray } });
  return s;
}

function tableSlide(title, headers, rows, colWidths) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.offWhite } });
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.0, fill:{ color:C.navy } });
  s.addShape(pres.ShapeType.rect, { x:0, y:0.95, w:10, h:0.08, fill:{ color:C.gold } });
  s.addText(title, { x:0.3, y:0.08, w:9.4, h:0.84, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle", margin:0 });

  const tableData = [
    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.slate, fill: ri%2===0 ? C.white : "EBF5FB", align:"left" } })))
  ];
  s.addTable(tableData, { x:0.25, y:1.12, w:9.5, colW: colWidths, border:{ color:C.ltGray, pt:0.5 }, margin:3 });
  return s;
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 1: TITLE
// ═══════════════════════════════════════════════════════════════
titleSlide(
  "Abortion, MTP &\nEctopic Pregnancy",
  "Classification | Management | Legal Framework | Clinical Approach"
);

// ═══════════════════════════════════════════════════════════════
// SLIDE 2: OUTLINE
// ═══════════════════════════════════════════════════════════════
contentSlide("Presentation Outline", [
  { text: "PART 1: Abortion", options:{ bold:true, fontSize:18, color:C.teal, breakLine:true } },
  { text: "  Definition, classification, types, clinical features & management", options:{ fontSize:16, color:C.slate, breakLine:true } },
  { text: "PART 2: Medical Termination of Pregnancy (MTP)", options:{ bold:true, fontSize:18, color:C.teal, breakLine:true } },
  { text: "  MTP Act 1971, 2021 Amendment, indications, techniques, consent", options:{ fontSize:16, color:C.slate, breakLine:true } },
  { text: "PART 3: Ectopic Pregnancy", options:{ bold:true, fontSize:18, color:C.teal, breakLine:true } },
  { text: "  Epidemiology, risk factors, diagnosis, management — expectant / medical / surgical", options:{ fontSize:16, color:C.slate, breakLine:true } },
]);

// ═══════════════════════════════════════════════════════════════
// SECTION 1: ABORTION
// ═══════════════════════════════════════════════════════════════
sectionDivider("PART 1", "Abortion", C.navy);

// Slide 3: Definition & Classification
contentSlide("Abortion — Definition & Classification", [
  { text: "DEFINITION", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } },
  { text: "Expulsion or extraction of a fetus/embryo weighing <500 g (or <20–22 weeks gestation) from the uterus, irrespective of whether it is alive or dead.", options:{ fontSize:16, color:C.slate, breakLine:true } },
  { text: "", options:{ breakLine:true } },
  { text: "MAJOR CLASSIFICATION", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } },
  { text: "Spontaneous Abortion — Occurs naturally without medical/surgical intervention", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Induced Abortion — Deliberately terminated; subdivided into:", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "    • Therapeutic (legal) — medical indication, legal regulation (MTP Act)", options:{ fontSize:14, color:C.slate, breakLine:true } },
  { text: "    • Criminal — outside legal framework, by unqualified persons", options:{ fontSize:14, color:C.slate, breakLine:true } },
  { text: "Missed Abortion — Fetal death without expulsion; 'blighted ovum' if no embryo forms", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Unsafe Abortion — Performed by unskilled persons or in unsafe environments", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
]);

// Slide 4: Types of Spontaneous Abortion (Table)
tableSlide(
  "Types of Spontaneous Abortion",
  ["Type", "os", "Bleeding", "Products Expelled", "Management"],
  [
    ["Threatened", "Closed", "Present", "None", "Bed rest, progesterone support, monitoring"],
    ["Inevitable", "Open", "Heavy", "None yet", "Hospitalize; surgical evacuation if needed"],
    ["Incomplete", "Open", "Heavy", "Partial", "Immediate uterine evacuation (MVA/D&C)"],
    ["Complete", "Closed", "Decreasing", "All expelled", "Confirm by USG; expectant if stable"],
    ["Missed", "Closed", "Absent/minimal", "Retained", "Medical (mifepristone + misoprostol) or surgical"],
    ["Septic", "May be open", "Variable + purulent", "Variable", "IV antibiotics + urgent evacuation"],
    ["Recurrent", "Variable", "Variable", "Variable", "≥3 consecutive losses; investigate for cause"],
  ],
  [2.2, 1.3, 1.3, 1.7, 2.7]
);

// Slide 5: Spontaneous Abortion — Risk Factors & Etiology
twoColSlide(
  "Spontaneous Abortion — Etiology",
  "Fetal / Embryonic Causes",
  [
    "Chromosomal abnormalities (50–60% of 1st trimester losses)",
    "Trisomies: most common (trisomy 16 most frequent)",
    "Monosomy X (Turner syndrome)",
    "Polyploidy (triploidy, tetraploidy)",
    "Structural chromosomal defects",
    "Single gene defects — rare",
  ],
  "Maternal / Uterine Causes",
  [
    "Uterine anomalies — septate uterus (most common correctable cause)",
    "Cervical incompetence — painless 2nd trimester loss",
    "Antiphospholipid syndrome (APS) — key cause of recurrent loss",
    "Thrombophilias (Factor V Leiden, Prothrombin mutation)",
    "Endocrine: hypothyroidism, uncontrolled DM, PCOS",
    "Infections: TORCH, bacterial vaginosis",
    "Advanced maternal age (>35 years)",
    "Smoking, alcohol, NSAID use",
  ]
);

// Slide 6: Management of Spontaneous Abortion
contentSlide("Management of Spontaneous Abortion", [
  { text: "THREATENED ABORTION", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Bed rest (debated), progesterone supplementation (in luteal phase defect), avoid coitus; monitor beta-hCG & USG", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "INEVITABLE / INCOMPLETE ABORTION", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Uterine evacuation: Manual Vacuum Aspiration (MVA) preferred up to 12 weeks; Electric Vacuum Aspiration (EVA) or sharp curettage (D&C) for larger gestations", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "MISSED ABORTION", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Medical: Mifepristone 200 mg PO then Misoprostol 800 mcg vaginally after 24–48 h", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Surgical if medical fails or patient preference: MVA / D&C", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "SEPTIC ABORTION", options:{ bold:true, fontSize:16, color:C.red, breakLine:true } },
  { text: "Triple antibiotic cover (ampicillin + gentamicin + metronidazole); urgent uterine evacuation after stabilization; ICU care if needed", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "RECURRENT PREGNANCY LOSS (RPL) — ≥3 consecutive losses", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Investigate: Karyotype both partners, APS panel, thyroid, HSG/hysteroscopy; treat underlying cause", options:{ fontSize:15, color:C.slate } },
]);

// Slide 7: Complications of Unsafe Abortion
contentSlide("Complications of Unsafe Abortion", [
  { text: "Global burden: ~25 million unsafe abortions/year; 47,000 deaths annually (WHO)", options:{ bold:true, fontSize:16, color:C.red, breakLine:true } },
  { text: "Immediate Complications", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Hemorrhage (most common cause of immediate death)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Uterine perforation — risk of bowel/bladder injury", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Sepsis — endometritis, peritonitis, septicemia", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Retained products of conception (RPOC)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Delayed / Long-term Complications", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Infertility — from intrauterine adhesions (Asherman syndrome) or tubal damage", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Chronic pelvic inflammatory disease (PID)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Psychological sequelae", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Legal abortion mortality: 0.7 per 100,000 procedures; maternal mortality: 8.8 per 100,000 live births (abortion at any gestation is safer than term delivery)", options:{ fontSize:14, italic:true, color:C.gray } },
]);

// ═══════════════════════════════════════════════════════════════
// SECTION 2: MTP
// ═══════════════════════════════════════════════════════════════
sectionDivider("PART 2", "Medical Termination of Pregnancy (MTP)", C.teal);

// Slide 8: MTP Act Overview
contentSlide("MTP Act 1971 — Overview", [
  { text: "Enacted 1971; amended 2002, 2003, 2021", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Aim: Reduce maternal morbidity & mortality from unsafe abortions; ensure safe, legal abortion by qualified practitioners", options:{ fontSize:16, color:C.slate, breakLine:true } },
  { text: "", options:{ breakLine:true } },
  { text: "KEY SECTIONS", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Section 3 — When pregnancy may be terminated (indications)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Section 4 — Approved places (government hospital / certified private facility)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Section 5 — Emergency termination (single RMP, no time limit for life-saving)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Section 5A (2021) — Confidentiality; disclosure punishable with fine + imprisonment", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "", options:{ breakLine:true } },
  { text: "RMP (Registered Medical Practitioner): Must be registered under IMC Act / State Medical Register with O&G training or recognized government training", options:{ fontSize:14, italic:true, color:C.gray } },
]);

// Slide 9: MTP Gestational Limits Table
tableSlide(
  "MTP Act — Permissible Gestational Limits",
  ["Gestational Age", "No. of Opinions", "Conditions / Category"],
  [
    ["Up to 20 weeks", "1 RMP", "Risk to life; grave physical/mental injury; contraceptive failure (married OR unmarried — post 2021); rape/incest"],
    ["20 to 24 weeks", "2 RMPs", "Special categories: rape/incest survivors, minors, divorcees/widows, women with disabilities, fetal anomalies, disasters/emergencies"],
    ["Beyond 24 weeks", "State Medical Board", "Substantial fetal anomalies only; no upper limit — must be approved by Medical Board"],
    ["Any gestational age", "1 RMP (Section 5)", "Emergency — immediate termination to save life of pregnant woman"],
  ],
  [2.2, 2.0, 5.3]
);

// Slide 10: MTP 2021 Amendment
contentSlide("MTP Amendment Act 2021 — Key Changes", [
  { text: "1. Extended gestational limit", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Upper limit raised from 20 to 24 weeks for special categories of women", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "2. Unmarried women included", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Contraceptive failure clause extended to unmarried women (earlier only married women)", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "3. Medical Board for >24 weeks", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "State-level Medical Board mandatory for fetal anomalies beyond 24 weeks", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "4. Confidentiality (Section 5A)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "No RMP shall reveal identity/details of woman except to authorized person; punishable offence", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "5. Consent", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Adult woman (≥18): own consent only | Minor (<18) or mentally ill: guardian consent required | Husband consent NOT required", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Ethical Principles: Autonomy | Beneficence | Non-maleficence | Justice | Confidentiality", options:{ bold:true, fontSize:14, italic:true, color:C.tealLt } },
]);

// Slide 11: MTP Techniques by Gestational Age
tableSlide(
  "MTP Techniques by Gestational Age",
  ["Gestational Age", "Method", "Details"],
  [
    ["Up to 9 weeks", "Medical Abortion", "Mifepristone 200 mg PO + Misoprostol 800 mcg vaginally/buccally after 24–48 h"],
    ["9–12 weeks", "MVA / EVA", "Manual or Electric Vacuum Aspiration under local anesthesia; prophylactic doxycycline"],
    ["12–20 weeks", "D&E (Dilation & Evacuation)", "Preceded by cervical preparation (laminaria/misoprostol); surgical evacuation"],
    ["13–24 weeks", "Medical induction", "Mifepristone + misoprostol; oxytocin augmentation; hospitalization required"],
    [">24 weeks (rare)", "Induction + delivery", "Medical Board approval; feticidal injection (digoxin) + laminaria + misoprostol/oxytocin"],
    ["Any trimester (emergency)", "Hysterotomy / Hysterectomy", "Reserved for failed medical/surgical methods or life-threatening complications"],
  ],
  [2.0, 2.5, 5.0]
);

// Slide 12: Medical Abortion — Mifepristone + Misoprostol
contentSlide("Medical Abortion — Mifepristone + Misoprostol", [
  { text: "MIFEPRISTONE (RU-486)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Antiprogesterone; competitively binds progesterone receptors; softens cervix; sensitizes uterus to prostaglandins", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Dose: 200 mg orally (as effective as 600 mg)", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "MISOPROSTOL", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "PGE1 analogue; causes uterine contractions and cervical ripening", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Dose (up to 9 weeks): 800 mcg vaginally or 400 mcg buccally/sublingually, 24–48 h after mifepristone", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Dose (13–24 weeks): 800 mcg vaginally, then 400 mcg q3h vaginally or 400 mcg buccally q3h (ACOG)", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "EFFICACY: ~95–98% complete abortion rate in first trimester; ~80–90% in second trimester", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Follow-up: USG or serial serum beta-hCG to confirm complete abortion; watch for retained POC, infection, ongoing pregnancy", options:{ fontSize:14, italic:true, color:C.gray } },
]);

// ═══════════════════════════════════════════════════════════════
// SECTION 3: ECTOPIC PREGNANCY
// ═══════════════════════════════════════════════════════════════
sectionDivider("PART 3", "Ectopic Pregnancy", C.slate);

// Slide 13: Definition & Epidemiology
contentSlide("Ectopic Pregnancy — Definition & Epidemiology", [
  { text: "DEFINITION", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Implantation of a fertilized ovum outside the endometrial cavity of the uterus", options:{ fontSize:16, color:C.slate, breakLine:true } },
  { text: "", options:{ breakLine:true } },
  { text: "SITES (frequency)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Fallopian tube: ~97% (Ampulla 70%, Isthmus 12%, Fimbria 11%, Cornual/Interstitial 3%)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Ovary, cervix, abdominal cavity, cesarean scar — rare but serious", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "EPIDEMIOLOGY", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Incidence: 0.64–2.0% of all pregnancies", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Leading obstetric cause of maternal death in the first trimester", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "50% of cases receive medical evaluation ≥2 times before correct diagnosis (high index of suspicion required)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Incidence increased with rise of ART (IVF), PID, prior tubal surgery", options:{ bullet:true, fontSize:15, color:C.slate } },
]);

// Slide 14: Risk Factors
twoColSlide(
  "Ectopic Pregnancy — Risk Factors",
  "HIGH RISK",
  [
    "Prior ectopic pregnancy (recurrence risk 10–25%)",
    "Prior tubal surgery / sterilization",
    "Prior salpingitis / PID (Chlamydia, Gonorrhoea)",
    "Documented tubal pathology",
    "In-utero DES exposure",
    "IVF / ART conception",
  ],
  "MODERATE / LOW RISK",
  [
    "IUD in situ (if failure occurs, risk of ectopic increased)",
    "Prior abdominal/pelvic surgery",
    "Current cigarette smoking",
    "Multiple sexual partners",
    "Age >35 years",
    "Vaginal douching",
    "Early age of first intercourse",
  ]
);

// Slide 15: Clinical Features
contentSlide("Ectopic Pregnancy — Clinical Features", [
  { text: "CLASSIC TRIAD (present in <50% of cases)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "1. Amenorrhea  2. Pelvic pain (colicky / constant)  3. Vaginal bleeding", options:{ fontSize:16, color:C.slate, breakLine:true } },
  { text: "", options:{ breakLine:true } },
  { text: "OTHER SYMPTOMS", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } },
  { text: "Shoulder tip pain (diaphragmatic irritation by hemoperitoneum) — PATHOGNOMONIC of rupture", options:{ bullet:true, fontSize:15, color:C.red, breakLine:true } },
  { text: "Syncope / dizziness — significant hemoperitoneum", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Rectal pressure or urgency (blood in pouch of Douglas)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Nausea, vomiting, breast tenderness", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "SIGNS", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } },
  { text: "Adnexal mass / tenderness; cervical excitation tenderness (Chandelier sign)", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } },
  { text: "Hypotension / tachycardia in ruptured ectopic (IMPORTANT: bradycardia can occur paradoxically)", options:{ bullet:true, fontSize:15, color:C.red, breakLine:true } },
  { text: "Blood in peritoneal cavity does NOT consistently correlate with vital sign changes (Bezold-Jarisch reflex)", options:{ fontSize:14, italic:true, color:C.gray } },
]);

// Slide 16: Investigations
contentSlide("Ectopic Pregnancy — Investigations", [
  { text: "1. Serum beta-hCG", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Quantitative: Serial measurements; in normal IUP, hCG doubles every 48 h (>66% rise)", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Suboptimal rise (<66%) or plateau: suspect ectopic or failing IUP", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Discriminatory zone: 1500–3000 mIU/mL — IUP should be visible on TVS above this level", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "2. Transvaginal Ultrasound (TVS) — INVESTIGATION OF CHOICE", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Empty uterine cavity (no IUP) + positive hCG = ectopic until proven otherwise", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Adnexal mass separate from ovary; free fluid (hemoperitoneum) in POD", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "\"Ring of fire\" sign on Doppler — peripheral vascularity of ectopic sac", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "3. Culdocentesis (historical, rarely used now)", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } },
  { text: "Aspiration of non-clotting blood (hematocrit >15%) from POD = positive tap (ruptured ectopic)", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "4. Progesterone level (adjunct): <5 ng/mL suggests non-viable pregnancy; >25 ng/mL suggests viable IUP", options:{ fontSize:14, color:C.gray } },
]);

// Slide 17: Management — Overview
contentSlide("Management of Ectopic Pregnancy — Overview", [
  { text: "THREE STRATEGIES: Expectant | Medical (Methotrexate) | Surgical", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } },
  { text: "Choice depends on: hemodynamic stability, USG findings (size, cardiac activity, free fluid), serum beta-hCG level, patient compliance, and preference", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "", options:{ breakLine:true } },
  { text: "EXPECTANT MANAGEMENT (selected patients)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Criteria: Hemodynamically stable + asymptomatic + declining beta-hCG + ectopic <35 mm + no cardiac activity", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "hCG <1500 IU/L; confirm decline on days 4 and 7; weekly until <20 IU/L", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Success rate ~70% when hCG <200 mIU/mL and falling", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "⚠ Risk of rupture persists — must counsel and ensure immediate access to emergency care", options:{ bold:true, fontSize:15, color:C.red } },
]);

// Slide 18: Medical Management — Methotrexate
contentSlide("Medical Management — Methotrexate", [
  { text: "Mechanism: Folic acid antagonist; inhibits dihydrofolate reductase; blocks DNA synthesis; targets actively dividing trophoblast", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "SINGLE-DOSE PROTOCOL: MTX 50 mg/m² IM on Day 1; measure hCG on Day 4 & 7; expect 15% fall by Day 4–7", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } },
  { text: "MULTI-DOSE PROTOCOL: MTX 1 mg/kg IM on Days 1,3,5,7 alternating with Leucovorin 0.1 mg/kg IM on Days 2,4,6,8", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } },
  { text: "ABSOLUTE CONTRAINDICATIONS to MTX", options:{ bold:true, fontSize:15, color:C.red, breakLine:true } },
  { text: "IUP • Hemodynamic instability • Ruptured ectopic • Breastfeeding • Immunodeficiency • Significant anemia/leukopenia/thrombocytopenia • Active PUD/pulmonary disease • Hepatic/renal dysfunction • Known sensitivity", options:{ fontSize:14, color:C.slate, breakLine:true } },
  { text: "RELATIVE CONTRAINDICATIONS", options:{ bold:true, fontSize:15, color:C.red, breakLine:true } },
  { text: "Ectopic >4 cm • Embryonic cardiac motion on TVS • hCG >5000 mIU/mL • Unable to comply with follow-up", options:{ fontSize:14, color:C.slate, breakLine:true } },
  { text: "Avoid pregnancy for 3 months post-MTX (teratogenicity risk). Avoid folic acid, NSAIDs, alcohol during treatment.", options:{ fontSize:14, italic:true, color:C.gray } },
]);

// Slide 19: Surgical Management
contentSlide("Surgical Management of Ectopic Pregnancy", [
  { text: "LAPAROSCOPIC APPROACH — preferred over laparotomy in stable patients (less morbidity, faster recovery)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "LAPAROTOMY — for hemodynamically unstable patients (ruptured ectopic with massive hemoperitoneum)", options:{ bold:true, fontSize:16, color:C.red, breakLine:true } },
  { text: "", options:{ breakLine:true } },
  { text: "SALPINGECTOMY (preferred surgical option)", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } },
  { text: "Removal of the affected tube; preferred when contralateral tube is healthy or tube is severely damaged; lower persistent ectopic risk", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "SALPINGOSTOMY (tube-conserving)", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } },
  { text: "Linear incision over ectopic; pregnancy tissue removed; tube left open to heal by secondary intention", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "Preferred when contralateral tube is damaged/absent; 5–8% risk of persistent trophoblast (monitor hCG)", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "SALPINGOTOMY — incision closed with sutures (higher persistent ectopic rate than salpingostomy)", options:{ fontSize:15, color:C.slate, breakLine:true } },
  { text: "POST-OP: Anti-D immunoglobulin 300 mcg IM for all Rh-negative women", options:{ bold:true, fontSize:15, color:C.gold } },
]);

// Slide 20: Treatment Selection Algorithm
tableSlide(
  "Ectopic Pregnancy — Treatment Selection",
  ["Parameter", "Expectant", "Medical (MTX)", "Surgical"],
  [
    ["Hemodynamic status", "Stable", "Stable", "Any (laparotomy if unstable)"],
    ["Serum beta-hCG", "<1500 IU/L (falling)", "1500–5000 IU/L", ">5000 IU/L or any"],
    ["Ectopic size", "<35 mm", "<35–40 mm", "Any / ≥35 mm"],
    ["Cardiac activity", "Absent", "Absent", "Present or absent"],
    ["Pain", "None", "Mild-moderate", "Any"],
    ["Follow-up compliance", "Essential", "Essential", "Not required"],
    ["Risk of failure", "~30%", "~15–20%", "<1%"],
  ],
  [2.8, 2.0, 2.2, 2.5]
);

// ═══════════════════════════════════════════════════════════════
// SLIDE 21: CLINICAL PEARLS & KEY EXAM POINTS
// ═══════════════════════════════════════════════════════════════
contentSlide("Clinical Pearls & Key Points for PG Exams", [
  { text: "ABORTION", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Cervical OS is the key to differentiating threatened (closed) vs. inevitable (open) abortion", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } },
  { text: "Most common cause of 1st trimester miscarriage: chromosomal anomaly (50–60%); most common: trisomy", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } },
  { text: "Septic abortion: requires antibiotics FIRST, then evacuation (not evacuation first)", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } },
  { text: "MTP ACT", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "2021: 20 wks (1 RMP), 20–24 wks (2 RMPs for special categories), >24 wks (Medical Board)", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } },
  { text: "Unmarried women NOW covered under contraceptive failure clause", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } },
  { text: "Husband's consent is NOT required under the MTP Act", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } },
  { text: "ECTOPIC PREGNANCY", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } },
  { text: "Shoulder tip pain = ruptured ectopic (diaphragmatic irritation by hemoperitoneum)", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } },
  { text: "Paradoxical bradycardia can occur in significant hemoperitoneum — do not be falsely reassured", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } },
  { text: "Anti-D to all Rh-negative women after ectopic surgery", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } },
  { text: "Salpingostomy: monitor hCG post-op (5–8% persistent trophoblast risk)", options:{ bullet:true, fontSize:14, color:C.slate } },
]);

// Slide 22: Thank You / End
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.navy } });
  s.addShape(pres.ShapeType.rect, { x:0, y:2.5, w:10, h:0.12, fill:{ color:C.gold } });
  s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.2, h:5.625, fill:{ color:C.teal } });
  s.addText("Summary", { x:0.5, y:0.8, w:9, h:1.2, fontSize:42, bold:true, color:C.white, fontFace:"Calibri", align:"left" });
  s.addText([
    { text: "Abortion: ", options:{ bold:true, color:C.gold } },
    { text: "Know your types, recognize complications early, manage sepsis aggressively\n", options:{ color:"D0EEF0" } },
    { text: "MTP Act: ", options:{ bold:true, color:C.gold } },
    { text: "2021 amendment — 24 weeks, unmarried women, Medical Board, confidentiality\n", options:{ color:"D0EEF0" } },
    { text: "Ectopic: ", options:{ bold:true, color:C.gold } },
    { text: "High suspicion, TVS + hCG, treat based on stability — expectant / MTX / surgery", options:{ color:"D0EEF0" } },
  ], { x:0.5, y:2.8, w:9, h:2.4, fontSize:18, fontFace:"Calibri", valign:"top" });
  s.addText("Sources: Berek & Novak's Gynecology | Bailey & Love's Surgery | Forensic Medicine & Toxicology (2026) | Creasy & Resnik's MFM | Roberts & Hedges' Emergency Medicine", 
    { x:0.5, y:5.1, w:9, h:0.4, fontSize:10, color:C.gray, fontFace:"Calibri" });
}

// ─── Write file ────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pptx" })
  .then(() => console.log("PPTX written successfully"))
  .catch(err => { console.error(err); process.exit(1); });
Editing File

~/abortion-mtp-ectopic/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/abortion-mtp-ectopic/build.js'
Running Command

cat > /home/daytona/workspace/abortion-mtp-ectopic/build.js << 'ENDBUILD' const pptxgen = require("pptxgenjs"); const pres = new pptxgen(); pres.layout = "LAYOUT_16x9"; pres.title = "Abortion, MTP & Ectopic Pregnancy"; pres.author = "Medical Education"; const C = { navy: "0A2342", teal: "1A6B72", tealLt: "24919A", red: "C0392B", gold: "D4A017", white: "FFFFFF", offWhite:"F4F6F9", gray: "6C757D", ltGray: "DEE2E6", slate: "2C3E50", }; function titleSlide(title, subtitle) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.navy } }); s.addShape(pres.ShapeType.rect, { x:0, y:4.5, w:10, h:1.125, fill:{ color:C.teal } }); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.15, h:5.625, fill:{ color:C.gold } }); s.addText(title, { x:0.4, y:1.2, w:9.2, h:1.8, fontSize:40, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" }); if (subtitle) s.addText(subtitle, { x:0.4, y:3.1, w:9.2, h:0.7, fontSize:20, color:"B0C4DE", fontFace:"Calibri", align:"left" }); s.addText("For Postgraduate Residents | Obstetrics & Gynecology", { x:0.4, y:4.6, w:9.2, h:0.4, fontSize:13, color:C.white, fontFace:"Calibri", align:"left" }); } function sectionDivider(title, subtitle, color) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color: color || C.teal } }); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.2, h:5.625, fill:{ color:C.gold } }); s.addShape(pres.ShapeType.rect, { x:0, y:4.8, w:10, h:0.825, fill:{ color:C.navy } }); s.addText(title, { x:0.5, y:1.2, w:9, h:1.2, fontSize:42, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle" }); if (subtitle) s.addText(subtitle, { x:0.5, y:2.6, w:9, h:1.0, fontSize:26, color:"D0EEF0", fontFace:"Calibri", align:"left" }); } function contentSlide(title, bullets) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.offWhite } }); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.0, fill:{ color:C.navy } }); s.addShape(pres.ShapeType.rect, { x:0, y:0.95, w:10, h:0.08, fill:{ color:C.gold } }); s.addText(title, { x:0.3, y:0.08, w:9.4, h:0.84, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle", margin:0 }); const items = bullets.map((b, i) => { if (typeof b === "string") return { text: b, options: { bullet:{ type:"bullet", characterCode:"25CF", color:C.teal }, fontSize:16, color:C.slate, fontFace:"Calibri", breakLine: i < bullets.length-1 } }; return b; }); s.addText(items, { x:0.35, y:1.12, w:9.3, h:4.3, valign:"top", margin:4 }); return s; } function twoColSlide(title, leftHead, leftItems, rightHead, rightItems) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.offWhite } }); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.0, fill:{ color:C.navy } }); s.addShape(pres.ShapeType.rect, { x:0, y:0.95, w:10, h:0.08, fill:{ color:C.gold } }); s.addText(title, { x:0.3, y:0.08, w:9.4, h:0.84, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle", margin:0 }); s.addShape(pres.ShapeType.rect, { x:0.3, y:1.1, w:4.4, h:0.45, fill:{ color:C.teal } }); s.addText(leftHead, { x:0.3, y:1.1, w:4.4, h:0.45, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 }); const li = leftItems.map((b, i) => ({ text:b, options:{ bullet:{ type:"bullet", characterCode:"25CF", color:C.teal }, fontSize:14, color:C.slate, fontFace:"Calibri", breakLine: i < leftItems.length-1 } })); s.addText(li, { x:0.3, y:1.62, w:4.4, h:3.8, valign:"top", margin:4 }); s.addShape(pres.ShapeType.rect, { x:5.2, y:1.1, w:4.4, h:0.45, fill:{ color:C.red } }); s.addText(rightHead, { x:5.2, y:1.1, w:4.4, h:0.45, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 }); const ri = rightItems.map((b, i) => ({ text:b, options:{ bullet:{ type:"bullet", characterCode:"25CF", color:C.red }, fontSize:14, color:C.slate, fontFace:"Calibri", breakLine: i < rightItems.length-1 } })); s.addText(ri, { x:5.2, y:1.62, w:4.4, h:3.8, valign:"top", margin:4 }); s.addShape(pres.ShapeType.rect, { x:4.85, y:1.05, w:0.05, h:4.4, fill:{ color:C.ltGray } }); return s; } function tableSlide(title, headers, rows, colWidths) { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.offWhite } }); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.0, fill:{ color:C.navy } }); s.addShape(pres.ShapeType.rect, { x:0, y:0.95, w:10, h:0.08, fill:{ color:C.gold } }); s.addText(title, { x:0.3, y:0.08, w:9.4, h:0.84, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"left", valign:"middle", margin:0 }); const tableData = [ headers.map(h => ({ text:h, options:{ bold:true, color:C.white, fill:C.teal, fontSize:12, align:"center" } })), ...rows.map((row, ri) => row.map(cell => ({ text:cell, options:{ fontSize:11, color:C.slate, fill: ri%2===0 ? C.white : "EBF5FB", align:"left" } }))) ]; s.addTable(tableData, { x:0.25, y:1.1, w:9.5, colW: colWidths, border:{ color:C.ltGray, pt:0.5 }, margin:3 }); return s; } // ── SLIDE 1: TITLE ── titleSlide("Abortion, MTP &\nEctopic Pregnancy", "Classification | Management | Legal Framework | Clinical Approach"); // ── SLIDE 2: OUTLINE ── contentSlide("Presentation Outline", [ { text: "PART 1: Abortion", options:{ bold:true, fontSize:18, color:C.teal, breakLine:true } }, { text: " Definition, classification, types, clinical features, management", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "PART 2: Medical Termination of Pregnancy (MTP)", options:{ bold:true, fontSize:18, color:C.teal, breakLine:true } }, { text: " MTP Act 1971, 2021 Amendment, indications, techniques, consent", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "PART 3: Ectopic Pregnancy", options:{ bold:true, fontSize:18, color:C.teal, breakLine:true } }, { text: " Epidemiology, risk factors, diagnosis, expectant / medical / surgical management", options:{ fontSize:15, color:C.slate } }, ]); // ── SECTION DIVIDER: ABORTION ── sectionDivider("PART 1", "Abortion", C.navy); // ── SLIDE 3: Definition & Classification ── contentSlide("Abortion — Definition & Classification", [ { text: "DEFINITION", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } }, { text: "Expulsion or extraction of a fetus/embryo weighing <500 g (or <20–22 weeks gestation) from the uterus, irrespective of viability", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "MAJOR CLASSIFICATION", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } }, { text: "Spontaneous Abortion — natural; without intervention", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Induced Abortion — deliberate termination:", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: " Therapeutic (legal) — under MTP Act by qualified RMP", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: " Criminal — outside legal framework, by unqualified persons", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "Missed Abortion — fetal death with retained products; no expulsion", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Unsafe Abortion — performed by unskilled personnel or in unsafe conditions (~25 million/year; 47,000 maternal deaths annually — WHO)", options:{ bullet:true, fontSize:15, color:C.red } }, ]); // ── SLIDE 4: Types of Spontaneous Abortion ── tableSlide("Types of Spontaneous Abortion", ["Type", "Cervical OS", "Bleeding", "POC Status", "Management"], [ ["Threatened", "Closed", "Present (mild)", "Intact", "Bed rest; progesterone; USG monitoring"], ["Inevitable", "Open", "Heavy", "Not yet passed", "Hospitalize; surgical evacuation if not spontaneous"], ["Incomplete", "Open", "Heavy", "Partial passage", "Urgent uterine evacuation (MVA / D&C)"], ["Complete", "Closed", "Decreasing", "All expelled", "Confirm by USG; expectant if stable"], ["Missed", "Closed", "Absent / minimal", "Retained", "Medical: mifepristone + misoprostol; or surgical (MVA)"], ["Septic", "Open (usually)", "Variable + purulent discharge", "Variable", "IV antibiotics FIRST, then urgent evacuation"], ["Recurrent (RPL)", "Variable", "Variable", "Variable", ">=3 losses: karyotype, APS panel, uterine imaging"], ], [1.8, 1.3, 1.7, 1.7, 3.0] ); // ── SLIDE 5: Etiology ── twoColSlide("Spontaneous Abortion — Etiology", "Fetal / Embryonic", [ "Chromosomal anomalies: 50–60% of 1st trimester losses", "Trisomies (trisomy 16 most common single type)", "Monosomy X (Turner syndrome)", "Polyploidy — triploidy, tetraploidy", "Structural chromosomal rearrangements", "Single gene defects (rare)", ], "Maternal / Uterine", [ "Uterine septum (most common correctable structural cause)", "Cervical incompetence (painless 2nd trimester loss)", "Antiphospholipid syndrome (APS) — key in RPL", "Thrombophilias: Factor V Leiden, Prothrombin mutation", "Endocrine: hypothyroidism, PCOS, uncontrolled DM", "Infections: TORCH, bacterial vaginosis", "Advanced maternal age >35 years", "Smoking, alcohol, NSAIDs, high caffeine intake", ] ); // ── SLIDE 6: Management ── contentSlide("Management of Spontaneous Abortion", [ { text: "THREATENED", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Bed rest (limited evidence); progesterone supplementation (luteal phase defect); avoid coitus; serial USG + hCG", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "INEVITABLE / INCOMPLETE", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Manual Vacuum Aspiration (MVA) preferred up to 12 weeks; EVA or sharp curettage for larger gestations; pre-op doxycycline prophylaxis", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "MISSED ABORTION", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Medical: Mifepristone 200 mg PO then Misoprostol 800 mcg vaginally after 24–48 h", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "Surgical if medical fails or >13 weeks: MVA or D&E", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "SEPTIC ABORTION", options:{ bold:true, fontSize:16, color:C.red, breakLine:true } }, { text: "IV ampicillin + gentamicin + metronidazole; uterine evacuation after antibiotic stabilization; ICU care if septic shock", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "RECURRENT PREGNANCY LOSS (RPL)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Investigate: karyotype both partners, APS panel, thyroid function, HSG/hysteroscopy for uterine anomaly; treat underlying cause; low-dose aspirin + LMWH for APS", options:{ fontSize:14, color:C.slate } }, ]); // ── SECTION DIVIDER: MTP ── sectionDivider("PART 2", "Medical Termination of Pregnancy (MTP)", C.teal); // ── SLIDE 7: MTP Act Overview ── contentSlide("MTP Act 1971 — Overview", [ { text: "Enacted 1971; Amended 2002, 2003, 2021", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } }, { text: "AIM: Reduce maternal mortality from unsafe abortions; provide safe, legal termination by qualified practitioners only", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "KEY SECTIONS", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Section 3 — Conditions under which pregnancy may be terminated", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Section 4 — Approved places: government hospitals or certified private facilities with adequate aseptic / resuscitation / blood transfusion facilities", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Section 5 — Emergency: single RMP, no gestational limit, to save the woman's life", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Section 5A (2021) — Confidentiality: identity of woman must not be revealed; punishable by fine + imprisonment", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "RMP: Must be registered under IMC Act / State Medical Register + hold recognized O&G training", options:{ fontSize:13, italic:true, color:C.gray } }, ]); // ── SLIDE 8: Gestational Limits Table ── tableSlide("MTP Act — Permissible Gestational Limits (Post-2021)", ["Gestational Age", "Opinions Required", "Category / Conditions"], [ ["Up to 20 weeks", "1 RMP", "Risk to life of woman; grave physical or mental injury; contraceptive failure (married OR unmarried); rape/incest (mental anguish presumed)"], ["20 to 24 weeks", "2 RMPs", "Rape/incest survivors; minors; widows/divorcees; women with disabilities; fetal anomalies; disaster/emergency victims"], ["Beyond 24 weeks", "State Medical Board", "Substantial fetal anomalies detected at any gestation; no upper gestational limit — Board approval mandatory"], ["Any gestation (Emergency)", "1 RMP (Sec 5)", "Immediate risk to life of pregnant woman; no gestational limit applies"], ], [2.0, 1.8, 5.7] ); // ── SLIDE 9: 2021 Amendment ── contentSlide("MTP Amendment Act 2021 — Key Changes", [ { text: "1. Extended gestational limit", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Upper limit increased from 20 to 24 weeks for special categories", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "2. Unmarried women included", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Contraceptive failure clause now extends to unmarried women (previously married women only)", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "3. State Medical Board", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Mandatory for termination beyond 24 weeks due to substantial fetal anomalies", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "4. Confidentiality clause (Section 5A)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "No RMP shall disclose name or other particulars of the woman; punishable offence", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "5. Consent requirements", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Adult (>=18 yrs): own written consent only | Minor (<18) or mentally ill: guardian consent | Husband's consent NOT legally required", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "Ethical framework: Autonomy | Beneficence | Non-maleficence | Justice | Confidentiality", options:{ bold:true, fontSize:13, italic:true, color:C.tealLt } }, ]); // ── SLIDE 10: MTP Techniques ── tableSlide("MTP Techniques by Gestational Age", ["Gestational Age", "Method", "Details"], [ ["Up to 9 weeks", "Medical Abortion", "Mifepristone 200 mg PO + Misoprostol 800 mcg vaginally/buccally after 24–48 h; ~95–98% complete abortion rate"], ["9–12 weeks", "MVA / EVA", "Manual or Electric Vacuum Aspiration under LA; cervical preparation with misoprostol 400 mcg 3–4 h prior"], ["12–20 weeks", "Dilation & Evacuation (D&E)", "Preceded by osmotic cervical dilators (laminaria) or misoprostol; larger bore cannula + forceps"], ["13–24 weeks", "Medical Induction", "Mifepristone + misoprostol; repeat dosing every 3 h (vaginal or buccal); oxytocin augmentation; hospital admission"], [">24 weeks (Board approval)", "Combined Induction + Delivery", "Feticidal injection (digoxin) + serial laminaria over 2–3 days + misoprostol/oxytocin + assisted delivery"], ["Emergency / Failed", "Hysterotomy / Hysterectomy", "Last resort; life-threatening complications or failed all other methods"], ], [2.0, 2.5, 5.0] ); // ── SLIDE 11: Mifepristone + Misoprostol ── contentSlide("Medical Abortion — Mifepristone + Misoprostol", [ { text: "MIFEPRISTONE (RU-486)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Antiprogestogen; competitively binds progesterone receptors; causes decidual breakdown, cervical softening, sensitizes uterus to prostaglandins; Dose: 200 mg PO", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "MISOPROSTOL", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Synthetic PGE1 analogue; induces uterine contractions and cervical ripening", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "First trimester: 800 mcg vaginally or 400 mcg buccally 24–48 h after mifepristone", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "Second trimester: 800 mcg vaginally then 400 mcg q3h vaginally or buccally (ACOG protocol)", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "EFFICACY", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "~95–98% complete abortion rate in first trimester; ~80–90% in second trimester", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "FOLLOW-UP", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "USG or serial serum beta-hCG at 2 weeks; confirm complete abortion; watch for retained POC, ongoing pregnancy, endometritis", options:{ fontSize:14, color:C.slate } }, ]); // ── SECTION DIVIDER: ECTOPIC ── sectionDivider("PART 3", "Ectopic Pregnancy", C.slate); // ── SLIDE 12: Definition & Epidemiology ── contentSlide("Ectopic Pregnancy — Definition & Epidemiology", [ { text: "DEFINITION: Implantation of a fertilized ovum outside the endometrial cavity of the uterus", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "SITES (by frequency)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Fallopian tube ~97%: Ampullary 70% | Isthmic 12% | Fimbrial 11% | Interstitial/Cornual 3%", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Non-tubal (<3%): Ovarian | Cervical | Abdominal | Cesarean scar — rare but life-threatening", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "EPIDEMIOLOGY", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Incidence: 0.64–2.0% of all pregnancies; increasing with rise of PID, ART, prior tubal surgery", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Leading obstetric cause of first-trimester maternal death", options:{ bullet:true, fontSize:15, color:C.red, breakLine:true } }, { text: "In a series of 300 consecutive cases: 50% received >=2 medical evaluations before correct diagnosis — HIGH INDEX OF SUSPICION IS ESSENTIAL", options:{ bullet:true, fontSize:14, italic:true, color:C.gray } }, ]); // ── SLIDE 13: Risk Factors ── twoColSlide("Ectopic Pregnancy — Risk Factors", "HIGH RISK", [ "Prior ectopic pregnancy (recurrence: 10–25%)", "Prior tubal surgery (including sterilization)", "Prior salpingitis / PID (Chlamydia, Gonorrhoea)", "Documented tubal pathology on HSG", "In-utero DES (diethylstilbestrol) exposure", "IVF / ART conception", ], "MODERATE / LOW RISK", [ "IUD in situ (if contraceptive fails, high ectopic risk)", "Prior abdominopelvic surgery (appendicectomy, etc.)", "Current cigarette smoking", "Multiple sexual partners", "Age >35 years", "Vaginal douching", "History of sexually transmitted infections", ] ); // ── SLIDE 14: Clinical Features ── contentSlide("Ectopic Pregnancy — Clinical Features", [ { text: "CLASSIC TRIAD (present in <50% — do not rely on it)", options:{ bold:true, fontSize:16, color:C.red, breakLine:true } }, { text: "1. Amenorrhea (6–8 weeks) 2. Lower abdominal / pelvic pain 3. Vaginal bleeding (dark, scanty)", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "FEATURES OF RUPTURE (EMERGENCY)", options:{ bold:true, fontSize:16, color:C.red, breakLine:true } }, { text: "Sudden severe lower abdominal pain radiating to shoulder (diaphragmatic irritation by hemoperitoneum) — HALLMARK of rupture", options:{ bullet:true, fontSize:15, color:C.red, breakLine:true } }, { text: "Syncope / collapse; hypotension; tachycardia (or paradoxical bradycardia — Bezold-Jarisch reflex)", options:{ bullet:true, fontSize:15, color:C.red, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "ON EXAMINATION", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } }, { text: "Cervical excitation tenderness (Chandelier sign) — pathognomonic of hemoperitoneum", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Adnexal mass / tenderness; fullness in POD", options:{ bullet:true, fontSize:15, color:C.slate, breakLine:true } }, { text: "Signs of peritonism if ruptured (guarding, rigidity, rebound tenderness)", options:{ bullet:true, fontSize:15, color:C.slate } }, ]); // ── SLIDE 15: Investigations ── contentSlide("Ectopic Pregnancy — Investigations", [ { text: "1. Serum Quantitative Beta-hCG", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Normal IUP: doubles >66% every 48 h | Suboptimal rise or plateau: suspect ectopic/failing IUP", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "Discriminatory zone: 1500–3000 mIU/mL — IUP should be visible on TVS above this; absence strongly suggests ectopic", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "2. Transvaginal Ultrasound (TVS) — FIRST-LINE INVESTIGATION", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Empty uterus + positive hCG = ectopic until proven otherwise", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "Adnexal mass separate from ovary; free fluid (hemoperitoneum) in POD", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "\"Ring of fire\" sign on Doppler: peripheral vascularity of ectopic gestational sac", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "3. Progesterone (adjunct)", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } }, { text: "<5 ng/mL suggests non-viable pregnancy (ectopic or miscarriage); >25 ng/mL suggests viable IUP", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "4. Culdocentesis (historical)", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } }, { text: "Positive tap: non-clotting blood, hematocrit >15% from pouch of Douglas; largely replaced by TVS", options:{ fontSize:14, color:C.gray } }, ]); // ── SLIDE 16: Management Overview ── contentSlide("Management Overview — Three Strategies", [ { text: "DECISION FACTORS: Hemodynamic stability | TVS findings (size, cardiac activity, free fluid) | Serum beta-hCG | Patient compliance & preference", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "EXPECTANT MANAGEMENT", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "Criteria: Stable + asymptomatic + hCG <1500 IU/L (falling) + ectopic <35 mm + no cardiac activity", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "Monitor hCG Days 4 and 7; >=15% fall is reassuring; weekly until <20 IU/L", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "Success rate ~70% if initial hCG <200 mIU/mL and clearly declining", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "WARN PATIENT: risk of rupture persists; ensure immediate hospital access if pain worsens", options:{ bold:true, fontSize:15, color:C.red, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "MEDICAL (Methotrexate): for stable patients with hCG 1500–5000 IU/L; ectopic <35–40 mm; no cardiac activity", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "SURGICAL: for unstable patients, hCG >5000 IU/L, ectopic >=35 mm, cardiac activity present, or patient preference", options:{ fontSize:15, color:C.slate } }, ]); // ── SLIDE 17: Methotrexate ── contentSlide("Medical Management — Methotrexate (MTX)", [ { text: "MECHANISM: Folic acid antagonist; inhibits dihydrofolate reductase; blocks DNA/RNA synthesis; targets rapidly dividing trophoblastic tissue", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "~35% of ectopic patients are candidates for primary MTX therapy", options:{ fontSize:14, italic:true, color:C.gray, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "SINGLE-DOSE PROTOCOL (most common)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "MTX 50 mg/m2 IM Day 1; measure hCG Day 4 and Day 7; expect >=15% fall between Day 4–7; if inadequate fall, repeat dose", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "MULTI-DOSE PROTOCOL", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "MTX 1 mg/kg IM Days 1,3,5,7 alternating with Leucovorin 0.1 mg/kg IM Days 2,4,6,8", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "ABSOLUTE CONTRAINDICATIONS", options:{ bold:true, fontSize:15, color:C.red, breakLine:true } }, { text: "IUP | Hemodynamic instability | Ruptured ectopic | Breastfeeding | Immunodeficiency | Bone marrow suppression | Active pulmonary / peptic ulcer disease | Hepatic/renal dysfunction | Hypersensitivity to MTX", options:{ fontSize:13, color:C.slate, breakLine:true } }, { text: "RELATIVE CONTRAINDICATIONS: Ectopic >4 cm | Cardiac activity | hCG >5000 mIU/mL | Unable to comply with follow-up", options:{ fontSize:13, color:C.slate, breakLine:true } }, { text: "Post-MTX: avoid pregnancy 3 months; avoid folic acid, NSAIDs, alcohol during treatment", options:{ bold:true, fontSize:13, italic:true, color:C.gray } }, ]); // ── SLIDE 18: Surgical Management ── contentSlide("Surgical Management of Ectopic Pregnancy", [ { text: "LAPAROSCOPY — preferred in hemodynamically stable patients (less morbidity, faster recovery, equivalent outcomes)", options:{ bold:true, fontSize:16, color:C.teal, breakLine:true } }, { text: "LAPAROTOMY — for hemodynamically UNSTABLE patients with massive hemoperitoneum", options:{ bold:true, fontSize:16, color:C.red, breakLine:true } }, { text: " ", options:{ breakLine:true } }, { text: "SALPINGECTOMY (PREFERRED)", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } }, { text: "Removal of entire affected tube; preferred when contralateral tube is healthy, tube is severely damaged, or patient has completed childbearing", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "Lower risk of persistent trophoblast compared to salpingostomy", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "SALPINGOSTOMY (tube-conserving; preferred when only tube remaining)", options:{ bold:true, fontSize:15, color:C.teal, breakLine:true } }, { text: "Linear incision over ectopic sac; pregnancy tissue removed; tube left to heal by secondary intention; 5–8% risk of persistent ectopic (monitor hCG post-op)", options:{ fontSize:15, color:C.slate, breakLine:true } }, { text: "Surgical management is preferred if: hCG >5000 mIU/mL | Cardiac activity on TVS | Ectopic >=35 mm | Significant pain | Rising hCG despite MTX", options:{ fontSize:14, color:C.slate, breakLine:true } }, { text: "POST-OP: Anti-D immunoglobulin 300 mcg IM for ALL Rh-negative women after ectopic surgery", options:{ bold:true, fontSize:15, color:C.gold } }, ]); // ── SLIDE 19: Treatment Selection Table ── tableSlide("Ectopic Pregnancy — Treatment Selection Guide", ["Parameter", "Expectant", "Medical (MTX)", "Surgical"], [ ["Hemodynamic status", "Stable", "Stable", "Any; laparotomy if unstable"], ["Beta-hCG (mIU/mL)", "<1500 (falling)", "1500–5000", ">5000 or any"], ["Ectopic size", "<35 mm", "<35–40 mm", "Any / >=35 mm"], ["Fetal cardiac activity", "Absent", "Absent", "Present or absent"], ["Free fluid / rupture", "None", "Minimal", "Any"], ["Follow-up compliance", "Essential (mandatory)", "Essential (mandatory)", "Not required"], ["Approx. success rate", "~70% if hCG <200", "~85–90%", ">99%"], ["Future fertility concern", "Preserved", "Preserved", "Salpingostomy > salpingectomy"], ], [2.5, 1.8, 2.2, 3.0] ); // ── SLIDE 20: Clinical Pearls ── contentSlide("Clinical Pearls & High-Yield Points (PG Exams)", [ { text: "ABORTION", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } }, { text: "OS state is the key distinction: Threatened (closed) vs. Inevitable/Incomplete (open)", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } }, { text: "Most common cause of 1st trimester loss: chromosomal anomaly (50–60%); most common: trisomy", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } }, { text: "Septic abortion: antibiotics BEFORE evacuation — not evacuation first", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } }, { text: "MTP ACT", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } }, { text: "2021: <=20 wks (1 RMP) | 20–24 wks (2 RMPs, special categories) | >24 wks (Medical Board)", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } }, { text: "Husband's consent is NOT required under the MTP Act", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } }, { text: "Unmarried women now covered under contraceptive failure clause (2021 Amendment)", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } }, { text: "ECTOPIC PREGNANCY", options:{ bold:true, fontSize:17, color:C.teal, breakLine:true } }, { text: "Shoulder tip pain = ruptured ectopic (diaphragmatic irritation by hemoperitoneum)", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } }, { text: "Paradoxical bradycardia can occur with massive hemoperitoneum — do NOT be falsely reassured", options:{ bullet:true, fontSize:14, color:C.red, breakLine:true } }, { text: "MTX absolute contraindication: ruptured ectopic, IUP, hemodynamic instability", options:{ bullet:true, fontSize:14, color:C.slate, breakLine:true } }, { text: "Anti-D immunoglobulin for ALL Rh-negative women post-ectopic surgery", options:{ bullet:true, fontSize:14, color:C.slate } }, ]); // ── SLIDE 21: SUMMARY (end slide) ── { const s = pres.addSlide(); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{ color:C.navy } }); s.addShape(pres.ShapeType.rect, { x:0, y:2.45, w:10, h:0.12, fill:{ color:C.gold } }); s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.2, h:5.625, fill:{ color:C.teal } }); s.addText("Summary", { x:0.4, y:0.5, w:9, h:1.0, fontSize:42, bold:true, color:C.white, fontFace:"Calibri", align:"left" }); s.addText([ { text: "Abortion: ", options:{ bold:true, color:C.gold } }, { text: "Know the types, differentiate by OS status, manage sepsis aggressively\n", options:{ color:"D0EEF0" } }, { text: "MTP Act: ", options:{ bold:true, color:C.gold } }, { text: "2021 amendment — 24-week limit, unmarried women, Medical Board, strict confidentiality\n", options:{ color:"D0EEF0" } }, { text: "Ectopic Pregnancy: ", options:{ bold:true, color:C.gold } }, { text: "High suspicion + TVS + serial hCG. Choose expectant / MTX / surgery based on stability & hCG", options:{ color:"D0EEF0" } }, ], { x:0.4, y:2.7, w:9, h:2.5, fontSize:17, fontFace:"Calibri", valign:"top" }); s.addText("Sources: Berek & Novak's Gynecology | Bailey & Love's Surgery (28e) | Essentials of Forensic Medicine & Toxicology (2026) | Creasy & Resnik's MFM | Roberts & Hedges' Emergency Medicine", { x:0.4, y:5.2, w:9.2, h:0.3, fontSize:9, color:C.gray, fontFace:"Calibri" }); } pres.writeFile({ fileName: "/home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pptx" }) .then(() => console.log("DONE")) .catch(err => { console.error(err); process.exit(1); }); ENDBUILD echo "File written"

Running Command

cd /home/daytona/workspace/abortion-mtp-ectopic && node build.js 2>&1

Running Command

cd /home/daytona/workspace/abortion-mtp-ectopic && libreoffice --headless --convert-to pdf Abortion_MTP_Ectopic.pptx --outdir . 2>&1

Running Command

cp /home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pptx /tmp/input.pptx && libreoffice --headless --convert-to pdf /tmp/input.pptx --outdir /tmp/ 2>&1 && cp /tmp/input.pdf /home/daytona/workspace/abortion-mtp-ectopic/Abortion_MTP_Ectopic.pdf && ls -lh /home/daytona/workspace/abortion-mtp-ectopic/

Your presentation is ready. Here are both download links:

Abortion MTP Ectopic

PDF Document · PDF

(173 KB)

Abortion MTP Ectopic

Presentation · PPTX

(406 KB — editable)

Presentation Structure (21 slides)

PART 1 — Abortion (6 slides)
  • Definition & major classification (spontaneous / induced / missed / unsafe)
  • Types of spontaneous abortion with an OS-state-based comparison table (threatened, inevitable, incomplete, complete, missed, septic, RPL)
  • Etiology — two-column layout: fetal/chromosomal causes vs. maternal/uterine causes
  • Management by type (threatened, incomplete, missed, septic, RPL)
  • Complications of unsafe abortion + global mortality figures
PART 2 — MTP (4 slides)
  • MTP Act 1971 overview with key sections
  • Gestational limits table (post-2021): ≤20 wks, 20–24 wks, >24 wks, emergency
  • 2021 Amendment — all 5 key changes (extended limit, unmarried women, Medical Board, confidentiality, consent)
  • MTP techniques by gestational age + Mifepristone/Misoprostol protocols with efficacy data
PART 3 — Ectopic Pregnancy (6 slides)
  • Definition, sites (tubal 97%, non-tubal), epidemiology
  • Risk factors (high vs. moderate/low) — two-column layout
  • Clinical features including classic triad + rupture signs, paradoxical bradycardia
  • Investigations: TVS (first-line), discriminatory zone, beta-hCG patterns, ring of fire sign
  • Management overview (expectant / MTX / surgical)
  • MTX — mechanism, single-dose vs. multi-dose protocol, absolute & relative contraindications
  • Surgical options (laparoscopy vs. laparotomy, salpingectomy vs. salpingostomy) + Anti-D
  • Treatment selection comparison table
Final slide: Clinical pearls and high-yield exam points
Sources: Berek & Novak's Gynecology, Bailey & Love's Surgery (28e), Essentials of Forensic Medicine & Toxicology (2026 edition) for MTP Act, Creasy & Resnik's Maternal-Fetal Medicine, Roberts & Hedges' Emergency Medicine.
This is a shared conversation. Sign in to Orris to start your own chat.