this is a TOG article on PLACENTA ACCRETA spectrum. Please, uh, make sure that you only take the snippets from the topic.. act like an obstetrics and gynecology mentor and make beautiful and crisp notes using the pictures, diagrams, tables from that article on placenta accreta syndrome and design beautiful notes for my students to be published as an Instagram feed. The notes should contain beautiful tables, bullet points, flow diagrams, charts, pie diagrams if required, and should be very easy for my students to remember.pls give ans as word document.

Reading File
Reading File
Running Command

cd /home/daytona/workspace && python3 -c " import pdfplumber import json pdf_paโ€ฆ

Running Command

cd /home/daytona/workspace && python3 -c " import pdfplumber pdf_path = '/home/โ€ฆ

Running Command

cd /home/daytona/workspace && python3 -c " import pdfplumber pdf_path = '/home/โ€ฆ

Running Command

ls /home/daytona/skills/docx/scripts/office/ 2>/dev/null || ls /home/daytona/skiโ€ฆ

Running Command

mkdir -p /home/daytona/workspace/PAS-notes && ls /home/daytona/workspace/PAS-notโ€ฆ

Writing File

~/PAS-notes/generate_notes.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  Header, Footer, AlignmentType, HeadingLevel, BorderStyle, WidthType,
  ShadingType, VerticalAlign, PageNumber, PageBreak, TabStopType,
  TabStopPosition, UnderlineType, ImageRun
} = require('docx');
const fs = require('fs');

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// COLOUR PALETTE  (Instagram-aesthetic)
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const C = {
  deepTeal:    "0D4F6E",   // primary headers
  coral:       "E8614A",   // accent / warnings
  softGold:    "C9973A",   // sub-headers
  lavender:    "7B6EA8",   // info boxes
  paleBlue:    "D6EAF8",   // row shading light
  paleTeal:    "D1EDE9",   // alt row
  paleYellow:  "FEF9E7",   // note boxes
  palePink:    "FDECEA",   // alert boxes
  paleLavend:  "EDE7F6",   // info highlight
  white:       "FFFFFF",
  darkGrey:    "2C3E50",
  midGrey:     "5D6D7E",
  lightGrey:   "ECF0F1",
  orange:      "E67E22",
  green:       "1E8449",
  paleGreen:   "D5F5E3",
};

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// HELPERS
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

function spacer(lines = 1) {
  return Array(lines).fill(new Paragraph({ text: "" }));
}

function divider() {
  return new Paragraph({
    border: { bottom: { style: BorderStyle.THICK, size: 6, color: C.deepTeal } },
    spacing: { after: 80 },
  });
}

function thinDivider(color = C.softGold) {
  return new Paragraph({
    border: { bottom: { style: BorderStyle.SINGLE, size: 4, color } },
    spacing: { after: 60 },
  });
}

function mainTitle(text) {
  return new Paragraph({
    alignment: AlignmentType.CENTER,
    shading: { type: ShadingType.SOLID, color: C.deepTeal },
    spacing: { before: 200, after: 200 },
    children: [
      new TextRun({
        text,
        bold: true,
        size: 52,
        color: C.white,
        font: "Calibri",
      }),
    ],
  });
}

function sectionHeader(text, bgColor = C.deepTeal, textColor = C.white, size = 36) {
  return new Paragraph({
    alignment: AlignmentType.LEFT,
    shading: { type: ShadingType.SOLID, color: bgColor },
    spacing: { before: 300, after: 120 },
    indent: { left: 200 },
    children: [
      new TextRun({
        text: "  " + text + "  ",
        bold: true,
        size,
        color: textColor,
        font: "Calibri",
      }),
    ],
  });
}

function subHeader(text, color = C.softGold) {
  return new Paragraph({
    spacing: { before: 200, after: 80 },
    children: [
      new TextRun({
        text,
        bold: true,
        size: 28,
        color,
        font: "Calibri",
      }),
    ],
  });
}

function bullet(text, level = 0, bold = false, color = C.darkGrey) {
  const indent = level === 0 ? 400 : 720;
  const symbol = level === 0 ? "โ—  " : "โ—ฆ  ";
  return new Paragraph({
    spacing: { before: 40, after: 40 },
    indent: { left: indent, hanging: 280 },
    children: [
      new TextRun({ text: symbol, bold: true, color: C.coral, size: 22, font: "Calibri" }),
      new TextRun({ text, bold, size: 22, color, font: "Calibri" }),
    ],
  });
}

function boldBullet(label, value, level = 0) {
  const indent = level === 0 ? 400 : 720;
  const symbol = level === 0 ? "โ—  " : "โ—ฆ  ";
  return new Paragraph({
    spacing: { before: 40, after: 40 },
    indent: { left: indent, hanging: 280 },
    children: [
      new TextRun({ text: symbol, bold: true, color: C.coral, size: 22, font: "Calibri" }),
      new TextRun({ text: label, bold: true, size: 22, color: C.deepTeal, font: "Calibri" }),
      new TextRun({ text: value, size: 22, color: C.darkGrey, font: "Calibri" }),
    ],
  });
}

function infoBox(lines, bgColor = C.paleBlue, borderColor = C.deepTeal) {
  const children = [];
  lines.forEach((line, idx) => {
    if (typeof line === "string") {
      children.push(new Paragraph({
        shading: { type: ShadingType.SOLID, color: bgColor },
        spacing: { before: idx === 0 ? 60 : 20, after: idx === lines.length - 1 ? 60 : 20 },
        indent: { left: 300, right: 300 },
        children: [new TextRun({ text: line, size: 22, color: C.darkGrey, font: "Calibri" })],
      }));
    } else {
      children.push(line);
    }
  });
  return children;
}

function alertBox(label, text, bgColor = C.palePink, labelColor = C.coral) {
  return new Paragraph({
    shading: { type: ShadingType.SOLID, color: bgColor },
    spacing: { before: 80, after: 80 },
    indent: { left: 300, right: 300 },
    children: [
      new TextRun({ text: "โš   " + label + ": ", bold: true, size: 22, color: labelColor, font: "Calibri" }),
      new TextRun({ text, size: 22, color: C.darkGrey, font: "Calibri" }),
    ],
  });
}

function noteBox(text, bgColor = C.paleYellow) {
  return new Paragraph({
    shading: { type: ShadingType.SOLID, color: bgColor },
    spacing: { before: 60, after: 60 },
    indent: { left: 300, right: 300 },
    children: [
      new TextRun({ text: "๐Ÿ“Œ  ", size: 22, font: "Calibri" }),
      new TextRun({ text, size: 22, color: C.darkGrey, font: "Calibri" }),
    ],
  });
}

function centeredBold(text, size = 28, color = C.deepTeal) {
  return new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 80, after: 80 },
    children: [new TextRun({ text, bold: true, size, color, font: "Calibri" })],
  });
}

function normal(text, size = 22, color = C.darkGrey) {
  return new Paragraph({
    spacing: { before: 40, after: 40 },
    children: [new TextRun({ text, size, color, font: "Calibri" })],
  });
}

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// TABLE HELPERS
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

