Create ppt sepsis management with recent guidelines

Reading File
Reading File
Reading File
Finding Sources
Searching PubMed

"sepsis" AND "management" AND "guidelines"

Searching the Web

Surviving Sepsis Campaign 2024 2025 guidelines updates

Reading File
Reading File
Reading Article

PMID: 41869844

Reading Web Page

https://www.ebmedicine.net/media_library/files/Sepsis-Emerge…

Reading File
Running Command

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

Writing File

~/sepsis-ppt/sepsis_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Orris";
pres.title = "Sepsis Management - Recent Guidelines 2025";

// ============================================================
// COLOUR PALETTE
// Deep navy dominant, crimson accent, pale slate secondary
// ============================================================
const C = {
  navy:      "0D1B2A",
  navyMid:   "1A3250",
  crimson:   "C62828",
  crimsonLt: "EF5350",
  amber:     "F57C00",
  amberLt:   "FFB300",
  teal:      "00838F",
  tealLt:    "4DD0E1",
  slate:     "37474F",
  slateLight:"546E7A",
  white:     "FFFFFF",
  offWhite:  "F0F4F8",
  lightGray: "B0BEC5",
  green:     "2E7D32",
  greenLt:   "66BB6A",
};

// ============================================================
// HELPER: accent bar at top of content slides
// ============================================================
function addTopBar(slide, color) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: 0.12,
    fill: { color: color || C.crimson },
    line: { type: "none" },
  });
}

function addSlideNumber(slide, num) {
  slide.addText(String(num), {
    x: 9.4, y: 5.3, w: 0.5, h: 0.25,
    fontSize: 9, color: C.lightGray, align: "right",
  });
}

function sectionDivider(slide, title, subtitle, bgColor, accentColor) {
  slide.background = { color: bgColor || C.navy };
  // Vertical accent stripe
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.08, h: "100%",
    fill: { color: accentColor || C.crimson },
    line: { type: "none" },
  });
  slide.addText(title, {
    x: 0.4, y: 1.8, w: 9.2, h: 1.2,
    fontSize: 38, bold: true, color: C.white, align: "left",
    fontFace: "Calibri",
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.4, y: 3.1, w: 9.2, h: 0.6,
      fontSize: 18, color: C.lightGray, align: "left",
      fontFace: "Calibri",
    });
  }
}

// ============================================================
// SLIDE 1 — TITLE
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };

  // Full-width bold stripe at top
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: 0.5,
    fill: { color: C.crimson }, line: { type: "none" },
  });

  // Decorative large background text (low opacity effect via color)
  s.addText("SEPSIS", {
    x: 3.5, y: 0.8, w: 6, h: 2.5,
    fontSize: 100, bold: true, color: "0F2A44",
    align: "right", fontFace: "Calibri", transparency: 60,
  });

  s.addText("SEPSIS MANAGEMENT", {
    x: 0.5, y: 1.2, w: 9, h: 1.2,
    fontSize: 40, bold: true, color: C.white, align: "left",
    fontFace: "Calibri", charSpacing: 2,
  });
  s.addText("Recent Guidelines & Clinical Practice", {
    x: 0.5, y: 2.5, w: 9, h: 0.6,
    fontSize: 20, color: C.crimsonLt, align: "left", fontFace: "Calibri",
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.5, y: 3.2, w: 3, h: 0.04,
    fill: { color: C.crimson }, line: { type: "none" },
  });
  s.addText([
    { text: "Surviving Sepsis Campaign (SSC) 2021 Adult Guidelines", options: { breakLine: true } },
    { text: "SSC Children's Guidelines 2026  |  CMS SEP-1 Bundle", options: { breakLine: true } },
    { text: "Harrison's Principles of Internal Medicine 22e, 2025", options: {} },
  ], {
    x: 0.5, y: 3.4, w: 9, h: 1.2,
    fontSize: 13, color: C.lightGray, fontFace: "Calibri",
  });
  // Bottom bar
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 5.42, w: "100%", h: 0.2,
    fill: { color: C.crimson }, line: { type: "none" },
  });
}

// ============================================================
// SLIDE 2 — OUTLINE / AGENDA
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("PRESENTATION OVERVIEW", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3,
    fontFace: "Calibri",
  });
  s.addText("Sepsis Management — Agenda", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.6,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  const topics = [
    ["01", "Definitions & Sepsis-3 Criteria"],
    ["02", "Epidemiology & Burden"],
    ["03", "Pathophysiology"],
    ["04", "Diagnosis & Screening Tools (qSOFA / SOFA)"],
    ["05", "The 1-Hour Bundle (SSC)"],
    ["06", "Antimicrobial Therapy"],
    ["07", "Fluid Resuscitation"],
    ["08", "Vasopressors & Haemodynamic Support"],
    ["09", "Source Control"],
    ["10", "Adjunctive Therapies"],
    ["11", "Mechanical Ventilation in Sepsis-ARDS"],
    ["12", "Post-ICU Care & Recovery"],
  ];

  const colW = 4.2;
  topics.forEach(([num, text], i) => {
    const col = i < 6 ? 0 : 1;
    const row = i % 6;
    const xBase = col === 0 ? 0.4 : 5.2;
    const yBase = 1.55 + row * 0.62;

    s.addShape(pres.ShapeType.rect, {
      x: xBase, y: yBase, w: 0.42, h: 0.42,
      fill: { color: C.crimson }, line: { type: "none" }, rounding: 0.04,
    });
    s.addText(num, {
      x: xBase, y: yBase, w: 0.42, h: 0.42,
      fontSize: 12, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(text, {
      x: xBase + 0.52, y: yBase + 0.04, w: colW - 0.1, h: 0.38,
      fontSize: 13, color: C.slate, fontFace: "Calibri", valign: "middle",
    });
  });
  addSlideNumber(s, 2);
}

// ============================================================
// SLIDE 3 — DEFINITIONS (SEPSIS-3)
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  addTopBar(s, C.crimson);

  s.addText("01  DEFINITIONS", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Sepsis-3 Consensus Definitions (2016)", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.55,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
  });

  const boxes = [
    {
      title: "INFECTION",
      color: C.teal,
      text: "Suspected or confirmed pathological process caused by microorganisms",
    },
    {
      title: "SEPSIS",
      color: C.amber,
      text: "Life-threatening organ dysfunction caused by a dysregulated host response to infection\n\nSOFA score ≥ 2 from baseline",
    },
    {
      title: "SEPTIC SHOCK",
      color: C.crimson,
      text: "Subset of sepsis with circulatory, cellular & metabolic dysfunction\n\nVasopressor required to maintain MAP ≥ 65 mmHg + Lactate > 2 mmol/L despite adequate fluid resuscitation",
    },
  ];

  boxes.forEach((b, i) => {
    const x = 0.3 + i * 3.25;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.45, w: 3.05, h: 3.9,
      fill: { color: C.navyMid }, line: { color: b.color, pt: 2 },
    });
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.45, w: 3.05, h: 0.5,
      fill: { color: b.color }, line: { type: "none" },
    });
    s.addText(b.title, {
      x, y: 1.45, w: 3.05, h: 0.5,
      fontSize: 14, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(b.text, {
      x: x + 0.1, y: 2.05, w: 2.85, h: 3.1,
      fontSize: 13, color: C.offWhite, fontFace: "Calibri", valign: "top",
    });
  });

  s.addText("Sepsis-3 Task Force, JAMA 2016  |  Harrison's Internal Medicine 22e", {
    x: 0.4, y: 5.3, w: 9.2, h: 0.25,
    fontSize: 9, color: C.lightGray, fontFace: "Calibri",
  });
  addSlideNumber(s, 3);
}

// ============================================================
// SLIDE 4 — EPIDEMIOLOGY
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("02  EPIDEMIOLOGY & BURDEN", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Global Impact of Sepsis", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  // Stat boxes
  const stats = [
    { val: "48.9M", label: "Cases worldwide\nper year", color: C.crimson },
    { val: "11M", label: "Deaths worldwide\nper year", color: C.navyMid },
    { val: "~30%", label: "Hospital mortality\nin septic shock", color: C.amber },
    { val: "7-8%", label: "Mortality increase\nper hour antibiotics delayed", color: C.teal },
  ];

  stats.forEach((st, i) => {
    const x = 0.3 + i * 2.38;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.4, w: 2.15, h: 2.2,
      fill: { color: st.color }, line: { type: "none" },
    });
    s.addText(st.val, {
      x, y: 1.55, w: 2.15, h: 1.0,
      fontSize: 32, bold: true, color: C.white,
      align: "center", fontFace: "Calibri",
    });
    s.addText(st.label, {
      x, y: 2.5, w: 2.15, h: 1.0,
      fontSize: 12, color: C.white,
      align: "center", fontFace: "Calibri",
    });
  });

  const bullets = [
    "Leading cause of ICU admission and in-hospital mortality globally",
    "3rd leading cause of death in the US — costs >$24 billion annually",
    "Sepsis survivors face long-term cognitive, physical, and psychological sequelae (Post-Sepsis Syndrome)",
    "Incidence is rising due to ageing populations, immunosuppression, and multi-drug resistant organisms",
    "2024 SSC guidelines specifically address long-term recovery and post-discharge care for the first time",
  ];

  s.addText(bullets.map((b, i) => ({
    text: b,
    options: { bullet: { indent: 15 }, breakLine: i < bullets.length - 1, fontSize: 13, color: C.slate },
  })), {
    x: 0.4, y: 3.8, w: 9.2, h: 1.7,
    fontFace: "Calibri",
  });
  addSlideNumber(s, 4);
}

