Give me a flowchart of pathophysiology of sepsis and septic shock based on Robbins Pathology and Bailey and Love Surgery

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Loading Image
Reading File
Generating Image

A detailed medical flowchart showing the pathophysiology of sepsis and septic shock, based on Robbins Pathology and Bailey and Love Surgery. The flowchart should flow top to bottom with the following structured pathway: TOP: "INFECTION / MICROBIAL PRODUCTS" box (Gram-positive bacteria, Gram-negative bacteria/LPS endotoxin, Fungi, Viruses) STEP 1: PAMPs (Pathogen-Associated Molecular Patterns) recognized by: - Toll-like receptors (TLRs) - G-protein-coupled receptors - C-type lectin receptors (Dectins) On: Macrophages, Neutrophils, Dendritic cells, Endothelial cells STEP 2: Three parallel activation branches: Branch A - INNATE IMMUNE ACTIVATION: NF-kB activation → Cytokine storm: TNF-α, IL-1, IL-6, IL-12, IL-18, IFN-γ, HMGB1 + ROS, Prostaglandins, PAF Branch B - COMPLEMENT ACTIVATION: C3a (mast cell activation), C5a (chemotaxis), C3b (opsonin) Branch C - COAGULATION ACTIVATION: Factor XII activation → Coagulation cascade STEP 3: PROINFLAMMATORY STATE leads to: A) ENDOTHELIAL ACTIVATION AND INJURY: - Upregulation of adhesion molecules - Increased vascular permeability / leakage - NO production → vasodilation → hypotension - Microvascular dysfunction (heterogeneous flow) B) PROCOAGULANT STATE: - ↑ Tissue factor (by monocytes) - ↓ Thrombomodulin, Protein C, TFPI - ↑ PAI-1 (↓ fibrinolysis) - Neutrophil Extracellular Traps (NETs) → DISSEMINATED INTRAVASCULAR COAGULATION (DIC) C) METABOLIC ABNORMALITIES: - Insulin resistance + Hyperglycemia - ↑ Gluconeogenesis (TNF, IL-1, stress hormones) - Lactic acidosis - Adrenal insufficiency D) COUNTER-REGULATORY IMMUNOSUPPRESSION: - Shift Th1→Th2 - IL-10, soluble TNF receptor, IL-1RA - Lymphocyte apoptosis + anergy STEP 4: SEPSIS box (life-threatening organ dysfunction from dysregulated host response) STEP 5: ORGAN DYSFUNCTION: - Lungs: ARDS - Kidneys: Acute Tubular Necrosis (ATN) - Heart: Myocardial depression, ↓ contractility - Liver: Hepatic dysfunction - Brain: Encephalopathy - Gut: Ileus, bacterial translocation STEP 6: SEPTIC SHOCK box (refractory hypotension + vasopressor requirement + lactate >2 mmol/L): - High cardiac output (initially) - Low systemic vascular resistance (SVR) - Low venous pressure - AV shunting and maldistribution of blood flow STEP 7 (bottom): MULTIPLE ORGAN DYSFUNCTION SYNDROME (MODS) → MULTIPLE SYSTEM ORGAN FAILURE (MSOF) → DEATH Color coding: Red for danger/shock states, orange for inflammatory mediators, yellow for coagulation, blue for vascular effects, green for metabolic changes. Clean professional medical diagram with clear arrows, boxes, and labels.

Pathophysiology of Sepsis and Septic Shock Flowchart
Here is the flowchart, synthesized directly from Robbins, Cotran & Kumar - Pathologic Basis of Disease (Fig. 4.20 and surrounding text) and Bailey and Love's Short Practice of Surgery, 28th Ed. (Chapter 5). Below is the full textual breakdown of the pathway:

Pathophysiology of Sepsis and Septic Shock

1. Trigger: Infection / Microbial Products

  • Gram-positive bacteria (most common trigger)
  • Gram-negative bacteria (LPS/endotoxin from dying bacilli, e.g. E. coli)
  • Fungi, viruses (e.g. SARS-CoV-2)
Bailey & Love: "Serious infection may lead to SIRS through the release of lipopolysaccharide endotoxin from the walls of dying Gram-negative bacilli."

2. Pattern Recognition: PAMPs + PRRs

Microbial PAMPs (and DAMPs from injured cells) engage:
  • Toll-like receptors (TLRs) - on macrophages, neutrophils, dendritic cells, endothelium
  • G-protein-coupled receptors - detect bacterial peptides
  • C-type lectin receptors (Dectins) - detect fungal antigens
This triggers NF-kB nuclear translocation and gene upregulation.

3. Three Parallel Pathogenic Arms (Robbins)

A. Proinflammatory Cytokine Cascade

  • TNF-α, IL-1, IL-6, IL-12, IL-18, IFN-γ, HMGB1
  • ROS, prostaglandins, platelet-activating factor (PAF)
  • Elevated CRP and procalcitonin (acute phase markers)
  • Complement activation: C3a (mast cell activation), C5a (chemotaxis), C3b (opsonin)
Bailey & Love: "Cytokines IL-1 and TNF-α stimulate neutrophil adhesion to endothelial surfaces... a respiratory burst occurs releasing lysosomal enzymes, oxidants and free radicals."

B. Endothelial Activation and Injury

  • Upregulation of adhesion molecules
  • Loosening of tight junctions → vascular leakage, protein-rich edema
  • Increased NO production → vascular smooth muscle relaxation → systemic hypotension
  • Microvascular dysfunction: heterogeneous capillary flow, AV shunting, loss of autoregulation → O₂ supply/demand mismatch

C. Procoagulant State → DIC

  • ↑ Tissue factor expression (monocytes, endothelium)
  • ↓ Thrombomodulin, Protein C, TFPI (anticoagulant factors)
  • ↑ PAI-1 → impaired fibrinolysis
  • Neutrophil Extracellular Traps (NETs) promote both intrinsic and extrinsic coagulation
  • Fibrin-rich thrombi in small vessels throughout the body
  • In full-blown DIC: consumption of coagulation factors + platelets → paradoxical bleeding

4. Metabolic Derangements (Robbins)

  • Insulin resistance + hyperglycemia
  • ↑ Gluconeogenesis (driven by TNF, IL-1, glucagon, cortisol, catecholamines)
  • Hyperglycemia suppresses neutrophil bactericidal function
  • Cellular hypoxia + impaired mitochondrial oxidative phosphorylation → lactic acidosis
  • Adrenal insufficiency (from DIC-induced adrenal necrosis - Waterhouse-Friderichsen syndrome)

5. Counter-regulatory Immunosuppression (Robbins)

The hyperinflammatory state triggers opposing mechanisms:
  • Th1 → Th2 cytokine shift
  • IL-10, soluble TNF receptor, IL-1 receptor antagonist
  • Lymphocyte apoptosis and anergy
This creates oscillation between hyperinflammatory and immunosuppressed states.

6. SEPSIS

"Life-threatening organ dysfunction caused by a dysregulated host response to infection" - Robbins Cotran
SIRS criteria (Bailey & Love): ≥2 of: fever/hypothermia, tachycardia/tachypnoea, WBC >12 or <4 × 10⁹/L. Sepsis = SIRS + documented source of infection.

7. Organ Dysfunction (MODS)

