Kindly answer all and make a ppt include as many as images flowcharts key points and visual representations as possible

Reading File
Reading File
Let me first read the PDF to understand its contents, then read the pptxgenjs guide.
Running Command

cd /home/daytona/workspace/attachments/d3842864-c2f8-452d-9d70-5dba2b419212/ && python3 -c " import pdfplumber with pdfplumber.open('Untitled document 2.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): print(f'--- PAGE {i+1} ---') text = page.extract_text() if text: print(text) print() "

Reading File
Now I have the full content. This is an Obstetrics question paper index (2019-2024) covering Essay and Short Note topics. Let me search for relevant medical images and then build the comprehensive PPT.
Searching the Web

obstetrics medical diagrams flowcharts preeclampsia PPH APH gestational diabetes free images

Finding Sources
Good, I have image URLs. Now let me build the comprehensive PPTX. Given the large scope (42 topics + short notes), I'll create a well-organized, visually rich presentation.
Running Command

mkdir -p /home/daytona/workspace/obstetrics-ppt && ls /home/daytona/workspace/obstetrics-ppt/

Writing File

~/obstetrics-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

let pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "Obstetrics 2019-2024 Complete Guide";
pres.author = "Medical Education";

// ─── COLOR PALETTE ───────────────────────────────────────────────
const DARK_BG   = "0D1B2A";   // Deep navy
const MID_BG    = "1B2A3B";   // Slate navy
const ACCENT1   = "00B4D8";   // Cyan
const ACCENT2   = "E63946";   // Red
const ACCENT3   = "2DC653";   // Green
const ACCENT4   = "FFB703";   // Amber
const ACCENT5   = "A8DADC";   // Soft teal
const WHITE     = "FFFFFF";
const LIGHT_GRAY= "C8D6E5";
const DARK_TEXT = "1A1A2E";

// ─── HELPER FUNCTIONS ─────────────────────────────────────────────

function addSlide(bg = DARK_BG) {
  let s = pres.addSlide();
  s.background = { color: bg };
  return s;
}

function addTitle(slide, text, y = 0.18, color = ACCENT1, size = 28) {
  slide.addText(text, {
    x: 0.4, y: y, w: 12.5, h: 0.55,
    fontSize: size, bold: true, color: color, fontFace: "Calibri",
    align: "left", margin: 0
  });
  // underline bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0.4, y: y + 0.58, w: 12.5, h: 0.04,
    fill: { color: ACCENT1 }, line: { color: ACCENT1 }
  });
}

function addSubtitle(slide, text, y, color = ACCENT4) {
  slide.addText(text, {
    x: 0.4, y: y, w: 12.5, h: 0.4,
    fontSize: 17, bold: true, color: color, fontFace: "Calibri",
    align: "left", margin: 0
  });
}

function bulletList(slide, items, x, y, w, h, opts = {}) {
  const textArr = items.map((item, i) => ({
    text: item,
    options: { bullet: { type: "bullet" }, breakLine: i < items.length - 1, ...opts }
  }));
  slide.addText(textArr, {
    x, y, w, h,
    fontSize: opts.fontSize || 13, color: opts.color || WHITE,
    fontFace: "Calibri", valign: "top"
  });
}

function addBox(slide, x, y, w, h, fillColor, text, textColor = WHITE, fontSize = 13, bold = false) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h,
    fill: { color: fillColor },
    line: { color: fillColor },
    rectRadius: 0.08
  });
  slide.addText(text, {
    x, y, w, h,
    fontSize, bold, color: textColor,
    fontFace: "Calibri", align: "center", valign: "middle", margin: 4
  });
}

function addArrow(slide, x, y, w = 0.0, h = 0.35) {
  // vertical arrow
  slide.addShape(pres.ShapeType.line, {
    x: x, y: y, w: w, h: h,
    line: { color: ACCENT1, width: 2, endArrowType: "triangle" }
  });
}

function addHArrow(slide, x, y, w = 0.4) {
  slide.addShape(pres.ShapeType.line, {
    x, y, w, h: 0,
    line: { color: ACCENT1, width: 2, endArrowType: "triangle" }
  });
}

function sectionHeader(slide, title, subtitle, color = ACCENT1) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 13.3, h: 7.5,
    fill: { color: DARK_BG }, line: { color: DARK_BG }
  });
  // accent stripe left
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.25, h: 7.5,
    fill: { color: color }, line: { color: color }
  });
  slide.addText(title, {
    x: 1, y: 2.5, w: 11, h: 1.2,
    fontSize: 42, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 1, y: 3.9, w: 11, h: 0.6,
      fontSize: 20, color: color, fontFace: "Calibri", align: "center"
    });
  }
}

// Fetch images safely
function fetchImages(urls) {
  try {
    const result = execSync(
      `node /home/daytona/skills/shared/scripts/fetch_images.js ${urls.map(u => `"${u}"`).join(" ")}`,
      { timeout: 30000 }
    ).toString();
    return JSON.parse(result);
  } catch (e) {
    return urls.map(u => ({ url: u, base64: null, error: e.message }));
  }
}

// ─── SLIDE 1: TITLE SLIDE ─────────────────────────────────────────
let s = addSlide(DARK_BG);
// big gradient-like rect
s.addShape(pres.ShapeType.rect, {
  x: 0, y: 0, w: 13.3, h: 7.5,
  fill: { type: "solid", color: DARK_BG }, line: { color: DARK_BG }
});
s.addShape(pres.ShapeType.rect, {
  x: 0, y: 4.8, w: 13.3, h: 2.7,
  fill: { color: MID_BG }, line: { color: MID_BG }
});
// Accent shapes
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 7.32, w: 13.3, h: 0.18, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });
// Cross symbol (medical)
s.addShape(pres.ShapeType.rect, { x: 0.7, y: 1.5, w: 0.15, h: 0.6, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });
s.addShape(pres.ShapeType.rect, { x: 0.55, y: 1.65, w: 0.45, h: 0.15, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });
s.addText("OBSTETRICS", {
  x: 1, y: 1.3, w: 11, h: 1.4,
  fontSize: 58, bold: true, color: WHITE, fontFace: "Calibri", align: "center",
  charSpacing: 8
});
s.addText("Complete Question Bank & Study Guide", {
  x: 1, y: 2.85, w: 11, h: 0.6,
  fontSize: 22, color: ACCENT1, fontFace: "Calibri", align: "center"
});
s.addText("2019 – 2024  |  Essay & Short Notes  |  All Major Topics", {
  x: 1, y: 3.5, w: 11, h: 0.45,
  fontSize: 15, color: LIGHT_GRAY, fontFace: "Calibri", align: "center"
});
s.addText("Topics Covered: Prolonged Pregnancy • Multiple Pregnancy • Hypertensive Disorders • Anemia • PPH • APH\nPreterm Labour • GDM • Cesarean Section • Rh-Negative Pregnancy • Labour & Delivery & MORE", {
  x: 0.6, y: 5.0, w: 12.1, h: 1.0,
  fontSize: 11.5, color: ACCENT5, fontFace: "Calibri", align: "center"
});
s.addText("42 Essay Topics  |  42 Short Note Topics  |  Exam Years Mapped", {
  x: 1, y: 6.3, w: 11, h: 0.4,
  fontSize: 13, color: ACCENT4, fontFace: "Calibri", align: "center", bold: true
});

// ─── SLIDE 2: INDEX / TABLE OF CONTENTS ──────────────────────────
s = addSlide(MID_BG);
addTitle(s, "📋  TABLE OF CONTENTS", 0.18, ACCENT1, 24);
const topics = [
  ["1. Prolonged Pregnancy","2. Multiple/Twin Pregnancy","3. Hypertensive Disorders"],
  ["4. Anemia in Pregnancy","5. Post-Partum Haemorrhage","6. Ante-Partum Haemorrhage"],
  ["7. Preterm Labour","8. Gestational Diabetes","9. Cesarean Section"],
  ["10. Rh-Negative Pregnancy","11. Labour","12. HELLP Syndrome"],
  ["13. Perinatal Mortality","14. Puerperium","15. Fetus & Newborn"],
  ["16. Maternal Adaptations","17. Aneuploidy Screening","18. Labour & Delivery"],
];
topics.forEach((row, ri) => {
  row.forEach((cell, ci) => {
    const colors = [ACCENT1, ACCENT2, ACCENT3, ACCENT4, "7B2FBE", "E76F51"];
    addBox(s, 0.3 + ci * 4.3, 1.1 + ri * 0.93, 4.0, 0.75, colors[ci % 6], cell, WHITE, 11.5, true);
  });
});
s.addText("* All topics mapped to exam years (2019–2024)", {
  x: 0.4, y: 7.05, w: 12.5, h: 0.3, fontSize: 10, color: LIGHT_GRAY, fontFace: "Calibri", italic: true
});

// ─── SLIDE 3: SECTION HEADER – ESSAY TOPICS ──────────────────────
s = addSlide(DARK_BG);
sectionHeader(s, "ESSAY TOPICS", "Detailed Study Cards for All 13 Major Topics", ACCENT1);

// ─── SLIDE 4: PROLONGED PREGNANCY ────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "1.  PROLONGED PREGNANCY  |  Feb 2024", 0.18, ACCENT1, 24);
// Definition box
addBox(s, 0.3, 0.9, 5.8, 0.65, ACCENT2, "DEFINITION: Pregnancy ≥ 42 completed weeks (294 days) from LMP", WHITE, 12, true);
// Two columns
addSubtitle(s, "🔬 Complications", 1.75, ACCENT4);
bulletList(s, [
  "Uteroplacental insufficiency",
  "Meconium aspiration syndrome",
  "Macrosomia → CPD, shoulder dystocia",
  "Oligohydramnios",
  "Fetal distress / Intrauterine death",
  "Post-maturity syndrome",
  "Increased C-section rate",
], 0.3, 2.15, 5.8, 3.2, { fontSize: 12 });