// ============================================================
// SLIDE 5 — PATHOPHYSIOLOGY
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  addTopBar(s, C.crimson);

  s.addText("03  PATHOPHYSIOLOGY", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Dysregulated Host Response to Infection", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.55,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
  });

  const steps = [
    { label: "Pathogen\nInvasion", color: C.crimson },
    { label: "PRR Activation\n(TLRs, NOD)", color: C.amber },
    { label: "Cytokine Storm\n(TNF-α, IL-1, IL-6)", color: C.amberLt },
    { label: "Endothelial\nDysfunction", color: C.teal },
    { label: "Coagulopathy\nDIC", color: C.tealLt },
    { label: "Multi-Organ\nFailure", color: C.crimsonLt },
  ];

  steps.forEach((st, i) => {
    const x = 0.25 + i * 1.62;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.5, w: 1.42, h: 1.5,
      fill: { color: st.color }, line: { type: "none" },
    });
    s.addText(st.label, {
      x, y: 1.5, w: 1.42, h: 1.5,
      fontSize: 12, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri",
    });
    if (i < steps.length - 1) {
      s.addShape(pres.ShapeType.rightArrow, {
        x: x + 1.42, y: 1.95, w: 0.2, h: 0.6,
        fill: { color: C.lightGray }, line: { type: "none" },
      });
    }
  });

  // Mechanisms text
  const mechs = [
    ["Microvascular Injury", "Capillary leak, maldistribution of blood flow, reduced O₂ delivery"],
    ["Mitochondrial Dysfunction", "Impaired cellular energy production despite adequate O₂ delivery — cytopathic hypoxia"],
    ["Immunosuppression", "Lymphocyte apoptosis, T-cell exhaustion, impaired monocyte function — increases susceptibility to secondary infections"],
    ["Neuroendocrine Response", "HPA axis activation, relative adrenal insufficiency in ~30% of septic shock patients"],
  ];

  mechs.forEach(([title, body], i) => {
    const x = i < 2 ? 0.3 : 5.2;
    const y = 3.15 + (i % 2) * 0.95;
    s.addText(title, {
      x, y, w: 4.5, h: 0.3,
      fontSize: 13, bold: true, color: C.amberLt, fontFace: "Calibri",
    });
    s.addText(body, {
      x, y: y + 0.3, w: 4.5, h: 0.58,
      fontSize: 11, color: C.offWhite, fontFace: "Calibri",
    });
  });

  addSlideNumber(s, 5);
}

// ============================================================
// SLIDE 6 — DIAGNOSIS & SCREENING
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("04  DIAGNOSIS & SCREENING", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("SOFA Score & Clinical Tools", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  // Left panel: qSOFA
  s.addShape(pres.ShapeType.rect, {
    x: 0.3, y: 1.4, w: 4.3, h: 2.5,
    fill: { color: C.navyMid }, line: { type: "none" },
  });
  s.addText("qSOFA (Quick SOFA) Screen", {
    x: 0.3, y: 1.4, w: 4.3, h: 0.42,
    fontSize: 14, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri",
    fill: { color: C.crimson },
  });
  // qSOFA criteria
  [
    "1.  Respiratory rate ≥ 22 breaths/min",
    "2.  Altered mental status (GCS < 15)",
    "3.  Systolic BP ≤ 100 mmHg",
    "",
    "Score ≥ 2 → Poor outcome, warrants further assessment",
    "More specific but LESS sensitive than SIRS",
  ].forEach((line, i) => {
    s.addText(line, {
      x: 0.5, y: 1.95 + i * 0.3, w: 3.9, h: 0.28,
      fontSize: 12.5, color: i >= 4 ? C.amberLt : C.offWhite,
      bold: i >= 4, fontFace: "Calibri",
    });
  });

  // Right panel: SOFA
  s.addShape(pres.ShapeType.rect, {
    x: 5.0, y: 1.4, w: 4.7, h: 2.5,
    fill: { color: C.navyMid }, line: { type: "none" },
  });
  s.addText("SOFA Score (Organ Dysfunction)", {
    x: 5.0, y: 1.4, w: 4.7, h: 0.42,
    fontSize: 14, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri",
    fill: { color: C.teal },
  });
  const sofaRows = [
    ["System", "Markers"],
    ["Respiratory", "PaO₂/FiO₂ ratio"],
    ["Coagulation", "Platelets (×10³/μL)"],
    ["Hepatic", "Bilirubin (mg/dL)"],
    ["Cardiovascular", "MAP / Vasopressors"],
    ["CNS", "Glasgow Coma Scale"],
    ["Renal", "Creatinine / Urine output"],
  ];
  sofaRows.forEach(([sys, mark], i) => {
    const isBold = i === 0;
    s.addText(sys, {
      x: 5.1, y: 1.93 + i * 0.28, w: 2.3, h: 0.26,
      fontSize: 12, color: isBold ? C.amberLt : C.offWhite, bold: isBold,
      fontFace: "Calibri",
    });
    s.addText(mark, {
      x: 7.4, y: 1.93 + i * 0.28, w: 2.2, h: 0.26,
      fontSize: 12, color: isBold ? C.amberLt : C.offWhite, bold: isBold,
      fontFace: "Calibri",
    });
  });

  // Sepsis definition box
  s.addShape(pres.ShapeType.rect, {
    x: 0.3, y: 4.05, w: 9.4, h: 0.75,
    fill: { color: C.crimson }, line: { type: "none" },
  });
  s.addText([
    { text: "SEPSIS = ", options: { bold: true } },
    { text: "SOFA ≥ 2 from baseline in presence of suspected/confirmed infection  |  " },
    { text: "SEPTIC SHOCK = ", options: { bold: true } },
    { text: "Vasopressor to maintain MAP ≥ 65 mmHg + Lactate > 2 mmol/L despite fluid resuscitation" },
  ], {
    x: 0.5, y: 4.1, w: 9.0, h: 0.65,
    fontSize: 13, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Other tools note
  s.addText("Other screening tools: NEWS, MEWS, AI-based TREWS — none preferentially endorsed by SSC 2021", {
    x: 0.4, y: 4.9, w: 9.2, h: 0.35,
    fontSize: 11, color: C.slateLight, italic: true, fontFace: "Calibri",
  });

  addSlideNumber(s, 6);
}

// ============================================================
// SLIDE 7 — THE 1-HOUR BUNDLE
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  addTopBar(s, C.crimson);

  s.addText("05  THE 1-HOUR BUNDLE", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Surviving Sepsis Campaign — Immediate Actions", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.55,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
  });

  const bundle = [
    { num: "1", icon: "🔬", title: "Measure Lactate", body: "Baseline serum lactate\nRemeasure in 2–4 h if initial > 2 mmol/L\nLactate ≥ 4 mmol/L — high mortality risk" },
    { num: "2", icon: "🩸", title: "Blood Cultures", body: "Obtain ≥ 2 sets (aerobic + anaerobic)\nBefore first antibiotic dose\nDo NOT delay antibiotics > 45 min for cultures" },
    { num: "3", icon: "💊", title: "Broad-Spectrum Antibiotics", body: "Administer within 1 h (septic shock)\nWithin 3 h if sepsis without shock & less certain diagnosis\nEmpiric: cover all likely organisms" },
    { num: "4", icon: "💧", title: "Crystalloid Fluids", body: "30 mL/kg IV crystalloid (balanced preferred)\nFor hypotension or lactate ≥ 4 mmol/L\nReassess with dynamic measures after" },
    { num: "5", icon: "⚡", title: "Vasopressors", body: "Start if MAP < 65 mmHg during/after fluids\nFirst-line: Norepinephrine\nTarget MAP ≥ 65 mmHg" },
  ];

  bundle.forEach((item, i) => {
    const x = 0.2 + i * 1.94;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.42, w: 1.78, h: 3.9,
      fill: { color: C.navyMid }, line: { color: C.teal, pt: 1 },
    });
    // Number badge
    s.addShape(pres.ShapeType.ellipse, {
      x: x + 0.6, y: 1.48, w: 0.58, h: 0.58,
      fill: { color: C.crimson }, line: { type: "none" },
    });
    s.addText(item.num, {
      x: x + 0.6, y: 1.48, w: 0.58, h: 0.58,
      fontSize: 18, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(item.title, {
      x: x + 0.05, y: 2.18, w: 1.68, h: 0.7,
      fontSize: 12.5, bold: true, color: C.amberLt,
      align: "center", fontFace: "Calibri",
    });
    s.addText(item.body, {
      x: x + 0.08, y: 2.95, w: 1.62, h: 2.3,
      fontSize: 11, color: C.offWhite, fontFace: "Calibri", valign: "top",
    });
  });

  // Note
  s.addText("★  SSC updated (2018): Previous 3-hour & 6-hour bundles merged into the 1-Hour Bundle. All elements should be initiated simultaneously.", {
    x: 0.3, y: 5.28, w: 9.4, h: 0.28,
    fontSize: 10, color: C.lightGray, italic: true, fontFace: "Calibri",
  });

  addSlideNumber(s, 7);
}

// ============================================================
// SLIDE 8 — ANTIMICROBIAL THERAPY
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("06  ANTIMICROBIAL THERAPY", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Empiric Selection & Stewardship", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  // Table
  const tableRows = [
    [{ text: "Clinical Scenario", options: { bold: true, color: C.white } },
     { text: "Recommended Empiric Coverage", options: { bold: true, color: C.white } },
     { text: "Agents", options: { bold: true, color: C.white } }],
    ["Community-acquired (no Pseudomonas risk)", "Gram-negative + anaerobic", "Ceftriaxone / Cefotaxime ± Metronidazole"],
    ["Pseudomonas risk (HAI, structural lung dz)", "Extended gram-negative", "Cefepime / Pip-Tazo / Meropenem"],
    ["MRSA risk (skin, soft tissue, prior MRSA)", "MRSA coverage added", "Add Vancomycin / Daptomycin"],
    ["Resistant gram-negative (MDR, prior carbapenems)", "XDR coverage", "Ceftazidime-Avibactam / Ceftolozone-Tazo"],
    ["Immunocompromised / neutropenic", "Broad including fungal", "Pip-Tazo or Carbapenem ± Antifungal"],
    ["Abdominal sepsis", "Gram-neg + anaerobic", "Pip-Tazo / Carbapenem + Metronidazole"],
  ];

  const colWidths = [2.8, 2.8, 3.8];
  const rowHeight = 0.52;

  tableRows.forEach((row, ri) => {
    const isHeader = ri === 0;
    row.forEach((cell, ci) => {
      const x = 0.3 + [0, 2.8, 5.6][ci];
      const y = 1.42 + ri * rowHeight;
      const w = colWidths[ci];
      const isObj = typeof cell === "object";
      const cellText = isObj ? cell.text : cell;
      const cellOpts = isObj ? cell.options : {};

      s.addShape(pres.ShapeType.rect, {
        x, y, w, h: rowHeight,
        fill: { color: isHeader ? C.navy : ri % 2 === 0 ? "EBF0F5" : C.white },
        line: { color: "CCCCCC", pt: 0.5 },
      });
      s.addText(cellText, {
        x: x + 0.08, y: y + 0.04, w: w - 0.16, h: rowHeight - 0.08,
        fontSize: 11.5,
        color: isHeader ? C.white : C.slate,
        bold: cellOpts.bold || false,
        fontFace: "Calibri",
        valign: "middle",
        wrap: true,
      });
    });
  });

  const footerItems = [
    "• De-escalate empiric therapy once culture/sensitivity available (antimicrobial stewardship)",
    "• Prolonged infusion of beta-lactams over conventional bolus (weak recommendation, SSC 2021)",
    "• Procalcitonin may guide discontinuation — do NOT use to START therapy",
    "• Duration: typically 7–10 days; shorter if rapid clinical improvement",
  ];
  s.addText(footerItems.map((t, i) => ({
    text: t, options: { breakLine: i < footerItems.length - 1, fontSize: 11, color: C.slate },
  })), {
    x: 0.4, y: 5.1, w: 9.2, h: 0.45,
    fontFace: "Calibri",
  });

  addSlideNumber(s, 8);
}

// ============================================================
// SLIDE 9 — FLUID RESUSCITATION
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  addTopBar(s, C.crimson);

  s.addText("07  FLUID RESUSCITATION", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Fluid Strategy in Sepsis", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.55,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
  });

  // Phase diagram
  const phases = [
    { label: "RESCUE", sub: "Immediate\nLife-Saving", color: C.crimson, body: "• Rapidly restore perfusion\n• 30 mL/kg crystalloid\n• Simultaneous vasopressors if needed" },
    { label: "OPTIMISE", sub: "Haemodynamic\nOptimisation", color: C.amber, body: "• Guided by dynamic fluid responsiveness\n• Passive leg raise test\n• Pulse pressure variation / SVV\n• POCUS assessment" },
    { label: "STABILISE", sub: "Organ\nSupport", color: C.teal, body: "• Avoid excess fluid\n• Conservative/restrictive strategy\n• Reassess lactate every 2–4 h" },
    { label: "EVACUATE", sub: "De-resuscitation\n(Late phase)", color: C.green, body: "• Active removal of excess fluid\n• Diuretics / Ultrafiltration\n• Avoid cumulative positive balance" },
  ];

  phases.forEach((p, i) => {
    const x = 0.25 + i * 2.4;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.42, w: 2.2, h: 0.5,
      fill: { color: p.color }, line: { type: "none" },
    });
    s.addText(p.label, {
      x, y: 1.42, w: 2.2, h: 0.5,
      fontSize: 14, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(p.sub, {
      x, y: 1.95, w: 2.2, h: 0.5,
      fontSize: 11, color: "AAAAAA", align: "center", fontFace: "Calibri",
    });
    s.addShape(pres.ShapeType.rect, {
      x, y: 2.5, w: 2.2, h: 2.4,
      fill: { color: C.navyMid }, line: { color: p.color, pt: 1 },
    });
    s.addText(p.body, {
      x: x + 0.1, y: 2.55, w: 2.0, h: 2.3,
      fontSize: 11, color: C.offWhite, fontFace: "Calibri", valign: "top",
    });
  });

  const fluidNotes = [
    "Balanced crystalloids (Lactated Ringer's / Plasmalyte) preferred over 0.9% NaCl — reduces hyperchloraemic acidosis & AKI (SMART trial)",
    "Albumin: consider when large volumes of crystalloid required — no proven mortality benefit",
    "Avoid hetastarch (HES) — associated with increased AKI and mortality (CHEST trial)",
    "Literature remains neutral on restrictive vs liberal strategies overall — tailor to the individual patient",
  ];

  s.addText(fluidNotes.map((t, i) => ({
    text: "• " + t, options: { breakLine: i < fluidNotes.length - 1, fontSize: 10.5, color: C.lightGray },
  })), {
    x: 0.3, y: 5.05, w: 9.4, h: 0.5,
    fontFace: "Calibri",
  });

  addSlideNumber(s, 9);
}