OrganEffect
LungsARDS
KidneysAcute tubular necrosis (ATN)
Heart↓ Contractility, myocardial depression
LiverHepatic dysfunction
BrainEncephalopathy
GutIleus, bacterial translocation
Bailey & Love: "The more organs that fail, the more likely it becomes that death will follow despite all that a modern ICU can do for organ support."

8. Septic Shock

"A subset of sepsis in which profound circulatory, cellular, and metabolic abnormalities are associated with a greater risk of mortality." - Robbins Cotran
Haemodynamic profile (Bailey & Love Table 2.1):
  • High cardiac output (early/warm phase)
  • Low systemic vascular resistance
  • Low venous pressure
  • High mixed venous saturation
Later phases: hypovolaemia from fluid extravasation + myocardial depression complicates the picture.

9. MSOF → Death

Vicious cycle: organ failure reduces host defences → further infection → further organ failure. Mortality remains 20-40% despite modern ICU support (Robbins).

Sources:
  • Robbins, Cotran & Kumar - Pathologic Basis of Disease, Fig. 4.20 and pp. 134-137
  • Robbins & Kumar - Basic Pathology, pp. 2782-2857
  • Bailey and Love's Short Practice of Surgery, 28th Ed., Chapter 5 (pp. 779-800, 4451-4484)

Generate a presentation on the Surviving Sepsis Campaign bundles

Reading File
Finding Sources
Searching PubMed

"Surviving Sepsis Campaign" bundles guidelines

Reading File
Reading File
Searching the Web

Surviving Sepsis Campaign 2021 guidelines 1-hour bundle elements update

Running Command

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/surviving-sepsis-ppt

Writing File

~/surviving-sepsis-ppt/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Surviving Sepsis Campaign Bundles";
pres.author = "Orris Medical";

// ─── THEME COLORS ────────────────────────────────────────────────────────────
const DARK_NAVY   = "0D1B2A";
const MID_NAVY    = "1B2D45";
const TEAL        = "00B4D8";
const TEAL_LIGHT  = "90E0EF";
const AMBER       = "F4A261";
const RED_ALERT   = "E63946";
const WHITE       = "FFFFFF";
const LIGHT_GRAY  = "E8EEF4";
const MID_GRAY    = "8FA3B1";
const GREEN       = "2DC653";
const ORANGE      = "F77F00";

// ─── HELPER: accent bar ──────────────────────────────────────────────────────
function accentBar(slide, color = TEAL) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: 5.625, fill: { color } });
}

// ─── HELPER: section header background ──────────────────────────────────────
function darkBackground(slide) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_NAVY } });
}

function midBackground(slide) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_NAVY } });
}

// ─── HELPER: slide title ─────────────────────────────────────────────────────
function slideTitle(slide, text, y = 0.18, color = WHITE) {
  slide.addText(text, {
    x: 0.3, y, w: 9.4, h: 0.55,
    fontSize: 22, bold: true, color, fontFace: "Calibri",
    margin: 0
  });
}

function sectionLabel(slide, text, color = TEAL) {
  slide.addText(text, {
    x: 0.3, y: 0.05, w: 9.4, h: 0.22,
    fontSize: 9, bold: true, color, fontFace: "Calibri",
    charSpacing: 3, margin: 0
  });
}