addSubtitle(s, "🩺 Management", 1.75, ACCENT3);
bulletList(s, [
  "Confirm dating – USG, LMP",
  "Antepartum fetal surveillance from 41 wks",
  "Biophysical profile (BPP), NST, AFI",
  "Cervical assessment – Bishop score",
  "Induction of labour at 41–42 weeks",
  "C-section if induction fails / fetal distress",
  "Monitor for meconium-stained liquor",
], 6.5, 2.15, 6.0, 3.2, { fontSize: 12 });

addSubtitle(s, "🔍 Investigations", 1.75, ACCENT1);
bulletList(s, ["USG for BPP", "NST / CTG", "Amniotic Fluid Index", "Doppler studies"], 0.3, 1.78, 5.8, 0.85, { fontSize: 11 });

// Flowchart: Management
addSubtitle(s, "▶ Management Flowchart", 5.5, ACCENT4);
addBox(s, 0.3, 5.95, 3.5, 0.5, "1B3A6B", "41 Weeks: ANC Surveillance", ACCENT1, 11, true);
addHArrow(s, 3.85, 6.2, 0.4);
addBox(s, 4.3, 5.95, 3.0, 0.5, "1B3A6B", "42 Weeks: Induce Labour", ACCENT4, 11, true);
addHArrow(s, 7.35, 6.2, 0.4);
addBox(s, 7.8, 5.95, 2.5, 0.5, ACCENT2, "Fetal Distress → C-Section", WHITE, 11, true);
addHArrow(s, 10.35, 6.2, 0.4);
addBox(s, 10.8, 5.95, 2.1, 0.5, ACCENT3, "Normal → SVD", WHITE, 11, true);

// ─── SLIDE 5: MULTIPLE PREGNANCY ─────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "2.  MULTIPLE / TWIN PREGNANCY  |  Feb 24, Jan 20, Apr 21", 0.18, ACCENT1, 22);
// Etiology + Classification boxes
addBox(s, 0.3, 0.88, 3.8, 0.5, "7B2FBE", "ETIOLOGY", WHITE, 13, true);
bulletList(s, ["Ovulation induction / ART", "Race (African > Asian)", "Advanced maternal age", "Hereditary (maternal side)", "High parity"], 0.3, 1.42, 3.8, 1.8, { fontSize: 11.5 });

addBox(s, 4.3, 0.88, 4.5, 0.5, ACCENT2, "DIAGNOSIS", WHITE, 13, true);
bulletList(s, [
  "Clinical: uterus large for dates, multiple FHR sites",
  "USG: gold standard – chorionicity, amnionicity",
  "Twin peak sign (Lambda) → DCDA",
  "T-sign → MCDA",
  "Elevated AFP / hCG",
], 4.3, 1.42, 4.5, 1.8, { fontSize: 11 });

addBox(s, 9.0, 0.88, 4.0, 0.5, ACCENT3, "ZYGOSITY", WHITE, 13, true);
const zyg = [
  ["DZ (70%)", "MZ (30%)"],
  ["2 ova + 2 sperms", "1 ovum + 1 sperm"],
  ["Always DCDA", "DCDA/MCDA/MCMA"],
  ["No shared placenta", "May share placenta"],
];
zyg.forEach((row, ri) => {
  row.forEach((cell, ci) => {
    addBox(s, 9.05 + ci * 1.95, 1.42 + ri * 0.48, 1.85, 0.42,
      ri === 0 ? ACCENT1 : (ci === 0 ? "1B3A6B" : "1B2A4B"), cell, WHITE, 10);
  });
});

addSubtitle(s, "⚠ Complications of Multifetal Gestation", 3.4, ACCENT4);
const comps = [
  ["Maternal", ["Hyperemesis", "Anaemia", "Preterm Labour", "PIH/PET", "Polyhydramnios", "PPH"]],
  ["Fetal", ["IUGR", "Malpresentation", "TTTS", "Cord entanglement", "IUD", "Prematurity"]],
  ["Neonatal", ["RDS", "IVH", "NEC", "Hypoglycaemia", "Hyperbilirubinaemia"]],
];
comps.forEach(([hdr, items], ci) => {
  const cx = 0.3 + ci * 4.35;
  addBox(s, cx, 3.88, 4.0, 0.42, ACCENT2, hdr, WHITE, 13, true);
  bulletList(s, items, cx, 4.35, 4.0, 2.8, { fontSize: 10.5 });
});

// TTTS note
addBox(s, 0.3, 7.05, 12.5, 0.35, "1B3A6B",
  "TTTS: Twin-to-Twin Transfusion Syndrome | Quintero staging | Tx: Fetoscopic laser coagulation (preferred)", ACCENT1, 11, true);

// ─── SLIDE 6: HYPERTENSIVE DISORDERS ─────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "3.  HYPERTENSIVE DISORDERS OF PREGNANCY", 0.18, ACCENT1, 24);
// Classification table
const hdpClasses = [
  ["Classification", "Definition", "Key Features"],
  ["Gestational HTN", "BP ≥140/90 after 20 wks\nNo proteinuria", "Resolves by 12 wks postpartum"],
  ["Pre-Eclampsia", "HTN + Proteinuria (≥300mg/24h)\nafter 20 wks", "Multi-system disorder"],
  ["Severe PET", "SBP ≥160 or DBP ≥110\nor end-organ damage", "HELLP, pulmonary edema, seizures"],
  ["Eclampsia", "PET + Convulsions\n(not due to other cause)", "Emergency – MgSO4 + Deliver"],
  ["Chronic HTN", "Pre-existing or before 20 wks", "May superimpose PET"],
  ["Superimposed PET", "Chronic HTN + new proteinuria", "Higher risk of complications"],
];
hdpClasses.forEach((row, ri) => {
  row.forEach((cell, ci) => {
    const isHeader = ri === 0;
    addBox(s, 0.25 + ci * 4.35, 0.9 + ri * 0.82, 4.15, 0.75,
      isHeader ? ACCENT1 : (ri % 2 === 0 ? "1B2A4B" : "0D1B2A"),
      cell, isHeader ? DARK_TEXT : WHITE, isHeader ? 12 : 10.5, isHeader);
  });
});

// Treatment flowchart
addSubtitle(s, "▶ Eclampsia Management Flowchart", 5.9, ACCENT4);
const ecl = [
  { label: "Eclampsia Seizure", color: ACCENT2 },
  { label: "Airway / Lateral decubitus", color: "7B2FBE" },
  { label: "MgSO4 (Pritchard/Zuspan)", color: ACCENT1 },
  { label: "Antihypertensives (Labetalol/Hydralazine)", color: ACCENT3 },
  { label: "Fetal Monitoring + Delivery", color: ACCENT4 },
  { label: "ICU / HDU Monitoring", color: "E76F51" },
];
ecl.forEach((step, i) => {
  addBox(s, 0.25 + i * 2.2, 6.3, 2.0, 0.65, step.color, step.label, WHITE, 10, true);
  if (i < ecl.length - 1) addHArrow(s, 2.28 + i * 2.2, 6.63, 0.18);
});

// ─── SLIDE 7: HELLP & MgSO4 REGIMENS ─────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "3a.  HELLP SYNDROME  &  MgSO4 REGIMENS", 0.18, ACCENT2, 24);

addSubtitle(s, "HELLP Syndrome (Hemolysis, Elevated Liver enzymes, Low Platelets)", 0.88, ACCENT4);
const hellpCols = [
  ["Criteria", ["LDH >600 U/L", "AST/ALT >70 U/L", "Platelets <100,000/µL"]],
  ["Tennessee Classification", ["Class I: Plt <50k", "Class II: Plt 50–100k", "Class III: Plt 100–150k"]],
  ["Management", ["Stabilise BP", "MgSO4 prophylaxis", "Steroids if <34 wks", "Deliver ≥34 wks", "Platelets if <20k or surgery"]],
];
hellpCols.forEach(([hdr, items], ci) => {
  addBox(s, 0.3 + ci * 4.35, 1.35, 4.0, 0.45, ACCENT2, hdr, WHITE, 12, true);
  bulletList(s, items, 0.3 + ci * 4.35, 1.85, 4.0, 1.7, { fontSize: 12 });
});

addSubtitle(s, "MgSO4 Regimens", 3.8, ACCENT1);
const mgRegs = [
  ["Pritchard Regimen", ["Loading: 4g IV (slow) + 10g IM (5g each buttock)", "Maintenance: 5g IM every 4h", "Continue 24h after last fit / delivery", "Monitor: RR >12/min, urine >25ml/h, patellar reflex present"]],
  ["Zuspan Regimen", ["Loading: 4g IV over 20 min", "Maintenance: 1–2g/hr IV infusion", "Easier to titrate, preferred in ICU setting", "Same monitoring parameters"]],
  ["Antidote", ["Calcium gluconate 1g IV slowly", "Given if toxicity signs appear", "Respiratory depression, loss of DTRs"]],
];
mgRegs.forEach(([hdr, items], ci) => {
  addBox(s, 0.3 + ci * 4.35, 4.3, 4.0, 0.48, ACCENT1, hdr, DARK_TEXT, 12, true);
  bulletList(s, items, 0.3 + ci * 4.35, 4.85, 4.0, 2.3, { fontSize: 11 });
});

addBox(s, 0.3, 7.1, 12.5, 0.32, ACCENT2,
  "⚠ Toxicity: Loss of patellar reflex (first sign) → Respiratory arrest → Cardiac arrest  |  Antidote: Ca Gluconate 1g IV", WHITE, 11, true);