function makeCell(text, bgColor = C.white, bold = false, color = C.darkGrey, width = null, vAlign = VerticalAlign.CENTER, size = 20) {
  const opts = {
    shading: { type: ShadingType.SOLID, color: bgColor },
    verticalAlign: vAlign,
    margins: { top: 80, bottom: 80, left: 120, right: 120 },
    children: [
      new Paragraph({
        alignment: AlignmentType.LEFT,
        children: [new TextRun({ text, bold, size, color, font: "Calibri" })],
      }),
    ],
  };
  if (width) opts.width = { size: width, type: WidthType.DXA };
  return new TableCell(opts);
}

function makeCenteredCell(text, bgColor = C.white, bold = false, color = C.darkGrey, width = null, size = 20) {
  const opts = {
    shading: { type: ShadingType.SOLID, color: bgColor },
    verticalAlign: VerticalAlign.CENTER,
    margins: { top: 80, bottom: 80, left: 120, right: 120 },
    children: [
      new Paragraph({
        alignment: AlignmentType.CENTER,
        children: [new TextRun({ text, bold, size, color, font: "Calibri" })],
      }),
    ],
  };
  if (width) opts.width = { size: width, type: WidthType.DXA };
  return new TableCell(opts);
}

function makeHeaderCell(text, bgColor = C.deepTeal, color = C.white, width = null) {
  return makeCenteredCell(text, bgColor, true, color, width, 22);
}

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// FLOW DIAGRAM with TABLE LAYOUT
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

function flowStep(text, bgColor, textColor = C.white) {
  return new TableRow({
    children: [
      new TableCell({
        shading: { type: ShadingType.SOLID, color: bgColor },
        margins: { top: 100, bottom: 100, left: 200, right: 200 },
        verticalAlign: VerticalAlign.CENTER,
        children: [new Paragraph({
          alignment: AlignmentType.CENTER,
          children: [new TextRun({ text, bold: true, size: 22, color: textColor, font: "Calibri" })],
        })],
      }),
    ],
  });
}

function flowArrow() {
  return new TableRow({
    children: [new TableCell({
      shading: { type: ShadingType.SOLID, color: C.white },
      margins: { top: 20, bottom: 20, left: 200, right: 200 },
      children: [new Paragraph({
        alignment: AlignmentType.CENTER,
        children: [new TextRun({ text: "โ–ผ", bold: true, size: 28, color: C.softGold, font: "Calibri" })],
      })],
    })],
  });
}

function flowDiagram(steps) {
  const rows = [];
  steps.forEach((step, i) => {
    rows.push(flowStep(step.text, step.color, step.textColor));
    if (i < steps.length - 1) rows.push(flowArrow());
  });
  return new Table({
    width: { size: 7000, type: WidthType.DXA },
    alignment: AlignmentType.CENTER,
    rows,
    borders: {
      top: { style: BorderStyle.NONE }, bottom: { style: BorderStyle.NONE },
      left: { style: BorderStyle.NONE }, right: { style: BorderStyle.NONE },
      insideH: { style: BorderStyle.NONE }, insideV: { style: BorderStyle.NONE },
    },
  });
}

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// BADGE / HIGHLIGHT PARAGRAPH
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

function badge(label, value, labelBg = C.coral, valueBg = C.paleBlue) {
  return new Paragraph({
    spacing: { before: 60, after: 60 },
    children: [
      new TextRun({ text: "  " + label + "  ", bold: true, size: 22, color: C.white, font: "Calibri",
        shading: { type: ShadingType.SOLID, color: labelBg } }),
      new TextRun({ text: "  " + value + "  ", size: 22, color: C.darkGrey, font: "Calibri",
        shading: { type: ShadingType.SOLID, color: valueBg } }),
    ],
  });
}

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// PAGE BREAK
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
function pageBreak() {
  return new Paragraph({ children: [new PageBreak()] });
}

// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
// CONTENT SECTIONS
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 1: TITLE / COVER
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide1 = [
  new Paragraph({
    alignment: AlignmentType.CENTER,
    shading: { type: ShadingType.SOLID, color: C.deepTeal },
    spacing: { before: 300, after: 0 },
    children: [new TextRun({ text: "  ", size: 10, color: C.deepTeal })],
  }),
  mainTitle("๐Ÿฉบ  PLACENTA ACCRETA SPECTRUM"),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    shading: { type: ShadingType.SOLID, color: C.deepTeal },
    spacing: { before: 0, after: 0 },
    children: [new TextRun({ text: "Imaging ยท Diagnosis ยท Management", bold: false, size: 28, color: "A8D8EA", font: "Calibri" })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    shading: { type: ShadingType.SOLID, color: C.deepTeal },
    spacing: { before: 0, after: 200 },
    children: [new TextRun({ text: "  ๐Ÿ“–  Based on TOG 2025 | Self, Cavallaro & Collins  ", size: 22, color: "FADBD8", font: "Calibri" })],
  }),
  ...spacer(1),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    shading: { type: ShadingType.SOLID, color: C.paleTeal },
    spacing: { before: 60, after: 60 },
    indent: { left: 500, right: 500 },
    children: [new TextRun({ text: '"The right team ยท The right place ยท The right time"', bold: true, italics: true, size: 26, color: C.deepTeal, font: "Calibri" })],
  }),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 2: DEFINITION + INCIDENCE
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide2 = [
  sectionHeader("๐Ÿ“Œ  WHAT IS PLACENTA ACCRETA SPECTRUM?", C.deepTeal),
  ...spacer(1),
  new Paragraph({
    shading: { type: ShadingType.SOLID, color: C.paleLavend },
    spacing: { before: 80, after: 80 },
    indent: { left: 300, right: 300 },
    children: [
      new TextRun({ text: "DEFINITION: ", bold: true, size: 24, color: C.lavender, font: "Calibri" }),
      new TextRun({ text: "PAS disorder describes failure of placental separation at birth, with forcible removal risking life-threatening haemorrhage. It is a spectrum disorder ranging from abnormal adherence to deeply invasive placental tissue.", size: 22, color: C.darkGrey, font: "Calibri" }),
    ],
  }),
  ...spacer(1),
  subHeader("๐Ÿ”‘  Key Points"),
  bullet("PAS = iatogenic disease โ€” any disruption to the endometrium increases risk"),
  bullet("Caesarean birth is the most common cause"),
  bullet("UK incidence (2012): 1.7 per 10,000 maternities โ€” significantly increased since then"),
  bullet("Incidence correlates with rising caesarean rate globally"),
  bullet("Forcible removal risks torrential haemorrhage โ†’ life-threatening emergency"),
  ...spacer(1),
  subHeader("โš   Why Is This Important?"),
  alertBox("KEY RISK", "Women with placenta praevia + prior CS: risk of PAS = 3% (1 CS) โ†’ 11% (2) โ†’ 40% (3) โ†’ 61% (4) โ†’ 67% (โ‰ฅ5)", C.palePink, C.coral),
  ...spacer(1),
  noteBox("PAS is an iatrogenic disease. As caesarean rates rise worldwide, PAS cases will increase. Prevention of unnecessary caesareans is a public health priority."),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 3: PATHOPHYSIOLOGY
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide3 = [
  sectionHeader("๐Ÿ”ฌ  PATHOPHYSIOLOGY OF PAS", C.deepTeal),
  ...spacer(1),
  subHeader("Normal Placentation - Quick Review"),
  bullet("Uterine arteries โ†’ arcuate arteries โ†’ radial arteries โ†’ spiral arteries"),
  bullet("Extravillous trophoblast (EVT) invades decidual stroma โ†’ remodels spiral arteries"),
  bullet("Nitabuch's membrane: fibrinoid layer between anchoring villi & decidual cells โ€” KEY for cleavage at 3rd stage"),
  bullet("Normal invasion: limited to upper โ…“ of myometrium (junctional zone)"),
  ...spacer(1),
  subHeader("What Goes Wrong in PAS?"),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("Step", C.deepTeal, C.white, 2000),
        makeHeaderCell("Normal", C.green, C.white, 3500),
        makeHeaderCell("PAS", C.coral, C.white, 3500),
      ]}),
      new TableRow({ children: [
        makeCell("Decidualisation", C.paleTeal, true, C.deepTeal, 2000),
        makeCell("Normal decidual layer regulates trophoblast invasion", C.paleGreen, false, C.darkGrey, 3500),
        makeCell("Scar disrupts endometrium โ†’ deficient decidualisation", C.palePink, false, C.darkGrey, 3500),
      ]}),
      new TableRow({ children: [
        makeCell("EVT invasion", C.paleTeal, true, C.deepTeal, 2000),
        makeCell("Limited to upper โ…“ myometrium", C.paleGreen, false, C.darkGrey, 3500),
        makeCell("Uncontrolled โ†’ penetrates deep into/beyond myometrium", C.palePink, false, C.darkGrey, 3500),
      ]}),
      new TableRow({ children: [
        makeCell("Nitabuch's membrane", C.paleTeal, true, C.deepTeal, 2000),
        makeCell("Intact โ†’ clean cleavage plane at birth", C.paleGreen, false, C.darkGrey, 3500),
        makeCell("Absent/defective โ†’ no cleavage โ†’ adherent placenta", C.palePink, false, C.darkGrey, 3500),
      ]}),
      new TableRow({ children: [
        makeCell("Vascularity", C.paleTeal, true, C.deepTeal, 2000),
        makeCell("Normal uterine vessels", C.paleGreen, false, C.darkGrey, 3500),
        makeCell("Neovascularity (serosa) + radial/arcuate artery dilatation โ†’ torrential haemorrhage", C.palePink, false, C.darkGrey, 3500),
      ]}),
    ],
  }),
  ...spacer(1),
  noteBox("The 'hypervascularity' seen on imaging mostly results from abnormal neo-vascularity developing in/on the serosa โ€” visible at delivery."),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 4: FIGO CLASSIFICATION
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide4 = [
  sectionHeader("๐Ÿ“Š  FIGO CLASSIFICATION OF PAS", C.deepTeal),
  ...spacer(1),
  centeredBold("FIGO Clinicopathological Criteria (2019)", 26, C.deepTeal),
  ...spacer(1),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("GRADE", C.deepTeal, C.white, 1200),
        makeHeaderCell("OLD NAME", C.softGold, C.white, 2000),
        makeHeaderCell("DEPTH", C.coral, C.white, 2000),
        makeHeaderCell("CLINICAL CRITERIA", C.lavender, C.white, 3800),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("Grade 1", C.paleBlue, true, C.deepTeal, 1200, 22),
        makeCell("Accreta / Creta\n(Adherent)", C.paleBlue, false, C.darkGrey, 2000),
        makeCell("Villi contact myometrium but do NOT penetrate", C.paleBlue, false, C.darkGrey, 2000),
        makeCell("โ€ข No separation with oxytocin/cord traction\nโ€ข Manual removal โ†’ heavy bleeding\nโ€ข No bulge, no neovascularity on serosa", C.paleBlue, false, C.darkGrey, 3800),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("Grade 2", "FFF3E0", true, C.orange, 1200, 22),
        makeCell("Increta", "FFF3E0", false, C.darkGrey, 2000),
        makeCell("Villi penetrate INTO myometrium", "FFF3E0", false, C.darkGrey, 2000),
        makeCell("โ€ข Bluish/purple colouring, bulge\nโ€ข Dense tangled hypervascular vessels on serosa\nโ€ข 'Dimple sign' on cord traction\nโ€ข No placenta through surface", "FFF3E0", false, C.darkGrey, 3800),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("Grade 3a", C.palePink, true, C.coral, 1200, 22),
        makeCell("Percreta\n(serosa only)", C.palePink, false, C.darkGrey, 2000),
        makeCell("Villi through FULL thickness โ†’ serosa (not beyond)", C.palePink, false, C.darkGrey, 2000),
        makeCell("โ€ข Placental tissue invading through uterine surface\nโ€ข Clear surgical plane between bladder & uterus", C.palePink, false, C.darkGrey, 3800),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("Grade 3b", "FFEBEE", true, "C62828", 1200, 22),
        makeCell("Percreta\n(bladder)", "FFEBEE", false, C.darkGrey, 2000),
        makeCell("Villi invade into BLADDER", "FFEBEE", false, C.darkGrey, 2000),
        makeCell("โ€ข Villi into bladder\nโ€ข NO clear surgical plane between bladder & uterus", "FFEBEE", false, C.darkGrey, 3800),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("Grade 3c", "F3E5F5", true, "6A1A9A", 1200, 22),
        makeCell("Percreta\n(other organs)", "F3E5F5", false, C.darkGrey, 2000),
        makeCell("Villi invade broad ligament, vaginal wall, pelvic sidewall, other organs", "F3E5F5", false, C.darkGrey, 2000),
        makeCell("โ€ข Villi into broad ligament / vaginal wall / pelvic sidewall / any pelvic organ\nโ€ข ยฑ bladder invasion", "F3E5F5", false, C.darkGrey, 3800),
      ]}),
    ],
  }),

  ...spacer(1),
  noteBox("'Uterus' in this classification refers to both the uterine BODY and CERVIX."),
  alertBox("IMPORTANT", "Many studies suggest percreta (Grade 3) is rarer than once thought. UD (uterine dehiscence) is frequently misdiagnosed as percreta โ€” avoid aggressive management based on imaging alone.", C.palePink),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 5: RISK FACTORS & PRETEST PROBABILITY
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide5 = [
  sectionHeader("โš   RISK FACTORS & PRETEST PROBABILITY", C.coral),
  ...spacer(1),
  subHeader("Risk Factors for PAS"),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("๐Ÿ”ด  HIGH RISK", C.coral, C.white, 4500),
        makeHeaderCell("๐ŸŸก  MODERATE RISK", C.softGold, C.white, 4500),
      ]}),
      new TableRow({ children: [
        makeCell("Prior caesarean delivery (โ†‘ with each CS)\nPlacenta praevia + prior CS\nCaesarean scar pregnancy\nPrevious PAS", C.palePink, false, C.darkGrey, 4500),
        makeCell("Uterine surgery (myomectomy, hysteroscopy)\nEndometrial ablation\nD&C / uterine curettage\nSubmucous fibroids\nAsherman's syndrome\nIVF / ART pregnancy", C.paleYellow, false, C.darkGrey, 4500),
      ]}),
    ],
  }),

  ...spacer(1),
  subHeader("๐ŸŽฏ  Pretest Probability โ€” WHY It Matters"),
  bullet("Higher background risk = greater diagnostic test accuracy"),
  bullet("Two US features of PAS (lacunae, sub-placental hypervascularity, irregular bladder wall) found in 98% of LOW-RISK normal pregnancies!"),
  bullet("Placental bulge, bridging vessels, myometrium <1 mm, loss of clear zone = RARELY seen in normal placentas โ†’ more specific"),
  bullet("Never interpret imaging in isolation โ€” always correlate with clinical risk"),
  ...spacer(1),
  alertBox("SCREENING TIMING", "Symptomatic women with risk factors โ†’ refer ASAP (risk of preterm/emergency). Asymptomatic โ†’ specialist review by 24-28 weeks (trophoblast invasion complete by 24 weeks, MDT planning needs time).", C.paleYellow, C.orange),
  ...spacer(1),

  subHeader("๐Ÿ“  Previous CS Scar Location Matters"),
  bullet("CS at โ‰ค2 cm dilatation โ†’ scar in lower segment, well above internal os"),
  bullet("CS at โ‰ฅ8 cm dilatation โ†’ scar near/at internal os or cervix"),
  bullet("Centre of placenta over presumed scar site โ†’ higher risk of niche implantation โ†’ PAS"),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 6: ULTRASOUND FEATURES
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide6 = [
  sectionHeader("๐Ÿ–ฅ  ULTRASOUND FEATURES OF PAS", C.deepTeal),
  ...spacer(1),
  subHeader("Machine Settings โ€” Get These Right First!"),
  bullet("Transabdominal approach first line (even with obesity โ€” lift pannus above symphysis)"),
  bullet("Convex 3-5 MHz probe (higher freq if anterior low-lying placenta)"),
  bullet("Bladder: MUST be filled with minimum 200-300 mL for key signs"),
  bullet("Colour Doppler: PRF setting >15 cm/s (avoids aliasing artefact)"),
  bullet("Power Doppler: use sub-noise gain (increase until bloom artefact, then reduce until it disappears)"),
  bullet("Turn off harmonic imaging for greyscale feature examination"),
  ...spacer(1),
  centeredBold("2D GREYSCALE SIGNS", 24, C.deepTeal),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("US Sign", C.deepTeal, C.white, 2500),
        makeHeaderCell("Description", C.deepTeal, C.white, 3200),
        makeHeaderCell("Pathophysiology", C.deepTeal, C.white, 3300),
      ]}),
      new TableRow({ children: [
        makeCell("Loss of 'clear zone'", C.paleTeal, true, C.deepTeal, 2500),
        makeCell("Loss/irregularity of hypoechoic plane in myometrium under placenta", C.paleTeal, false, C.darkGrey, 3200),
        makeCell("Thinned decidua/myometrium + absent Nitabuch's layer", C.paleTeal, false, C.darkGrey, 3300),
      ]}),
      new TableRow({ children: [
        makeCell("Abnormal placental lacunae", C.paleBlue, true, C.deepTeal, 2500),
        makeCell("Numerous large, irregular intraplacental hypoechoic spaces (Finberg Grade 3); turbulent flow on greyscale", C.paleBlue, false, C.darkGrey, 3200),
        makeCell("Distortion of placental cotyledon by chronic high-velocity maternal blood flow", C.paleBlue, false, C.darkGrey, 3300),
      ]}),
      new TableRow({ children: [
        makeCell("Bladder wall interruption", C.paleTeal, true, C.deepTeal, 2500),
        makeCell("Loss of bright hyperechoic band between uterine serosa and bladder lumen ('equals sign')", C.paleTeal, false, C.darkGrey, 3200),
        makeCell("Artefact from neovascularity at serosal surface", C.paleTeal, false, C.darkGrey, 3300),
      ]}),
      new TableRow({ children: [
        makeCell("Myometrial thinning", C.paleBlue, true, C.deepTeal, 2500),
        makeCell("Myometrium <1 mm or undetectable overlying placenta", C.paleBlue, false, C.darkGrey, 3200),
        makeCell("Major scar defect โ€” myometrium replaced by fibrous tissue", C.paleBlue, false, C.darkGrey, 3300),
      ]}),
      new TableRow({ children: [
        makeCell("Placental bulge", C.paleTeal, true, C.deepTeal, 2500),
        makeCell("Deviation of uterine serosa outward from expected plane โ€” bulge into bladder; serosa intact but contour distorted ('snowman' sign at laparotomy)", C.paleTeal, false, C.darkGrey, 3200),
        makeCell("Placental tissue herniation through weakened uterine wall", C.paleTeal, false, C.darkGrey, 3300),
      ]}),
      new TableRow({ children: [
        makeCell("Focal exophytic mass", C.paleBlue, true, C.deepTeal, 2500),
        makeCell("Placental tissue breaking through serosa (often into bladder) โ€” EXTREMELY RARE", C.paleBlue, false, C.darkGrey, 3200),
        makeCell("Placenta herniating through small uterine wall defect", C.paleBlue, false, C.darkGrey, 3300),
      ]}),
      new TableRow({ children: [
        makeCell("Separation sign", C.paleTeal, true, C.deepTeal, 2500),
        makeCell("RULE-OUT sign: probe compression then rapid release โ€” clear zone appears/enhances if normal (bounce-back of myometrium)", C.paleTeal, false, C.darkGrey, 3200),
        makeCell("Uterine wall remodelling removes elasticity difference between placenta and myometrium in PAS", C.paleTeal, false, C.darkGrey, 3300),
      ]}),
    ],
  }),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 7: COLOUR DOPPLER + 3D US SIGNS
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide7 = [
  sectionHeader("๐ŸŒˆ  COLOUR DOPPLER & 3D ULTRASOUND SIGNS", C.deepTeal),
  ...spacer(1),
  centeredBold("COLOUR DOPPLER SIGNS", 24, C.deepTeal),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("Sign", C.lavender, C.white, 2800),
        makeHeaderCell("Description", C.lavender, C.white, 3200),
        makeHeaderCell("Clinical Value", C.lavender, C.white, 3000),
      ]}),
      new TableRow({ children: [
        makeCell("Uterovesical hypervascularity", C.paleLavend, true, C.lavender, 2800),
        makeCell("Striking colour Doppler signal between myometrium and posterior bladder wall โ€” tortuous, closely packed vessels, multidirectional flow with aliasing", C.paleLavend, false, C.darkGrey, 3200),
        makeCell("Suggests numerous dilated deep uterine vessels. Increased cervical/vaginal vascularity โ†’ warns of colpotomy haemorrhage risk", C.paleLavend, false, C.darkGrey, 3000),
      ]}),
      new TableRow({ children: [
        makeCell("Subplacental hypervascularity", C.paleBlue, true, C.deepTeal, 2800),
        makeCell("Striking colour signal in placental bed โ€” numerous tortuous closely packed vessels, multidirectional flow", C.paleBlue, false, C.darkGrey, 3200),
        makeCell("Excessive dilatation of radial/arcuate arteries near EVT. Often seen in normal placentas โ†’ unreliable alone", C.paleBlue, false, C.darkGrey, 3000),
      ]}),
      new TableRow({ children: [
        makeCell("Bridging vessels โญ", C.paleTeal, true, C.green, 2800),
        makeCell("Vessels extending from placenta, across myometrium and BEYOND serosa into bladder/organs; often perpendicular to myometrium", C.paleTeal, false, C.darkGrey, 3200),
        makeCell("MORE useful predictor than hypervascularity โ€” only occurs with significant serosal neovascularity. Warns of friable large vessels when reflecting bladder", C.paleTeal, false, C.darkGrey, 3000),
      ]}),
      new TableRow({ children: [
        makeCell("Intracervical lakes", C.palePink, true, C.coral, 2800),
        makeCell("Tortuous anechoic spaces WITHIN cervical tissue โ€” hypervascular on Doppler. NOT uterine/cervical arteries", C.palePink, false, C.darkGrey, 3200),
        makeCell("Indicates deep EVT invasion โ†’ linked to increased blood loss & hysterectomy requirement", C.palePink, false, C.darkGrey, 3000),
      ]}),
      new TableRow({ children: [
        makeCell("Lacunae feeder vessels", C.paleBlue, true, C.deepTeal, 2800),
        makeCell("High-velocity blood flow (>10 cm/s) into lacunae on Doppler", C.paleBlue, false, C.darkGrey, 3200),
        makeCell("Distinguishes PAS lacunae from UD lakes (UD = low/no flow)", C.paleBlue, false, C.darkGrey, 3000),
      ]}),
    ],
  }),

  ...spacer(1),
  centeredBold("3D ULTRASOUND + POWER DOPPLER + VOLUME RENDERING", 24, C.deepTeal),
  bullet("Intraplacental hypervascularity: Complex, irregular arrangement of numerous placental vessels with tortuous courses and varying calibres"),
  bullet("Can detect retroplacental clear zone in UD when 2D US alone could not"),
  bullet("Tramline disruption sign, distortion of bladder wall, obliterated vesicouterine space โ€” identifiable in PAS on 3D"),
  bullet("3D volume rendering: retroperitoneal clear zone visible in UD; loss of clear zone in PAS"),
  ...spacer(1),
  noteBox("3D ultrasound with power Doppler volume rendering may help differentiate PAS from uterine dehiscence (UD) when 2D is ambiguous โ€” reduces unnecessary hysterectomy."),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 8: PAS vs UTERINE DEHISCENCE TABLE
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide8 = [
  sectionHeader("โšก  PAS vs UTERINE DEHISCENCE (UD)", C.softGold, C.darkGrey),
  ...spacer(1),
  normal("KEY DISTINCTION: Confirmation bias can lead to more radical surgery than needed โ€” always differentiate PAS from UD carefully.", 22, C.coral),
  ...spacer(1),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("Feature", C.deepTeal, C.white, 2800),
        makeHeaderCell("PAS", C.coral, C.white, 3100),
        makeHeaderCell("UD (Uterine Dehiscence)", C.green, C.white, 3100),
      ]}),
      new TableRow({ children: [
        makeCell("Myometrial thinning", C.lightGrey, true, C.midGrey, 2800),
        makeCenteredCell("โœ…", C.palePink, false, C.coral, 3100, 26),
        makeCenteredCell("โœ…", C.paleGreen, false, C.green, 3100, 26),
      ]}),
      new TableRow({ children: [
        makeCell("Loss of clear zone (2D)", C.lightGrey, true, C.midGrey, 2800),
        makeCenteredCell("โœ…", C.palePink, false, C.coral, 3100, 26),
        makeCenteredCell("โœ…", C.paleGreen, false, C.green, 3100, 26),
      ]}),
      new TableRow({ children: [
        makeCell("Separation sign", C.lightGrey, true, C.midGrey, 2800),
        makeCell("Diffusely ABSENT", C.palePink, true, C.coral, 3100),
        makeCell("Absent only where myometrium is vanishingly thin", C.paleGreen, false, C.green, 3100),
      ]}),
      new TableRow({ children: [
        makeCell("Placental bulge", C.lightGrey, true, C.midGrey, 2800),
        makeCenteredCell("โœ…", C.palePink, false, C.coral, 3100, 26),
        makeCell("Only with very large UD", C.paleGreen, false, C.green, 3100),
      ]}),
      new TableRow({ children: [
        makeCell("Lakes/Lacunae shape", C.lightGrey, true, C.midGrey, 2800),
        makeCell("Numerous, LARGE, IRREGULAR, connecting with basal plate", C.palePink, false, C.coral, 3100),
        makeCell("More regular. May have hyperechoic rim (echogenic cystic lesions)", C.paleGreen, false, C.green, 3100),
      ]}),
      new TableRow({ children: [
        makeCell("Lacunae blood flow", C.lightGrey, true, C.midGrey, 2800),
        makeCell("HIGH flow >10 cm/s on Doppler", C.palePink, false, C.coral, 3100),
        makeCell("LOW or NO flow on Doppler", C.paleGreen, false, C.green, 3100),
      ]}),
      new TableRow({ children: [
        makeCell("Bladder wall interruption", C.lightGrey, true, C.midGrey, 2800),
        makeCenteredCell("โœ…", C.palePink, false, C.coral, 3100, 26),
        makeCenteredCell("โŒ", C.paleGreen, false, C.green, 3100, 26),
      ]}),
      new TableRow({ children: [
        makeCell("Bridging vessels", C.lightGrey, true, C.midGrey, 2800),
        makeCenteredCell("โœ…", C.palePink, false, C.coral, 3100, 26),
        makeCenteredCell("โŒ", C.paleGreen, false, C.green, 3100, 26),
      ]}),
      new TableRow({ children: [
        makeCell("Focal exophytic mass", C.lightGrey, true, C.midGrey, 2800),
        makeCell("โœ… (extremely rare)", C.palePink, false, C.coral, 3100),
        makeCenteredCell("โŒ", C.paleGreen, false, C.green, 3100, 26),
      ]}),
      new TableRow({ children: [
        makeCell("Uterovesical/subplacental vascularity", C.lightGrey, true, C.midGrey, 2800),
        makeCenteredCell("โœ…", C.palePink, false, C.coral, 3100, 26),
        makeCenteredCell("โŒ", C.paleGreen, false, C.green, 3100, 26),
      ]}),
      new TableRow({ children: [
        makeCell("Intracervical lakes", C.lightGrey, true, C.midGrey, 2800),
        makeCenteredCell("โœ…", C.palePink, false, C.coral, 3100, 26),
        makeCenteredCell("โŒ", C.paleGreen, false, C.green, 3100, 26),
      ]}),
      new TableRow({ children: [
        makeCell("3D: Retroplacental clear zone", C.lightGrey, true, C.midGrey, 2800),
        makeCell("LOSS of clear zone", C.palePink, false, C.coral, 3100),
        makeCell("Clear zone VISIBLE on 3D even when absent on 2D", C.paleGreen, false, C.green, 3100),
      ]}),
    ],
  }),
  ...spacer(1),
  alertBox("MANAGEMENT CAUTION", "All cases suspicious for PAS should be managed based on surgical findings rather than fixed antenatal plans. UD + non-adherent placenta can be managed conservatively.", C.palePink),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 9: MRI ROLE
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide9 = [
  sectionHeader("๐Ÿงฒ  ROLE OF MRI IN PAS DIAGNOSIS", C.lavender, C.white),
  ...spacer(1),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("Aspect", C.lavender, C.white, 2500),
        makeHeaderCell("Details", C.lavender, C.white, 6500),
      ]}),
      new TableRow({ children: [
        makeCell("Technique", C.paleLavend, true, C.lavender, 2500),
        makeCell("Ultra-fast sequences, semi-filled bladder, no contrast needed, slices โ‰ฅ5 mm (thinner โ†’ artefacts/false positives), aligned to uterine axis", C.paleLavend, false, C.darkGrey, 6500),
      ]}),
      new TableRow({ children: [
        makeCell("MRI Features of PAS", C.paleBlue, true, C.deepTeal, 2500),
        makeCell("โ€ข Abnormal uterine bulge\nโ€ข Dark intraplacental bands on T2-weighted imaging\nโ€ข Tenting of the bladder\nโ€ข Heterogeneous signal intensity within placenta\nโ€ข Disorganised vasculature\nโ€ข Focal interruption of myometrium", C.paleBlue, false, C.darkGrey, 6500),
      ]}),
      new TableRow({ children: [
        makeCell("MRI vs US", C.paleLavend, true, C.lavender, 2500),
        makeCell("In expert hands: BOTH have similar diagnostic value. No evidence MRI is superior. True diagnostic accuracy hard to assess due to high pretest probability from prior US.", C.paleLavend, false, C.darkGrey, 6500),
      ]}),
      new TableRow({ children: [
        makeCell("When to use MRI", C.paleGreen, true, C.green, 2500),
        makeCell("NOT routine. Use as ADJUNCT after specialist US if:\nโ€ข Ambiguity about diagnosis remains\nโ€ข Extent of invasion unclear (parametrium, other organs)\nโ€ข Considering surgical mapping when US dynamic assessment insufficient", C.paleGreen, false, C.darkGrey, 6500),
      ]}),
      new TableRow({ children: [
        makeCell("Cautions", C.palePink, true, C.coral, 2500),
        makeCell("โ€ข Intraplacental bands + heterogeneity found in normal placentas too (not specific!)\nโ€ข Uterine bulge also seen in UD\nโ€ข Cases where MRI changed diagnosis INCORRECTLY โ†’ harm to mothers\nโ€ข More expensive, less accessible (especially LMICs)\nโ€ข Requires standardisation", C.palePink, false, C.darkGrey, 6500),
      ]}),
    ],
  }),

  ...spacer(1),
  noteBox("CURRENT GUIDANCE (RCOG Green-Top 27a, ISUOG): MRI should NOT be routine. It is a complementary modality after specialist US when ambiguity remains about diagnosis or extent of invasion."),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 10: SCREENING PATHWAY (FLOW DIAGRAM)
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide10 = [
  sectionHeader("๐Ÿ”„  SCREENING & REFERRAL PATHWAY", C.deepTeal),
  ...spacer(1),
  centeredBold("WHEN TO SUSPECT & REFER โ€” CLINICAL ALGORITHM", 24, C.deepTeal),
  ...spacer(1),

  flowDiagram([
    { text: "Mid-pregnancy Anomaly Scan (18-20 weeks)", color: C.deepTeal },
    { text: "Low-lying placenta / Placenta praevia identified", color: C.softGold, textColor: C.darkGrey },
    { text: "Ask: History of previous caesarean birth?", color: C.lavender },
    { text: "YES โ†’ Refer for specialist PAS imaging assessment", color: C.coral },
    { text: "Symptomatic (bleeding / preterm risk)?\nโ†’ URGENT referral ASAP", color: "C62828" },
    { text: "Asymptomatic?\nโ†’ Specialist review by 24-28 weeks\n(trophoblast invasion complete; MDT planning time)", color: C.green },
    { text: "Specialist PAS Imaging\n(2D + Colour Doppler ยฑ 3D US)", color: C.deepTeal },
    { text: "High suspicion of PAS?\nโ†’ Refer to PAS CENTRE OF EXCELLENCE\nfor MDT planning + delivery", color: C.coral },
    { text: "MDT Planning completed by 28 weeks\nDelivery in specialist centre", color: C.green },
  ]),

  ...spacer(1),
  alertBox("NOTE", "All women with previous PAS history OR caesarean scar pregnancy should be screened by a PAS expert regardless of current placental location.", C.paleYellow, C.orange),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 11: PLACENTAL LAKES vs LACUNAE
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide11 = [
  sectionHeader("๐Ÿ”  PLACENTAL LAKES vs LACUNAE โ€” SPOT THE DIFFERENCE!", C.deepTeal),
  ...spacer(1),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("Feature", C.midGrey, C.white, 2500),
        makeHeaderCell("LAKES (Normal)", C.green, C.white, 3250),
        makeHeaderCell("LACUNAE (PAS)", C.coral, C.white, 3250),
      ]}),
      new TableRow({ children: [
        makeCell("Appearance", C.lightGrey, true, C.midGrey, 2500),
        makeCell("Homogeneous hypoechoic lesions, anywhere in placenta, up to 5cm+", C.paleGreen, false, C.darkGrey, 3250),
        makeCell("Numerous, LARGE, IRREGULAR intraplacental hypoechoic spaces (moth-eaten / swiss-cheese)", C.palePink, false, C.darkGrey, 3250),
      ]}),
      new TableRow({ children: [
        makeCell("Number / Grade", C.lightGrey, true, C.midGrey, 2500),
        makeCell("Variable; usually few", C.paleGreen, false, C.darkGrey, 3250),
        makeCell("Finberg Grade 3 = numerous irregular lacunae", C.palePink, false, C.darkGrey, 3250),
      ]}),
      new TableRow({ children: [
        makeCell("Blood flow (Doppler)", C.lightGrey, true, C.midGrey, 2500),
        makeCell("LOW or NO flow", C.paleGreen, false, C.darkGrey, 3250),
        makeCell("HIGH velocity flow >10 cm/s (turbulent, visible on greyscale)", C.palePink, false, C.darkGrey, 3250),
      ]}),
      new TableRow({ children: [
        makeCell("Connection to basal plate", C.lightGrey, true, C.midGrey, 2500),
        makeCell("No connection to basal plate", C.paleGreen, false, C.darkGrey, 3250),
        makeCell("YES โ€” connects with basal plate (diagnostic clue)", C.palePink, false, C.darkGrey, 3250),
      ]}),
      new TableRow({ children: [
        makeCell("Hyperechoic rim", C.lightGrey, true, C.midGrey, 2500),
        makeCell("May have a hyperechoic rim (increases probability of lake/UD)", C.paleGreen, false, C.darkGrey, 3250),
        makeCell("Usually NO hyperechoic rim", C.palePink, false, C.darkGrey, 3250),
      ]}),
      new TableRow({ children: [
        makeCell("Significance", C.lightGrey, true, C.midGrey, 2500),
        makeCell("Normal finding; also seen in UD", C.paleGreen, false, C.darkGrey, 3250),
        makeCell("Strongly associated with PAS โ€” especially Grade 3 lacunae", C.palePink, false, C.darkGrey, 3250),
      ]}),
    ],
  }),

  ...spacer(1),
  noteBox("Absence of high velocity flow (>10 cm/s) on colour Doppler increases probability that lesions are lakes โ†’ UD more likely than PAS."),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 12: MDT & CENTRE OF EXCELLENCE
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide12 = [
  sectionHeader("๐Ÿฅ  MDT & CENTRE OF EXCELLENCE", C.green, C.white),
  ...spacer(1),
  subHeader("Why a Specialist Centre?"),
  bullet("Studies consistently show DECREASED morbidity and mortality when PAS is managed by experienced MDT in a PAS centre"),
  bullet("Centralising imaging + management increases exposure to full PAS spectrum โ†’ optimises care"),
  bullet("Many women with PAS diagnosis are STILL managed in centres seeing <1 case/year โ†’ unacceptable"),
  bullet("No place for improvised care โ€” ad hoc management outside true emergencies is unacceptable"),
  bullet("If PAS clinically suspected intraoperatively in unprepared centre โ†’ CLOSE abdomen, defer hysterotomy, TRANSFER to specialist centre"),
  ...spacer(1),

  subHeader("MDT Composition"),
  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("Specialty", C.deepTeal, C.white, 3000),
        makeHeaderCell("Role", C.deepTeal, C.white, 6000),
      ]}),
      new TableRow({ children: [
        makeCell("Maternal-Fetal Medicine / Obstetrician", C.paleTeal, true, C.deepTeal, 3000),
        makeCell("Lead surgeon, antenatal planning, delivery", C.paleTeal, false, C.darkGrey, 6000),
      ]}),
      new TableRow({ children: [
        makeCell("Interventional Radiologist", C.paleBlue, true, C.deepTeal, 3000),
        makeCell("Pre-operative embolisation, balloon occlusion, post-op haemorrhage control", C.paleBlue, false, C.darkGrey, 6000),
      ]}),
      new TableRow({ children: [
        makeCell("Urologist", C.paleTeal, true, C.deepTeal, 3000),
        makeCell("Bladder involvement (Grade 3b), ureteric stenting (parametrial bulge)", C.paleTeal, false, C.darkGrey, 6000),
      ]}),
      new TableRow({ children: [
        makeCell("Anaesthesiology (Obstetric)", C.paleBlue, true, C.deepTeal, 3000),
        makeCell("Complex anaesthesia, massive haemorrhage protocol, cell salvage", C.paleBlue, false, C.darkGrey, 6000),
      ]}),
      new TableRow({ children: [
        makeCell("Haematology / Blood Bank", C.paleTeal, true, C.deepTeal, 3000),
        makeCell("Massive transfusion protocol, cell salvage, clotting management", C.paleTeal, false, C.darkGrey, 6000),
      ]}),
      new TableRow({ children: [
        makeCell("Specialist Radiologist / Sonographer", C.paleBlue, true, C.deepTeal, 3000),
        makeCell("Specialist PAS imaging (US + MRI), antenatal assessment", C.paleBlue, false, C.darkGrey, 6000),
      ]}),
      new TableRow({ children: [
        makeCell("Neonatology", C.paleTeal, true, C.deepTeal, 3000),
        makeCell("Delivery planning, NICU availability", C.paleTeal, false, C.darkGrey, 6000),
      ]}),
    ],
  }),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 13: REPORTING + KEY MESSAGES
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide13 = [
  sectionHeader("๐Ÿ“  ULTRASOUND REPORTING & KEY MESSAGES", C.deepTeal),
  ...spacer(1),
  subHeader("Writing the Ultrasound Report"),
  bullet("Emphasise anatomy DESCRIPTION over pathological labels"),
  bullet("Report must enable surgical team to accurately predict intraoperative findings"),
  bullet("Always include: fetal growth + presentation, placental and uterine features"),
  bullet("Describe: proximity of bulge to other structures (e.g. ureters, broad ligament)"),
  bullet("Parametrial involvement / bulge near ureter โ†’ consider ureteric stenting pre-op"),
  bullet("Report cervical + vaginal vascularity โ†’ warns of colpotomy haemorrhage"),
  bullet("Use proposed pro forma (Alfirevic et al. 2016) as framework"),
  ...spacer(1),
  thinDivider(),
  ...spacer(1),
  subHeader("โญ  Top 5 Key Messages โ€” EXAM ESSENTIALS"),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [
        makeHeaderCell("#", C.coral, C.white, 600),
        makeHeaderCell("Key Message", C.coral, C.white, 8400),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("1", C.palePink, true, C.coral, 600, 22),
        makeCell("PAS is iatrogenic โ€” rising caesarean rates directly drive increasing PAS incidence worldwide", C.palePink, false, C.darkGrey, 8400),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("2", C.paleBlue, true, C.deepTeal, 600, 22),
        makeCell("Pre-test probability MUST be considered before interpreting any imaging sign โ€” many features are found in normal pregnancies", C.paleBlue, false, C.darkGrey, 8400),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("3", C.paleTeal, true, C.green, 600, 22),
        makeCell("Specialist assessment should be offered between 24-28 weeks; US + MRI have similar diagnostic value โ€” MRI is NOT routine", C.paleTeal, false, C.darkGrey, 8400),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("4", C.paleYellow, true, C.orange, 600, 22),
        makeCell("Bridging vessels + intracervical lakes are the most specific and clinically significant Doppler signs for severe PAS", C.paleYellow, false, C.darkGrey, 8400),
      ]}),
      new TableRow({ children: [
        makeCenteredCell("5", C.paleLavend, true, C.lavender, 600, 22),
        makeCell("Right team ยท Right place ยท Right time = THE mantra for PAS. Manage in a specialist MDT centre to reduce morbidity and mortality", C.paleLavend, false, C.darkGrey, 8400),
      ]}),
    ],
  }),
  ...spacer(1),
  pageBreak(),
];

// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
// SLIDE 14: MNEMONIC + QUICK RECALL
// โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
const slide14 = [
  sectionHeader("๐Ÿง   MNEMONICS & QUICK RECALL", C.coral, C.white),
  ...spacer(1),
  subHeader("๐Ÿ“Œ  PAS โ€” The ACCRETA Mnemonic"),

  new Table({
    width: { size: 9000, type: WidthType.DXA },
    rows: [
      new TableRow({ children: [makeHeaderCell("Letter", C.coral, C.white, 800), makeHeaderCell("Word", C.coral, C.white, 2400), makeHeaderCell("Meaning", C.coral, C.white, 5800)] }),
      new TableRow({ children: [makeCenteredCell("A", C.palePink, true, C.coral, 800, 28), makeCell("Adherent", C.palePink, true, C.darkGrey, 2400), makeCell("Grade 1 โ€” villi adhere to, do NOT penetrate myometrium", C.palePink, false, C.darkGrey, 5800)] }),
      new TableRow({ children: [makeCenteredCell("C", C.paleBlue, true, C.deepTeal, 800, 28), makeCell("Caesarean Scar", C.paleBlue, true, C.darkGrey, 2400), makeCell("Most common cause โ€” each CS exponentially raises risk", C.paleBlue, false, C.darkGrey, 5800)] }),
      new TableRow({ children: [makeCenteredCell("C", C.paleTeal, true, C.green, 800, 28), makeCell("Centre of Excellence", C.paleTeal, true, C.darkGrey, 2400), makeCell("Always manage in specialist MDT centre", C.paleTeal, false, C.darkGrey, 5800)] }),
      new TableRow({ children: [makeCenteredCell("R", "FFF3E0", true, C.orange, 800, 28), makeCell("Refer Early", "FFF3E0", true, C.darkGrey, 2400), makeCell("24-28 weeks for asymptomatic; URGENT if bleeding/preterm", "FFF3E0", false, C.darkGrey, 5800)] }),
      new TableRow({ children: [makeCenteredCell("E", C.paleLavend, true, C.lavender, 800, 28), makeCell("Extravillous Trophoblast", C.paleLavend, true, C.darkGrey, 2400), makeCell("Unregulated EVT invasion = core pathophysiology", C.paleLavend, false, C.darkGrey, 5800)] }),
      new TableRow({ children: [makeCenteredCell("T", C.palePink, true, C.coral, 800, 28), makeCell("Trophoblast Invasion", C.palePink, true, C.darkGrey, 2400), makeCell("Complete by 24 weeks โ€” key window for imaging assessment", C.palePink, false, C.darkGrey, 5800)] }),
      new TableRow({ children: [makeCenteredCell("A", C.paleGreen, true, C.green, 800, 28), makeCell("Avoid Forcible Removal", C.paleGreen, true, C.darkGrey, 2400), makeCell("Torrential haemorrhage = forcible removal of PAS placenta", C.paleGreen, false, C.darkGrey, 5800)] }),
    ],
  }),

  ...spacer(1),
  subHeader("๐Ÿ“Œ  Doppler Colour: Remember BUBS"),
  bullet("B  โ€”  Bridging vessels (most specific sign of PAS)"),
  bullet("U  โ€”  Uterovesical hypervascularity"),
  bullet("B  โ€”  Basal plate connection with lacunae (PAS vs lakes)"),
  bullet("S  โ€”  Subplacental hypervascularity"),
  ...spacer(1),

  subHeader("๐Ÿ“Œ  Grade 3 Percreta โ€” Remember 'A-B-C'"),
  bullet("3a โ†’ A = serosa only (no other organ)"),
  bullet("3b โ†’ B = Bladder invaded"),
  bullet("3c โ†’ C = Can be any other organ (ยฑ bladder)"),
  ...spacer(1),

  new Paragraph({
    alignment: AlignmentType.CENTER,
    shading: { type: ShadingType.SOLID, color: C.deepTeal },
    spacing: { before: 200, after: 200 },
    children: [
      new TextRun({ text: "Source: Self A, Cavallaro A, Collins SL. Placenta accreta spectrum: imaging and diagnosis.", size: 18, color: C.white, font: "Calibri" }),
      new TextRun({ text: " The Obstetrician & Gynaecologist 2025;27:15โ€“28. (TOG / RCOG)", size: 18, color: "A8D8EA", font: "Calibri" }),
    ],
  }),
];

// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
// ASSEMBLE DOCUMENT
// โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

const doc = new Document({
  styles: {
    default: {
      document: {
        run: { font: "Calibri", size: 22, color: C.darkGrey },
      },
    },
  },
  sections: [{
    properties: {
      page: {
        margin: { top: 720, bottom: 720, left: 900, right: 900 },
      },
    },
    headers: {
      default: new Header({
        children: [
          new Paragraph({
            alignment: AlignmentType.RIGHT,
            shading: { type: ShadingType.SOLID, color: C.deepTeal },
            children: [
              new TextRun({ text: "  PAS โ€” Placenta Accreta Spectrum  |  OB-GYN Education Notes  |  TOG 2025  ", bold: true, size: 18, color: C.white, font: "Calibri" }),
            ],
          }),
        ],
      }),
    },
    footers: {
      default: new Footer({
        children: [
          new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [
              new TextRun({ text: "ยฉ Educational Notes for Instagram Feed  |  Prepared from: TOG 2025 (Self et al.)  |  Page: ", size: 16, color: C.midGrey, font: "Calibri" }),
              new TextRun({ children: [PageNumber.CURRENT], size: 16, color: C.midGrey, font: "Calibri" }),
            ],
          }),
        ],
      }),
    },
    children: [
      ...slide1,
      ...slide2,
      ...slide3,
      ...slide4,
      ...slide5,
      ...slide6,
      ...slide7,
      ...slide8,
      ...slide9,
      ...slide10,
      ...slide11,
      ...slide12,
      ...slide13,
      ...slide14,
    ],
  }],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync('/home/daytona/workspace/PAS-notes/PAS_Instagram_Notes.docx', buffer);
  console.log('โœ…  Document written: /home/daytona/workspace/PAS-notes/PAS_Instagram_Notes.docx');
}).catch(err => {
  console.error('ERROR:', err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/PAS-notes && node generate_notes.js 2>&1

Running Command

cd /home/daytona/workspace/PAS-notes && python3 /home/daytona/skills/docx/validaโ€ฆ

Running Command

ls /home/daytona/skills/docx/ && ls -lh /home/daytona/workspace/PAS-notes/PAS_Inโ€ฆ

Your beautifully designed Instagram-feed style Word document is ready!

๐Ÿ“ฅ Download Your PAS Notes

PAS Instagram Notes

Word Document ยท DOCX


What's Inside โ€” 14 Instagram-Style Slides

Here's a summary of every "slide" (page) designed from the TOG 2025 article:
#Slide TitleVisual Elements
1Cover / TitleDeep teal banner, italic quote, journal citation
2What is PAS?Definition box, coloured bullet points, risk statistics alert box
3Pathophysiology4-column comparison table (Normal vs PAS at each step)
4FIGO Classification5-row colour-graded table (Grade 1 โ†’ 3c, with old names + criteria)
5Risk Factors & Pretest ProbabilitySide-by-side High vs Moderate risk table, referral timing alert box
62D Greyscale US Signs7-row table: sign, description, pathophysiology
7Colour Doppler + 3D US5-row Doppler table, bullet points for 3D signs
8PAS vs Uterine Dehiscence12-row โœ…/โŒ comparison table (most clinically critical distinction)
9Role of MRI5-row table: technique, features, when to use, cautions
10Screening & Referral PathwayStep-by-step flow diagram with colour-coded boxes and arrows
11Placental Lakes vs Lacunae6-row comparison table (spot the difference!)
12MDT & Centre of Excellence8-row MDT composition table with specialty + role
13Reporting + Top 5 Key MessagesNumbered colour-coded key messages table
14Mnemonics & Quick RecallACCRETA mnemonic table, BUBS Doppler memory aid, ABC for Grade 3 percreta
Every slide uses a consistent colour palette (teal, coral, gold, lavender), emoji section headers, shaded info boxes, alert boxes with warnings, and note boxes with pinned pearls โ€” all ready to screenshot as Instagram feed posts!
This is a shared conversation. Sign in to Orris to start your own chat.