// ─── HELPER: divider line ────────────────────────────────────────────────────
function divider(slide, y = 0.78, color = TEAL) {
  slide.addShape(pres.ShapeType.line, {
    x: 0.3, y, w: 9.4, h: 0,
    line: { color, width: 1.5 }
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 1 – TITLE SLIDE
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkBackground(s);

  // Bold teal left stripe
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.25, h: 5.625, fill: { color: TEAL } });

  // Large decorative circle
  s.addShape(pres.ShapeType.ellipse, {
    x: 6.8, y: -1.2, w: 4.5, h: 4.5,
    fill: { color: MID_NAVY }, line: { color: TEAL, width: 2 }
  });

  s.addText("SURVIVING SEPSIS", {
    x: 0.5, y: 1.1, w: 8.5, h: 0.75,
    fontSize: 42, bold: true, color: WHITE, fontFace: "Calibri",
    charSpacing: 4, margin: 0
  });
  s.addText("CAMPAIGN BUNDLES", {
    x: 0.5, y: 1.85, w: 8.5, h: 0.75,
    fontSize: 42, bold: true, color: TEAL, fontFace: "Calibri",
    charSpacing: 4, margin: 0
  });

  s.addShape(pres.ShapeType.line, {
    x: 0.5, y: 2.72, w: 5.5, h: 0,
    line: { color: TEAL, width: 2 }
  });

  s.addText("From Evidence to Action: The Hour-1 Bundle & SSC 2021 Guidelines", {
    x: 0.5, y: 2.85, w: 8.5, h: 0.45,
    fontSize: 14, color: TEAL_LIGHT, fontFace: "Calibri", italic: true, margin: 0
  });

  s.addText("Based on: Surviving Sepsis Campaign Guidelines 2021  |  SSC Hour-1 Bundle 2018  |  Bailey & Love Surgery 28e", {
    x: 0.5, y: 4.8, w: 9, h: 0.3,
    fontSize: 8.5, color: MID_GRAY, fontFace: "Calibri", margin: 0
  });

  // Bottom teal bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.38, w: 10, h: 0.25, fill: { color: TEAL } });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 2 – OVERVIEW / AGENDA
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_GRAY } });
  accentBar(s, TEAL);

  sectionLabel(s, "AGENDA", TEAL);
  slideTitle(s, "What We Will Cover", 0.28, DARK_NAVY);
  divider(s, 0.88, TEAL);

  const topics = [
    ["01", "What is the Surviving Sepsis Campaign?", "Origins, goals, and evolution (2002–2021)"],
    ["02", "Sepsis Definitions", "Sepsis-3: SOFA, qSOFA, septic shock criteria"],
    ["03", "The Hour-1 Bundle (2018)", "Five elements — measure, obtain, give, give, give"],
    ["04", "Fluid Resuscitation", "30 mL/kg crystalloid, balanced fluids, dynamic markers"],
    ["05", "Antimicrobials", "Timing, source control, empiric coverage principles"],
    ["06", "Vasopressors & Steroids", "Norepinephrine, vasopressin, hydrocortisone"],
    ["07", "Lactate & Monitoring", "Serial lactate, capillary refill time, organ perfusion"],
    ["08", "The Sepsis Six (Bailey & Love)", "UK Sepsis Trust practical bedside bundle"],
    ["09", "2021 SSC Key Updates", "New recommendations vs 2016 guidelines"],
    ["10", "Outcomes & Evidence", "Mortality impact of bundle compliance"],
  ];

  const colW = 4.55;
  topics.forEach((t, i) => {
    const col = i < 5 ? 0 : 1;
    const row = i < 5 ? i : i - 5;
    const x = 0.25 + col * colW;
    const y = 0.98 + row * 0.84;

    s.addShape(pres.ShapeType.rect, {
      x, y, w: colW - 0.15, h: 0.72,
      fill: { color: WHITE },
      line: { color: "D0DDE8", width: 0.8 },
      shadow: { type: "outer", blur: 3, offset: 1, angle: 45, color: "C0C8D0", opacity: 0.3 }
    });

    s.addShape(pres.ShapeType.rect, {
      x, y, w: 0.38, h: 0.72,
      fill: { color: TEAL }
    });

    s.addText(t[0], {
      x, y: y + 0.18, w: 0.38, h: 0.35,
      fontSize: 11, bold: true, color: WHITE, align: "center",
      fontFace: "Calibri", margin: 0
    });

    s.addText(t[1], {
      x: x + 0.45, y: y + 0.05, w: colW - 0.65, h: 0.35,
      fontSize: 9.5, bold: true, color: DARK_NAVY, fontFace: "Calibri", margin: 0
    });
    s.addText(t[2], {
      x: x + 0.45, y: y + 0.38, w: colW - 0.65, h: 0.28,
      fontSize: 7.5, color: MID_GRAY, fontFace: "Calibri", italic: true, margin: 0
    });
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 3 – WHAT IS THE SSC?
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  midBackground(s);
  accentBar(s, TEAL);

  sectionLabel(s, "BACKGROUND", TEAL);
  slideTitle(s, "The Surviving Sepsis Campaign", 0.28, WHITE);
  divider(s, 0.88, TEAL);

  // Left panel – history timeline
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.0, w: 3.6, h: 4.3,
    fill: { color: DARK_NAVY }, line: { color: TEAL, width: 1 }
  });
  s.addText("TIMELINE", {
    x: 0.35, y: 1.05, w: 3.4, h: 0.3,
    fontSize: 9, bold: true, color: TEAL, charSpacing: 3, fontFace: "Calibri", margin: 0
  });

  const timeline = [
    ["2002", "SSC Initiated by ESICM & SCCM"],
    ["2004", "First adult sepsis guidelines published"],
    ["2005", "6-hr resuscitation + 24-hr management bundles"],
    ["2008", "Updated guidelines"],
    ["2012", "Updated guidelines"],
    ["2013", "3-hour and 6-hour bundles introduced"],
    ["2016", "Major guideline revision; Sepsis-3 definitions"],
    ["2018", "Single Hour-1 Bundle released"],
    ["2021", "Latest comprehensive guideline update"],
  ];

  timeline.forEach((t, i) => {
    const y = 1.45 + i * 0.41;
    s.addShape(pres.ShapeType.ellipse, { x: 0.38, y: y - 0.02, w: 0.18, h: 0.18, fill: { color: TEAL } });
    s.addText(t[0], { x: 0.62, y: y - 0.05, w: 0.65, h: 0.25, fontSize: 8.5, bold: true, color: TEAL, fontFace: "Calibri", margin: 0 });
    s.addText(t[1], { x: 1.32, y: y - 0.05, w: 2.4, h: 0.25, fontSize: 7.8, color: WHITE, fontFace: "Calibri", margin: 0 });
  });

  // Right panel – goals
  s.addText("SSC MISSION & GOALS", {
    x: 4.1, y: 1.0, w: 5.6, h: 0.35,
    fontSize: 11, bold: true, color: TEAL, fontFace: "Calibri", charSpacing: 2, margin: 0
  });

  const goals = [
    ["🎯", "Build global awareness of sepsis as a medical emergency"],
    ["📋", "Develop evidence-based clinical practice guidelines"],
    ["🎓", "Educate healthcare professionals worldwide"],
    ["🏥", "Implement performance improvement programs"],
    ["🔬", "Improve early diagnosis and recognition"],
    ["💉", "Increase use of appropriate and timely treatment"],
    ["🏠", "Improve post-ICU care and long-term recovery"],
  ];

  goals.forEach((g, i) => {
    const y = 1.45 + i * 0.51;
    s.addShape(pres.ShapeType.rect, {
      x: 4.1, y, w: 5.65, h: 0.43,
      fill: { color: "152035" }, line: { color: "2A4060", width: 0.5 }
    });
    s.addText(g[0] + "  " + g[1], {
      x: 4.2, y: y + 0.08, w: 5.4, h: 0.28,
      fontSize: 10, color: WHITE, fontFace: "Calibri", margin: 0
    });
  });

  s.addText("Spearheaded by ESICM + SCCM  |  Mission: reduce global sepsis mortality", {
    x: 4.1, y: 5.25, w: 5.65, h: 0.25,
    fontSize: 8, color: MID_GRAY, italic: true, fontFace: "Calibri", margin: 0
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 4 – SEPSIS DEFINITIONS (Sepsis-3)
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_GRAY } });
  accentBar(s, RED_ALERT);

  sectionLabel(s, "DEFINITIONS", RED_ALERT);
  slideTitle(s, "Sepsis-3 Definitions (2016)", 0.28, DARK_NAVY);
  divider(s, 0.88, RED_ALERT);

  const defs = [
    {
      label: "INFECTION",
      color: TEAL,
      desc: "Microbial invasion of normally sterile host tissue",
      detail: "Gram-positive (most common) > Gram-negative > Fungi > Viruses (e.g., SARS-CoV-2)"
    },
    {
      label: "SIRS",
      color: ORANGE,
      desc: "≥2 of: Temp >38°C or <36°C  |  HR >90/min  |  RR >20/min  |  WBC >12 or <4 × 10⁹/L",
      detail: "Nonspecific — can occur without infection (trauma, burns, pancreatitis)"
    },
    {
      label: "SEPSIS",
      color: RED_ALERT,
      desc: "Life-threatening organ dysfunction caused by a dysregulated host response to infection",
      detail: "SOFA score increase ≥2 from baseline  |  Presumed or confirmed infection"
    },
    {
      label: "SEPTIC SHOCK",
      color: "9B0000",
      desc: "Sepsis + vasopressor requirement to maintain MAP ≥65 mmHg + lactate >2 mmol/L (despite fluid resuscitation)",
      detail: "Hospital mortality >40%  |  Profound circulatory, cellular, metabolic abnormalities"
    },
  ];

  defs.forEach((d, i) => {
    const y = 1.0 + i * 1.12;
    s.addShape(pres.ShapeType.rect, {
      x: 0.25, y, w: 9.5, h: 1.0,
      fill: { color: WHITE }, line: { color: d.color, width: 1.5 }
    });
    s.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 1.5, h: 1.0, fill: { color: d.color } });
    s.addText(d.label, {
      x: 0.25, y: y + 0.3, w: 1.5, h: 0.4,
      fontSize: 9.5, bold: true, color: WHITE, align: "center",
      fontFace: "Calibri", charSpacing: 1, margin: 0
    });
    s.addText(d.desc, {
      x: 1.9, y: y + 0.07, w: 7.7, h: 0.42,
      fontSize: 10.5, bold: true, color: DARK_NAVY, fontFace: "Calibri", margin: 0
    });
    s.addText(d.detail, {
      x: 1.9, y: y + 0.52, w: 7.7, h: 0.38,
      fontSize: 9, color: "4A5568", fontFace: "Calibri", italic: true, margin: 0
    });
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 5 – THE HOUR-1 BUNDLE
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkBackground(s);
  accentBar(s, AMBER);

  sectionLabel(s, "HOUR-1 BUNDLE", AMBER);
  slideTitle(s, "The SSC Hour-1 Bundle (2018 Update)", 0.28, WHITE);
  divider(s, 0.88, AMBER);

  s.addText("Begin resuscitation and management IMMEDIATELY upon recognition of sepsis/septic shock", {
    x: 0.3, y: 0.92, w: 9.4, h: 0.28,
    fontSize: 9.5, color: TEAL_LIGHT, fontFace: "Calibri", italic: true, margin: 0
  });

  const elements = [
    {
      num: "1",
      title: "Measure Lactate",
      body: "Obtain serum lactate level\nRemeasure if initial lactate >2 mmol/L\nLactate >2 indicates tissue hypoperfusion",
      color: TEAL,
      icon: "🧪"
    },
    {
      num: "2",
      title: "Blood Cultures",
      body: "Obtain blood cultures BEFORE administering antibiotics\n≥2 sets from different sites\nDo NOT delay antibiotics >45 min to obtain cultures",
      color: ORANGE,
      icon: "🩸"
    },
    {
      num: "3",
      title: "Broad-Spectrum Antibiotics",
      body: "Administer IV antimicrobials immediately\nWithin 1 hour for septic shock\nWithin 3 hours for sepsis without shock\nEmpiric coverage; de-escalate with culture results",
      color: RED_ALERT,
      icon: "💊"
    },
    {
      num: "4",
      title: "IV Crystalloid Fluids",
      body: "Give 30 mL/kg IV crystalloid within first 3 hours\nBalanced crystalloids preferred over 0.9% saline\nReassess fluid responsiveness dynamically",
      color: "5B9BD5",
      icon: "💧"
    },
    {
      num: "5",
      title: "Vasopressors",
      body: "Apply vasopressors if hypotension persists during/after fluid resuscitation\nTarget MAP ≥65 mmHg\nNorepinephrine = first-line vasopressor",
      color: GREEN,
      icon: "💉"
    },
  ];

  elements.forEach((el, i) => {
    const col = i < 3 ? 0 : i - 3;
    const row = i < 3 ? i : 0;
    const isBottom = i >= 3;
    const x = isBottom ? 0.25 + col * 3.2 : 0.25;
    const y = isBottom ? 3.88 : 1.28 + i * 0.83;
    const w = isBottom ? 3.05 : 9.5;
    const h = isBottom ? 1.45 : 0.72;

    s.addShape(pres.ShapeType.rect, {
      x, y, w, h,
      fill: { color: "152035" }, line: { color: el.color, width: 1.5 }
    });
    s.addShape(pres.ShapeType.rect, { x, y, w: 0.55, h, fill: { color: el.color } });

    s.addText(el.num, {
      x, y: y + (h / 2) - 0.18, w: 0.55, h: 0.36,
      fontSize: 18, bold: true, color: WHITE, align: "center", fontFace: "Calibri", margin: 0
    });

    if (!isBottom) {
      s.addText(el.title + " " + el.icon, {
        x: x + 0.65, y: y + 0.08, w: 2.5, h: 0.3,
        fontSize: 11, bold: true, color: el.color, fontFace: "Calibri", margin: 0
      });
      s.addText(el.body, {
        x: x + 3.2, y: y + 0.07, w: 6.4, h: 0.58,
        fontSize: 9, color: WHITE, fontFace: "Calibri", margin: 0
      });
    } else {
      s.addText(el.icon + " " + el.title, {
        x: x + 0.65, y: y + 0.12, w: w - 0.75, h: 0.3,
        fontSize: 10, bold: true, color: el.color, fontFace: "Calibri", margin: 0
      });
      s.addText(el.body, {
        x: x + 0.65, y: y + 0.45, w: w - 0.75, h: 0.88,
        fontSize: 7.8, color: WHITE, fontFace: "Calibri", margin: 0
      });
    }
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 6 – FLUID RESUSCITATION
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_GRAY } });
  accentBar(s, "5B9BD5");

  sectionLabel(s, "BUNDLE ELEMENT 4", "5B9BD5");
  slideTitle(s, "Fluid Resuscitation", 0.28, DARK_NAVY);
  divider(s, 0.88, "5B9BD5");

  // Central recommendation box
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.0, w: 9.5, h: 0.75,
    fill: { color: "5B9BD5" }, line: { color: "2574A9", width: 1.5 }
  });
  s.addText("⭐  STRONG RECOMMENDATION (Weak evidence):  Give ≥30 mL/kg IV crystalloid within the first 3 hours of sepsis-induced hypoperfusion or septic shock", {
    x: 0.35, y: 1.08, w: 9.3, h: 0.58,
    fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });

  const fluidCards = [
    {
      title: "Fluid Choice",
      color: "2574A9",
      points: [
        "Balanced crystalloids (e.g. Hartmann's/Ringer's lactate) preferred over 0.9% NaCl (NEW – 2021)",
        "Normal saline associated with hyperchloraemic acidosis",
        "Albumin may be used as adjunct (not first-line)",
        "Avoid synthetic colloids (HES) — associated with AKI"
      ]
    },
    {
      title: "Dynamic Assessment",
      color: TEAL,
      points: [
        "Reassess fluid responsiveness after each bolus",
        "Passive leg raising test (PLR) — predicts fluid responsiveness",
        "Pulse pressure variation (PPV) in ventilated patients",
        "Capillary refill time as adjunct (NEW – 2021)"
      ]
    },
    {
      title: "When to Stop Fluids",
      color: ORANGE,
      points: [
        "Fluid overload worsens outcomes (pulmonary edema, abdominal compartment syndrome)",
        "Use de-resuscitation once patient stabilised",
        "CVP alone is NOT reliable for guiding fluid therapy",
        "Target: MAP ≥65 mmHg, UO ≥0.5 mL/kg/hr, falling lactate"
      ]
    }
  ];

  fluidCards.forEach((card, i) => {
    const x = 0.25 + i * 3.2;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.88, w: 3.08, h: 3.5,
      fill: { color: WHITE }, line: { color: card.color, width: 1.5 }
    });
    s.addShape(pres.ShapeType.rect, { x, y: 1.88, w: 3.08, h: 0.4, fill: { color: card.color } });
    s.addText(card.title, {
      x: x + 0.08, y: 1.92, w: 2.92, h: 0.32,
      fontSize: 10, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
    });
    card.points.forEach((pt, j) => {
      s.addText("▸  " + pt, {
        x: x + 0.1, y: 2.35 + j * 0.73, w: 2.88, h: 0.65,
        fontSize: 8.5, color: DARK_NAVY, fontFace: "Calibri", margin: 0
      });
    });
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 7 – ANTIMICROBIALS
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkBackground(s);
  accentBar(s, RED_ALERT);

  sectionLabel(s, "BUNDLE ELEMENT 3", RED_ALERT);
  slideTitle(s, "Antimicrobial Therapy", 0.28, WHITE);
  divider(s, 0.88, RED_ALERT);

  // Timing recommendation
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.0, w: 9.5, h: 0.65,
    fill: { color: RED_ALERT }
  });
  s.addText("⚠  STRONG RECOMMENDATION:  Administer IV antimicrobials as soon as possible after recognition — within 1 HOUR for septic shock; within 3 HOURS when sepsis is possible but shock absent", {
    x: 0.35, y: 1.07, w: 9.2, h: 0.5,
    fontSize: 10, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });

  // Boxes
  const antiCards = [
    {
      title: "Empiric Coverage Principles",
      color: ORANGE,
      points: [
        "Broad-spectrum coverage guided by likely source & local antibiogram",
        "Consider MRSA coverage if risk factors present",
        "Anti-fungal if immunocompromised or prolonged ICU stay",
        "Combination therapy for septic shock (improve coverage breadth)",
        "De-escalate based on culture results within 24–48 hours"
      ]
    },
    {
      title: "Source Control",
      color: TEAL,
      points: [
        "Identify and control source within 6–12 hours of diagnosis",
        "Drainage of abscesses, debridement of infected tissue",
        "Removal of infected devices/lines/catheters",
        "Timing: as soon as medically/logistically feasible",
        "Insufficient source control = treatment failure"
      ]
    },
    {
      title: "Antibiotic Stewardship",
      color: GREEN,
      points: [
        "Reassess antibiotic regimen daily",
        "Discontinue if non-infectious cause confirmed",
        "Use procalcitonin to guide de-escalation",
        "Avoid prolonged empiric broad-spectrum use",
        "Duration: typically 7–10 days (guided by clinical response)"
      ]
    }
  ];

  antiCards.forEach((card, i) => {
    const x = 0.25 + i * 3.2;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.75, w: 3.08, h: 3.62,
      fill: { color: "152035" }, line: { color: card.color, width: 1.5 }
    });
    s.addShape(pres.ShapeType.rect, { x, y: 1.75, w: 3.08, h: 0.4, fill: { color: card.color } });
    s.addText(card.title, {
      x: x + 0.08, y: 1.79, w: 2.92, h: 0.32,
      fontSize: 9.5, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
    });
    card.points.forEach((pt, j) => {
      s.addText("▸  " + pt, {
        x: x + 0.1, y: 2.22 + j * 0.64, w: 2.88, h: 0.58,
        fontSize: 8.5, color: TEAL_LIGHT, fontFace: "Calibri", margin: 0
      });
    });
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 8 – VASOPRESSORS & STEROIDS
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_GRAY } });
  accentBar(s, GREEN);

  sectionLabel(s, "BUNDLE ELEMENT 5 + ADJUNCTS", GREEN);
  slideTitle(s, "Vasopressors, Steroids & Adjunct Therapies", 0.28, DARK_NAVY);
  divider(s, 0.88, GREEN);

  // Vasopressor table
  s.addText("VASOPRESSOR THERAPY  (Target MAP ≥65 mmHg)", {
    x: 0.25, y: 1.0, w: 9.5, h: 0.3,
    fontSize: 11, bold: true, color: DARK_NAVY, fontFace: "Calibri", charSpacing: 1, margin: 0
  });

  const vasRows = [
    ["Agent", "Role", "Dose", "Evidence"],
    ["Norepinephrine", "First-line vasopressor", "0.01–3.3 mcg/kg/min", "STRONG – 2021"],
    ["Vasopressin", "Add-on to reduce NE dose", "0.03–0.04 units/min", "Weak – 2021"],
    ["Epinephrine", "Second-line or cardiac arrest", "0.01–0.3 mcg/kg/min", "Weak suggestion"],
    ["Dopamine", "NOT recommended routinely", "—", "Against use (arrhythmias)"],
    ["Phenylephrine", "Avoid in septic shock", "—", "Weak – avoid"],
  ];

  vasRows.forEach((row, i) => {
    const isHeader = i === 0;
    const bg = isHeader ? GREEN : (i % 2 === 0 ? "EEF5EE" : WHITE);
    const textColor = isHeader ? WHITE : DARK_NAVY;
    const colWidths = [2.3, 2.5, 2.2, 2.5];
    let xPos = 0.25;
    row.forEach((cell, j) => {
      s.addShape(pres.ShapeType.rect, {
        x: xPos, y: 1.35 + i * 0.38, w: colWidths[j], h: 0.38,
        fill: { color: bg }, line: { color: "C8D8C8", width: 0.5 }
      });
      s.addText(cell, {
        x: xPos + 0.05, y: 1.38 + i * 0.38, w: colWidths[j] - 0.1, h: 0.3,
        fontSize: isHeader ? 9 : 8.8, bold: isHeader, color: textColor, fontFace: "Calibri", margin: 0
      });
      xPos += colWidths[j];
    });
  });

  // Peripheral vasopressor note (new 2021)
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 3.7, w: 9.5, h: 0.38,
    fill: { color: TEAL }, line: { color: TEAL, width: 1 }
  });
  s.addText("NEW 2021: Peripheral IV vasopressors may be initiated while awaiting central venous access — do NOT delay vasopressors to obtain CVC (Weak recommendation)", {
    x: 0.35, y: 3.76, w: 9.2, h: 0.28,
    fontSize: 9, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });

  // Steroid box
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 4.18, w: 4.6, h: 1.15,
    fill: { color: WHITE }, line: { color: AMBER, width: 1.5 }
  });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 4.18, w: 4.6, h: 0.35, fill: { color: AMBER } });
  s.addText("CORTICOSTEROIDS (NEW 2021)", {
    x: 0.35, y: 4.22, w: 4.4, h: 0.28,
    fontSize: 9, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  s.addText("IV hydrocortisone 200 mg/day if vasopressor requirement is ongoing despite adequate fluid resuscitation.\nWeak recommendation — not routine; indicated for refractory septic shock.", {
    x: 0.35, y: 4.58, w: 4.4, h: 0.68,
    fontSize: 8.5, color: DARK_NAVY, fontFace: "Calibri", margin: 0
  });

  // Blood glucose box
  s.addShape(pres.ShapeType.rect, {
    x: 5.1, y: 4.18, w: 4.65, h: 1.15,
    fill: { color: WHITE }, line: { color: RED_ALERT, width: 1.5 }
  });
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 4.18, w: 4.65, h: 0.35, fill: { color: RED_ALERT } });
  s.addText("GLYCAEMIC CONTROL", {
    x: 5.2, y: 4.22, w: 4.45, h: 0.28,
    fontSize: 9, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
  });
  s.addText("Target blood glucose 7.8–10.0 mmol/L (140–180 mg/dL).\nUse insulin infusion protocol if 2 consecutive readings >10 mmol/L.\nAvoid hypoglycaemia — increases mortality.", {
    x: 5.2, y: 4.58, w: 4.45, h: 0.68,
    fontSize: 8.5, color: DARK_NAVY, fontFace: "Calibri", margin: 0
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 9 – LACTATE & MONITORING
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkBackground(s);
  accentBar(s, TEAL);

  sectionLabel(s, "BUNDLE ELEMENT 1 + MONITORING", TEAL);
  slideTitle(s, "Lactate Monitoring & Perfusion Assessment", 0.28, WHITE);
  divider(s, 0.88, TEAL);

  // Lactate significance
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.0, w: 9.5, h: 0.6,
    fill: { color: "152035" }, line: { color: TEAL, width: 1.5 }
  });
  s.addText("Serum lactate is a biomarker of tissue hypoperfusion and cellular energy failure (anaerobic glycolysis). Elevated lactate >2 mmol/L identifies occult shock even when BP appears normal.", {
    x: 0.4, y: 1.05, w: 9.2, h: 0.5,
    fontSize: 9.5, color: WHITE, fontFace: "Calibri", margin: 0
  });

  // Lactate levels
  const lactateData = [
    { range: "<2 mmol/L", label: "Normal", color: GREEN, action: "Continue monitoring; optimise fluid status" },
    { range: "2–4 mmol/L", label: "Elevated", color: AMBER, action: "30 mL/kg crystalloid; repeat lactate in 2 hrs; antibiotics within 1 hr" },
    { range: ">4 mmol/L", label: "Severe / Septic Shock", color: RED_ALERT, action: "ICU admission; vasopressors; aggressive resuscitation; source control" },
  ];

  lactateData.forEach((ld, i) => {
    const y = 1.72 + i * 0.82;
    s.addShape(pres.ShapeType.rect, {
      x: 0.25, y, w: 9.5, h: 0.72,
      fill: { color: "152035" }, line: { color: ld.color, width: 1.5 }
    });
    s.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 1.6, h: 0.72, fill: { color: ld.color } });
    s.addText(ld.range, {
      x: 0.3, y: y + 0.05, w: 1.5, h: 0.3,
      fontSize: 10, bold: true, color: WHITE, align: "center", fontFace: "Calibri", margin: 0
    });
    s.addText(ld.label, {
      x: 0.3, y: y + 0.38, w: 1.5, h: 0.28,
      fontSize: 8, color: WHITE, align: "center", fontFace: "Calibri", margin: 0
    });
    s.addText("▸  " + ld.action, {
      x: 1.95, y: y + 0.17, w: 7.65, h: 0.38,
      fontSize: 10, color: WHITE, fontFace: "Calibri", margin: 0
    });
  });

  // Monitoring targets
  s.addText("RESUSCITATION TARGETS", {
    x: 0.25, y: 4.26, w: 4.5, h: 0.28,
    fontSize: 10, bold: true, color: TEAL, charSpacing: 2, fontFace: "Calibri", margin: 0
  });

  const targets = [
    "MAP ≥65 mmHg",
    "Urine output ≥0.5 mL/kg/hr",
    "Lactate normalisation / ↓ by 10–20%",
    "Capillary refill time ≤3 sec (NEW 2021)",
    "ScvO₂ ≥70% (if measuring)",
  ];
  targets.forEach((t, i) => {
    s.addText("✓  " + t, {
      x: 0.25, y: 4.58 + i * 0.19, w: 4.4, h: 0.18,
      fontSize: 8.5, color: WHITE, fontFace: "Calibri", margin: 0
    });
  });

  s.addText("SCREENING TOOLS", {
    x: 5.1, y: 4.26, w: 4.65, h: 0.28,
    fontSize: 10, bold: true, color: TEAL, charSpacing: 2, fontFace: "Calibri", margin: 0
  });
  const tools = [
    "SOFA: Organ dysfunction score (0–24)",
    "qSOFA: RR ≥22 + AMS + SBP ≤100 mmHg",
    "NEWS-2: Early warning score",
    "SIRS criteria (Bailey & Love: ≥2 of fever/HR/RR/WBC)",
    "Procalcitonin: guides antibiotic de-escalation",
  ];
  tools.forEach((t, i) => {
    s.addText("✓  " + t, {
      x: 5.1, y: 4.58 + i * 0.19, w: 4.6, h: 0.18,
      fontSize: 8.5, color: WHITE, fontFace: "Calibri", margin: 0
    });
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 10 – THE SEPSIS SIX (Bailey & Love)
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_GRAY } });
  accentBar(s, ORANGE);

  sectionLabel(s, "BAILEY & LOVE SURGERY 28E", ORANGE);
  slideTitle(s, "The Sepsis Six (UK Sepsis Trust)", 0.28, DARK_NAVY);
  divider(s, 0.88, ORANGE);

  s.addText("Derived from SSC international guidelines by the UK Sepsis Trust — a practical bedside bundle for immediate action within 1 hour of sepsis recognition", {
    x: 0.3, y: 0.95, w: 9.4, h: 0.3,
    fontSize: 9.5, color: "4A5568", italic: true, fontFace: "Calibri", margin: 0
  });

  // Two columns: Give Three / Take Three
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.35, w: 4.55, h: 0.42,
    fill: { color: TEAL }
  });
  s.addText("GIVE THREE  →  To the Patient", {
    x: 0.35, y: 1.42, w: 4.35, h: 0.28,
    fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 1, margin: 0
  });

  s.addShape(pres.ShapeType.rect, {
    x: 5.0, y: 1.35, w: 4.75, h: 0.42,
    fill: { color: ORANGE }
  });
  s.addText("TAKE THREE  ←  From the Patient", {
    x: 5.1, y: 1.42, w: 4.55, h: 0.28,
    fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 1, margin: 0
  });

  const giveThree = [
    {
      n: "1",
      title: "IV Fluid Challenge",
      detail: "30 mL/kg crystalloid (Ringer's lactate preferred)\nRapid infusion for hypotension or lactate >2\nReassess response dynamically"
    },
    {
      n: "2",
      title: "IV Broad-Spectrum Antibiotics",
      detail: "Empiric coverage for likely source\nBlood cultures first (do not delay >45 min)\nLocal protocol / microbiologist advice"
    },
    {
      n: "3",
      title: "Oxygen + Monitor Urine Output",
      detail: "High-flow O₂ targeting SpO₂ ≥94%\nUrinary catheter for hourly UO monitoring\nTarget ≥0.5 mL/kg/hr"
    }
  ];

  const takeThree = [
    {
      n: "4",
      title: "Blood Cultures",
      detail: "≥2 sets — peripheral + central (if present)\nBefore antibiotics — do not delay >45 min\nInclude fungal cultures if immunocompromised"
    },
    {
      n: "5",
      title: "Full Blood Count",
      detail: "Check WBC (>12 or <4 × 10⁹/L = SIRS)\nThromobocytopenia may indicate DIC\nHaemoglobin — guide transfusion decisions"
    },
    {
      n: "6",
      title: "Serum Lactate",
      detail: "Tissue hypoperfusion marker\n>2 mmol/L → resuscitate aggressively\n>4 mmol/L → septic shock; ICU"
    }
  ];

  giveThree.forEach((item, i) => {
    const y = 1.85 + i * 1.2;
    s.addShape(pres.ShapeType.rect, {
      x: 0.25, y, w: 4.55, h: 1.1,
      fill: { color: WHITE }, line: { color: TEAL, width: 1.2 }
    });
    s.addShape(pres.ShapeType.ellipse, { x: 0.33, y: y + 0.12, w: 0.55, h: 0.55, fill: { color: TEAL } });
    s.addText(item.n, {
      x: 0.33, y: y + 0.2, w: 0.55, h: 0.38,
      fontSize: 14, bold: true, color: WHITE, align: "center", fontFace: "Calibri", margin: 0
    });
    s.addText(item.title, {
      x: 1.0, y: y + 0.1, w: 3.65, h: 0.3,
      fontSize: 10, bold: true, color: DARK_NAVY, fontFace: "Calibri", margin: 0
    });
    s.addText(item.detail, {
      x: 1.0, y: y + 0.42, w: 3.65, h: 0.6,
      fontSize: 8.2, color: "4A5568", fontFace: "Calibri", margin: 0
    });
  });

  takeThree.forEach((item, i) => {
    const y = 1.85 + i * 1.2;
    s.addShape(pres.ShapeType.rect, {
      x: 5.0, y, w: 4.75, h: 1.1,
      fill: { color: WHITE }, line: { color: ORANGE, width: 1.2 }
    });
    s.addShape(pres.ShapeType.ellipse, { x: 5.08, y: y + 0.12, w: 0.55, h: 0.55, fill: { color: ORANGE } });
    s.addText(item.n, {
      x: 5.08, y: y + 0.2, w: 0.55, h: 0.38,
      fontSize: 14, bold: true, color: WHITE, align: "center", fontFace: "Calibri", margin: 0
    });
    s.addText(item.title, {
      x: 5.73, y: y + 0.1, w: 3.85, h: 0.3,
      fontSize: 10, bold: true, color: DARK_NAVY, fontFace: "Calibri", margin: 0
    });
    s.addText(item.detail, {
      x: 5.73, y: y + 0.42, w: 3.85, h: 0.6,
      fontSize: 8.2, color: "4A5568", fontFace: "Calibri", margin: 0
    });
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 11 – SSC 2021 KEY UPDATES
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  midBackground(s);
  accentBar(s, GREEN);

  sectionLabel(s, "2021 GUIDELINE UPDATES", GREEN);
  slideTitle(s, "What's New in SSC 2021 vs 2016?", 0.28, WHITE);
  divider(s, 0.88, GREEN);

  const updates = [
    {
      topic: "Fluid Choice",
      old: "Crystalloids (unspecified)",
      new2021: "Balanced crystalloids PREFERRED over 0.9% NaCl",
      strength: "Weak"
    },
    {
      topic: "Vasopressors",
      old: "Start via CVC",
      new2021: "Peripheral IV vasopressors acceptable while awaiting CVC — do not delay",
      strength: "Weak"
    },
    {
      topic: "Antimicrobial Timing",
      old: "Within 1 hr for sepsis and septic shock",
      new2021: "Immediate for septic shock; within 3 hrs for possible sepsis without shock",
      strength: "Strong"
    },
    {
      topic: "Corticosteroids",
      old: "Not recommended unless ACTH-unresponsive",
      new2021: "IV hydrocortisone 200 mg/day if vasopressors ongoing — new clear indication",
      strength: "Weak"
    },
    {
      topic: "Capillary Refill Time",
      old: "Not mentioned",
      new2021: "Use CRT as adjunct to other measures of perfusion to guide resuscitation",
      strength: "Weak"
    },
    {
      topic: "Post-ICU Care",
      old: "Not addressed",
      new2021: "Expanded section on rehabilitation, follow-up, cognitive impairment, PTSD",
      strength: "NEW"
    },
    {
      topic: "Diversity",
      old: "Limited geographic/gender diversity",
      new2021: "Greater geographic and gender diversity in guideline committee membership",
      strength: "NEW"
    },
  ];

  // Table header
  const headers = ["Topic", "2016 Recommendation", "2021 Update", "Strength"];
  const colW2 = [1.8, 3.1, 3.6, 0.9];
  let xH = 0.2;
  headers.forEach((h, j) => {
    s.addShape(pres.ShapeType.rect, {
      x: xH, y: 1.0, w: colW2[j], h: 0.35,
      fill: { color: GREEN }
    });
    s.addText(h, {
      x: xH + 0.05, y: 1.04, w: colW2[j] - 0.1, h: 0.28,
      fontSize: 9.5, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
    });
    xH += colW2[j];
  });

  updates.forEach((row, i) => {
    const rowH = 0.52;
    const y = 1.38 + i * rowH;
    const bg = i % 2 === 0 ? "1B2D45" : "152035";
    let xC = 0.2;

    const cells = [row.topic, row.old, row.new2021, row.strength];
    cells.forEach((cell, j) => {
      s.addShape(pres.ShapeType.rect, {
        x: xC, y, w: colW2[j], h: rowH,
        fill: { color: bg }, line: { color: "2A4060", width: 0.5 }
      });
      const isNew = j === 3;
      const textColor = isNew ? (row.strength === "NEW" ? GREEN : row.strength === "Strong" ? RED_ALERT : AMBER) : WHITE;
      s.addText(cell, {
        x: xC + 0.05, y: y + 0.1, w: colW2[j] - 0.1, h: rowH - 0.12,
        fontSize: j === 0 ? 9 : 8.2, bold: (j === 0 || j === 3), color: textColor,
        fontFace: "Calibri", margin: 0
      });
      xC += colW2[j];
    });
  });

  s.addText("Source: Evans L et al. Surviving Sepsis Campaign: International Guidelines for Management of Sepsis and Septic Shock 2021. Crit Care Med 2021;49:e1063.", {
    x: 0.2, y: 5.3, w: 9.6, h: 0.22,
    fontSize: 7.5, color: MID_GRAY, italic: true, fontFace: "Calibri", margin: 0
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 12 – OUTCOMES & EVIDENCE
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_GRAY } });
  accentBar(s, TEAL);

  sectionLabel(s, "EVIDENCE & OUTCOMES", TEAL);
  slideTitle(s, "Impact of Bundle Compliance on Mortality", 0.28, DARK_NAVY);
  divider(s, 0.88, TEAL);

  const stats = [
    { value: "20–30%", label: "Hospital mortality\n(Robbins Basic Pathology)", color: TEAL },
    { value: "40%", label: "Mortality in septic\nshock (Robbins Cotran)", color: ORANGE },
    { value: "750,000+", label: "Cases per year\nin the USA", color: RED_ALERT },
    { value: "~7%", label: "Absolute mortality\nreduction with bundles", color: GREEN },
  ];

  stats.forEach((stat, i) => {
    const x = 0.25 + i * 2.4;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.0, w: 2.2, h: 1.5,
      fill: { color: WHITE }, line: { color: stat.color, width: 2 }
    });
    s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 2.2, h: 0.12, fill: { color: stat.color } });
    s.addText(stat.value, {
      x: x + 0.05, y: 1.2, w: 2.1, h: 0.7,
      fontSize: 26, bold: true, color: stat.color, align: "center", fontFace: "Calibri", margin: 0
    });
    s.addText(stat.label, {
      x: x + 0.05, y: 1.92, w: 2.1, h: 0.52,
      fontSize: 8.5, color: DARK_NAVY, align: "center", fontFace: "Calibri", margin: 0
    });
  });

  const evidence = [
    {
      title: "Hour-1 Bundle (2018)",
      points: [
        "Combining previous 3-hr and 6-hr bundles into a single 1-hr bundle",
        "Faster completion associated with significantly lower in-hospital mortality",
        "ROSEN's Emergency Medicine: Bundle of antibiotics + fluids + cultures within 1 hr reduced mortality (OR significant)"
      ]
    },
    {
      title: "ANDROMEDA-SHOCK Trial",
      points: [
        "Capillary refill time-guided resuscitation vs lactate-guided",
        "CRT group had non-significant lower 28-day mortality (34.9% vs 43.4%)",
        "Informed the NEW 2021 recommendation for CRT as adjunct perfusion marker"
      ]
    },
    {
      title: "Barriers to Implementation",
      points: [
        "Delayed sepsis recognition — qSOFA and NEWS-2 improve screening",
        "Antibiotic overuse concerns — stewardship protocols address this",
        "Fluid overload in elderly and heart failure patients",
        "Resource limitations in low/middle-income countries"
      ]
    }
  ];

  evidence.forEach((ev, i) => {
    const x = 0.25 + i * 3.2;
    s.addShape(pres.ShapeType.rect, {
      x, y: 2.65, w: 3.1, h: 2.75,
      fill: { color: WHITE }, line: { color: TEAL, width: 1.2 }
    });
    s.addShape(pres.ShapeType.rect, { x, y: 2.65, w: 3.1, h: 0.38, fill: { color: TEAL } });
    s.addText(ev.title, {
      x: x + 0.08, y: 2.7, w: 2.94, h: 0.3,
      fontSize: 9, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
    });
    ev.points.forEach((pt, j) => {
      s.addText("▸  " + pt, {
        x: x + 0.1, y: 3.1 + j * 0.68, w: 2.9, h: 0.62,
        fontSize: 8, color: DARK_NAVY, fontFace: "Calibri", margin: 0
      });
    });
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 13 – QUICK REFERENCE SUMMARY
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkBackground(s);
  accentBar(s, TEAL);

  sectionLabel(s, "QUICK REFERENCE", TEAL);
  slideTitle(s, "Hour-1 Bundle — Bedside Summary Card", 0.28, WHITE);
  divider(s, 0.88, TEAL);

  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.0, w: 9.5, h: 0.5,
    fill: { color: RED_ALERT }
  });
  s.addText("⚠  SEPSIS / SEPTIC SHOCK IDENTIFIED?  →  START THE CLOCK — EVERY MINUTE COUNTS", {
    x: 0.35, y: 1.08, w: 9.2, h: 0.35,
    fontSize: 12, bold: true, color: WHITE, align: "center", fontFace: "Calibri", charSpacing: 1, margin: 0
  });

  const summary = [
    { step: "MEASURE", detail: "Lactate — if >2 mmol/L: repeat in 2h | if >4 mmol/L: septic shock", color: TEAL, t: "⏱ NOW" },
    { step: "OBTAIN", detail: "Blood cultures (≥2 sets) — BEFORE antibiotics", color: ORANGE, t: "⏱ NOW" },
    { step: "GIVE", detail: "IV broad-spectrum antibiotics — within 1h for shock; 3h for possible sepsis", color: RED_ALERT, t: "< 1 HR" },
    { step: "GIVE", detail: "30 mL/kg IV crystalloid (balanced preferred) — within 3h of presentation", color: "5B9BD5", t: "< 3 HR" },
    { step: "APPLY", detail: "Vasopressors (norepinephrine first-line) if MAP <65 mmHg despite fluids — can use peripheral IV", color: GREEN, t: "< 1 HR" },
  ];

  summary.forEach((item, i) => {
    const y = 1.62 + i * 0.74;
    s.addShape(pres.ShapeType.rect, {
      x: 0.25, y, w: 9.5, h: 0.65,
      fill: { color: "152035" }, line: { color: item.color, width: 1.5 }
    });
    s.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 1.2, h: 0.65, fill: { color: item.color } });
    s.addText(item.step, {
      x: 0.25, y: y + 0.17, w: 1.2, h: 0.3,
      fontSize: 10, bold: true, color: WHITE, align: "center", fontFace: "Calibri", charSpacing: 1, margin: 0
    });
    s.addShape(pres.ShapeType.rect, { x: 7.8, y, w: 1.95, h: 0.65, fill: { color: "0D1B2A" } });
    s.addText(item.t, {
      x: 7.85, y: y + 0.17, w: 1.85, h: 0.3,
      fontSize: 10, bold: true, color: item.color, align: "center", fontFace: "Calibri", margin: 0
    });
    s.addText(item.detail, {
      x: 1.55, y: y + 0.13, w: 6.1, h: 0.42,
      fontSize: 9.5, color: WHITE, fontFace: "Calibri", margin: 0
    });
  });

  s.addText("Sepsis Six (Bailey & Love / UK Sepsis Trust):  Give → O₂ | IV Fluids | IV Antibiotics  |  Take → Blood Cultures | FBC | Lactate", {
    x: 0.25, y: 5.35, w: 9.5, h: 0.22,
    fontSize: 8.5, color: TEAL_LIGHT, italic: true, fontFace: "Calibri", align: "center", margin: 0
  });
}

