Prepare a seminar on perioperative care

Reading File
Finding Sources
Finding Sources
Searching PubMed

perioperative care management outcomes

Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/perioperative-seminar && ls /home/daytona/works…

Writing File

~/perioperative-seminar/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Orris Medical Education";
pres.title = "Perioperative Care – A Comprehensive Seminar";

// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const C = {
  navy:    "0A2342",   // dominant dark
  teal:    "006D77",   // accent
  sky:     "83C5BE",   // light accent
  cream:   "EAF4F4",   // light bg
  white:   "FFFFFF",
  red:     "C1121F",   // alert / warning
  amber:   "E9C46A",   // caution
  text:    "1A1A2E",   // body text
  muted:   "4A5568",   // subdued text
  divider: "83C5BE",
};

// ─── HELPER FUNCTIONS ─────────────────────────────────────────────────────────
function darkSlide(slide) {
  slide.background = { color: C.navy };
}
function lightSlide(slide) {
  slide.background = { color: C.cream };
}
function addSectionBar(slide, label) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: C.teal }, line: { type: "none" } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.5, w: 10, h: 0.125, fill: { color: C.teal }, line: { type: "none" } });
  slide.addText(label, { x: 0.3, y: 0.18, w: 9.4, h: 0.4, fontSize: 9, bold: true, color: C.teal, fontFace: "Calibri", charSpacing: 3 });
}
function addSlideNumber(slide, n) {
  slide.addText(String(n), { x: 9.5, y: 5.25, w: 0.4, h: 0.25, fontSize: 8, color: C.muted, align: "right" });
}
function bulletList(items, opts = {}) {
  return items.map((txt, i) => ({
    text: txt,
    options: { bullet: { type: "bullet", indent: 12 }, breakLine: i < items.length - 1, ...opts }
  }));
}
function numberedList(items, opts = {}) {
  return items.map((txt, i) => ({
    text: txt,
    options: { bullet: { type: "number", indent: 15 }, breakLine: i < items.length - 1, ...opts }
  }));
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  // Decorative teal stripe
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.35, h: 5.625, fill: { color: C.teal }, line: { type: "none" } });
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0, w: 0.08, h: 5.625, fill: { color: C.sky }, line: { type: "none" } });
  // Title
  s.addText("PERIOPERATIVE CARE", {
    x: 0.65, y: 1.1, w: 9.2, h: 1.0, fontSize: 42, bold: true, color: C.white,
    fontFace: "Calibri", charSpacing: 3
  });
  s.addText("A Comprehensive Seminar", {
    x: 0.65, y: 2.15, w: 9.2, h: 0.55, fontSize: 22, color: C.sky, fontFace: "Calibri"
  });
  s.addShape(pres.ShapeType.line, { x: 0.65, y: 2.85, w: 7.5, h: 0, line: { color: C.teal, width: 1.5 } });
  s.addText([
    { text: "Topics covered: ", options: { bold: true, color: C.sky } },
    { text: "Preoperative Assessment  ·  Intraoperative Management  ·  ERAS  ·  Postoperative Care  ·  Complications", options: { color: C.white } }
  ], { x: 0.65, y: 3.0, w: 9.0, h: 0.5, fontSize: 12, fontFace: "Calibri" });
  s.addText("Sources: Current Surgical Therapy 14e · Miller's Anesthesia 10e · Schwartz's Principles of Surgery 11e · Barash Clinical Anesthesia 9e · Pye's Surgical Handicraft 22e", {
    x: 0.65, y: 5.1, w: 9.2, h: 0.35, fontSize: 8, color: C.muted, fontFace: "Calibri"
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – AGENDA / OUTLINE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "OVERVIEW");
  s.addText("Seminar Outline", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 28, bold: true, color: C.navy, fontFace: "Calibri" });

  const sections = [
    ["1", "Preoperative Assessment", "History, physical, risk stratification, investigations"],
    ["2", "Perioperative Medical Optimization", "Diabetes, cardiac disease, frailty, nutrition"],
    ["3", "Fluid & Electrolyte Management", "Goal-directed therapy, ERAS fluid principles"],
    ["4", "Antibiotic Prophylaxis", "Timing, agents, dosing"],
    ["5", "Venous Thromboembolism Prophylaxis", "Risk, mechanical & pharmacological methods"],
    ["6", "Enhanced Recovery After Surgery (ERAS)", "Components, evidence, outcomes"],
    ["7", "Intraoperative Considerations", "Anesthesia, monitoring, positioning"],
    ["8", "Postoperative Care", "Analgesia, nutrition, wound care, mobilization"],
    ["9", "Postoperative Complications", "Recognition & management"],
    ["10", "Special Populations", "Elderly, obese, cardiac patients"],
  ];

  sections.forEach(([num, title, sub], i) => {
    const col = i < 5 ? 0 : 1;
    const row = i % 5;
    const x = col === 0 ? 0.4 : 5.2;
    const y = 1.35 + row * 0.82;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.55, h: 0.65, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.05 });
    s.addText(num, { x: x + 0.1, y: y + 0.05, w: 0.38, h: 0.55, fontSize: 18, bold: true, color: C.teal, align: "center", valign: "middle" });
    s.addShape(pres.ShapeType.line, { x: x + 0.5, y: y + 0.1, w: 0, h: 0.45, line: { color: C.teal, width: 1 } });
    s.addText(title, { x: x + 0.6, y: y + 0.05, w: 3.85, h: 0.3, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri" });
    s.addText(sub, { x: x + 0.6, y: y + 0.33, w: 3.85, h: 0.25, fontSize: 8.5, color: C.sky, fontFace: "Calibri" });
  });
  addSlideNumber(s, 2);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – SECTION DIVIDER: PREOPERATIVE ASSESSMENT
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.8, w: 10, h: 2.0, fill: { color: C.teal }, line: { type: "none" } });
  s.addText("SECTION 1", { x: 0.5, y: 0.7, w: 9, h: 0.5, fontSize: 14, bold: true, color: C.sky, charSpacing: 6, align: "center" });
  s.addText("Preoperative Assessment", { x: 0.5, y: 1.9, w: 9, h: 0.95, fontSize: 36, bold: true, color: C.white, align: "center" });
  s.addText("History · Physical Examination · Risk Stratification · Investigations", { x: 0.5, y: 2.95, w: 9, h: 0.45, fontSize: 14, color: C.cream, align: "center" });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – PREOPERATIVE ASSESSMENT: OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 1  ·  PREOPERATIVE ASSESSMENT");
  s.addText("Goals of Preoperative Assessment", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  // Left column
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.25, w: 4.3, h: 3.9, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.08 });
  s.addText("Core Aims", { x: 0.5, y: 1.35, w: 4.1, h: 0.4, fontSize: 14, bold: true, color: C.sky, align: "center" });
  s.addText(bulletList([
    "Identify and optimize medical comorbidities",
    "Assess functional capacity and surgical risk",
    "Develop an individualized anaesthetic plan",
    "Obtain informed consent",
    "Optimize fasting, medications & hydration",
    "Institute VTE and SSI prophylaxis planning",
    "Educate the patient and set expectations"
  ], { fontSize: 11, color: C.white, fontFace: "Calibri" }), { x: 0.5, y: 1.8, w: 4.1, h: 3.1 });

  // Right column
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.25, w: 4.6, h: 3.9, fill: { color: C.cream }, line: { color: C.teal, width: 1 }, rectRadius: 0.08 });
  s.addText("Key Investigations", { x: 5.1, y: 1.35, w: 4.4, h: 0.4, fontSize: 14, bold: true, color: C.navy, align: "center" });
  s.addText(bulletList([
    "Full Blood Count – anaemia, infection",
    "Renal & electrolytes – AKI risk",
    "Liver function – coagulopathy",
    "Coagulation screen – bleeding risk",
    "Blood glucose / HbA1c – DM control",
    "ECG – arrhythmia, ischaemia",
    "CXR – respiratory pathology",
    "Pulmonary function tests (FEV₁, FVC, PFR) – COPD, asthma",
    "Group & Save / Cross-match – major surgery"
  ], { fontSize: 11, color: C.text, fontFace: "Calibri" }), { x: 5.1, y: 1.8, w: 4.4, h: 3.25 });
  addSlideNumber(s, 4);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – ASA CLASSIFICATION & CARDIAC RISK
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 1  ·  PREOPERATIVE ASSESSMENT");
  s.addText("ASA Physical Status & Cardiac Risk Stratification", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 24, bold: true, color: C.navy });

  // ASA table
  const asaRows = [
    ["ASA I",   "Normal healthy patient",                  C.white],
    ["ASA II",  "Mild systemic disease (controlled DM, HTN)", "#e8f5e9"],
    ["ASA III", "Severe systemic disease, not incapacitating", "#fff9c4"],
    ["ASA IV",  "Severe disease, constant threat to life",  "#ffe0b2"],
    ["ASA V",   "Moribund, unlikely to survive 24 h",      "#ffcdd2"],
    ["ASA VI",  "Brain-dead donor",                        "#e8eaf6"],
  ];
  s.addText("ASA Classification", { x: 0.4, y: 1.25, w: 4.5, h: 0.35, fontSize: 13, bold: true, color: C.teal });
  const asaColW = [0.75, 3.65];
  const asaX = [0.4, 1.2];
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.62, w: 4.5, h: 0.35, fill: { color: C.navy }, line: { type: "none" } });
  ["Class", "Description"].forEach((h, ci) => {
    s.addText(h, { x: asaX[ci], y: 1.65, w: asaColW[ci], h: 0.28, fontSize: 10, bold: true, color: C.white });
  });
  asaRows.forEach(([cls, desc, bg], ri) => {
    const y = 1.97 + ri * 0.42;
    s.addShape(pres.ShapeType.rect, { x: 0.4, y, w: 4.5, h: 0.4, fill: { color: bg }, line: { color: C.divider, width: 0.5 } });
    s.addText(cls, { x: asaX[0], y: y + 0.05, w: asaColW[0], h: 0.3, fontSize: 10, bold: true, color: C.navy });
    s.addText(desc, { x: asaX[1], y: y + 0.05, w: asaColW[1], h: 0.3, fontSize: 10, color: C.text });
  });

  // Cardiac
  s.addText("Active Cardiac Conditions (ACC/AHA – Require Workup)", { x: 5.1, y: 1.25, w: 4.7, h: 0.35, fontSize: 12, bold: true, color: C.teal });
  const conditions = [
    ["Unstable CAD", "Unstable angina, recent MI"],
    ["Symptomatic HF", "Decompensated heart failure"],
    ["Unstable Valvular Disease", "Progressive, symptomatic"],
    ["Unstable Arrhythmia", "Acute, malignant"],
    ["Pulmonary Vascular Disease", "Symptomatic PH"],
    ["Adult Congenital HD", "Symptomatic"],
  ];
  conditions.forEach(([title, detail], ri) => {
    const y = 1.65 + ri * 0.62;
    s.addShape(pres.ShapeType.rect, { x: 5.1, y, w: 4.7, h: 0.55, fill: { color: ri % 2 === 0 ? C.navy : "#0d2d4e" }, line: { type: "none" } });
    s.addText(title, { x: 5.25, y: y + 0.04, w: 4.4, h: 0.25, fontSize: 11, bold: true, color: C.sky });
    s.addText(detail, { x: 5.25, y: y + 0.28, w: 4.4, h: 0.2, fontSize: 9.5, color: C.white });
  });
  addSlideNumber(s, 5);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – SECTION DIVIDER: MEDICAL OPTIMIZATION
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.8, w: 10, h: 2.0, fill: { color: C.teal }, line: { type: "none" } });
  s.addText("SECTION 2", { x: 0.5, y: 0.7, w: 9, h: 0.5, fontSize: 14, bold: true, color: C.sky, charSpacing: 6, align: "center" });
  s.addText("Perioperative Medical Optimization", { x: 0.5, y: 1.9, w: 9, h: 0.95, fontSize: 34, bold: true, color: C.white, align: "center" });
  s.addText("Diabetes · Cardiac Disease · Frailty · Nutrition", { x: 0.5, y: 2.95, w: 9, h: 0.45, fontSize: 14, color: C.cream, align: "center" });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – DIABETES MANAGEMENT
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 2  ·  MEDICAL OPTIMIZATION");
  s.addText("Perioperative Diabetes Management", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  // Alert box
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.2, w: 9.2, h: 0.55, fill: { color: C.red }, line: { type: "none" }, rectRadius: 0.06 });
  s.addText("⚠  Perioperative hyperglycaemia occurs in up to 40% of general surgery and 80% of cardiac surgery patients — independently associated with wound infection, pneumonia, sepsis and prolonged LOS", {
    x: 0.55, y: 1.27, w: 9.0, h: 0.4, fontSize: 10.5, color: C.white, bold: true
  });

  // Left panel
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.85, w: 4.3, h: 3.4, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.07 });
  s.addText("Preoperative", { x: 0.5, y: 1.95, w: 4.1, h: 0.35, fontSize: 13, bold: true, color: C.sky, align: "center" });
  s.addText(bulletList([
    "Measure HbA1c – if > 8%, consider delaying elective surgery",
    "Refer to endocrinologist if HbA1c > 8%",
    "ERAS carbohydrate drinks up to 2 h pre-op reduce catabolism and hypoglycaemia",
    "Reduce stable insulin by ½ to ⅔ while fasting",
    "Hold SGLT2 inhibitors ≥ 3 days pre-op (risk of euglycaemic DKA)",
  ], { fontSize: 10.5, color: C.white }), { x: 0.5, y: 2.35, w: 4.1, h: 2.8 });

  // Right panel
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.85, w: 4.6, h: 3.4, fill: { color: C.cream }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
  s.addText("Intra & Postoperative Targets", { x: 5.1, y: 1.95, w: 4.4, h: 0.35, fontSize: 13, bold: true, color: C.navy, align: "center" });
  s.addText(bulletList([
    "Target BG < 180 mg/dL in the operating room (SCA guideline)",
    "Target BG < 150 mg/dL in the ICU",
    "Hourly BG monitoring for insulin pump patients",
    "Insulin pump: maintain basal rate unless BG < 110 mg/dL; correct if BG > 180 mg/dL",
    "Euglycaemia supports wound healing, immune function, and reduces infection risk",
  ], { fontSize: 10.5, color: C.text }), { x: 5.1, y: 2.35, w: 4.4, h: 2.8 });
  addSlideNumber(s, 7);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – CARDIAC DISEASE & FRAILTY
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 2  ·  MEDICAL OPTIMIZATION");
  s.addText("Cardiac Disease & Frailty Assessment", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  // Cardiac column
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.2, w: 4.3, h: 4.0, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.07 });
  s.addText("Cardiac Optimization", { x: 0.5, y: 1.3, w: 4.1, h: 0.35, fontSize: 13, bold: true, color: C.sky, align: "center" });
  s.addText(bulletList([
    "5–8% of noncardiac surgery patients suffer a major cardiac complication within 30 days",
    "Use RCRI or NSQUIP calculator for risk stratification",
    "Best predictor: protocolised functional capacity assessment (6-min walk, AMPAC)",
    "Continue β-blockers and dihydropyridine CCBs perioperatively",
    "Hold ACE inhibitors / ARBs before induction (risk of intraoperative hypotension)",
    "CHF patients: target return to baseline weight, perfusion and functional status at discharge",
  ], { fontSize: 10.5, color: C.white }), { x: 0.5, y: 1.7, w: 4.1, h: 3.4 });

  // Frailty column
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.2, w: 4.6, h: 4.0, fill: { color: C.cream }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
  s.addText("Frailty & Nutrition", { x: 5.1, y: 1.3, w: 4.4, h: 0.35, fontSize: 13, bold: true, color: C.navy, align: "center" });
  s.addText([
    { text: "Frailty\n", options: { bold: true, color: C.teal, breakLine: true } },
    ...bulletList([
      "Frailty = generalized poor functional status + reduced physiologic reserve",
      "Doubles odds of new disability; 5× increased odds of non-home discharge in elderly",
      "Prehabilitation (exercise, nutrition) before surgery counters frailty",
    ], { fontSize: 10.5, color: C.text }),
    { text: "\nNutrition\n", options: { bold: true, color: C.teal, breakLine: true } },
    ...bulletList([
      "Malnutrition → infection, wound failure, fistula, renal & cardiac complications",
      "Screen with PONS tool (BMI, weight loss, intake change, albumin)",
      "7 days preoperative nutritional support ↓ complications by 50% in high-risk abdominal surgery",
      "Postoperative period is catabolic — resume nutrition plan early",
    ], { fontSize: 10.5, color: C.text }),
  ], { x: 5.1, y: 1.7, w: 4.4, h: 3.4 });
  addSlideNumber(s, 8);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – SECTION DIVIDER: FLUID & ELECTROLYTES
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.8, w: 10, h: 2.0, fill: { color: C.teal }, line: { type: "none" } });
  s.addText("SECTION 3", { x: 0.5, y: 0.7, w: 9, h: 0.5, fontSize: 14, bold: true, color: C.sky, charSpacing: 6, align: "center" });
  s.addText("Fluid & Electrolyte Management", { x: 0.5, y: 1.9, w: 9, h: 0.95, fontSize: 36, bold: true, color: C.white, align: "center" });
  s.addText("Goal-Directed Therapy · Volume Status · Electrolyte Disorders", { x: 0.5, y: 2.95, w: 9, h: 0.45, fontSize: 14, color: C.cream, align: "center" });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – FLUID MANAGEMENT
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 3  ·  FLUID & ELECTROLYTE MANAGEMENT");
  s.addText("Perioperative Fluid Management", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  const cols = [
    {
      title: "Preoperative",
      bg: C.navy, tc: C.sky, bc: C.white,
      items: [
        "Allow clear liquids up to 2 h pre-op (ESA 2011 guidelines)",
        "Carbohydrate + electrolyte-rich drinks → enhance hydration, blunt metabolic response",
        "Correct pre-existing dehydration with isotonic crystalloid",
        "Assess for occult volume depletion (tachycardia, orthostasis, oliguria)",
      ]
    },
    {
      title: "Intraoperative",
      bg: C.teal, tc: C.white, bc: C.white,
      items: [
        "Goal-directed fluid therapy (GDFT): guides IV fluids to optimise CO and DO₂",
        "ERAS protocols restrict intra-operative sodium and IV fluid volume",
        "Fluid overload → prolonged ileus, coagulation abnormalities",
        "Replace insensible losses + surgical losses accurately",
      ]
    },
    {
      title: "Postoperative",
      bg: C.cream, tc: C.navy, bc: C.text,
      items: [
        "Earliest sign of volume overload: weight gain (expected loss 0.25–0.5 lb/day from catabolism)",
        "Discontinue IV fluids early — prompt switch to oral/enteral route",
        "Volume deficit: treat with isotonic crystalloid while assessing electrolytes",
        "Monitor for SIADH after CNS surgery or morphine/NSAID use",
      ]
    },
  ];
  cols.forEach(({ title, bg, tc, bc, items }, ci) => {
    const x = 0.3 + ci * 3.15;
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.05, h: 4.1, fill: { color: bg }, line: { type: "none" }, rectRadius: 0.07 });
    s.addText(title, { x: x + 0.1, y: 1.3, w: 2.85, h: 0.4, fontSize: 14, bold: true, color: tc, align: "center" });
    s.addText(bulletList(items, { fontSize: 10, color: bc }), { x: x + 0.1, y: 1.75, w: 2.85, h: 3.4 });
  });
  addSlideNumber(s, 10);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – ANTIBIOTIC PROPHYLAXIS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 4  ·  ANTIBIOTIC PROPHYLAXIS");
  s.addText("Surgical Site Infection & Antibiotic Prophylaxis", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 24, bold: true, color: C.navy });

  // Key facts banner
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.2, w: 9.2, h: 0.5, fill: { color: C.teal }, line: { type: "none" }, rectRadius: 0.05 });
  s.addText("SSI Rate: ~0.4% (NSQUIP) • MRSA now accounts for ~15% of SSI • Prophylaxis is standard where infection risk exceeds a minimum threshold", {
    x: 0.55, y: 1.27, w: 9.0, h: 0.36, fontSize: 10, color: C.white, bold: true
  });

  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.8, w: 4.3, h: 3.5, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.07 });
  s.addText("Principles of Prophylaxis", { x: 0.5, y: 1.9, w: 4.1, h: 0.35, fontSize: 13, bold: true, color: C.sky, align: "center" });
  s.addText(bulletList([
    "Agent must cover likely organisms at surgical site",
    "Clean surgery: skin flora (S. aureus, coag-neg staph)",
    "Clean-contaminated: + gram-negative rods, enterococci",
    "First-choice agent: Cefazolin (1st-gen cephalosporin) – proven, safe, broad spectrum",
    "Vancomycin: reserved for known/suspected MRSA colonisation",
    "Prophylactic antibiotics → discontinue within 24 h post-op",
  ], { fontSize: 10.5, color: C.white }), { x: 0.5, y: 2.3, w: 4.1, h: 2.9 });

  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.8, w: 4.6, h: 3.5, fill: { color: C.cream }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
  s.addText("Timing & Dosing", { x: 5.1, y: 1.9, w: 4.4, h: 0.35, fontSize: 13, bold: true, color: C.navy, align: "center" });
  s.addText(bulletList([
    "Ideal timing: 30–60 min before incision for bolus agents (e.g. cefazolin)",
    "Vancomycin infusion: must start within 120 min before incision",
    "When tourniquet used: complete infusion before inflation",
    "Repeat cefazolin every 4 h intraoperatively (t½ = 8 h, doubled turnover with blood loss)",
    "Weight-based dosing based on volume of distribution",
    "Giving too early (> 60 min before incision) is a recurrent quality problem",
  ], { fontSize: 10.5, color: C.text }), { x: 5.1, y: 2.3, w: 4.4, h: 2.9 });
  addSlideNumber(s, 11);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – VTE PROPHYLAXIS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 5  ·  VTE PROPHYLAXIS");
  s.addText("Venous Thromboembolism (VTE) Prophylaxis", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 24, bold: true, color: C.navy });

  // Risk factors
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.2, w: 2.95, h: 4.1, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.07 });
  s.addText("Risk Factors", { x: 0.5, y: 1.3, w: 2.75, h: 0.35, fontSize: 13, bold: true, color: C.sky, align: "center" });
  s.addText(bulletList([
    "Major orthopaedic / pelvic surgery",
    "Active malignancy",
    "Prior VTE",
    "Prolonged immobility",
    "Obesity (BMI > 30)",
    "Advanced age",
    "Oestrogen therapy / OCP",
    "Thrombophilia",
  ], { fontSize: 10.5, color: C.white }), { x: 0.5, y: 1.7, w: 2.75, h: 3.5 });

  // Mechanical
  s.addShape(pres.ShapeType.rect, { x: 3.5, y: 1.2, w: 2.95, h: 4.1, fill: { color: C.teal }, line: { type: "none" }, rectRadius: 0.07 });
  s.addText("Mechanical Methods", { x: 3.6, y: 1.3, w: 2.75, h: 0.35, fontSize: 13, bold: true, color: C.white, align: "center" });
  s.addText(bulletList([
    "Early ambulation – single best low-risk measure",
    "Graduated compression stockings (TED)",
    "Intermittent pneumatic compression (IPC) devices",
    "Combined IPC + pharmacological prophylaxis for high-risk patients (Cochrane evidence)",
    "Used when pharmacological methods are contraindicated",
  ], { fontSize: 10.5, color: C.white }), { x: 3.6, y: 1.7, w: 2.75, h: 3.5 });

  // Pharmacological
  s.addShape(pres.ShapeType.rect, { x: 6.6, y: 1.2, w: 3.0, h: 4.1, fill: { color: C.cream }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
  s.addText("Pharmacological Methods", { x: 6.7, y: 1.3, w: 2.8, h: 0.35, fontSize: 13, bold: true, color: C.navy, align: "center" });
  s.addText(bulletList([
    "LMWH (enoxaparin) – preferred agent in most guidelines",
    "Unfractionated heparin 5000 IU SC TDS – alternative",
    "DOACs (rivaroxaban, apixaban) – orthopaedic surgery",
    "Fondaparinux – alternative, longer duration",
    "NCCN guidelines: cancer-associated VTE prophylaxis",
    "Duration: 7–35 days depending on surgery type and risk",
  ], { fontSize: 10.5, color: C.text }), { x: 6.7, y: 1.7, w: 2.8, h: 3.5 });
  addSlideNumber(s, 12);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – SECTION DIVIDER: ERAS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.8, w: 10, h: 2.0, fill: { color: C.teal }, line: { type: "none" } });
  s.addText("SECTION 6", { x: 0.5, y: 0.7, w: 9, h: 0.5, fontSize: 14, bold: true, color: C.sky, charSpacing: 6, align: "center" });
  s.addText("Enhanced Recovery After Surgery", { x: 0.5, y: 1.9, w: 9, h: 0.95, fontSize: 34, bold: true, color: C.white, align: "center" });
  s.addText("ERAS Principles · Evidence · Outcomes", { x: 0.5, y: 2.95, w: 9, h: 0.45, fontSize: 14, color: C.cream, align: "center" });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – ERAS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 6  ·  ENHANCED RECOVERY AFTER SURGERY (ERAS)");
  s.addText("ERAS: Components & Evidence", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  // Evidence bar
  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.15, w: 9.2, h: 0.5, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.05 });
  s.addText("ERAS was pioneered by Danish surgeon Henrik Kehlet • Reduces LOS • Improves patient satisfaction • Cuts costs • Lowers complications • ERAS Society publishes specialty-specific guidelines (erssociety.org)", {
    x: 0.55, y: 1.22, w: 9.0, h: 0.36, fontSize: 10, color: C.sky, bold: false
  });

  // Three phase columns
  const phases = [
    {
      label: "PRE-OPERATIVE",
      bg: "#0d2d4e", tc: C.sky, bc: C.white,
      items: [
        "Patient education & shared decision-making",
        "Nutritional optimisation",
        "Prehabilitation (exercise programme)",
        "Carbohydrate loading up to 2 h pre-op",
        "No prolonged fasting – clear liquids allowed",
        "Smoking cessation ≥ 3 weeks",
        "Minimise pre-op anxiolytic medications",
      ]
    },
    {
      label: "INTRA-OPERATIVE",
      bg: C.teal, tc: C.white, bc: C.white,
      items: [
        "Opioid-sparing multimodal analgesia",
        "Pre-emptive regional / peripheral nerve blocks",
        "Local anaesthetic wound infiltration",
        "Prefer regional / sedation over GA when possible",
        "PONV prophylaxis (multimodal)",
        "Goal-directed fluid therapy",
        "Minimally invasive surgical approach",
      ]
    },
    {
      label: "POST-OPERATIVE",
      bg: C.cream, tc: C.navy, bc: C.text,
      items: [
        "Resume full diet as soon as tolerated",
        "Early mobilisation (median 5–6 h post-op in studies)",
        "Prompt IV fluid discontinuation",
        "Multimodal non-opioid analgesia",
        "DVT prophylaxis continued",
        "Outcome: RCT ↓ time in hospital (23h → 9.7h for appendectomy)",
        "Breast cancer ERAS: same-day discharge ↑ from 7% to 59%",
      ]
    },
  ];
  phases.forEach(({ label, bg, tc, bc, items }, ci) => {
    const x = 0.3 + ci * 3.15;
    s.addShape(pres.ShapeType.rect, { x, y: 1.75, w: 3.05, h: 3.65, fill: { color: bg }, line: { type: "none" }, rectRadius: 0.07 });
    s.addText(label, { x: x + 0.1, y: 1.85, w: 2.85, h: 0.4, fontSize: 11, bold: true, color: tc, align: "center", charSpacing: 1 });
    s.addShape(pres.ShapeType.line, { x: x + 0.3, y: 2.28, w: 2.45, h: 0, line: { color: tc, width: 0.75 } });
    s.addText(bulletList(items, { fontSize: 9.5, color: bc }), { x: x + 0.12, y: 2.34, w: 2.83, h: 3.0 });
  });
  addSlideNumber(s, 14);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – POSTOPERATIVE CARE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 7 & 8  ·  INTRAOPERATIVE & POSTOPERATIVE CARE");
  s.addText("Postoperative Care & Analgesia", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.2, w: 4.3, h: 4.1, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.07 });
  s.addText("Immediate Postoperative", { x: 0.5, y: 1.3, w: 4.1, h: 0.35, fontSize: 13, bold: true, color: C.sky, align: "center" });
  s.addText(bulletList([
    "Ensure full reversal of neuromuscular blockade",
    "Suction upper airway secretions before extubation",
    "Oxygen routinely after major surgery – adequate concentration to counteract desaturation",
    "Encourage deep breathing, coughing, and moving every hour ('stir up' regime)",
    "Mobilise as early as clinically safe",
    "Monitor observations: HR, BP, SpO₂, urine output, temp, pain score",
  ], { fontSize: 10.5, color: C.white }), { x: 0.5, y: 1.7, w: 4.1, h: 3.5 });

  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.2, w: 4.6, h: 4.1, fill: { color: C.cream }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
  s.addText("Analgesia Principles", { x: 5.1, y: 1.3, w: 4.4, h: 0.35, fontSize: 13, bold: true, color: C.navy, align: "center" });
  s.addText(bulletList([
    "Multimodal approach: paracetamol + NSAIDs + opioid (PRN) + regional",
    "Deep breathing & coughing best performed after a dose of analgesic with wound support",
    "Opioid balance: too much → sedation + respiratory depression; too little → splinting, atelectasis",
    "Epidural analgesia: gold standard for major thoraco-abdominal surgery",
    "PCA (patient-controlled analgesia): safe and effective alternative",
    "Wound infiltration with local anaesthetic reduces systemic opioid requirement",
    "Respiratory function tests (FEV₁, VC, PFR) guide need for ICU post-op ventilation",
  ], { fontSize: 10.5, color: C.text }), { x: 5.1, y: 1.7, w: 4.4, h: 3.5 });
  addSlideNumber(s, 15);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – SECTION DIVIDER: POSTOPERATIVE COMPLICATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.8, w: 10, h: 2.0, fill: { color: C.red }, line: { type: "none" } });
  s.addText("SECTION 9", { x: 0.5, y: 0.7, w: 9, h: 0.5, fontSize: 14, bold: true, color: C.sky, charSpacing: 6, align: "center" });
  s.addText("Postoperative Complications", { x: 0.5, y: 1.9, w: 9, h: 0.95, fontSize: 36, bold: true, color: C.white, align: "center" });
  s.addText("Recognition · Early Intervention · Management", { x: 0.5, y: 2.95, w: 9, h: 0.45, fontSize: 14, color: C.cream, align: "center" });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 – POSTOPERATIVE COMPLICATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 9  ·  POSTOPERATIVE COMPLICATIONS");
  s.addText("Common Postoperative Complications", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  const comps = [
    {
      title: "Surgical Site Infection (SSI)",
      color: C.red,
      points: [
        "Superficial, deep, or organ-space",
        "Typically manifest by POD 5+",
        "Signs: erythema, warmth, pain, discharge, fever, raised WBC",
        "Liberal CT use for suspected organ-space SSI",
        "Superficial: open incision + drainage + dressing",
        "Abscess ≤ 2–4 cm: IV antibiotics + repeat imaging",
        "Abscess > 2–4 cm: image-guided percutaneous drainage",
      ]
    },
    {
      title: "Anastomotic Leak",
      color: C.amber,
      points: [
        "Risk highest in duodenal/complex reconstruction sites",
        "Immediate (< POD 5–7): re-explore and repair",
        "Late (> POD 7): local drainage + NPO → characterise output",
        "CT with enteral contrast to diagnose",
        "Endoscopic management (covered stent) in select cases",
      ]
    },
    {
      title: "Pulmonary Complications",
      color: C.teal,
      points: [
        "Commonest serious post-op complication",
        "Risk factors: existing lung disease, smoking, obesity",
        "Treat with O₂, chest physiotherapy, early mobilisation",
        "Pre-op: treat infections, bronchodilators, smoking cessation ≥ 3 weeks",
        "Dental sepsis removed ≥ 3 weeks pre-op (risk of lung abscess)",
      ]
    },
    {
      title: "Urinary Retention (POUR)",
      color: C.navy,
      points: [
        "Incidence 0.4–41.6%; higher in males ≥ 65 (9.5%)",
        "Risk: anticholinergics, prior retention, longer op time",
        "Tx: indwelling catheterisation; 65% void spontaneously by 30 days",
        "51.8% of 30-day readmissions in RETAINER I trial were POUR",
      ]
    },
  ];
  comps.forEach(({ title, color, points }, ci) => {
    const col = ci % 2, row = Math.floor(ci / 2);
    const x = col === 0 ? 0.35 : 5.15;
    const y = row === 0 ? 1.2 : 3.3;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 1.95, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.06 });
    s.addShape(pres.ShapeType.rect, { x, y, w: 0.15, h: 1.95, fill: { color }, line: { type: "none" }, rectRadius: 0.06 });
    s.addText(title, { x: x + 0.25, y: y + 0.08, w: 4.15, h: 0.3, fontSize: 12, bold: true, color: C.sky });
    s.addText(bulletList(points, { fontSize: 9.5, color: C.white }), { x: x + 0.25, y: y + 0.4, w: 4.15, h: 1.45 });
  });
  addSlideNumber(s, 17);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 18 – RESPIRATORY COMPLICATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 9  ·  POSTOPERATIVE COMPLICATIONS");
  s.addText("Pulmonary & Respiratory Care", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  s.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.2, w: 4.3, h: 4.1, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.07 });
  s.addText("Preoperative Optimisation", { x: 0.5, y: 1.3, w: 4.1, h: 0.35, fontSize: 13, bold: true, color: C.sky, align: "center" });
  s.addText(bulletList([
    "Identify high-risk patients: existing pulmonary disease, obesity",
    "CXR + PFTs (VC, FEV₁, PFR) – compare to predicted normals",
    "Bronchodilator reversibility testing (FEV₁ pre/post)",
    "Treat purulent sputum with antibiotics + physiotherapy",
    "Avoid elective surgery during acute respiratory infections",
    "Smokers: cessation ≥ 3 weeks (↓ hypersecretion)",
    "Obese: weight loss before elective surgery",
    "Pre-op physiotherapy education: breathing exercises",
    "Severe COPD: plan for ICU ventilation postoperatively",
  ], { fontSize: 10.5, color: C.white }), { x: 0.5, y: 1.7, w: 4.1, h: 3.5 });

  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.2, w: 4.6, h: 4.1, fill: { color: C.cream }, line: { color: C.teal, width: 1 }, rectRadius: 0.07 });
  s.addText("Postoperative Management", { x: 5.1, y: 1.3, w: 4.4, h: 0.35, fontSize: 13, bold: true, color: C.navy, align: "center" });
  s.addText(bulletList([
    "Ensure full NMB reversal at end of operation",
    "Suction upper airway before extubation",
    "Supplemental O₂ routinely after major surgery",
    "'Stir up' regime: hourly deep breathing, coughing, movement",
    "Best achieved after analgesia + supported wound",
    "Chest physiotherapy continued postoperatively",
    "Position: semi-recumbent (30–45°) reduces aspiration risk",
    "ICU ventilation for patients with critical pre-op pulmonary function",
  ], { fontSize: 10.5, color: C.text }), { x: 5.1, y: 1.7, w: 4.4, h: 3.5 });
  addSlideNumber(s, 18);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 19 – SPECIAL POPULATIONS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "SECTION 10  ·  SPECIAL POPULATIONS");
  s.addText("Perioperative Care in Special Populations", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 24, bold: true, color: C.navy });

  const pops = [
    {
      label: "Elderly & Frail",
      color: C.teal,
      items: [
        "Frailty ↑ risk of death, disability, institutional care",
        "Prehabilitation: exercise + nutrition before surgery",
        "Higher POUR risk (males ≥ 65)",
        "AMPAC score to guide physio and discharge planning",
        "Anticipate increased sensitivity to analgesia/anaesthesia",
      ]
    },
    {
      label: "Obese (BMI > 30)",
      color: "#e76f51",
      items: [
        "Higher VTE, SSI, wound dehiscence risk",
        "Weight loss before elective surgery desirable",
        "Increased risk of post-op respiratory complications",
        "Drug dosing adjustment required (weight-based)",
        "Ergonomic & positioning challenges",
      ]
    },
    {
      label: "Cardiac Disease / CHF",
      color: C.red,
      items: [
        "Higher perioperative morbidity with decreasing EF",
        "Perioperative monitoring: maintain perfusion & avoid fluid overload",
        "Target: return to baseline weight & functional status at discharge",
        "CHF: avoid ACE/ARB on day of surgery",
        "Assess by TTE if EF unknown",
      ]
    },
  ];
  pops.forEach(({ label, color, items }, ci) => {
    const x = 0.35 + ci * 3.1;
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 2.95, h: 4.1, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.07 });
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 2.95, h: 0.45, fill: { color }, line: { type: "none" }, rectRadius: 0.07 });
    s.addText(label, { x: x + 0.1, y: 1.25, w: 2.75, h: 0.35, fontSize: 12, bold: true, color: C.white, align: "center" });
    s.addText(bulletList(items, { fontSize: 10.5, color: C.white }), { x: x + 0.1, y: 1.7, w: 2.75, h: 3.5 });
  });
  addSlideNumber(s, 19);
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 20 – SUMMARY / KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.15, fill: { color: C.teal }, line: { type: "none" } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.475, w: 10, h: 0.15, fill: { color: C.teal }, line: { type: "none" } });
  s.addText("KEY TAKEAWAYS", { x: 0.5, y: 0.2, w: 9, h: 0.5, fontSize: 14, bold: true, color: C.sky, align: "center", charSpacing: 5 });
  s.addText("Perioperative Care – Essential Principles", { x: 0.5, y: 0.75, w: 9, h: 0.55, fontSize: 28, bold: true, color: C.white, align: "center" });
  s.addShape(pres.ShapeType.line, { x: 1.5, y: 1.38, w: 7.0, h: 0, line: { color: C.teal, width: 1.5 } });

  const points = [
    "Preoperative optimisation is the single biggest modifiable determinant of surgical outcome",
    "Glycaemic control (HbA1c < 8%, BG < 180 mg/dL intra-op) reduces wound infection, pneumonia, and mortality",
    "Antibiotic prophylaxis timing is critical – administer within 30–60 min before incision, discontinue within 24 h",
    "ERAS multimodal protocols decrease LOS, opioid use, and complications across surgical specialties",
    "Goal-directed fluid therapy and fluid restriction are cornerstones of ERAS; fluid overload → ileus and coagulopathy",
    "Early ambulation + breathing exercises prevent the two most common post-op complications: VTE and atelectasis",
    "Postoperative complications (SSI, leaks, POUR) require anticipation, close monitoring, and protocolised response",
  ];
  points.forEach((pt, i) => {
    const y = 1.5 + i * 0.55;
    s.addShape(pres.ShapeType.rect, { x: 0.4, y: y + 0.02, w: 0.3, h: 0.36, fill: { color: C.teal }, line: { type: "none" }, rectRadius: 0.04 });
    s.addText(String(i + 1), { x: 0.4, y: y + 0.02, w: 0.3, h: 0.36, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle" });
    s.addText(pt, { x: 0.85, y, w: 8.8, h: 0.5, fontSize: 11, color: C.white, valign: "middle" });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 21 – REFERENCES
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  lightSlide(s);
  addSectionBar(s, "REFERENCES");
  s.addText("References & Sources", { x: 0.5, y: 0.55, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.navy });

  const refs = [
    "Goeddel LA. Perioperative Optimization. In: Current Surgical Therapy, 14th ed. Elsevier, 2023. (Chapters on DM, CVD, Frailty, Nutrition)",
    "Miller RD et al. Miller's Anesthesia, 10th ed. Elsevier, 2023. (ERAS in Ambulatory & Major Surgery, pp. 10041–10050)",
    "Schwartz SI et al. Schwartz's Principles of Surgery, 11th ed. McGraw-Hill, 2019. (Fluid & Electrolyte Management, ERAS Pathways, pp. 125–396)",
    "Barash PG et al. Clinical Anesthesia, 9th ed. Wolters Kluwer, 2022. (Antibiotic Prophylaxis, pp. 569–570)",
    "Bailey & Love / Pye's Surgical Handicraft, 22nd ed. (Preoperative Assessment, Postoperative Pulmonary Care, pp. 448–1924)",
    "Fischer JE. Fischer's Mastery of Surgery, 8th ed. Wolters Kluwer, 2023. (Postoperative Care / Complications, pp. 7773–7774)",
    "Sabiston Textbook of Surgery, 21st ed. Elsevier, 2022. (Surgical Site Infection, p. 1691)",
    "American College of Cardiology / American Heart Association. Guidelines for Perioperative Cardiac Evaluation, 2014.",
    "ERAS Society. Multi-specialty perioperative care guidelines. erssociety.org",
    "Cochrane Database Syst Rev: Combined IPC + pharmacological VTE prophylaxis in high-risk surgical patients, 2008.",
  ];
  s.addText(refs.map((r, i) => ({
    text: `${i + 1}.  ${r}`,
    options: { bullet: false, breakLine: i < refs.length - 1, color: C.text, fontSize: 10, fontFace: "Calibri" }
  })), { x: 0.4, y: 1.2, w: 9.2, h: 4.1 });
  addSlideNumber(s, 21);
}

// ═══════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ═══════════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/perioperative-seminar/Perioperative_Care_Seminar.pptx" })
  .then(() => console.log("✅  Presentation saved successfully."))
  .catch(err => { console.error("❌  Error:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/perioperative-seminar && node build.js

Running Command

ls -lh /home/daytona/workspace/perioperative-seminar/Perioperative_Care_Seminar.…

Your seminar is ready:

Perioperative Care Seminar

Presentation · PPTX


What's Inside (21 slides)

The deck uses a professional navy/teal/cream colour palette with dark title slides and clean content slides. Here is the full structure:
SlideContent
1Title - Perioperative Care: A Comprehensive Seminar
2Visual Outline - 10-section overview with descriptions
3Section divider: Preoperative Assessment
4Goals & Investigations - Core aims, key lab/imaging workup
5ASA Classification & Cardiac Risk - Full ASA table + ACC/AHA active cardiac conditions
6Section divider: Medical Optimization
7Perioperative Diabetes - HbA1c targets, SGLT2i risks, insulin pump management, BG targets (< 180 mg/dL OR, < 150 mg/dL ICU)
8Cardiac Disease & Frailty/Nutrition - RCRI, functional capacity, β-blocker/ACE guidance, prehabilitation, PONS screening
9Section divider: Fluid & Electrolyte Management
10Fluid Management - Pre/intra/post-op phases, GDFT, ERAS fluid principles
11Antibiotic Prophylaxis - Agent choice, timing (30–60 min), cefazolin redosing, MRSA considerations
12VTE Prophylaxis - Risk factors, mechanical (IPC, TED), pharmacological (LMWH, DOACs)
13Section divider: ERAS
14ERAS Components - Pre/intra/post-op phases with outcomes (LOS reductions, opioid data)
15Postoperative Care & Analgesia - 'Stir up' regime, multimodal analgesia, extubation care
16Section divider: Postoperative Complications
17Complications Overview - SSI, anastomotic leak, pulmonary, POUR with management pathways
18Pulmonary Complications - Pre-op optimisation + post-op respiratory management
19Special Populations - Elderly/frail, obese, cardiac disease/CHF
20Key Takeaways - 7 essential evidence-based principles
21References - 10 authoritative sources (textbooks + guidelines)
Primary sources used: Current Surgical Therapy 14e, Miller's Anesthesia 10e, Schwartz's Principles of Surgery 11e, Barash Clinical Anesthesia 9e, Pye's Surgical Handicraft 22e, Fischer's Mastery of Surgery 8e, Sabiston Textbook of Surgery, ACC/AHA Guidelines, ERAS Society guidelines.

Make a comparison infographic: Traditional care vs. ERAS pathways

Generating Image

A detailed medical comparison infographic: "Traditional Perioperative Care vs. ERAS Pathways". Split into two clear columns with a bold dividing line in the center. Left column titled "Traditional Care" with a muted red/orange color scheme, right column titled "ERAS Pathways" with a teal/green color scheme. The infographic has three horizontal sections: PREOPERATIVE, INTRAOPERATIVE, and POSTOPERATIVE. Each section compares the two approaches side by side with clean icons and concise bullet points. Traditional Care bullets: prolonged fasting (nil by mouth from midnight), bowel prep routinely used, heavy sedative premedication, opioid-based analgesia, liberal IV fluid administration, restricted oral intake postoperatively, prolonged bed rest, routine nasogastric tubes, late mobilization. ERAS bullets: clear liquids up to 2h pre-op, carbohydrate loading drinks, no routine bowel prep, multimodal opioid-sparing analgesia, goal-directed fluid therapy, early oral feeding, early ambulation within hours, remove drains/catheters early. Outcome comparison at the bottom: Traditional = longer hospital stay, higher opioid use, more complications. ERAS = reduced LOS by 30-50%, lower opioid consumption, fewer complications, higher patient satisfaction. Professional clinical design with clear typography, medical icons, and a clean white background.

Traditional Perioperative Care vs. ERAS Pathways
Here is your comparison infographic covering the full perioperative timeline across three phases:
Preoperative
  • Traditional: nil-by-mouth from midnight, routine bowel prep, heavy premedication
  • ERAS: clear liquids up to 2 h pre-op, carbohydrate loading drinks, no routine bowel prep, minimal sedation
Intraoperative
  • Traditional: opioid-dominant analgesia, liberal IV fluids, general anaesthesia preferred
  • ERAS: multimodal opioid-sparing analgesia, goal-directed fluid therapy, regional/local anaesthetic preference, PONV prophylaxis
Postoperative
  • Traditional: prolonged fasting, NG tubes, restricted mobilisation, prolonged IV drips
  • ERAS: early oral feeding, remove drains/catheters promptly, mobilise within hours, discontinue IV fluids early
Outcomes at the bottom summarise the key evidence: ERAS reduces hospital length of stay by 30–50%, lowers opioid consumption, cuts complication rates, and improves patient satisfaction compared to traditional care pathways.

Give ppt

The perioperative seminar PPTX was already built in the previous session. Here it is:

Perioperative Care Seminar

Presentation · PPTX

This is the full 21-slide deck covering:
  1. Preoperative Assessment - ASA classification, cardiac risk, investigations
  2. Medical Optimization - Diabetes, cardiac disease, frailty, nutrition
  3. Fluid & Electrolyte Management - Goal-directed therapy, ERAS fluid principles
  4. Antibiotic Prophylaxis - Timing, agents, dosing
  5. VTE Prophylaxis - Mechanical & pharmacological methods
  6. ERAS Pathways - Pre/intra/post-op components with outcomes data
  7. Postoperative Care & Analgesia - 'Stir up' regime, multimodal analgesia
  8. Postoperative Complications - SSI, anastomotic leak, POUR, pulmonary
  9. Special Populations - Elderly, obese, cardiac patients
  10. Key Takeaways + References
If you'd like a separate, dedicated PPT focused specifically on the Traditional Care vs. ERAS comparison (based on the infographic), just say so and I'll build that as well.
This is a shared conversation. Sign in to Orris to start your own chat.