// ============================================================
// SLIDE 10 — VASOPRESSORS
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("08  VASOPRESSORS & HAEMODYNAMIC SUPPORT", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Target MAP ≥ 65 mmHg", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  // Ladder diagram
  const ladder = [
    { step: "1st LINE", agent: "Norepinephrine", dose: "0.01–3 μg/kg/min IV", note: "Preferred vasopressor — strong α1 + mild β1", color: C.navy },
    { step: "ADD-ON", agent: "Vasopressin", dose: "Fixed 0.03 U/min IV", note: "Add when NE dose ≥ 0.25 μg/kg/min — spares NE dose; also helps in right heart failure", color: C.teal },
    { step: "ADD-ON / SWAP", agent: "Epinephrine", dose: "0.01–0.5 μg/kg/min IV", note: "Alternative add-on; useful in low cardiac output; causes lactic acidosis", color: C.amber },
    { step: "REFRACTORY", agent: "Angiotensin II", dose: "20–200 ng/kg/min IV", note: "Adjunct for vasodilatory shock — reduces NE requirements (ATHOS-3 trial)", color: C.amberLt },
    { step: "INOTROPE", agent: "Dobutamine", dose: "2–20 μg/kg/min IV", note: "Add for low cardiac output persisting despite adequate fluids and vasopressors", color: C.crimson },
  ];

  const hdr = ["Step", "Agent", "Dose", "Note"];
  hdr.forEach((h, ci) => {
    const xArr = [0.3, 1.65, 3.55, 5.6];
    const wArr = [1.3, 1.85, 2.0, 4.0];
    s.addShape(pres.ShapeType.rect, {
      x: xArr[ci], y: 1.4, w: wArr[ci], h: 0.4,
      fill: { color: C.navy }, line: { type: "none" },
    });
    s.addText(h, {
      x: xArr[ci] + 0.05, y: 1.4, w: wArr[ci] - 0.1, h: 0.4,
      fontSize: 12, bold: true, color: C.white, valign: "middle", fontFace: "Calibri",
    });
  });

  ladder.forEach((row, ri) => {
    const y = 1.85 + ri * 0.62;
    const bg = ri % 2 === 0 ? "EBF0F5" : C.white;
    const cols = [
      { x: 0.3, w: 1.3, text: row.step, bold: true, color: row.color },
      { x: 1.65, w: 1.85, text: row.agent, bold: true, color: C.slate },
      { x: 3.55, w: 2.0, text: row.dose, bold: false, color: C.slate },
      { x: 5.6, w: 4.0, text: row.note, bold: false, color: C.slateLight },
    ];
    cols.forEach(({ x, w, text, bold, color }) => {
      s.addShape(pres.ShapeType.rect, {
        x, y, w, h: 0.58,
        fill: { color: bg }, line: { color: "CCCCCC", pt: 0.5 },
      });
      s.addText(text, {
        x: x + 0.06, y: y + 0.04, w: w - 0.12, h: 0.5,
        fontSize: 11.5, color, bold, fontFace: "Calibri", valign: "middle", wrap: true,
      });
    });
  });

  s.addText([
    { text: "⚠  Avoid dopamine ", options: { bold: true, color: C.crimson } },
    { text: "as vasopressor (higher arrhythmia rate) — use only in selected cases (severe bradycardia)  |  " },
    { text: "Peripheral vasopressors ", options: { bold: true } },
    { text: "are safe to initiate — do NOT delay for central access  |  Arterial line recommended for BP monitoring" },
  ], {
    x: 0.3, y: 5.2, w: 9.4, h: 0.35,
    fontSize: 10.5, color: C.slate, fontFace: "Calibri",
  });

  addSlideNumber(s, 10);
}

// ============================================================
// SLIDE 11 — SOURCE CONTROL
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  addTopBar(s, C.crimson);

  s.addText("09  SOURCE CONTROL", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Identifying & Eliminating the Infection Focus", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.55,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
  });

  const srcItems = [
    { title: "Imaging Workup", color: C.teal, points: ["CT chest/abdomen/pelvis — if source unclear", "USS for cholecystitis, renal abscess", "Echocardiography if endocarditis suspected", "Prompt imaging — do not delay antibiotics"] },
    { title: "Procedural Control", color: C.amber, points: ["Drain any abscess / fluid collection (IR or surgical)", "Debride necrotic tissue (NF, gas gangrene)", "Remove infected foreign bodies (lines, implants)", "Biliary decompression (ERCP / PTC)"] },
    { title: "Surgical Intervention", color: C.crimson, points: ["Bowel perforation — emergency laparotomy", "Obstructed urinary source — nephrostomy / stenting", "Necrotising fasciitis — immediate debridement", "Source control as soon as medically feasible"] },
    { title: "Intravascular Devices", color: C.greenLt, points: ["Remove infected central venous catheters", "CRBSI: line removal + systemic antibiotics", "Consider lock therapy for tunnelled lines", "Joint infections — arthroscopic washout"] },
  ];

  srcItems.forEach((item, i) => {
    const x = 0.3 + i * 2.4;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.45, w: 2.2, h: 3.85,
      fill: { color: C.navyMid }, line: { color: item.color, pt: 2 },
    });
    s.addText(item.title, {
      x, y: 1.45, w: 2.2, h: 0.45,
      fontSize: 13, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri",
      fill: { color: item.color },
    });
    item.points.forEach((pt, pi) => {
      s.addText("• " + pt, {
        x: x + 0.1, y: 2.0 + pi * 0.8, w: 2.0, h: 0.76,
        fontSize: 11, color: C.offWhite, fontFace: "Calibri", valign: "top",
      });
    });
  });

  s.addText("Timing: Source control should be performed as soon as possible — ideally within 6–12 hours of sepsis recognition. Delayed source control is an independent predictor of mortality.", {
    x: 0.3, y: 5.25, w: 9.4, h: 0.3,
    fontSize: 10.5, color: C.lightGray, italic: true, fontFace: "Calibri",
  });

  addSlideNumber(s, 11);
}