// ─────────────────────────────────────────────────────────────────────────────
// SLIDE 14 – CLOSING / THANK YOU
// ─────────────────────────────────────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkBackground(s);

  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_NAVY } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: TEAL } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.06, fill: { color: TEAL } });

  s.addShape(pres.ShapeType.ellipse, {
    x: -1.2, y: -1.2, w: 5, h: 5,
    fill: { color: MID_NAVY }, line: { color: TEAL, width: 1.5 }
  });

  s.addText("KEY TAKEAWAYS", {
    x: 0.5, y: 0.65, w: 9, h: 0.38,
    fontSize: 10, bold: true, color: TEAL, charSpacing: 4, fontFace: "Calibri", margin: 0
  });

  const takeaways = [
    "Sepsis is a TIME-SENSITIVE emergency — early recognition saves lives",
    "The Hour-1 Bundle: Lactate | Cultures | Antibiotics | 30 mL/kg fluids | Vasopressors",
    "Balanced crystalloids are now preferred over normal saline (SSC 2021)",
    "Norepinephrine is first-line vasopressor; peripheral initiation is now acceptable",
    "Antibiotics: immediately for septic shock; within 3 hrs for possible sepsis",
    "Hydrocortisone 200 mg/day for refractory shock (ongoing vasopressor requirement)",
    "The Sepsis Six (Bailey & Love): Give O₂, fluids, antibiotics — Take cultures, FBC, lactate",
    "Bundle compliance significantly reduces in-hospital mortality",
  ];

  takeaways.forEach((t, i) => {
    s.addShape(pres.ShapeType.ellipse, { x: 0.5, y: 1.12 + i * 0.5, w: 0.18, h: 0.18, fill: { color: TEAL } });
    s.addText(t, {
      x: 0.8, y: 1.08 + i * 0.5, w: 8.8, h: 0.42,
      fontSize: 10.5, color: WHITE, fontFace: "Calibri", margin: 0
    });
  });

  s.addText("References: SSC 2021 Guidelines (Evans et al., Crit Care Med 2021) | SSC Hour-1 Bundle 2018 | Bailey & Love Surgery 28e | Robbins Pathology", {
    x: 0.3, y: 5.26, w: 9.4, h: 0.22,
    fontSize: 7.5, color: DARK_NAVY, fontFace: "Calibri", margin: 0
  });
}

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