// ─── SLIDE 8: ANEMIA IN PREGNANCY ────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "4.  ANEMIA IN PREGNANCY  |  Feb 24, Apr 24, Jul 24, Aug 22, Jul 19", 0.18, ACCENT1, 20);
// Definition
addBox(s, 0.3, 0.88, 12.5, 0.48, ACCENT2,
  "WHO Definition: Hb <11 g/dL in pregnancy  |  Severe: Hb <7 g/dL  |  Very Severe: Hb <4 g/dL", WHITE, 12, true);

// Classification
addSubtitle(s, "Classification (WHO)", 1.52, ACCENT4);
const aneClass = [
  ["Mild", "Hb 10–10.9 g/dL", ACCENT3],
  ["Moderate", "Hb 7–9.9 g/dL", ACCENT4],
  ["Severe", "Hb 4–6.9 g/dL", ACCENT2],
  ["Very Severe", "Hb <4 g/dL", "8B1A1A"],
];
aneClass.forEach(([grade, range, clr], i) => {
  addBox(s, 0.3 + i * 3.15, 1.97, 2.9, 0.55, clr, `${grade}\n${range}`, WHITE, 11, true);
});

// IDA
addSubtitle(s, "Iron Deficiency Anemia (IDA) – Most Common", 2.75, ACCENT3);
bulletList(s, [
  "Causes: Poor intake, multiple pregnancies, malabsorption, hookworm infestation",
  "Complications: IUGR, preterm birth, PPH, maternal mortality",
  "Management: Oral iron (FeSO4 200mg TDS) for mild-moderate; IV iron (Ferric carboxymaltose) for severe",
  "Prevention: IFA supplementation from 12 wks; 100–150mg elemental iron + folic acid 500µg daily",
], 0.3, 3.2, 12.5, 1.8, { fontSize: 11.5 });

// Severe anemia management
addSubtitle(s, "Severe Anemia (Hb <7 g/dL) at 28 Weeks – Management", 5.15, ACCENT2);
const sevAneSteps = ["Admit + Bedrest", "High protein diet", "Oral/IV iron therapy", "Treat cause (deworm etc.)", "Target Hb ≥10 by term", "Transfuse if Hb <6 or symptomatic"];
sevAneSteps.forEach((step, i) => {
  addBox(s, 0.3 + i * 2.18, 5.6, 2.0, 0.65, i === 5 ? ACCENT2 : "1B3A6B", step, i === 5 ? WHITE : ACCENT1, 10.5, true);
  if (i < sevAneSteps.length - 1) addHArrow(s, 2.33 + i * 2.18, 5.93, 0.15);
});

addSubtitle(s, "Intrapartum Management", 6.45, ACCENT1);
bulletList(s, [
  "Active management of 3rd stage (Oxytocin 10IU IM)",
  "Minimize blood loss",
  "Transfuse if Hb <8 g/dL before delivery",
  "Paediatric presence at delivery for neonatal care",
], 0.3, 6.88, 12.5, 0.65, { fontSize: 11 });

// ─── SLIDE 9: PPH ─────────────────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "5.  POST-PARTUM HAEMORRHAGE (PPH)  |  Jul 23, Aug 21, Aug 22, Jan 20, Jan 19", 0.18, ACCENT1, 19);
addBox(s, 0.3, 0.88, 12.5, 0.48, ACCENT2,
  "Definition: Blood loss ≥500mL after vaginal delivery or ≥1000mL after C-section within 24 hrs (Primary) | After 24hrs–6wks (Secondary)", WHITE, 11.5, true);

// 4 T's of PPH
addSubtitle(s, "Etiological Factors – The 4 T's", 1.52, ACCENT4);
const fourTs = [
  ["TONE (70–80%)", ACCENT2, ["Uterine atony", "Grand multiparity", "Macrosomia", "Polyhydramnios", "Prolonged labour"]],
  ["TRAUMA (20%)", ACCENT4, ["Cervical/vaginal tears", "Uterine rupture", "Episiotomy", "Broad ligament hematoma"]],
  ["TISSUE (10%)", ACCENT3, ["Retained placenta", "Retained products", "Morbidly adherent placenta", "Placenta accreta"]],
  ["THROMBIN (<1%)", ACCENT1, ["Coagulation defects", "DIC", "ITP", "Von Willebrand disease"]],
];
fourTs.forEach(([hdr, clr, items], ci) => {
  addBox(s, 0.3 + ci * 3.2, 2.0, 3.0, 0.48, clr, hdr, ci === 0 ? WHITE : DARK_TEXT, 12, true);
  bulletList(s, items, 0.3 + ci * 3.2, 2.55, 3.0, 2.0, { fontSize: 10.5 });
});

// Management flowchart
addSubtitle(s, "▶ Management of Atonic PPH – Stepwise Approach", 4.72, ACCENT4);
const pphSteps = [
  ["Call for HELP + IV Access", ACCENT1],
  ["Bimanual Compression", "1B3A6B"],
  ["Oxytocin 10U IM / 20U IV", ACCENT3],
  ["Ergometrine 0.5mg IM", ACCENT4],
  ["Carboprost (PGF2α) 0.25mg IM", "7B2FBE"],
  ["Misoprostol 1000µg PR", ACCENT2],
  ["B-Lynch / Brace Suture", "E76F51"],
  ["Hysterectomy (Last resort)", "8B1A1A"],
];
pphSteps.forEach((step, i) => {
  const row = Math.floor(i / 4);
  const col = i % 4;
  addBox(s, 0.3 + col * 3.25, 5.2 + row * 0.88, 3.0, 0.72, step[1], step[0], WHITE, 10, true);
  if (col < 3 && i < pphSteps.length - 1 && row === Math.floor((i + 1) / 4))
    addHArrow(s, 3.33 + col * 3.25, 5.57 + row * 0.88, 0.2);
});
addBox(s, 0.3, 7.0, 12.5, 0.36, "1B3A6B",
  "AMTSL: Active Management of Third Stage of Labour – Oxytocin + CCT + Uterine massage → reduces PPH by 60%", ACCENT1, 11, true);

// ─── SLIDE 10: APH ────────────────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "6.  ANTE-PARTUM HAEMORRHAGE (APH)  |  Jul 23, Jul 19, Apr 21, Mar 22", 0.18, ACCENT1, 21);
addBox(s, 0.3, 0.88, 12.5, 0.42, ACCENT2,
  "Definition: Bleeding from genital tract after 28 weeks gestation and before delivery of the baby", WHITE, 12, true);

// Comparison table
addSubtitle(s, "Comparison: Placenta Previa vs Abruptio Placenta", 1.45, ACCENT4);
const aphComp = [
  ["Feature", "Placenta Previa", "Abruptio Placenta"],
  ["Onset", "Sudden, painless", "Sudden with pain"],
  ["Bleeding", "Revealed, bright red", "May be concealed/revealed; dark"],
  ["Pain", "Absent", "Severe, board-like rigidity"],
  ["Uterus", "Soft, non-tender", "Tender, tense, woody hard"],
  ["Fetal parts", "High / malpresentation", "Palpable (if no tenderness)"],
  ["Fetal heart", "Usually present", "Often fetal distress/IUD"],
  ["Management", "Steroids + CS if major", "Emergency delivery"],
];
aphComp.forEach((row, ri) => {
  row.forEach((cell, ci) => {
    const isHdr = ri === 0;
    const colrs = [ACCENT1, "1B3A6B", ACCENT2];
    addBox(s, 0.25 + ci * 4.35, 1.9 + ri * 0.56, 4.1, 0.5,
      isHdr ? ACCENT1 : colrs[ci], cell, isHdr ? DARK_TEXT : WHITE, isHdr ? 12 : 10.5, isHdr);
  });
});
addBox(s, 0.3, 6.5, 12.5, 0.42, "1B3A6B",
  "Couvelaire Uterus: Extravasation of blood into uterine musculature in severe abruption → Blue, toneless uterus → Risk of PPH + DIC", ACCENT4, 11, true);
addBox(s, 0.3, 7.0, 12.5, 0.36, "1B3A6B",
  "Grading: Grade 0 (no symptoms) → Grade 1 (mild) → Grade 2 (moderate) → Grade 3 (severe: DIC, IUD)", ACCENT1, 11, true);

// ─── SLIDE 11: PRETERM LABOUR ─────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "7.  PRETERM LABOUR  |  Apr 21, Sep 20", 0.18, ACCENT1, 24);
addBox(s, 0.3, 0.88, 12.5, 0.42, ACCENT2,
  "Definition: Regular uterine contractions + cervical changes before 37 completed weeks with ≥3 contractions/10 min, each ≥30 sec", WHITE, 11.5, true);

// Two columns
const ptlLeft = {
  "Etiological Factors": ["Cervical incompetence", "PPROM", "Infections (UTI, chorioamnionitis)", "Multiple pregnancy", "Polyhydramnios", "Uterine anomalies", "Low socioeconomic status", "Previous preterm birth", "Trauma / surgery"],
  "Clinical Features": ["Regular painful contractions", "Cervical effacement & dilatation", "Pelvic pressure", "Bloody show", "Intact/ruptured membranes"],
};
let yPos = 1.45;
Object.entries(ptlLeft).forEach(([hdr, items]) => {
  addSubtitle(s, hdr, yPos, ACCENT4);
  bulletList(s, items, 0.3, yPos + 0.42, 5.8, items.length * 0.32 + 0.1, { fontSize: 11 });
  yPos += items.length * 0.32 + 0.85;
});

addSubtitle(s, "Prediction", 1.45, ACCENT3);
bulletList(s, ["Cervical length <25mm on TVS", "fFN (Fetal Fibronectin) – high NPV", "History of PTB"], 6.5, 1.88, 6.0, 1.1, { fontSize: 11 });

addSubtitle(s, "Prevention", 2.75, ACCENT3);
bulletList(s, ["Cervical cerclage (McDonald/Shirodkar)", "Progesterone supplementation (17-OHPC IM)", "Treat infections early", "Avoid uterine over-distension"], 6.5, 3.18, 6.0, 1.2, { fontSize: 11 });