// ============================================================
// SLIDE 12 — ADJUNCTIVE THERAPIES
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("10  ADJUNCTIVE THERAPIES", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Evidence-Based Additional Interventions", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  const adjRows = [
    { therapy: "Corticosteroids", rec: "Recommended", detail: "Hydrocortisone 200 mg/day IV (50 mg q6h or CI) if refractory septic shock despite fluids & vasopressors. Fludrocortisone 50 μg PO once daily optional.", strength: "WEAK REC", color: C.amber },
    { therapy: "Glucose Control", rec: "Recommended", detail: "Initiate insulin when BG > 180 mg/dL. Target glucose 144–180 mg/dL. Avoid hypoglycaemia. Intensive insulin (80–110) NOT recommended.", strength: "BEST PRACTICE", color: C.teal },
    { therapy: "VTE Prophylaxis", rec: "Recommended", detail: "Pharmacological prophylaxis (LMWH preferred over UFH) unless contraindicated. Mechanical (IPC) if pharmacological is contraindicated.", strength: "STRONG REC", color: C.green },
    { therapy: "Stress Ulcer Prophylaxis", rec: "Suggested", detail: "PPI or H2 blocker for patients with risk factors for GI bleeding (mechanical ventilation, coagulopathy, renal failure, prior GI bleed).", strength: "WEAK REC", color: C.amber },
    { therapy: "Blood Transfusion", rec: "Restrictive", detail: "Transfuse only when Hb < 7 g/dL (target 7–9 g/dL) in absence of tissue hypoperfusion or ACS. No routine FFP unless active bleeding or procedure.", strength: "STRONG REC", color: C.navy },
    { therapy: "Vitamin C", rec: "Not Recommended", detail: "No proven mortality benefit when added to usual care. Multiple RCTs (CITRIS-ALI, VITAMINS, LOVIT) failed to show benefit.", strength: "AGAINST", color: C.crimson },
    { therapy: "IV Immunoglobulin", rec: "Not Suggested", detail: "Weak evidence. Not recommended routinely. No consistent mortality benefit in adult sepsis/septic shock.", strength: "WEAK AGAINST", color: C.slateLight },
    { therapy: "Renal Replacement", rec: "AKI-Guided", detail: "Initiate RRT for AKI with life-threatening complications. Continuous RRT (CRRT) preferred for haemodynamically unstable patients.", strength: "CONDITIONAL", color: C.teal },
  ];

  adjRows.forEach((row, ri) => {
    const colStart = ri < 4 ? 0 : 1;
    const rowIdx = ri % 4;
    const x = colStart === 0 ? 0.3 : 5.1;
    const y = 1.45 + rowIdx * 0.98;

    // Strength badge
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 1.4, h: 0.38,
      fill: { color: row.color }, line: { type: "none" },
    });
    s.addText(row.strength, {
      x, y, w: 1.4, h: 0.38,
      fontSize: 9, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });

    s.addText(row.therapy, {
      x: x + 1.5, y, w: 3.4, h: 0.38,
      fontSize: 13, bold: true, color: C.navy, valign: "middle", fontFace: "Calibri",
    });

    s.addText(row.detail, {
      x: x + 0.05, y: y + 0.42, w: 4.5, h: 0.5,
      fontSize: 11, color: C.slateLight, fontFace: "Calibri", valign: "top",
    });

    // Separator
    if (rowIdx < 3) {
      s.addShape(pres.ShapeType.line, {
        x: x, y: y + 0.96, w: 4.7, h: 0,
        line: { color: "CCCCCC", pt: 0.5 },
      });
    }
  });

  addSlideNumber(s, 12);
}

// ============================================================
// SLIDE 13 — MECHANICAL VENTILATION
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  addTopBar(s, C.crimson);

  s.addText("11  MECHANICAL VENTILATION", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Sepsis-Induced ARDS Management", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.55,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
  });

  const ventBoxes = [
    {
      title: "Lung-Protective Ventilation",
      color: C.teal,
      items: [
        "Tidal volume: 6 mL/kg IBW (max 8 mL/kg)",
        "Plateau pressure ≤ 30 cmH₂O",
        "Driving pressure < 15 cmH₂O",
        "Apply PEEP (PEEP-FiO₂ table)",
        "SpO₂ target 92–96%",
      ],
    },
    {
      title: "Moderate-Severe ARDS (P/F < 150)",
      color: C.amber,
      items: [
        "Prone positioning ≥ 12–16 hrs/day",
        "NMBA (cisatracurium) to facilitate proning",
        "Consider recruitment manoeuvres with caution",
        "High PEEP strategy may benefit selected pts",
        "Conservative fluid strategy once resuscitated",
      ],
    },
    {
      title: "High-Flow Nasal Oxygen (HFNO)",
      color: C.green,
      items: [
        "Consider HFNO before intubation in hypoxic resp failure",
        "May reduce intubation need (SSC 2021 recommendation)",
        "NIV/CPAP — limited role in sepsis-ARDS",
        "Monitor closely; do NOT delay intubation if failing",
      ],
    },
    {
      title: "Refractory Hypoxaemia",
      color: C.crimson,
      items: [
        "Veno-venous ECMO — for refractory ARDS",
        "Requires experienced centre (SSC: suggested)",
        "Inhaled nitric oxide — not routinely recommended",
        "Pulmonary artery catheter: avoid routine use",
      ],
    },
  ];

  ventBoxes.forEach((box, i) => {
    const x = 0.3 + (i % 2) * 4.9;
    const y = 1.45 + Math.floor(i / 2) * 2.15;
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 4.7, h: 2.05,
      fill: { color: C.navyMid }, line: { color: box.color, pt: 2 },
    });
    s.addText(box.title, {
      x, y, w: 4.7, h: 0.42,
      fontSize: 13, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri",
      fill: { color: box.color },
    });
    box.items.forEach((item, ii) => {
      s.addText("• " + item, {
        x: x + 0.12, y: y + 0.5 + ii * 0.3, w: 4.46, h: 0.28,
        fontSize: 11.5, color: C.offWhite, fontFace: "Calibri",
      });
    });
  });

  s.addText("Sedation: Prefer light sedation (RASS –1 to 0). Propofol/Dexmedetomidine preferred over benzodiazepines. Early mobilisation when stable. ABCDEF bundle implementation recommended (PADIS 2025 update).", {
    x: 0.3, y: 5.28, w: 9.4, h: 0.28,
    fontSize: 10, color: C.lightGray, italic: true, fontFace: "Calibri",
  });

  addSlideNumber(s, 13);
}

// ============================================================
// SLIDE 14 — POST-ICU / RECOVERY
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("12  POST-ICU CARE & RECOVERY", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Post-Sepsis Syndrome & Long-Term Outcomes", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  // PSS icon boxes
  const pssItems = [
    { icon: "🧠", label: "Cognitive", body: "Memory loss, attention deficits, PTSD\nDelirium common in ICU\nCognitive rehabilitation referral" },
    { icon: "💪", label: "Physical", body: "ICU-acquired weakness\nPeripheral neuropathy\nEarly physiotherapy essential" },
    { icon: "😔", label: "Psychological", body: "Depression, anxiety, PTSD\nAffects 25–50% of survivors\nPsychiatric follow-up" },
    { icon: "🏥", label: "Healthcare", body: "Hospital readmission risk high\nGoals-of-care discussions\nDischarge planning with family" },
  ];

  pssItems.forEach((item, i) => {
    const x = 0.3 + i * 2.38;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.42, w: 2.2, h: 2.9,
      fill: { color: C.navyMid }, line: { type: "none" },
    });
    s.addText(item.icon, {
      x, y: 1.55, w: 2.2, h: 0.65,
      fontSize: 32, align: "center", fontFace: "Calibri",
    });
    s.addText(item.label, {
      x, y: 2.2, w: 2.2, h: 0.38,
      fontSize: 14, bold: true, color: C.amberLt,
      align: "center", fontFace: "Calibri",
    });
    s.addText(item.body, {
      x: x + 0.1, y: 2.6, w: 2.0, h: 1.65,
      fontSize: 11.5, color: C.offWhite, fontFace: "Calibri", valign: "top",
    });
  });

  const recoveryRecs = [
    "SSC 2021/2024: Involve patients and families in goals-of-care discussions and discharge planning",
    "Early follow-up clinic: assess physical, cognitive, and emotional domains at 1 month and 3 months post-discharge",
    "Rehabilitation: occupational therapy, physiotherapy, speech therapy based on individual deficits",
    "Antibiotic stewardship in survivorship — avoid unnecessary courses reducing microbiome diversity",
    "Reassess all long-term medications — ICU-started medications should be re-evaluated at discharge",
  ];

  s.addText(recoveryRecs.map((t, i) => ({
    text: "• " + t, options: { breakLine: i < recoveryRecs.length - 1, fontSize: 12, color: C.slate },
  })), {
    x: 0.4, y: 4.5, w: 9.2, h: 1.0,
    fontFace: "Calibri",
  });

  addSlideNumber(s, 14);
}