cd /home/daytona/workspace/surviving-sepsis-ppt && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/surviving-sepsis-ppt/

Your presentation is ready! Here's the download link:

Surviving Sepsis Campaign Bundles

Presentation · PPTX


What's Inside (14 Slides)

#SlideContent
1Title SlideDark navy theme with teal accents
2Agenda10-topic overview with numbered cards
3What is the SSC?Timeline (2002–2021) + SSC mission & goals
4Sepsis-3 DefinitionsInfection → SIRS → Sepsis → Septic Shock with diagnostic criteria
5Hour-1 BundleAll 5 elements with colour-coded action panels
6Fluid Resuscitation30 mL/kg crystalloid, balanced fluids (2021 update), dynamic assessment
7AntimicrobialsTiming rules, empiric coverage, source control, stewardship
8Vasopressors & SteroidsFull vasopressor table, peripheral IV use (2021 NEW), hydrocortisone, glycaemic control
9Lactate & MonitoringLactate level tiers with actions, resuscitation targets, screening tools
10Sepsis SixBailey & Love / UK Sepsis Trust — Give 3 vs Take 3 side-by-side layout
11SSC 2021 Key UpdatesComparison table vs 2016 (7 new/changed recommendations)
12Outcomes & EvidenceMortality statistics + ANDROMEDA-SHOCK trial + bundle compliance data
13Quick Reference CardBedside summary — colour-coded action steps with time targets
14Key Takeaways8-point summary with references
Sources used: Bailey & Love Surgery 28e, SSC 2021 International Guidelines (Evans et al., Crit Care Med 2021), SSC Hour-1 Bundle 2018, Robbins Pathology.
This is a shared conversation. Sign in to Orris to start your own chat.