addSubtitle(s, "Management", 4.1, ACCENT3);
bulletList(s, [
  "Tocolytics: Nifedipine (1st line), Atosiban, Indomethacin, Ritodrine",
  "Corticosteroids: Betamethasone 12mg IM × 2 doses (48h apart) if 24–34 wks",
  "MgSO4 for neuroprotection if <32 wks",
  "GBS prophylaxis if indicated",
  "Plan delivery in tertiary centre with NICU",
], 6.5, 4.55, 6.0, 2.4, { fontSize: 11 });

// ─── SLIDE 12: GDM ────────────────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "8.  GESTATIONAL DIABETES MELLITUS (GDM)  |  Mar 22, Sep 20", 0.18, ACCENT1, 21);
addBox(s, 0.3, 0.88, 12.5, 0.42, ACCENT4,
  "Definition: Carbohydrate intolerance of variable severity with onset or first recognition during pregnancy", DARK_TEXT, 12, true);

// Risk Factors
addSubtitle(s, "Risk Factors", 1.45, ACCENT2);
const rfs = ["BMI >30", "Previous GDM", "Prev macrosomia (>4kg)", "Family hx DM (1st degree)", "PCOS", "Ethnicity (S.Asian, Afro-Carib)", "Age >35", "Glycosuria on dipstick"];
const rfColors = [ACCENT2, ACCENT1, ACCENT3, ACCENT4, "7B2FBE", "E76F51", "00B4D8", ACCENT2];
rfs.forEach((rf, i) => {
  addBox(s, 0.3 + (i % 4) * 3.2, 1.9 + Math.floor(i / 4) * 0.58, 3.0, 0.48, rfColors[i], rf, WHITE, 11, true);
});

// Screening
addSubtitle(s, "Screening (DIPSI Method)", 3.25, ACCENT3);
bulletList(s, [
  "50g OGCT (Glucose Challenge Test): 1h plasma glucose",
  "  - ≥140 mg/dL → proceed to 75g 2h OGTT",
  "DIPSI: 75g glucose load (non-fasting) → 2h glucose",
  "  - ≥140 mg/dL = GDM  |  ≥120–139 = IGT",
  "Screen at 24–28 wks (or earlier if high risk)",
], 0.3, 3.72, 6.0, 1.8, { fontSize: 11 });

// Complications
addSubtitle(s, "Complications", 3.25, ACCENT2);
const gdmComps = [
  ["Maternal", ["PIH / Pre-eclampsia", "Polyhydramnios", "Recurrent UTI", "C-section rate ↑", "Future T2DM (50% risk)"]],
  ["Fetal", ["Macrosomia", "Congenital anomalies", "IUGR", "IUFD", "Shoulder dystocia"]],
  ["Neonatal", ["Hypoglycaemia", "Hypocalcaemia", "Polycythaemia", "RDS", "Jaundice"]],
];
gdmComps.forEach(([hdr, items], ci) => {
  addBox(s, 6.5 + ci * 2.28, 3.7, 2.1, 0.4, ACCENT2, hdr, WHITE, 11, true);
  bulletList(s, items, 6.5 + ci * 2.28, 4.15, 2.1, 1.8, { fontSize: 10 });
});

// Management flowchart
addSubtitle(s, "▶ Management Flowchart", 6.1, ACCENT4);
const gdmFlow = [
  ["Diagnose GDM", ACCENT2],
  ["MNT × 2 weeks", ACCENT1],
  ["Target: FBS <95, PPBS <120", ACCENT3],
  ["Not achieved → Insulin", ACCENT4],
  ["Monitor BPP + Growth USG", "7B2FBE"],
  ["Deliver at 38–39 wks", "E76F51"],
];
gdmFlow.forEach((step, i) => {
  addBox(s, 0.25 + i * 2.18, 6.55, 2.0, 0.65, step[1], step[0], i === 3 ? DARK_TEXT : WHITE, 10.5, true);
  if (i < gdmFlow.length - 1) addHArrow(s, 2.28 + i * 2.18, 6.88, 0.17);
});

// ─── SLIDE 13: CESAREAN SECTION ───────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "9.  CESAREAN SECTION (C-SECTION)  |  Apr 24", 0.18, ACCENT1, 24);
addBox(s, 0.3, 0.88, 12.5, 0.42, ACCENT4,
  "Definition: Delivery of fetus, placenta, and membranes through incisions in the anterior abdominal wall and uterine wall after 28 weeks", DARK_TEXT, 11.5, true);

addSubtitle(s, "Types", 1.45, ACCENT2);
const csTypes = [
  ["Lower Segment CS (LSCS)", "Most common; transverse incision; less morbidity; allows VBAC"],
  ["Classical CS", "Vertical uterine incision; used for preterm, anterior placenta previa; high risk of rupture"],
  ["Emergency CS", "Category 1 (immediate threat) to Category 4 (elective)"],
  ["Perimortem CS", "Maternal cardiac arrest – delivery within 5 min"],
];
csTypes.forEach(([type, desc], i) => {
  addBox(s, 0.3, 1.95 + i * 0.68, 3.5, 0.58, ACCENT2, type, WHITE, 11, true);
  slide_addText(s, desc, 3.9, 2.02 + i * 0.68, 8.8, 0.45, 11);
});

addSubtitle(s, "Indications", 4.9, ACCENT3);
const csInd = [
  ["Absolute", ["Contracted pelvis", "Placenta previa (major)", "Previous 2+ CS", "Transverse lie at term"]],
  ["Relative", ["Cephalopelvic disproportion", "Fetal distress", "Malpresentation", "Cord prolapse", "Previous uterine surgery"]],
  ["Complications", ["Anaesthetic risks", "Haemorrhage", "Wound infection", "DVT/PE", "Bladder/bowel injury", "Placenta accreta next preg."]],
];
csInd.forEach(([hdr, items], ci) => {
  addBox(s, 0.3 + ci * 4.35, 5.35, 4.1, 0.45, ACCENT3, hdr, DARK_TEXT, 12, true);
  bulletList(s, items, 0.3 + ci * 4.35, 5.85, 4.1, 1.6, { fontSize: 11 });
});

function slide_addText(sl, text, x, y, w, h, fontSize) {
  sl.addText(text, { x, y, w, h, fontSize, color: WHITE, fontFace: "Calibri", valign: "middle" });
}

// ─── SLIDE 14: RH-NEGATIVE PREGNANCY ──────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "10.  RH-NEGATIVE PREGNANCY  |  Sep 20", 0.18, ACCENT1, 24);
addBox(s, 0.3, 0.88, 12.5, 0.42, ACCENT4,
  "Rh-isoimmunisation: When Rh-negative mother develops antibodies against Rh-positive fetal RBCs → Haemolytic Disease of Fetus/Newborn (HDFN)", DARK_TEXT, 11, true);

addSubtitle(s, "Etiopathogenesis", 1.45, ACCENT2);
const rhPath = ["Rh-D positive fetus (Father Rh+)", "Fetomaternal hemorrhage (FMH)", "Mother sensitized → IgM (1st preg.) → IgG (2nd+)", "IgG crosses placenta → hemolysis of fetal RBCs", "Hydrops fetalis / IUD in severe cases"];
rhPath.forEach((step, i) => {
  addBox(s, 0.3 + i * 2.58, 1.95, 2.4, 0.72, i % 2 === 0 ? "1B3A6B" : "1B2A4B", step, ACCENT1, 10.5, true);
  if (i < rhPath.length - 1) addHArrow(s, 2.73 + i * 2.58, 2.3, 0.15);
});

addSubtitle(s, "Diagnosis", 2.9, ACCENT3);
bulletList(s, [
  "ICT (Indirect Coomb's Test) in mother – detects antibodies",
  "DCT (Direct Coomb's Test) in neonate – confirms HDFN",
  "Liley chart: Spectrophotometric analysis of amniotic fluid (OD450)",
  "MCA Doppler (PSV) – elevated → fetal anaemia",
  "Kleihauer-Betke test – quantifies FMH",
], 0.3, 3.35, 6.2, 1.85, { fontSize: 11.5 });

addSubtitle(s, "Prophylaxis & Management", 2.9, ACCENT2);
bulletList(s, [
  "Anti-D immunoglobulin (300µg = 1500IU) prevents sensitisation",
  "Antenatal: 28 & 34 weeks in non-sensitised Rh-ve mothers",
  "Postnatal: within 72 hours of delivery (if baby Rh+)",
  "Also after: miscarriage, amniocentesis, CVS, ectopic, APH",
  "Sensitised: Monitor antibody titres, MCA Doppler",
  "IUT (Intrauterine Transfusion) if severe fetal anaemia",
  "Early delivery if fetal compromise",
], 6.5, 3.35, 6.2, 2.7, { fontSize: 11 });

addBox(s, 0.3, 7.05, 12.5, 0.35, ACCENT2,
  "ROUTINE ANTENATAL ANTI-D PROPHYLAXIS (RAADP): 500IU at 28 weeks → reduces sensitisation from 1.5% to 0.2%", WHITE, 11, true);

// ─── SLIDE 15: LABOUR ─────────────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "11.  LABOUR  |  Feb 23", 0.18, ACCENT1, 24);
addBox(s, 0.3, 0.88, 12.5, 0.42, ACCENT4,
  "Definition: Regular painful uterine contractions causing progressive effacement and dilatation of cervix with descent of presenting part", DARK_TEXT, 12, true);