// ============================================================
// SLIDE 15 — KEY CLINICAL PEARLS / SUMMARY
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.navy };
  addTopBar(s, C.crimson);

  s.addText("CLINICAL PEARLS & KEY TAKEAWAYS", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("What Every Clinician Must Know", {
    x: 0.4, y: 0.72, w: 9.2, h: 0.55,
    fontSize: 24, bold: true, color: C.white, fontFace: "Calibri",
  });

  const pearls = [
    ["⏱", "Time is life", "Every 1-hour delay in antibiotics increases mortality 7–8% in septic shock"],
    ["🩸", "Cultures first", "Always draw blood cultures before antibiotics — but don't delay antibiotics > 45 min for cultures"],
    ["💧", "Fluid reassess", "30 mL/kg is a starting point — always reassess fluid responsiveness dynamically before more fluids"],
    ["⚡", "Start NE early", "Do NOT wait for central access — peripheral vasopressors are safe and save time"],
    ["🎯", "MAP 65 is enough", "Higher MAP targets (>65 mmHg) do NOT improve survival; reduce excess vasopressor burden"],
    ["✂", "Source control", "No antibiotic can replace surgical drainage — find and eliminate the source promptly"],
    ["📉", "De-escalate", "Narrow empiric antibiotics when cultures available — antimicrobial stewardship saves lives"],
    ["🔄", "Think recovery", "Post-sepsis syndrome is real — plan for cognitive, physical & psychological rehabilitation from day 1"],
  ];

  pearls.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.3 : 5.2;
    const y = 1.42 + row * 0.95;

    s.addText(p[0], {
      x, y, w: 0.55, h: 0.75,
      fontSize: 24, align: "center", valign: "middle", fontFace: "Calibri",
    });
    s.addText(p[1], {
      x: x + 0.6, y, w: 3.9, h: 0.35,
      fontSize: 13, bold: true, color: C.amberLt, fontFace: "Calibri",
    });
    s.addText(p[2], {
      x: x + 0.6, y: y + 0.35, w: 3.9, h: 0.55,
      fontSize: 11.5, color: C.lightGray, fontFace: "Calibri",
    });
    if (row < 3) {
      s.addShape(pres.ShapeType.line, {
        x: col === 0 ? 0.3 : 5.2,
        y: y + 0.9,
        w: 4.7, h: 0,
        line: { color: C.navyMid, pt: 0.5 },
      });
    }
  });

  addSlideNumber(s, 15);
}

// ============================================================
// SLIDE 16 — REFERENCES
// ============================================================
{
  const s = pres.addSlide();
  s.background = { color: C.offWhite };
  addTopBar(s, C.navy);

  s.addText("REFERENCES", {
    x: 0.4, y: 0.2, w: 9.2, h: 0.5,
    fontSize: 11, bold: true, color: C.crimson, charSpacing: 3, fontFace: "Calibri",
  });
  s.addText("Sources & Guidelines", {
    x: 0.4, y: 0.7, w: 9.2, h: 0.55,
    fontSize: 26, bold: true, color: C.navy, fontFace: "Calibri",
  });

  const refs = [
    "1.  Evans L, et al. Surviving Sepsis Campaign: International Guidelines for Management of Sepsis and Septic Shock 2021. Intensive Care Med. 2021;47(11):1181–1247.",
    "2.  Weiss SL, Peters MJ, et al. Surviving Sepsis Campaign International Guidelines for Management of Sepsis and Septic Shock in Children 2026. Pediatr Crit Care Med. 2026. PMID: 41869844",
    "3.  Singer M, et al. The Third International Consensus Definitions for Sepsis and Septic Shock (Sepsis-3). JAMA. 2016;315(8):801–810.",
    "4.  Harrison's Principles of Internal Medicine, 22nd Edition (2025). Chapter 315 — Sepsis and Septic Shock.",
    "5.  Fischer's Mastery of Surgery, 8th Edition. Chapter — Management of Sepsis.",
    "6.  Barash, Cullen, Stoelting's Clinical Anesthesia 9e. Table 57-4 Management of Sepsis and Septic Shock.",
    "7.  Sartini C, Landoni G, et al. Beyond the Surviving Sepsis Campaign Guidelines: a systematic review of interventions affecting mortality in sepsis. Panminerva Med. 2024. PMID: 38093626.",
    "8.  Kim HJ, et al. Sepsis Alert Systems, Mortality, and Adherence in Emergency Departments: A Systematic Review and Meta-Analysis. JAMA Netw Open. 2024. PMID: 39037814.",
    "9.  Lewis K, et al. PADIS 2025 Focused Update. Crit Care Med. 2025. PMID: 39982143.",
    "10. EB Medicine. Sepsis in the Emergency Department — Evidence-Based Review. August 2025.",
    "11. CMS. Severe Sepsis and Septic Shock Management Bundle (SEP-1). Updated 2024.",
    "12. Brunkhorst FM, et al. S3 Guideline on Sepsis — Prevention, Diagnosis, Therapy, and Follow-up 2025. PMID: 40824313.",
  ];

  refs.forEach((ref, i) => {
    s.addText(ref, {
      x: 0.4, y: 1.4 + i * 0.35, w: 9.2, h: 0.32,
      fontSize: 10.5, color: C.slate, fontFace: "Calibri",
    });
  });

  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 5.35, w: "100%", h: 0.28,
    fill: { color: C.navy }, line: { type: "none" },
  });
  s.addText("Sepsis Management — Recent Guidelines  |  Prepared June 2026  |  SSC 2021 Adult + SSC Children 2026", {
    x: 0.4, y: 5.37, w: 9.2, h: 0.24,
    fontSize: 9.5, color: C.lightGray, align: "center", fontFace: "Calibri",
  });

  addSlideNumber(s, 16);
}

// ============================================================
// SAVE
// ============================================================
pres.writeFile({ fileName: "/home/daytona/workspace/sepsis-ppt/Sepsis_Management_Guidelines_2025.pptx" })
  .then(() => console.log("✅ Saved successfully."))
  .catch(err => console.error("❌ Error:", err));
Running Command

cd /home/daytona/workspace/sepsis-ppt && node sepsis_ppt.js

Running Command

ls -lh /home/daytona/workspace/sepsis-ppt/Sepsis_Management_Guidelines_2025.pptx

Your presentation is ready:

Sepsis Management Guidelines 2025

Presentation · PPTX


What's Inside — 16 Slides

SlideTopic
1Title Slide — bold navy/crimson design
2Agenda / Overview
3Definitions — Sepsis-3 (Infection → Sepsis → Septic Shock)
4Epidemiology — 48.9M cases/yr, global burden stats
5Pathophysiology — cytokine storm, endothelial dysfunction, MOF cascade
6Diagnosis & Screening — qSOFA, SOFA score table
7The 1-Hour Bundle (SSC) — 5-step visual layout
8Antimicrobial Therapy — empiric selection table by scenario
9Fluid Resuscitation — ROSE phases (Rescue → Optimise → Stabilise → Evacuate)
10Vasopressors — step-up table (NE → Vasopressin → Epi → Ang-II → Dobutamine)
11Source Control — imaging, procedural, surgical, device removal
12Adjunctive Therapies — steroids, glucose, VTE, Vit C (not recommended), RRT
13Mechanical Ventilation — lung-protective, prone positioning, HFNO, ECMO
14Post-ICU Recovery — Post-Sepsis Syndrome (cognitive, physical, psychological)
15Clinical Pearls — 8 key takeaways
16References — SSC 2021, SSC Children 2026, Harrison's 22e, S3 Guidelines 2025, PADIS 2025

Key guidelines incorporated:
  • Surviving Sepsis Campaign Adult Guidelines 2021
  • SSC Children's Guidelines 2026 (PMID 41869844)
  • S3 Sepsis Guidelines Update 2025 (Germany, PMID 40824313)
  • PADIS 2025 ICU sedation update (PMID 39982143)
  • Harrison's Principles of Internal Medicine 22e (2025)
  • CMS SEP-1 Bundle current version

Create flashcard

Asking for Preferences
Generating Image

Medical flashcard set, 8 cards arranged in a 2x4 grid on a white background. Each card has a navy blue front side showing a question in bold white text, and a crimson red back side showing the answer in white text. Clean, professional clinical education style. Cards are labeled 1-8 with these question/answer pairs: Card 1 Q: "What is the Sepsis-3 definition of SEPSIS?" A: "Life-threatening organ dysfunction caused by dysregulated host response to infection. SOFA score ≥ 2 from baseline." Card 2 Q: "Define SEPTIC SHOCK" A: "Vasopressor needed to maintain MAP ≥ 65 mmHg + Lactate > 2 mmol/L despite adequate fluid resuscitation." Card 3 Q: "Name the 3 components of qSOFA" A: "1. RR ≥ 22/min 2. Altered mental status (GCS <15) 3. Systolic BP ≤ 100 mmHg Score ≥ 2 = poor outcome" Card 4 Q: "List the 5 elements of the SSC 1-Hour Bundle" A: "1. Measure lactate 2. Blood cultures x2 3. Broad-spectrum antibiotics 4. 30 mL/kg crystalloid (if hypotensive or lactate ≥4) 5. Vasopressors if MAP <65" Card 5 Q: "First-line vasopressor in septic shock?" A: "NOREPINEPHRINE — target MAP ≥ 65 mmHg. Add Vasopressin when NE dose ≥ 0.25 μg/kg/min." Card 6 Q: "When to start corticosteroids in sepsis?" A: "Hydrocortisone 200 mg/day IV if septic shock persists despite adequate fluids and vasopressors." Card 7 Q: "Preferred fluid type and initial volume in sepsis?" A: "Balanced crystalloid (Lactated Ringer's / Plasmalyte). Initial: 30 mL/kg IV in first 3 hours. Reassess with dynamic measures." Card 8 Q: "Antibiotic timing in septic shock vs. sepsis without shock?" A: "Septic shock: within 1 HOUR. Sepsis without shock (uncertain dx): within 3 HOURS. Always draw cultures first." Each card has a small SSC 2021 guideline badge. Bold readable fonts, minimal but stylish design.

Sepsis Management Flashcards
Here are your 8 Sepsis Management Flashcards based on the SSC 2021 guidelines. Here's what each card covers:
#QuestionKey Answer
1Sepsis-3 definition of SepsisSOFA ≥ 2 + dysregulated host response
2Definition of Septic ShockVasopressor to maintain MAP ≥ 65 + Lactate > 2
33 components of qSOFARR, AMS, Systolic BP
4SSC 1-Hour Bundle (5 elements)Lactate, Cultures, ABx, Fluids, Vasopressors
5First-line vasopressorNorepinephrine + add Vasopressin at escalating doses
6When to start corticosteroidsRefractory shock despite fluids + vasopressors
7Preferred fluid type & doseBalanced crystalloid, 30 mL/kg in 3 hrs
8Antibiotic timingSeptic shock: 1 hr / Sepsis without shock: 3 hrs
Want me to also create a downloadable PPTX version of these flashcards so you can print or present them individually?

Make concise notes

Here are concise notes on Sepsis Management based on SSC 2021 guidelines and recent evidence:

SEPSIS MANAGEMENT — CONCISE NOTES

Surviving Sepsis Campaign 2021 | Harrison's 22e | SSC Children 2026


1. DEFINITIONS (Sepsis-3, 2016)

TermDefinition
SepsisLife-threatening organ dysfunction from dysregulated host response to infection. SOFA ≥ 2 from baseline
Septic ShockSepsis + vasopressor needed to maintain MAP ≥ 65 mmHg + Lactate > 2 mmol/L despite fluids
qSOFARR ≥ 22 + GCS < 15 + SBP ≤ 100. Score ≥ 2 = poor prognosis

2. THE 1-HOUR BUNDLE (SSC 2018 update)

All elements initiated simultaneously from time zero:
  1. Lactate — measure baseline; remeasure in 2–4 h if > 2 mmol/L
  2. Blood cultures × 2 sets before antibiotics (don't delay ABx > 45 min)
  3. Broad-spectrum antibiotics — within 1 h (septic shock) / 3 h (sepsis, uncertain dx)
  4. Crystalloid 30 mL/kg — if hypotensive OR lactate ≥ 4 mmol/L
  5. Vasopressors — start if MAP < 65 mmHg during/after fluids

3. ANTIMICROBIALS

  • Cover all likely organisms empirically; narrow once cultures return
  • No Pseudomonas risk → Ceftriaxone/Cefotaxime
  • Pseudomonas risk → Cefepime / Pip-Tazo / Carbapenem
  • MRSA risk → add Vancomycin
  • MDR gram-negative → Ceftazidime-Avibactam
  • Immunocompromised → broad + antifungal
  • Duration: 7–10 days; shorter if rapid improvement
  • Procalcitonin — use to guide STOPPING, NOT starting
  • Prolonged infusion of beta-lactams preferred over bolus (weak rec)

4. FLUID RESUSCITATION

PhaseGoalAction
RescueRestore perfusion30 mL/kg balanced crystalloid
OptimiseHaemodynamic stabilityDynamic assessment (PLR, PPV, POCUS)
StabilisePrevent fluid overloadConservative strategy; serial lactates
EvacuateDe-resuscitateDiuretics/CRRT if needed
  • Balanced crystalloids (LR, Plasmalyte) > 0.9% NaCl — reduces AKI
  • Albumin — consider if large crystalloid volumes needed (no proven mortality benefit)
  • Avoid hetastarch (HES) — increased AKI and mortality

5. VASOPRESSORS

StepAgentDoseNotes
1st lineNorepinephrine0.01–3 μg/kg/minTarget MAP ≥ 65 mmHg
Add-onVasopressinFixed 0.03 U/minAdd when NE ≥ 0.25 μg/kg/min
Add-onEpinephrine0.01–0.5 μg/kg/minUseful in low cardiac output
RefractoryAngiotensin II20–200 ng/kg/minReduces NE requirement
InotropeDobutamine2–20 μg/kg/minAdd for persistent low CO
  • MAP 65 is sufficient — higher targets don't improve survival
  • Peripheral vasopressors are safe — don't delay for central access
  • Avoid dopamine routinely (higher arrhythmia risk)

6. SOURCE CONTROL

  • Identify source with imaging (CT/USS/Echo) — promptly
  • Drain abscesses; debride necrotic tissue; remove infected devices
  • Timing: within 6–12 hours of sepsis recognition
  • Delayed source control = independent predictor of mortality

7. ADJUNCTIVE THERAPIES

TherapyRecommendationDetails
CorticosteroidsWeak rec — if refractory shockHydrocortisone 200 mg/day IV
Glucose controlBest practiceInsulin if BG > 180; target 144–180 mg/dL
VTE prophylaxisStrong recLMWH preferred; IPC if anticoagulation contraindicated
Stress ulcer PXWeak recPPI/H2B if GI bleeding risk factors present
Blood transfusionRestrictiveTransfuse only if Hb < 7 g/dL; target 7–9 g/dL
Vitamin CNOT recommendedNo mortality benefit (CITRIS-ALI, LOVIT trials)
IV ImmunoglobulinNot suggestedNo consistent benefit
RRTAKI-guidedCRRT preferred in haemodynamic instability

8. MECHANICAL VENTILATION (Sepsis-ARDS)

  • Tidal volume: 6 mL/kg IBW (max 8)
  • Plateau pressure: ≤ 30 cmH₂O; Driving pressure < 15
  • PEEP: apply using PEEP-FiO₂ table
  • Prone positioning: ≥ 12–16 h/day for moderate-severe ARDS (P/F < 150)
  • HFNO: consider before intubation in hypoxic respiratory failure
  • ECMO: for refractory ARDS at experienced centres
  • Sedation: light sedation (RASS −1 to 0); propofol/dexmedetomidine over benzos
  • Avoid routine pulmonary artery catheter

9. POST-SEPSIS SYNDROME

Affects 25–50% of survivors:
  • Cognitive: memory loss, attention deficits, PTSD
  • Physical: ICU-acquired weakness, neuropathy — early physiotherapy
  • Psychological: depression, anxiety — psychiatric follow-up
  • SSC 2021/2024: involve patients and families in goals-of-care and discharge planning
  • Follow-up clinic at 1 month and 3 months post-discharge

10. CLINICAL PEARLS

Every 1-hour delay in antibiotics = 7–8% increase in mortality (septic shock)
  • Always cultures before antibiotics — but never delay ABx > 45 min for cultures
  • 30 mL/kg is a starting point — always reassess fluid responsiveness dynamically
  • Peripheral NE is safe — do NOT wait for central access
  • De-escalate antibiotics once cultures available
  • Source control cannot be replaced by antibiotics — find and drain
  • Post-sepsis rehabilitation planning starts from day 1 in the ICU

Sources: SSC 2021 Adult Guidelines | SSC Children 2026 (PMID 41869844) | S3 Guidelines 2025 (PMID 40824313) | Harrison's Internal Medicine 22e (2025) | PADIS 2025 (PMID 39982143)

Create a quick reference PDF of these notes

Reading File
Reading File
Writing File

~/sepsis-ppt/make_sepsis_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.platypus.flowables import Flowable
from reportlab.lib.colors import HexColor

# ── Colour palette ──────────────────────────────────────────
NAVY      = HexColor("#0D1B2A")
NAVY_MID  = HexColor("#1A3250")
CRIMSON   = HexColor("#C62828")
CRIMSON_LT= HexColor("#EF5350")
AMBER     = HexColor("#F57C00")
AMBER_LT  = HexColor("#FFB300")
TEAL      = HexColor("#00838F")
TEAL_LT   = HexColor("#4DD0E1")
GREEN     = HexColor("#2E7D32")
GREEN_LT  = HexColor("#66BB6A")
SLATE     = HexColor("#37474F")
SLATE_LT  = HexColor("#546E7A")
OFF_WHITE = HexColor("#F0F4F8")
LIGHT_GRAY= HexColor("#B0BEC5")
WHITE     = colors.white

W, H = A4   # 595.27 x 841.89 pts

# ── Styles ───────────────────────────────────────────────────
def S(name, **kw):
    base = {
        "fontName": "Helvetica",
        "fontSize": 9,
        "leading":  12,
        "textColor": SLATE,
        "spaceAfter": 2,
    }
    base.update(kw)
    return ParagraphStyle(name, **base)

title_style     = S("title",     fontName="Helvetica-Bold", fontSize=18, textColor=WHITE,   leading=22, alignment=TA_CENTER)
subtitle_style  = S("subtitle",  fontName="Helvetica",      fontSize=10, textColor=CRIMSON_LT, leading=13, alignment=TA_CENTER)
h1_style        = S("h1",        fontName="Helvetica-Bold", fontSize=11, textColor=WHITE,   leading=14, spaceAfter=0)
h2_style        = S("h2",        fontName="Helvetica-Bold", fontSize=9,  textColor=NAVY,    leading=12, spaceAfter=1)
body_style      = S("body",      fontName="Helvetica",      fontSize=8.5,textColor=SLATE,   leading=11, spaceAfter=1)
small_style     = S("small",     fontName="Helvetica",      fontSize=7.5,textColor=SLATE_LT,leading=10, spaceAfter=0)
bold_body       = S("bold_body", fontName="Helvetica-Bold", fontSize=8.5,textColor=SLATE,   leading=11)
pearl_q_style   = S("pearl_q",   fontName="Helvetica-Bold", fontSize=8.5,textColor=AMBER_LT,leading=11)
pearl_a_style   = S("pearl_a",   fontName="Helvetica",      fontSize=8.5,textColor=OFF_WHITE,leading=11)
footer_style    = S("footer",    fontName="Helvetica",      fontSize=7,  textColor=LIGHT_GRAY, leading=9, alignment=TA_CENTER)
src_style       = S("src",       fontName="Helvetica-Oblique", fontSize=7, textColor=SLATE_LT, leading=9)

# ── Custom flowables ─────────────────────────────────────────
class ColorBanner(Flowable):
    """Full-width banner with title text."""
    def __init__(self, text, sub, bg=NAVY, h=1.6*cm):
        super().__init__()
        self.text = text
        self.sub  = sub
        self.bg   = bg
        self.bh   = h
        self.width = W - 3*cm   # will be set by doc
    def wrap(self, avail_w, avail_h):
        self.width = avail_w
        return avail_w, self.bh
    def draw(self):
        c = self.canv
        c.setFillColor(self.bg)
        c.rect(0, 0, self.width, self.bh, fill=1, stroke=0)
        # accent stripe left
        c.setFillColor(CRIMSON)
        c.rect(0, 0, 4, self.bh, fill=1, stroke=0)
        # title
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 18)
        c.drawString(12, self.bh - 1.1*cm, self.text)
        if self.sub:
            c.setFillColor(CRIMSON_LT)
            c.setFont("Helvetica", 9)
            c.drawString(12, self.bh - 1.4*cm, self.sub)