addSubtitle(s, "Stages of Labour", 1.45, ACCENT2);
const labourStages = [
  ["Stage 1", "Onset of labour → Full dilatation (10cm)", "Latent: 0–3cm | Active: 3–10cm (1cm/hr nullip, 1.5cm/hr multip)", ACCENT2],
  ["Stage 2", "Full dilatation → Delivery of baby", "Pushing phase; max 2hr nullip / 1hr multip (with epidural: +1hr)", ACCENT3],
  ["Stage 3", "Delivery of baby → Delivery of placenta", "Up to 30 min; AMTSL given", ACCENT1],
  ["Stage 4", "1 hour postpartum", "Monitoring for PPH, vitals, uterine tone", ACCENT4],
];
labourStages.forEach(([stg, def, detail, clr], i) => {
  addBox(s, 0.3, 1.95 + i * 1.05, 1.5, 0.85, clr, stg, WHITE, 14, true);
  s.addText(def, { x: 1.9, y: 2.0 + i * 1.05, w: 5.5, h: 0.35, fontSize: 11, color: WHITE, fontFace: "Calibri", bold: true });
  s.addText(detail, { x: 1.9, y: 2.38 + i * 1.05, w: 10.8, h: 0.35, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri" });
});

addSubtitle(s, "Mechanism of Labour (LOA – Most Common)", 6.25, ACCENT3);
const mech = ["Engagement", "Descent", "Flexion", "Internal Rotation", "Extension", "Restitution", "External Rotation", "Expulsion"];
mech.forEach((step, i) => {
  addBox(s, 0.3 + i * 1.62, 6.7, 1.48, 0.55, i % 2 === 0 ? ACCENT1 : "1B3A6B", step, WHITE, 9.5, true);
  if (i < mech.length - 1) addHArrow(s, 1.81 + i * 1.62, 6.97, 0.11);
});

// ─── SLIDE 16: SECTION HEADER – SHORT NOTES ───────────────────────
s = addSlide(DARK_BG);
sectionHeader(s, "SHORT NOTE TOPICS", "Key Points, Definitions & Exam Highlights", ACCENT2);

// ─── SLIDE 17: PERINATAL & MATERNAL MORTALITY ─────────────────────
s = addSlide(MID_BG);
addTitle(s, "SHORT NOTE: PERINATAL & MATERNAL MORTALITY  |  Jan 20, Feb 24, Jul 23", 0.18, ACCENT2, 19);
addSubtitle(s, "Perinatal Mortality", 0.88, ACCENT4);
bulletList(s, [
  "Definition: Deaths from 28 weeks gestation to 7 days of life",
  "Perinatal Mortality Rate (PMR) = (Stillbirths + Early neonatal deaths) / 1000 total births",
  "India PMR ≈ 21–23/1000 (2021 SRS)",
  "Causes: Birth asphyxia, prematurity, congenital anomalies, infection, IUGR",
], 0.3, 1.35, 12.5, 1.5, { fontSize: 12 });

addSubtitle(s, "Maternal Mortality Ratio (MMR)", 3.0, ACCENT2);
bulletList(s, [
  "Definition: Maternal deaths per 100,000 live births",
  "India MMR = 97/100,000 (2018–20 SRS) – major improvement from 254 (2004–06)",
  "WHO target: <70/100,000 by 2030 (SDG 3.1)",
], 0.3, 3.45, 12.5, 1.1, { fontSize: 12 });

addSubtitle(s, "Causes of Maternal Death (HAEMORRHAGE – leading cause in India)", 4.7, ACCENT3);
const mmCauses = ["Haemorrhage (38%)", "Hypertensive disorders (20%)", "Sepsis (11%)", "Obstructed labour (9%)", "Unsafe abortion (8%)", "Other (14%)"];
mmCauses.forEach((cause, i) => {
  addBox(s, 0.3 + (i % 3) * 4.35, 5.15 + Math.floor(i / 3) * 0.72, 4.1, 0.58, [ACCENT2, "7B2FBE", ACCENT4, ACCENT1, ACCENT3, "E76F51"][i], cause, WHITE, 12, true);
});

addSubtitle(s, "Strategies to Reduce Maternal Mortality", 6.6, ACCENT1);
bulletList(s, [
  "JSSK – Janani Shishu Suraksha Karyakaram | JSY – Janani Suraksha Yojana | Muthulakshmi Reddy Scheme",
  "Skilled birth attendance | EmOC facilities | ANC quality | Blood banking | Transport",
], 0.3, 7.05, 12.5, 0.42, { fontSize: 11 });

// ─── SLIDE 18: PUERPERIUM ─────────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "SHORT NOTE: PUERPERIUM  |  Apr 21, Jan 20", 0.18, ACCENT2, 24);
addBox(s, 0.3, 0.88, 12.5, 0.42, ACCENT4,
  "Puerperium: Period from delivery of placenta to return of reproductive organs to non-pregnant state – approximately 6 weeks", DARK_TEXT, 12, true);

addSubtitle(s, "Problems Associated with Puerperium", 1.45, ACCENT3);
const puerp = [
  ["PPH", "Primary (24h) or secondary (after 24h–6 wks). Causes: uterine atony, retained products, infection"],
  ["Puerperal Sepsis", "Temp >38°C on 2 of first 10 days (excluding 1st 24h). Common organisms: E. coli, Group B Strep, Staph aureus"],
  ["DVT/PE", "Hypercoagulable state, immobility. Anticoagulate with LMWH"],
  ["Mastitis", "Engorgement → cracked nipple → infection. Tx: Flucloxacillin, continue breastfeeding"],
  ["Depression", "Baby blues (day 3–5, self-limiting) vs Postnatal depression vs Puerperal psychosis (emergency)"],
  ["Sheehan Syndrome", "Postpartum pituitary necrosis due to severe PPH → panhypopituitarism"],
];
puerp.forEach(([cond, detail], i) => {
  addBox(s, 0.3, 1.95 + i * 0.77, 2.8, 0.62, [ACCENT2, ACCENT1, ACCENT3, ACCENT4, "7B2FBE", "E76F51"][i], cond, WHITE, 12, true);
  s.addText(detail, { x: 3.2, y: 2.02 + i * 0.77, w: 9.7, h: 0.58, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle" });
});

// ─── SLIDE 19: FETUS & NEWBORN ────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "SHORT NOTE: FETUS & NEWBORN  |  Multiple Exams", 0.18, ACCENT2, 24);

// APGAR Score table
addSubtitle(s, "APGAR Score (Jan 19)", 0.88, ACCENT4);
const apgar = [
  ["Sign", "0", "1", "2"],
  ["Appearance (Color)", "Blue/Pale all over", "Blue extremities", "Pink all over"],
  ["Pulse (Heart Rate)", "Absent", "<100 bpm", "≥100 bpm"],
  ["Grimace (Reflex)", "No response", "Grimace", "Cry / Cough"],
  ["Activity (Muscle Tone)", "Limp", "Some flexion", "Active motion"],
  ["Respiration", "Absent", "Slow/Irregular", "Good, crying"],
];
apgar.forEach((row, ri) => {
  row.forEach((cell, ci) => {
    const isHdr = ri === 0;
    addBox(s, 0.25 + ci * 3.2, 1.35 + ri * 0.58, 3.05, 0.52,
      isHdr ? ACCENT1 : (ri % 2 ? "1B2A4B" : "0D1B2A"), cell, isHdr ? DARK_TEXT : WHITE, isHdr ? 11 : 10, isHdr);
  });
});

// Neonatal Resuscitation
addSubtitle(s, "Neonatal Resuscitation (NRP) – Feb 23", 4.9, ACCENT3);
const nrpSteps = ["Warm & Dry", "Stimulate", "Assess HR/Breathing", "PPV (BMV) if HR<100", "Chest compressions if HR<60", "Drugs: Epinephrine"];
nrpSteps.forEach((step, i) => {
  addBox(s, 0.25 + i * 2.18, 5.38, 2.0, 0.65, [ACCENT3, ACCENT1, ACCENT4, ACCENT2, "7B2FBE", "E76F51"][i], step, WHITE, 10.5, true);
  if (i < nrpSteps.length - 1) addHArrow(s, 2.28 + i * 2.18, 5.7, 0.17);
});

// RDS
addSubtitle(s, "RDS (Respiratory Distress Syndrome) – Apr 21", 6.2, ACCENT2);
bulletList(s, [
  "Surfactant deficiency → Type II pneumocytes immature (before 34 wks)",
  "Features: Grunting, nasal flaring, intercostal retractions, cyanosis within 6h of birth",
  "Prevention: Antenatal corticosteroids (24–34 wks) | Treatment: Surfactant therapy + CPAP/ventilation",
], 0.3, 6.65, 12.5, 0.78, { fontSize: 11 });

// ─── SLIDE 20: MATERNAL ADAPTATIONS ──────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "SHORT NOTE: MATERNAL ADAPTATIONS IN PREGNANCY  |  Aug 21, Feb 24", 0.18, ACCENT2, 18);

addSubtitle(s, "Cardiovascular Changes", 0.88, ACCENT1);
bulletList(s, [
  "CO increases 40–50% (peaks 28–32 wks) – due to ↑HR and ↑SV",
  "Blood volume ↑ 45–50% (plasma 50% > RBC 20% → physiological anaemia)",
  "SVR decreases → BP falls in 2nd trimester, rises near term",
  "Cardiac output: Supine position causes aortocaval compression → SVC syndrome",
], 0.3, 1.35, 12.5, 1.3, { fontSize: 11.5 });

addSubtitle(s, "Haematological Changes", 2.82, ACCENT4);
bulletList(s, [
  "WBC rises to 9,000–15,000 (non-infective, physiological leukocytosis)",
  "ESR increases (not useful in pregnancy diagnostics)",
  "Coagulation: Hypercoagulable state (↑Fibrinogen, ↑F VII/VIII/X, ↓Protein S) → DVT risk",
  "Platelets: Slight decrease due to dilution (gestational thrombocytopenia)",
], 0.3, 3.3, 12.5, 1.3, { fontSize: 11.5 });

addSubtitle(s, "Respiratory Changes", 4.77, ACCENT3);
bulletList(s, [
  "Tidal volume ↑ 40%; Respiratory rate slightly increases",
  "FRC decreases (diaphragm elevation)",
  "Chronic respiratory alkalosis: PaCO2 ↓ to 30 mmHg → compensatory metabolic acidosis",
  "Oxygen demand increases 20%",
], 0.3, 5.25, 6.2, 1.3, { fontSize: 11.5 });

addSubtitle(s, "Other Changes", 4.77, ACCENT2);
bulletList(s, [
  "Renal: GFR ↑ 50%, creatinine/urea lower; glycosuria common",
  "GI: Nausea/vomiting (HCG effect); delayed gastric emptying; GERD",
  "Endocrine: Pituitary enlarges; prolactin ↑; insulin resistance in 3rd trimester",
  "Skin: Linea nigra, melasma, striae gravidarum, palmar erythema",
], 6.5, 5.25, 6.2, 1.3, { fontSize: 11.5 });

addBox(s, 0.3, 6.68, 12.5, 0.38, "1B3A6B",
  "NYHA Classification in Pregnancy: Class I & II → vaginal delivery possible; Class III → hospitalize from 28 wks; Class IV → terminate/C-section", ACCENT1, 11, true);

addBox(s, 0.3, 7.1, 12.5, 0.32, "1B3A6B",
  "Fetal Circulation: Foramen ovale + Ductus arteriosus + Ductus venosus → Closed at birth | PaO2 low (fetal Hb compensates)", ACCENT4, 11, true);

// ─── SLIDE 21: ANEUPLOIDY & PRENATAL SCREENING ────────────────────
s = addSlide(MID_BG);
addTitle(s, "SHORT NOTE: ANEUPLOIDY SCREENING & PRENATAL DIAGNOSIS  |  Feb 24, Aug 22", 0.18, ACCENT2, 18);

addSubtitle(s, "First Trimester Screening (11–14 weeks)", 0.88, ACCENT4);
bulletList(s, [
  "NT (Nuchal Translucency) + PAPP-A + Free β-hCG → Combined test",
  "NT >3.5mm → high risk for trisomies 21, 18, 13",
  "Cell-free DNA (cfDNA/NIPT): Sensitivity >99% for Down syndrome",
  "Trisomy 21 (Down): ↓PAPP-A, ↑hCG, ↑NT, absent nasal bone",
], 0.3, 1.35, 6.2, 1.7, { fontSize: 11.5 });

addSubtitle(s, "Second Trimester Screening", 0.88, ACCENT2);
bulletList(s, [
  "Quad screen: AFP + hCG + uE3 + Inhibin A",
  "AFP ↑ → NTD (open spina bifida, anencephaly)",
  "Triple test (15–20 wks): AFP + hCG + uE3",
  "Anomaly scan at 18–20 wks",
], 6.5, 1.35, 6.2, 1.7, { fontSize: 11.5 });

addSubtitle(s, "CVS (Chorionic Villus Sampling)", 3.2, ACCENT3);
bulletList(s, [
  "Timing: 10–12 weeks gestation",
  "Route: Transcervical or transabdominal",
  "Advantage: Early diagnosis, rapid result",
  "Risk: Miscarriage 0.5–1%; limb defects if <10 wks",
], 0.3, 3.65, 6.2, 1.5, { fontSize: 11.5 });

addSubtitle(s, "Amniocentesis", 3.2, ACCENT2);
bulletList(s, [
  "Timing: 15–18 weeks gestation (optimal 16 wks)",
  "Provides: Karyotype, AFP, metabolic studies",
  "Risk: Miscarriage 0.5–1%; culture takes 2–3 weeks",
  "Technique: USG-guided, 20mL amniotic fluid",
], 6.5, 3.65, 6.2, 1.5, { fontSize: 11.5 });

// Down syndrome markers table
addSubtitle(s, "Down Syndrome (Trisomy 21) Marker Summary", 5.35, ACCENT1);
const ds = [
  ["Test", "NT", "PAPP-A", "hCG", "AFP", "uE3"],
  ["Trisomy 21", "↑", "↓", "↑", "↓", "↓"],
  ["Trisomy 18", "↑", "↓", "↓", "↓", "↓"],
  ["Trisomy 13", "↑", "↓", "↓", "N", "N"],
];
ds.forEach((row, ri) => {
  row.forEach((cell, ci) => {
    addBox(s, 0.25 + ci * 2.58, 5.82 + ri * 0.52, 2.45, 0.46,
      ri === 0 ? ACCENT1 : (ri % 2 ? "1B2A4B" : "0D1B2A"), cell, ri === 0 ? DARK_TEXT : WHITE, ri === 0 ? 12 : 13, ri === 0);
  });
});
addBox(s, 0.3, 7.0, 12.5, 0.36, "1B3A6B",
  "Preimplantation Genetic Diagnosis (PGD): Biopsy of 1 blastomere from 8-cell embryo → for single gene defects, chromosomal translocations | Jul 24, Aug 21", ACCENT4, 11, true);

// ─── SLIDE 22: LABOUR & DELIVERY SHORT NOTES ─────────────────────
s = addSlide(MID_BG);
addTitle(s, "SHORT NOTE: LABOUR & DELIVERY  |  Multiple Exams", 0.18, ACCENT2, 23);

// Bishop Score
addSubtitle(s, "Bishop Score & Interpretation (Jul 23, Sep 20)", 0.88, ACCENT3);
const bishop = [
  ["Feature", "0", "1", "2", "3"],
  ["Dilatation", "Closed", "1–2cm", "3–4cm", "≥5cm"],
  ["Effacement", "<30%", "40–50%", "60–70%", "≥80%"],
  ["Station", "-3", "-2", "-1/0", "+1/+2"],
  ["Consistency", "Firm", "Medium", "Soft", "–"],
  ["Position", "Posterior", "Mid", "Anterior", "–"],
];
bishop.forEach((row, ri) => {
  row.forEach((cell, ci) => {
    addBox(s, 0.25 + ci * 2.58, 1.35 + ri * 0.5, 2.45, 0.44,
      ri === 0 ? ACCENT3 : (ri % 2 ? "1B2A4B" : "0D1B2A"), cell, ri === 0 ? DARK_TEXT : WHITE, ri === 0 ? 11 : 10.5, ri === 0);
  });
});
s.addText("Score ≥6: Favourable (induction likely to succeed)  |  Score ≤5: Unfavourable (cervical ripening first)", {
  x: 13.2, y: 1.35, w: 0.01, h: 0.01, fontSize: 1, color: MID_BG
}); // invisible spacer
s.addText("Score ≥6 = Favourable (induction likely to succeed)  |  Score ≤5 = Unfavourable → ripen first (PGE2/misoprostol/Foley's)", {
  x: 0.3, y: 4.55, w: 12.5, h: 0.38, fontSize: 11, color: ACCENT4, fontFace: "Calibri", bold: true
});

// Episiotomy
addSubtitle(s, "Episiotomy  |  Jul 19, Jan 20", 5.1, ACCENT2);
bulletList(s, [
  "Definition: Surgical incision of perineum to enlarge vaginal outlet during delivery",
  "Types: Mediolateral (most common in India) vs Median (higher fistula risk)",
  "Indications: Fetal distress, forceps/vacuum delivery, large baby, rigid perineum",
  "Complications: Haematoma, infection, extension, dyspareunia, incontinence",
], 0.3, 5.55, 6.2, 1.65, { fontSize: 11 });

// Cord Prolapse
addSubtitle(s, "Cord Prolapse  |  Jan 20", 5.1, ACCENT1);
bulletList(s, [
  "Definition: Descent of umbilical cord below presenting part after ROM",
  "Risk factors: Malpresentation (footling breech), high presenting part, polyhydramnios, preterm, multiparity",
  "Management: Elevate presenting part manually + emergency C-section",
  "If at full dilatation – immediate vaginal delivery",
], 6.5, 5.55, 6.2, 1.65, { fontSize: 11 });

addBox(s, 0.3, 7.28, 12.5, 0.15, "1B3A6B",
  "Partograph: Tool to monitor labour progress – alert line (1cm/hr) & action line (4h after) → guides intervention decisions", ACCENT5, 10, false);

// ─── SLIDE 23: SECTION HEADER – SPECIAL TOPICS ───────────────────
s = addSlide(DARK_BG);
sectionHeader(s, "SPECIAL TOPICS", "Frequently Repeated Short Notes", ACCENT3);

// ─── SLIDE 24: AFTER-COMING HEAD / INSTRUMENTAL DELIVERY ──────────
s = addSlide(MID_BG);
addTitle(s, "AFTER-COMING HEAD IN BREECH  &  INSTRUMENTAL DELIVERY  |  Feb 24, Jul 23", 0.18, ACCENT3, 18);

addSubtitle(s, "Delivery of After-coming Head in Breech", 0.88, ACCENT4);
const breechMethods = [
  ["Mauriceau-Smellie-Veit (MSV)", "Jaw flexion + traction on shoulders; most common; safe"],
  ["Burns-Marshall Technique", "Fetal body raised in arc; gravity delivers head"],
  ["Forceps to After-coming Head", "Piper's forceps; safest; 1st assistant holds the body"],
  ["Wigand-Martin-Winckel", "Assistant elevates body; operator uses suprapubic pressure"],
];
breechMethods.forEach(([method, desc], i) => {
  addBox(s, 0.3, 1.42 + i * 0.72, 3.8, 0.58, [ACCENT3, ACCENT1, ACCENT4, ACCENT2][i], method, WHITE, 11, true);
  s.addText(desc, { x: 4.2, y: 1.49 + i * 0.72, w: 8.7, h: 0.5, fontSize: 11, color: WHITE, fontFace: "Calibri", valign: "middle" });
});

addSubtitle(s, "Vacuum Delivery (Ventouse) – Jul 23, Sep 20", 4.35, ACCENT3);
bulletList(s, [
  "Prerequisites: Fully dilated cervix, ROM, no CPD, vertex presentation, ≥36 wks",
  "Complications: Chignon (scalp oedema), cephalhaematoma, subgaleal haematoma, neonatal jaundice",
  "Contraindications: Face/brow presentation, gestation <34 wks, fetal bleeding disorders",
], 0.3, 4.8, 12.5, 1.15, { fontSize: 11.5 });

addSubtitle(s, "Kielland Forceps – Apr 21  |  External Cephalic Version – Apr 24, Jan 19", 6.1, ACCENT2);
bulletList(s, [
  "Kielland: Rotational forceps; sliding lock; used for deep transverse arrest, asynclitism – HIGHEST maternal risk",
  "ECV: Manual turning of breech to cephalic at ≥36 wks; success 50–60%; risk: FHR change, PPROM, abruption",
  "ECV prerequisites: Singleton, adequate liquor, no placenta previa, FHR reactive, theatre standby",
], 0.3, 6.55, 12.5, 0.85, { fontSize: 11 });

// ─── SLIDE 25: INFECTIONS & MISCELLANEOUS ─────────────────────────
s = addSlide(MID_BG);
addTitle(s, "INFECTIONS, ABORTION & MISCELLANEOUS", 0.18, ACCENT3, 23);

addSubtitle(s, "Septic Abortion (Apr 24)", 0.88, ACCENT2);
bulletList(s, [
  "Definition: Abortion complicated by genital tract infection",
  "Organisms: E. coli, Clostridium, anaerobes, Staph",
  "Features: Fever >38°C, uterine tenderness, foul-smelling discharge, altered sensorium in severe cases",
  "Management: Admit, IV antibiotics (Ampicillin + Gentamicin + Metronidazole), suction evacuation after stabilization, ICU if septic shock",
], 0.3, 1.35, 6.2, 1.9, { fontSize: 11 });

addSubtitle(s, "Asymptomatic Bacteriuria (Jan 20, Sep 20, Mar 22, Apr 24)", 0.88, ACCENT1);
bulletList(s, [
  "Definition: ≥10⁵ CFU/mL of single organism in midstream urine, no symptoms",
  "Incidence: 4–7% in pregnancy; 25–40% progress to pyelonephritis if untreated",
  "Organisms: E. coli (most common), Klebsiella, GBS",
  "Complications: Pyelonephritis, preterm labour, LBW, IUGR, hypertension",
  "Treatment: Nitrofurantoin / Amoxicillin / Cephalexin × 7 days (sensitivity-guided)",
], 6.5, 1.35, 6.2, 1.9, { fontSize: 11 });

addSubtitle(s, "Hydatidiform Mole (Aug 22)", 3.45, ACCENT4);
bulletList(s, [
  "Complete mole: 46XX (paternal origin), no fetal tissue; partial mole: triploid (69XXX/XXY), some fetal parts",
  "Features: Exaggerated morning sickness, very large uterus, no FHR, snowstorm USG, very high β-hCG",
  "Management: Suction evacuation, weekly β-hCG monitoring until 3 normal values",
  "Contraception for 1 year; risk of choriocarcinoma (2%) → GTN surveillance",
], 0.3, 3.95, 6.2, 1.9, { fontSize: 11 });

addSubtitle(s, "HIV in Pregnancy (Apr 21)", 3.45, ACCENT2);
bulletList(s, [
  "MTCT risk: 15–45% without intervention (reduced to <2% with ART)",
  "Perinatal prevention: ART to all HIV+ pregnant women (Option B+), AZT to neonate ×6 wks",
  "Delivery: C-section not routinely recommended if viral load <1000 copies/mL",
  "Breastfeeding: In India – exclusive breastfeeding + ART preferred over formula",
], 6.5, 3.95, 6.2, 1.9, { fontSize: 11 });

addSubtitle(s, "Inversion of Uterus (Feb 23)", 5.55, ACCENT3);
bulletList(s, [
  "Definition: Uterus turns inside out; 3rd/4th stage emergency",
  "Degrees: Incomplete (fundus doesn't pass cervix) vs Complete vs Prolapsed",
  "Treatment: O'Sullivan's hydrostatic method (first line) → Manual replacement → Haultain's (surgical)",
], 0.3, 6.0, 12.5, 1.0, { fontSize: 11 });
addBox(s, 0.3, 7.1, 12.5, 0.35, ACCENT2, "Polyhydramnios (AFI >25 cm): Causes: GDM, fetal anomalies (NTD, GI obstruction), hydrops, idiopathic | Tx: Treat cause, amnioreduction, indomethacin", WHITE, 11, false);

// ─── SLIDE 26: ANC & SCREENING ────────────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "ANTENATAL CARE  |  Apr 21, Jul 23, Jan 20, Feb 24", 0.18, ACCENT3, 23);

addSubtitle(s, "ANC Schedule (WHO 2016: 8+ Contacts)", 0.88, ACCENT4);
const ancSchedule = [
  ["First Visit (<12 wks)", "Dating USG, Blood group, Rh, CBC, VDRL, HIV, HBsAg, urine RE"],
  ["Second Visit (14–20 wks)", "Mid-trimester anomaly screening, review blood tests"],
  ["Third Visit (24–28 wks)", "OGTT, 50g GCT, anomaly scan, review growth"],
  ["Fourth Visit (28–32 wks)", "Anti-D if Rh-, repeat CBC, BP monitoring"],
  ["Fifth Visit (34–36 wks)", "Presentation, fetal wellbeing, GBS swab if indicated"],
  ["Sixth Visit (38–40 wks)", "Assess labour readiness, NST, plan delivery"],
];
ancSchedule.forEach(([visit, action], i) => {
  addBox(s, 0.3, 1.38 + i * 0.67, 3.5, 0.56, i % 2 === 0 ? ACCENT3 : "1B3A6B", visit, WHITE, 10.5, true);
  s.addText(action, { x: 3.9, y: 1.45 + i * 0.67, w: 9.1, h: 0.48, fontSize: 10.5, color: WHITE, fontFace: "Calibri", valign: "middle" });
});

addSubtitle(s, "Hyperemesis Gravidarum  |  Jul 24, Apr 21", 5.55, ACCENT2);
bulletList(s, [
  "Severe persistent nausea/vomiting leading to >5% weight loss, dehydration, ketonuria, electrolyte imbalance",
  "Cause: High HCG (peaks 8–10 wks), Helicobacter pylori, psychological, thyrotoxicosis (transient gestational)",
  "Management: Hospitalize → IV fluids (NS + KCl) → Antiemetics (Promethazine / Ondansetron) → Pyridoxine B6 → Thiamine → Enteral/parenteral nutrition if refractory",
], 0.3, 6.0, 12.5, 1.15, { fontSize: 11 });

// ─── SLIDE 27: EXAM YEAR FREQUENCY CHART ─────────────────────────
s = addSlide(MID_BG);
addTitle(s, "📊  EXAM FREQUENCY ANALYSIS  |  Most Repeated Topics", 0.18, ACCENT4, 22);

const freqData = [
  ["Hypertensive Disorders (PET/Eclampsia/HELLP/MgSO4)", 12, ACCENT2],
  ["Anemia in Pregnancy", 9, ACCENT1],
  ["PPH / APH", 9, "E76F51"],
  ["Multiple / Twin Pregnancy (incl. TTTS)", 9, "7B2FBE"],
  ["GDM / Diabetes in Pregnancy", 8, ACCENT3],
  ["Maternal/Perinatal Mortality", 8, ACCENT4],
  ["Preterm Labour / Neonatal complications", 7, "00B4D8"],
  ["Labour & Delivery (Bishop, Partograph, etc.)", 7, "8B2FC9"],
  ["Rh-negative Pregnancy / Anti-D", 6, ACCENT5],
  ["Aneuploidy Screening / CVS / Amniocentesis", 5, "FF6B6B"],
];

const maxFreq = 12;
s.addText("Times Appeared in Exams (2019–2024 - approximate count)", {
  x: 0.3, y: 0.85, w: 12.5, h: 0.35, fontSize: 12, color: LIGHT_GRAY, fontFace: "Calibri", italic: true
});
freqData.forEach(([topic, count, color], i) => {
  const barW = (count / maxFreq) * 9.5;
  s.addText(topic, { x: 0.3, y: 1.28 + i * 0.55, w: 5.5, h: 0.45, fontSize: 10.5, color: WHITE, fontFace: "Calibri", align: "right", valign: "middle" });
  s.addShape(pres.ShapeType.rect, {
    x: 5.9, y: 1.32 + i * 0.55, w: barW, h: 0.38,
    fill: { color }, line: { color }
  });
  s.addText(`${count}x`, { x: 5.95 + barW, y: 1.32 + i * 0.55, w: 0.5, h: 0.38, fontSize: 10.5, color: color, fontFace: "Calibri", bold: true });
});
addBox(s, 0.3, 6.85, 12.5, 0.55, "1B3A6B",
  "⭐ TOP PRIORITY: Hypertensive Disorders, Twin Pregnancy (esp. TTTS), Anemia in Pregnancy, PPH, GDM – These appear in EVERY exam cycle!", ACCENT4, 12, true);

// ─── SLIDE 28: QUICK REVISION CARDS ──────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "⚡  QUICK REVISION – KEY MNEMONICS & FACTS", 0.18, ACCENT4, 22);

const mnemonics = [
  ["4 T's of PPH", "Tone • Tissue • Trauma • Thrombin", ACCENT2],
  ["HELLP", "Haemolysis • Elevated Liver • Low Platelets", ACCENT1],
  ["APGAR", "Appearance • Pulse • Grimace • Activity • Respiration", ACCENT3],
  ["Pre-Eclampsia Rx", "MgSO4 + Antihypertensives + Deliver", ACCENT4],
  ["GDM Diagnosis", "75g OGTT: FBS≥92, 1h≥180, 2h≥153 (IADPSG)", "7B2FBE"],
  ["Rh Prophylaxis", "Anti-D 300µg within 72h postpartum / 28+34 wks ante", "E76F51"],
  ["Preterm Tocolytics", "Nifedipine (1st) • Atosiban • Indomethacin • Ritodrine", "00B4D8"],
  ["PTL Steroids", "Betamethasone 12mg IM ×2 doses, 24h apart (24–34 wks)", ACCENT5],
  ["Eclampsia Convulsion Tx", "MgSO4 Loading: 4g IV slow • Pritchard / Zuspan regimen", "FF6B6B"],
];

mnemonics.forEach((mn, i) => {
  const row = Math.floor(i / 3);
  const col = i % 3;
  addBox(s, 0.3 + col * 4.35, 1.0 + row * 1.55, 4.1, 0.48, mn[2], mn[0], WHITE, 12, true);
  s.addText(mn[1], { x: 0.35 + col * 4.35, y: 1.52 + row * 1.55, w: 4.0, h: 0.88, fontSize: 11, color: LIGHT_GRAY, fontFace: "Calibri", align: "center", valign: "middle" });
});

// ─── SLIDE 29: BIOPHYSICAL PROFILE ───────────────────────────────
s = addSlide(MID_BG);
addTitle(s, "BIOPHYSICAL PROFILE (BPP)  &  ANTEPARTUM FETAL SURVEILLANCE  |  Aug 21, Feb 23", 0.18, ACCENT3, 17);

addSubtitle(s, "BPP Components (Manning Score – each scored 0 or 2)", 0.88, ACCENT4);
const bppComp = [
  ["NST (Non-Stress Test)", "≥2 accelerations of ≥15 bpm for ≥15 sec in 20 min = reactive (score 2)"],
  ["Fetal Breathing Movements", "≥1 episode ≥30 sec in 30 min (score 2)"],
  ["Fetal Body Movements", "≥3 discrete body/limb movements in 30 min (score 2)"],
  ["Fetal Tone", "≥1 episode of extension → return to flexion (score 2)"],
  ["Amniotic Fluid Volume", "≥1 pocket of ≥2cm in 2 perpendicular planes (score 2)"],
];
bppComp.forEach(([comp, detail], i) => {
  addBox(s, 0.3, 1.38 + i * 0.72, 3.8, 0.58, [ACCENT1, ACCENT3, ACCENT4, ACCENT2, "7B2FBE"][i], comp, WHITE, 11, true);
  s.addText(detail, { x: 4.2, y: 1.45 + i * 0.72, w: 8.8, h: 0.54, fontSize: 11, color: WHITE, fontFace: "Calibri", valign: "middle" });
});

// BPP Interpretation
addSubtitle(s, "BPP Interpretation", 5.0, ACCENT1);
const bppIntr = [
  ["8–10", "Normal", "No intervention"],
  ["6", "Equivocal", "Repeat in 24h / Deliver if mature"],
  ["4", "Abnormal", "Deliver immediately"],
  ["0–2", "Grossly Abnormal", "Emergency delivery"],
];
bppIntr.forEach(([score, interp, action], i) => {
  const clrs = [ACCENT3, ACCENT4, ACCENT2, "8B1A1A"];
  addBox(s, 0.25 + i * 3.27, 5.48, 3.0, 0.45, clrs[i], score, WHITE, 12, true);
  s.addText(`${interp} → ${action}`, { x: 0.25 + i * 3.27, y: 5.97, w: 3.0, h: 0.38, fontSize: 10, color: WHITE, fontFace: "Calibri", align: "center" });
});

addBox(s, 0.3, 6.5, 12.5, 0.35, "1B3A6B",
  "Modified BPP: NST + AFI (quick, practical, widely used)  |  Contraction Stress Test (CST): 3 contractions/10 min → assess fetal reserve", ACCENT5, 11, false);
addBox(s, 0.3, 6.9, 12.5, 0.45, "1B3A6B",
  "Post-Maturity Syndrome (Apr 24): Meconium staining, loss of vernix, dry/peeling skin, long nails, worried facies – Clifford grading I/II/III", ACCENT4, 11, false);

// ─── SLIDE 30: CLOSING / EXAM TIPS ───────────────────────────────
s = addSlide(DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.25, h: 7.5, fill: { color: ACCENT3 }, line: { color: ACCENT3 } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.1, fill: { color: ACCENT3 }, line: { color: ACCENT3 } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 7.4, w: 13.3, h: 0.1, fill: { color: ACCENT3 }, line: { color: ACCENT3 } });
s.addText("EXAM TIPS & STRATEGY", {
  x: 0.5, y: 0.35, w: 12.3, h: 0.75, fontSize: 36, bold: true, color: WHITE, fontFace: "Calibri", align: "center"
});
s.addText("Obstetrics 2019–2024 – Final Revision Checklist", {
  x: 0.5, y: 1.15, w: 12.3, h: 0.4, fontSize: 17, color: ACCENT3, fontFace: "Calibri", align: "center"
});
const tips = [
  ["📌 Must-Master Topics", "Hypertensive Disorders (PET, Eclampsia, HELLP, MgSO4 regimens) • PPH management stepwise • Twin pregnancy complications • GDM screening & management"],
  ["📊 Definitions to memorize", "PPH (≥500ml SVD / ≥1000ml CS) • GDM (DIPSI/IADPSG criteria) • Perinatal mortality definition • Maternal mortality ratio vs rate"],
  ["🔢 Numbers to know", "Anti-D: 300µg / 500IU within 72h • Corticosteroids: 24–34 wks • BPP: 8-10 normal • Bishop ≥6 favourable • MgSO4 loading 4g IV"],
  ["🩺 Flowcharts to draw", "PPH Management (4T's + stepwise Tx) • Eclampsia management • GDM screening flowchart • Rh-negative management"],
  ["✏ Short note structure", "Definition → Classification → Etiology → Diagnosis → Complications → Management → Prevention → Recent advances"],
];
tips.forEach(([hdr, detail], i) => {
  addBox(s, 0.4, 1.68 + i * 0.98, 3.2, 0.75, [ACCENT2, ACCENT1, ACCENT3, ACCENT4, "7B2FBE"][i], hdr, WHITE, 12, true);
  s.addText(detail, { x: 3.7, y: 1.73 + i * 0.98, w: 9.3, h: 0.72, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle" });
});
s.addText("Good Luck! Prepare systematically and practice flowcharts repeatedly.", {
  x: 0.5, y: 7.1, w: 12.3, h: 0.35, fontSize: 13, color: ACCENT3, fontFace: "Calibri", align: "center", bold: true
});

// ─── WRITE FILE ───────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/obstetrics-ppt/Obstetrics_2019_2024_Complete_Guide.pptx" })
  .then(() => console.log("✅ PPTX created successfully!"))
  .catch(e => console.error("❌ Error:", e));
Running Command

cd /home/daytona/workspace/obstetrics-ppt && node create_ppt.js 2>&1

Running Command

ls -lh /home/daytona/workspace/obstetrics-ppt/

Your PPT is ready! Here's your download link:

Obstetrics 2019 2024 Complete Guide

Presentation · PPTX


What's Inside (30 Slides, Wide Format 13.3" × 7.5")

Design: Dark navy theme with color-coded sections, accent bars, and bold typography.

Slide-by-Slide Breakdown:

SlideContent
1Title Slide – Obstetrics 2019–2024 branded cover
2Table of Contents – 18 color-coded topic cards
3Section header: Essay Topics
4Prolonged Pregnancy – Definition, Complications, Management Flowchart
5Multiple/Twin Pregnancy – Etiology, Zygosity comparison table, DZ vs MZ, Complications (maternal/fetal/neonatal), TTTS
6Hypertensive Disorders – Full classification table + Eclampsia management flowchart
7HELLP Syndrome & MgSO4 Regimens – Pritchard vs Zuspan, Tennessee classification
8Anemia in Pregnancy – WHO grading, IDA management, Severe anemia stepwise flowchart
9PPH – 4 T's table + 8-step management flowchart (Oxytocin → B-Lynch → Hysterectomy)
10APH – Placenta Previa vs Abruptio Placenta comparison table, Couvelaire uterus
11Preterm Labour – Etiology, Tocolytics, Corticosteroids, Prevention
12GDM – Risk factors grid, DIPSI screening, Complications table, Management flowchart
13Cesarean Section – Types, Indications, Complications
14Rh-Negative Pregnancy – Etiopathogenesis flowchart, Anti-D prophylaxis, RAADP
15Labour – 4 stages, Mechanism of labour (8-step flowchart)
16Section header: Short Notes
17Perinatal & Maternal Mortality – Definitions, India MMR, Causes pie data, Schemes
18Puerperium – 6 conditions (PPH, Sepsis, DVT, Mastitis, Depression, Sheehan)
19Fetus & Newborn – APGAR score table, NRP flowchart, RDS
20Maternal Adaptations – CVS, Haematological, Respiratory changes; NYHA classification
21Aneuploidy Screening – CVS vs Amniocentesis, Down syndrome marker table
22Labour & Delivery – Bishop score table, Episiotomy, Cord prolapse, Partograph
23Section header: Special Topics
24After-coming Head & Instrumental Delivery – 4 methods, ECV, Kielland forceps
25Infections & Miscellaneous – Septic abortion, ASB, Hydatidiform mole, HIV in pregnancy, Uterine inversion
26ANC Schedule – 6-visit table, Hyperemesis Gravidarum
27Exam Frequency Bar Chart – Top 10 most-repeated topics visualized
28Quick Revision Mnemonics – 9 key mnemonics/fact cards
29BPP & Antepartum Surveillance – 5 components table, Interpretation grid
30Exam Tips & Strategy – Checklist for last-day revision
This is a shared conversation. Sign in to Orris to start your own chat.