class SectionHeader(Flowable):
    """Coloured section header bar."""
    def __init__(self, num, title, color=NAVY):
        super().__init__()
        self.num   = num
        self.title = title
        self.color = color
        self.height = 0.55*cm
    def wrap(self, aw, ah):
        self.width = aw
        return aw, self.height
    def draw(self):
        c = self.canv
        c.setFillColor(self.color)
        c.rect(0, 0, self.width, self.height, fill=1, stroke=0)
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 9)
        c.drawString(5, 4, f"  {self.num}   {self.title}")

class PearlBox(Flowable):
    """Dark navy box for clinical pearls."""
    def __init__(self, emoji, title, body, h=1.05*cm):
        super().__init__()
        self.emoji = emoji
        self.title = title
        self.body  = body
        self.bh    = h
    def wrap(self, aw, ah):
        self.width = aw
        return aw, self.bh
    def draw(self):
        c = self.canv
        c.setFillColor(NAVY_MID)
        c.roundRect(0, 0, self.width, self.bh, 3, fill=1, stroke=0)
        c.setFillColor(AMBER_LT)
        c.setFont("Helvetica-Bold", 8.5)
        c.drawString(6, self.bh - 13, f"{self.emoji}  {self.title}")
        c.setFillColor(OFF_WHITE)
        c.setFont("Helvetica", 8)
        c.drawString(6, self.bh - 24, self.body)

# ── Table helpers ─────────────────────────────────────────────
def make_table(data, col_widths, header_bg=NAVY, alt_bg=OFF_WHITE):
    t = Table(data, colWidths=col_widths, repeatRows=1)
    style = TableStyle([
        ("BACKGROUND",  (0,0), (-1,0),  header_bg),
        ("TEXTCOLOR",   (0,0), (-1,0),  WHITE),
        ("FONTNAME",    (0,0), (-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",    (0,0), (-1,-1), 8),
        ("LEADING",     (0,0), (-1,-1), 10),
        ("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, alt_bg]),
        ("GRID",        (0,0), (-1,-1), 0.4, HexColor("#CCCCCC")),
        ("VALIGN",      (0,0), (-1,-1), "TOP"),
        ("LEFTPADDING", (0,0), (-1,-1), 5),
        ("RIGHTPADDING",(0,0), (-1,-1), 5),
        ("TOPPADDING",  (0,0), (-1,-1), 3),
        ("BOTTOMPADDING",(0,0),(-1,-1), 3),
    ])
    t.setStyle(style)
    return t

def bp(text, color=SLATE):
    """Bullet paragraph."""
    return Paragraph(f"<bullet>&bull;</bullet> {text}",
                     ParagraphStyle("bp", fontName="Helvetica", fontSize=8.5,
                                    leading=11, textColor=color, leftIndent=10,
                                    bulletIndent=0, spaceAfter=1))

def sp(n=4):
    return Spacer(1, n)

# ── Build story ───────────────────────────────────────────────
story = []

# === TITLE BANNER ===
story.append(ColorBanner(
    "SEPSIS MANAGEMENT",
    "Quick Reference Guide  |  SSC 2021  |  Harrison's 22e  |  June 2026",
    bg=NAVY, h=1.8*cm
))
story.append(sp(6))

# ──────────────────────────────────────────────────────────────
# SECTION 1 — DEFINITIONS
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("01", "DEFINITIONS  (Sepsis-3, 2016 | Sepsis-3 Task Force, JAMA 2016)", CRIMSON),
    sp(4),
    make_table(
        [
            ["Term", "Definition", "Key Criterion"],
            ["SEPSIS",
             "Life-threatening organ dysfunction from\ndysregulated host response to infection",
             "SOFA \u2265 2 from baseline"],
            ["SEPTIC SHOCK",
             "Sepsis + circulatory/cellular/metabolic\ndysfunction profound enough to raise mortality",
             "Vasopressor to maintain MAP \u2265 65 mmHg\n+ Lactate > 2 mmol/L despite fluids"],
            ["qSOFA\n(screening)",
             "Rapid bedside screen — score \u2265 2 = poor prognosis",
             "RR \u2265 22  |  GCS < 15  |  SBP \u2264 100"],
        ],
        col_widths=[2.8*cm, 8.5*cm, 5.5*cm],
        header_bg=CRIMSON,
    ),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 2 — 1-HOUR BUNDLE
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("02", "THE 1-HOUR BUNDLE  (SSC 2018 Update — all elements simultaneous)", NAVY),
    sp(4),
    make_table(
        [
            ["#", "Element", "Details"],
            ["1", "Measure Lactate",
             "Baseline serum lactate. Remeasure in 2\u20134 h if > 2 mmol/L. Lactate \u2265 4 mmol/L = high risk."],
            ["2", "Blood Cultures \u00d72",
             "Aerobic + anaerobic, before antibiotics. Do NOT delay antibiotics > 45 min for cultures."],
            ["3", "Broad-Spectrum Antibiotics",
             "Within 1 h in septic shock. Within 3 h if sepsis, uncertain diagnosis. Cover all likely organisms."],
            ["4", "Crystalloid 30 mL/kg",
             "If hypotensive OR lactate \u2265 4 mmol/L. Administer rapidly. Reassess dynamically after."],
            ["5", "Vasopressors (if needed)",
             "Start if MAP < 65 mmHg during or after fluid bolus. Do NOT wait for central access."],
        ],
        col_widths=[0.8*cm, 3.5*cm, 12.5*cm],
        header_bg=NAVY,
    ),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 3 — ANTIMICROBIALS
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("03", "ANTIMICROBIAL THERAPY", TEAL),
    sp(4),
    make_table(
        [
            ["Clinical Scenario", "Recommended Empiric Agents"],
            ["Community-acquired (no Pseudomonas risk)",  "Ceftriaxone / Cefotaxime \u00b1 Metronidazole"],
            ["Pseudomonas risk (HAI, structural lung disease)", "Cefepime / Pip-Tazo / Meropenem"],
            ["MRSA risk (skin/soft tissue, prior MRSA)", "Add Vancomycin or Daptomycin"],
            ["MDR / carbapenem-resistant gram-negative",  "Ceftazidime-Avibactam / Ceftolozone-Tazo"],
            ["Immunocompromised / febrile neutropenia",   "Pip-Tazo or Carbapenem \u00b1 Antifungal (echinocandin)"],
            ["Abdominal sepsis",                          "Pip-Tazo / Carbapenem + Metronidazole"],
        ],
        col_widths=[8.0*cm, 8.8*cm],
        header_bg=TEAL,
    ),
    sp(3),
    bp("De-escalate to targeted therapy once culture/sensitivity results available (stewardship)"),
    bp("Prolonged infusion of beta-lactams preferred over bolus dosing (weak recommendation, SSC 2021)"),
    bp("Procalcitonin \u2014 use to guide STOPPING antibiotics, NOT to start therapy"),
    bp("Duration: typically 7\u201310 days; shorter courses if rapid clinical improvement"),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 4 — FLUID RESUSCITATION
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("04", "FLUID RESUSCITATION  (ROSE Framework)", AMBER),
    sp(4),
    make_table(
        [
            ["Phase", "Goal", "Action"],
            ["RESCUE",    "Restore perfusion urgently",      "30 mL/kg balanced crystalloid rapidly; start vasopressors simultaneously if needed"],
            ["OPTIMISE",  "Haemodynamic stability",          "Dynamic fluid responsiveness: passive leg raise, pulse pressure variation, POCUS/IVC"],
            ["STABILISE", "Prevent fluid overload",          "Conservative fluid strategy; serial lactate monitoring every 2\u20134 h"],
            ["EVACUATE",  "De-resuscitate (late phase)",     "Diuretics / ultrafiltration; target negative or even fluid balance"],
        ],
        col_widths=[2.5*cm, 4.5*cm, 9.8*cm],
        header_bg=AMBER,
    ),
    sp(3),
    bp("Balanced crystalloids (Lactated Ringer\u2019s, Plasmalyte) \u003e 0.9% NaCl \u2014 reduces AKI and hyperchloraemic acidosis (SMART trial)"),
    bp("Albumin: consider if large volumes of crystalloid required \u2014 no proven mortality benefit"),
    bp("Avoid hetastarch (HES) \u2014 associated with increased AKI and mortality (CHEST trial)"),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 5 — VASOPRESSORS
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("05", "VASOPRESSORS & HAEMODYNAMIC SUPPORT  (Target MAP \u2265 65 mmHg)", NAVY),
    sp(4),
    make_table(
        [
            ["Step", "Agent", "Dose", "Notes"],
            ["1st LINE",        "Norepinephrine",  "0.01\u20133 \u03bcg/kg/min",   "Preferred. Strong \u03b11 + mild \u03b21. Start peripherally."],
            ["ADD-ON",          "Vasopressin",     "Fixed 0.03 U/min",          "Add when NE \u2265 0.25 \u03bcg/kg/min. Spares NE dose."],
            ["ADD-ON / SWAP",   "Epinephrine",     "0.01\u20130.5 \u03bcg/kg/min","Useful in low cardiac output. Raises lactate."],
            ["REFRACTORY",      "Angiotensin II",  "20\u2013200 ng/kg/min",      "ATHOS-3 trial. Adjunct for vasodilatory shock."],
            ["INOTROPE",        "Dobutamine",      "2\u201320 \u03bcg/kg/min",    "Add for persistent low CO despite fluids + vasopressors."],
        ],
        col_widths=[2.5*cm, 3.2*cm, 3.8*cm, 7.3*cm],
        header_bg=NAVY,
    ),
    sp(3),
    bp("MAP 65 mmHg is sufficient \u2014 higher targets do NOT improve survival (SEPSISPAM trial)"),
    bp("Peripheral vasopressors are safe to initiate \u2014 do NOT delay for central venous access"),
    bp("Avoid dopamine as vasopressor \u2014 higher arrhythmia risk; reserve for selected bradycardia cases"),
    bp("Arterial line recommended for continuous BP monitoring once vasopressors started"),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 6 — SOURCE CONTROL
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("06", "SOURCE CONTROL", CRIMSON),
    sp(4),
    bp("Identify source promptly with CT / USS / Echocardiography", SLATE),
    bp("Drain abscesses or infected fluid collections (IR or surgical)"),
    bp("Debride necrotic tissue (necrotising fasciitis, gas gangrene) \u2014 emergency surgery"),
    bp("Remove infected devices: CVCs, prosthetics, implants"),
    bp("Bowel perforation \u2014 emergency laparotomy; biliary obstruction \u2014 ERCP / PTC"),
    bp("Timing: as soon as medically feasible, ideally within 6\u201312 hours of recognition"),
    bp("Delayed source control is an independent predictor of mortality"),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 7 — ADJUNCTIVE THERAPIES
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("07", "ADJUNCTIVE THERAPIES", SLATE),
    sp(4),
    make_table(
        [
            ["Therapy", "Recommendation", "Key Details"],
            ["Corticosteroids",        "Weak \u2014 if refractory shock",  "Hydrocortisone 200 mg/day IV (50 mg q6h or CI). \u00b1 Fludrocortisone 50 \u03bcg PO OD."],
            ["Glucose Control",        "Best practice",                   "Start insulin if BG > 180 mg/dL. Target 144\u2013180 mg/dL. Avoid intensive (80\u2013110) protocol."],
            ["VTE Prophylaxis",        "Strong \u2014 recommended",        "LMWH preferred over UFH. Use IPC if pharmacological contraindicated."],
            ["Stress Ulcer Prophy.",   "Weak \u2014 if risk factors",      "PPI or H2 blocker if: MV, coagulopathy, renal failure, prior GI bleed."],
            ["Blood Transfusion",      "Restrictive \u2014 strong rec",    "Transfuse only if Hb < 7 g/dL. Target Hb 7\u20139 g/dL."],
            ["Vitamin C",              "NOT recommended",                  "No mortality benefit (CITRIS-ALI, LOVIT, VITAMINS trials)."],
            ["IV Immunoglobulin",      "Not suggested",                    "No consistent benefit in adult sepsis."],
            ["Renal Replacement (RRT)","AKI-guided",                      "CRRT preferred for haemodynamically unstable patients."],
        ],
        col_widths=[3.8*cm, 3.2*cm, 9.8*cm],
        header_bg=SLATE,
    ),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 8 — MECHANICAL VENTILATION
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("08", "MECHANICAL VENTILATION  (Sepsis-Induced ARDS)", TEAL),
    sp(4),
    make_table(
        [
            ["Strategy", "Target / Action"],
            ["Tidal Volume",          "6 mL/kg IBW (max 8 mL/kg)"],
            ["Plateau Pressure",      "\u2264 30 cmH\u2082O"],
            ["Driving Pressure",      "< 15 cmH\u2082O"],
            ["PEEP",                  "Apply using PEEP-FiO\u2082 table; higher PEEP for moderate-severe ARDS"],
            ["SpO\u2082 Target",      "92\u201396%"],
            ["Prone Positioning",     "\u2265 12\u201316 h/day for moderate-severe ARDS (P/F < 150 mmHg)"],
            ["NMBA",                  "Cisatracurium to facilitate proning; intermittent bolus preferred over CI"],
            ["HFNO",                  "Consider before intubation in hypoxic respiratory failure (SSC 2021)"],
            ["Veno-Venous ECMO",      "Refractory ARDS at experienced centre (SSC: suggested)"],
            ["Sedation",              "Light sedation RASS \u22121 to 0; propofol / dexmedetomidine over benzos (PADIS 2025)"],
        ],
        col_widths=[5.0*cm, 11.8*cm],
        header_bg=TEAL,
    ),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 9 — POST-SEPSIS SYNDROME
# ──────────────────────────────────────────────────────────────
story.append(KeepTogether([
    SectionHeader("09", "POST-SEPSIS SYNDROME & RECOVERY  (SSC 2021/2024 New Emphasis)", GREEN),
    sp(4),
    make_table(
        [
            ["Domain", "Manifestations", "Intervention"],
            ["Cognitive",      "Memory loss, attention deficits, PTSD, delirium",     "Cognitive rehabilitation; neuropsychology referral"],
            ["Physical",       "ICU-acquired weakness, peripheral neuropathy",          "Early physiotherapy from ICU day 1"],
            ["Psychological",  "Depression, anxiety, PTSD (25\u201350% of survivors)", "Psychiatric follow-up; screen at discharge"],
            ["Healthcare",     "High readmission risk, care coordination",             "Goals-of-care discussions; family inclusion in planning"],
        ],
        col_widths=[3.0*cm, 7.0*cm, 6.8*cm],
        header_bg=GREEN,
    ),
    sp(3),
    bp("Follow-up clinic at 1 month and 3 months post-discharge: assess physical, cognitive, and emotional domains"),
    bp("Reassess all medications started in ICU \u2014 many should be discontinued or modified at discharge"),
    sp(3),
]))

# ──────────────────────────────────────────────────────────────
# SECTION 10 — CLINICAL PEARLS
# ──────────────────────────────────────────────────────────────
story.append(SectionHeader("10", "CLINICAL PEARLS", CRIMSON))
story.append(sp(4))

pearls = [
    ("\u23f1", "Time is life",
     "Every 1-hour delay in antibiotics increases mortality by 7-8% in septic shock (Harrison's 22e)"),
    ("\U0001f9ea", "Cultures first, but don't stall",
     "Draw blood cultures before antibiotics - but never delay antibiotics more than 45 minutes for cultures"),
    ("\U0001f4a7", "30 mL/kg is a starting point",
     "Always reassess fluid responsiveness dynamically (PLR, PPV, POCUS) before giving more fluid"),
    ("\u26a1", "Start NE peripherally",
     "Peripheral vasopressors are safe - do NOT wait for central access; delays cost lives"),
    ("\U0001f3af", "MAP 65 is enough",
     "Higher MAP targets (>65 mmHg) do NOT improve survival and increase vasopressor burden (SEPSISPAM)"),
    ("\u2702", "Source control cannot be replaced",
     "No antibiotic can substitute for drainage of an abscess or removal of an infected device"),
    ("\U0001f4c9", "De-escalate antibiotics",
     "Narrow empiric therapy once cultures available - antimicrobial stewardship reduces resistance and C. diff"),
    ("\U0001f504", "Recovery starts day 1",
     "Post-Sepsis Syndrome is real - plan cognitive, physical, and psychological rehab from ICU admission"),
]

for emoji, title, body in pearls:
    story.append(PearlBox(emoji, title, body, h=1.1*cm))
    story.append(sp(3))

# ──────────────────────────────────────────────────────────────
# FOOTER / SOURCES
# ──────────────────────────────────────────────────────────────
story.append(sp(6))
story.append(HRFlowable(width="100%", thickness=0.5, color=LIGHT_GRAY))
story.append(sp(3))
story.append(Paragraph(
    "<b>Sources:</b> Evans L et al. SSC Guidelines 2021. Intensive Care Med 2021;47:1181-1247  |  "
    "Weiss SL et al. SSC Children Guidelines 2026. Pediatr Crit Care Med 2026 (PMID 41869844)  |  "
    "Harrison's Principles of Internal Medicine 22e (2025)  |  "
    "Fischer's Mastery of Surgery 8e  |  Barash Clinical Anesthesia 9e  |  "
    "PADIS 2025: Lewis K et al. Crit Care Med 2025 (PMID 39982143)  |  "
    "S3 Sepsis Guidelines 2025 (PMID 40824313)",
    src_style
))
story.append(sp(3))
story.append(Paragraph(
    "SEPSIS MANAGEMENT QUICK REFERENCE  \u2014  Prepared June 2026  \u2014  For educational use",
    footer_style
))

# ── Page template with header/footer ──────────────────────────
def on_page(canvas, doc):
    canvas.saveState()
    # top thin stripe
    canvas.setFillColor(CRIMSON)
    canvas.rect(doc.leftMargin, H - 0.4*cm, W - doc.leftMargin - doc.rightMargin, 0.25*cm, fill=1, stroke=0)
    # page number
    canvas.setFillColor(LIGHT_GRAY)
    canvas.setFont("Helvetica", 7)
    canvas.drawRightString(W - doc.rightMargin, 0.6*cm, f"Page {doc.page}")
    canvas.restoreState()

# ── Build ──────────────────────────────────────────────────────
OUT = "/home/daytona/workspace/sepsis-ppt/Sepsis_Quick_Reference.pdf"

doc = SimpleDocTemplate(
    OUT,
    pagesize=A4,
    leftMargin=1.5*cm,
    rightMargin=1.5*cm,
    topMargin=0.8*cm,
    bottomMargin=1.5*cm,
    title="Sepsis Management Quick Reference",
    author="Orris",
    subject="SSC 2021 Guidelines",
)

doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
print(f"PDF saved to {OUT}")
Running Command

cd /home/daytona/workspace/sepsis-ppt && python make_sepsis_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/sepsis-ppt/Sepsis_Quick_Reference.pdf

Your quick reference PDF is ready:

Sepsis Quick Reference

PDF Document · PDF


What's in the PDF

A clean, print-ready A4 document with 10 colour-coded sections:
SectionContent
01Definitions table — Sepsis, Septic Shock, qSOFA
021-Hour Bundle — all 5 elements with details
03Antimicrobial therapy table by clinical scenario
04Fluid resuscitation — ROSE framework table
05Vasopressor step-up ladder with doses
06Source control — bullet checklist
07Adjunctive therapies table (steroids, VTE, glucose, RRT, Vit C)
08Mechanical ventilation targets for ARDS
09Post-Sepsis Syndrome domains and interventions
108 Clinical Pearls in highlighted navy boxes
Designed for printing and pinning at the bedside or ICU workstation. Page numbers, a crimson header stripe, and full source citations are included at the bottom.
This is a shared conversation. Sign in to Orris to start your own chat.