kimdly make a ppt for basics of icu care for mbbs students under NMC

Reading File
Reading File
Reading File
Finding Sources
Searching the Web

NMC MBBS curriculum ICU critical care topics 2024

Finding Sources
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"

Running Command

mkdir -p /home/daytona/workspace/icu-basics-ppt && ls /home/daytona/workspace/icu-basics-ppt

Writing File

~/icu-basics-ppt/create_icu_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Basics of ICU Care - MBBS";
pres.author = "NMC CBME Curriculum";
pres.subject = "Critical Care Medicine";

// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const C = {
  navy:     "0B2545",   // dominant dark navy
  teal:     "137B7B",   // supporting teal
  sky:      "1A9BD7",   // accent sky-blue
  white:    "FFFFFF",
  offwhite: "F0F4F8",
  gold:     "F5A623",
  red:      "D62839",
  green:    "1B8A5A",
  gray:     "5A6472",
  lightgray:"C8D3DC",
};

// ─── HELPERS ──────────────────────────────────────────────────────────────────
function addDarkSlide(pres, bg = C.navy) {
  const slide = pres.addSlide();
  slide.background = { color: bg };
  return slide;
}

function addLightSlide(pres) {
  const slide = pres.addSlide();
  slide.background = { color: C.offwhite };
  return slide;
}

// Decorative left accent bar
function accentBar(slide, color = C.teal) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: color }, line: { type: "none" },
  });
}

// Top banner on light slides
function topBanner(slide, title, subtitle = "") {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 1.05, fill: { color: C.navy }, line: { type: "none" },
  });
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 1.05, w: 10, h: 0.07, fill: { color: C.teal }, line: { type: "none" },
  });
  slide.addText(title, {
    x: 0.35, y: 0.08, w: 9.2, h: 0.6, fontSize: 22, bold: true,
    color: C.white, fontFace: "Calibri", margin: 0,
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.35, y: 0.68, w: 9.2, h: 0.35, fontSize: 12,
      color: C.lightgray, fontFace: "Calibri", margin: 0,
    });
  }
}

// Slide number badge
function slideNum(slide, num, total) {
  slide.addText(`${num} / ${total}`, {
    x: 8.8, y: 5.25, w: 1, h: 0.3, fontSize: 9, color: C.lightgray,
    fontFace: "Calibri", align: "right", margin: 0,
  });
}

// ─── SLIDE COUNT (total) ──────────────────────────────────────────────────────
const TOTAL = 20;

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, C.navy);

  // Large teal strip left
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 0.5, h: 5.625, fill: { color: C.teal }, line: { type: "none" },
  });
  // Gold accent strip
  s.addShape(pres.ShapeType.rect, {
    x: 0.5, y: 0, w: 0.06, h: 5.625, fill: { color: C.gold }, line: { type: "none" },
  });

  // Big ECG-style horizontal line
  s.addShape(pres.ShapeType.line, {
    x: 1, y: 3.0, w: 8.5, h: 0, line: { color: C.teal, width: 1.5, dashType: "dash" },
  });

  s.addText("BASICS OF", {
    x: 1, y: 0.55, w: 8.5, h: 0.55, fontSize: 20, bold: false,
    color: C.lightgray, fontFace: "Calibri", charSpacing: 8, margin: 0,
  });
  s.addText("ICU CARE", {
    x: 1, y: 1.05, w: 8.5, h: 1.2, fontSize: 68, bold: true,
    color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText("Intensive Care Unit – Fundamentals for MBBS Students", {
    x: 1, y: 2.25, w: 8.5, h: 0.5, fontSize: 15,
    color: C.sky, fontFace: "Calibri", margin: 0,
  });

  s.addShape(pres.ShapeType.rect, {
    x: 1, y: 3.15, w: 8.5, h: 0.04, fill: { color: C.teal }, line: { type: "none" },
  });

  s.addText([
    { text: "NMC CBME Curriculum  |  ", options: { bold: true } },
    { text: "Department of Medicine / Critical Care", options: {} },
  ], {
    x: 1, y: 3.35, w: 8.5, h: 0.4, fontSize: 13,
    color: C.lightgray, fontFace: "Calibri", margin: 0,
  });

  s.addText("National Medical Commission – Competency Based Medical Education", {
    x: 1, y: 4.85, w: 8.5, h: 0.35, fontSize: 10,
    color: C.gray, fontFace: "Calibri", margin: 0,
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – TABLE OF CONTENTS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, "102232");
  accentBar(s, C.gold);

  s.addText("Contents", {
    x: 0.5, y: 0.2, w: 9, h: 0.6, fontSize: 28, bold: true,
    color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.5, y: 0.85, w: 2.5, h: 0.05, fill: { color: C.teal }, line: { type: "none" },
  });

  const topics = [
    ["01", "What is ICU & Why It Matters"],
    ["02", "ICU Team & Patient Selection"],
    ["03", "Monitoring – Vital Signs & Scoring"],
    ["04", "Airway Management & Oxygen Therapy"],
    ["05", "Mechanical Ventilation Basics"],
    ["06", "Hemodynamic Monitoring & Shock"],
    ["07", "Fluid Therapy & Vasopressors"],
    ["08", "Sepsis & Septic Shock"],
    ["09", "Renal Failure & Nutrition in ICU"],
    ["10", "Infection Control, Ethics & Communication"],
  ];

  topics.forEach(([num, title], i) => {
    const col = i < 5 ? 0 : 1;
    const row = i % 5;
    const x = col === 0 ? 0.5 : 5.25;
    const y = 1.1 + row * 0.83;

    s.addShape(pres.ShapeType.rect, {
      x, y, w: 0.45, h: 0.45, fill: { color: C.teal }, line: { type: "none" },
      rectRadius: 0.05,
    });
    s.addText(num, {
      x: x, y: y + 0.02, w: 0.45, h: 0.4, fontSize: 12, bold: true,
      color: C.white, fontFace: "Calibri", align: "center", margin: 0,
    });
    s.addText(title, {
      x: x + 0.55, y: y + 0.04, w: 4.2, h: 0.38, fontSize: 13,
      color: C.offwhite, fontFace: "Calibri", margin: 0,
    });
  });

  slideNum(s, 2, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – WHAT IS ICU?
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "What is an Intensive Care Unit (ICU)?", "Definition & Purpose");
  accentBar(s, C.sky);

  const boxes = [
    { title: "Definition", body: "A specialised hospital ward providing continuous monitoring and life support for critically ill patients with single or multiple organ failure.", color: C.navy },
    { title: "Purpose", body: "To prevent death, support failing organs, treat reversible illness, and bridge patients until recovery or definitive treatment.", color: C.teal },
    { title: "Types of ICU", body: "• General Medical/Surgical ICU\n• Cardiac Care Unit (CCU)\n• Neurological ICU (NICU)\n• Neonatal ICU (NICU)\n• Paediatric ICU (PICU)\n• Respiratory ICU", color: C.sky },
  ];

  boxes.forEach((b, i) => {
    const x = 0.3 + i * 3.22;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.25, w: 3.0, h: 3.9, fill: { color: b.color }, line: { type: "none" },
      rectRadius: 0.1,
    });
    s.addText(b.title, {
      x: x + 0.15, y: 1.35, w: 2.7, h: 0.5, fontSize: 15, bold: true,
      color: C.white, fontFace: "Calibri", margin: 0,
    });
    s.addShape(pres.ShapeType.line, {
      x: x + 0.15, y: 1.87, w: 2.7, h: 0, line: { color: "FFFFFF", width: 1.0, transparency: 50 },
    });
    s.addText(b.body, {
      x: x + 0.12, y: 1.95, w: 2.76, h: 3.0, fontSize: 12,
      color: C.offwhite, fontFace: "Calibri", margin: 0,
    });
  });

  slideNum(s, 3, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – ICU ADMISSION CRITERIA
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "ICU Admission Criteria", "Priority-Based Triage (NMC Competency: AN71.1, IM8.7)");
  accentBar(s, C.red);

  const priorities = [
    { pri: "Priority 1", color: C.red, text: "Critically ill, haemodynamically unstable. Need immediate monitoring & intervention.\nExamples: cardiogenic shock, ARDS, status epilepticus, severe sepsis." },
    { pri: "Priority 2", color: C.gold, text: "High risk of deterioration. Intensive monitoring required.\nExamples: post-major surgery, large MI with no shock, DKA with altered consciousness." },
    { pri: "Priority 3", color: C.green, text: "Critically ill but poor prognosis. ICU admission conditional.\nExamples: metastatic malignancy with sepsis, end-stage organ failure." },
    { pri: "Priority 4", color: C.gray, text: "Inappropriate for ICU (too well or too ill, no benefit expected).\nExamples: terminal cancer, brainstem death with no plans for organ donation." },
  ];

  priorities.forEach((p, i) => {
    const y = 1.25 + i * 1.0;
    s.addShape(pres.ShapeType.rect, {
      x: 0.35, y, w: 1.6, h: 0.72, fill: { color: p.color }, line: { type: "none" }, rectRadius: 0.07,
    });
    s.addText(p.pri, {
      x: 0.35, y: y + 0.1, w: 1.6, h: 0.5, fontSize: 13, bold: true,
      color: C.white, fontFace: "Calibri", align: "center", margin: 0,
    });
    s.addText(p.text, {
      x: 2.1, y: y + 0.04, w: 7.55, h: 0.65, fontSize: 12,
      color: C.navy, fontFace: "Calibri", margin: 0,
    });
  });

  slideNum(s, 4, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – ICU TEAM
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "The ICU Multidisciplinary Team", "Roles & Responsibilities");
  accentBar(s, C.teal);

  const members = [
    { role: "Intensivist", desc: "Specialist physician overseeing all ICU patients; leads daily rounds, manages complex decisions.", icon: "👨‍⚕️" },
    { role: "ICU Nurse", desc: "1:1 or 1:2 nurse-patient ratio; continuous bedside monitoring, medication administration.", icon: "👩‍⚕️" },
    { role: "Respiratory Therapist", desc: "Manages mechanical ventilators, weaning protocols, nebulisations.", icon: "🫁" },
    { role: "Pharmacist", desc: "Medication reconciliation, TPN formulations, antibiotic stewardship.", icon: "💊" },
    { role: "Physiotherapist", desc: "Early mobilisation, chest physiotherapy, preventing muscle wasting.", icon: "🏃" },
    { role: "Dietitian / Nutritionist", desc: "Enteral/parenteral nutrition planning, caloric calculations.", icon: "🥗" },
  ];

  members.forEach((m, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col * 3.22;
    const y = 1.25 + row * 1.95;

    s.addShape(pres.ShapeType.rect, {
      x, y, w: 3.0, h: 1.75, fill: { color: row === 0 ? C.navy : C.teal }, line: { type: "none" }, rectRadius: 0.1,
    });
    s.addText(m.icon + "  " + m.role, {
      x: x + 0.12, y: y + 0.1, w: 2.76, h: 0.45, fontSize: 14, bold: true,
      color: C.white, fontFace: "Calibri", margin: 0,
    });
    s.addText(m.desc, {
      x: x + 0.12, y: y + 0.55, w: 2.76, h: 1.1, fontSize: 11,
      color: C.offwhite, fontFace: "Calibri", margin: 0,
    });
  });

  slideNum(s, 5, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – MONITORING: VITAL SIGNS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "ICU Monitoring – Vital Signs & Parameters", "Continuous Assessment (NMC Competency: IM8.3)");
  accentBar(s, C.sky);

  const params = [
    { label: "Heart Rate", normal: "60-100 bpm", alarm: "< 40 or > 150 bpm" },
    { label: "Blood Pressure", normal: "SBP 90-140 mmHg", alarm: "MAP < 65 mmHg" },
    { label: "SpO₂", normal: "≥ 95%", alarm: "< 90%" },
    { label: "Respiratory Rate", normal: "12-20 /min", alarm: "< 8 or > 35 /min" },
    { label: "Temperature", normal: "36.5 – 37.5°C", alarm: "< 35 or > 39.5°C" },
    { label: "Urine Output", normal: "≥ 0.5 mL/kg/hr", alarm: "< 0.3 mL/kg/hr" },
    { label: "GCS (neuro)", normal: "15", alarm: "≤ 8 (consider intubation)" },
    { label: "Blood Sugar", normal: "140-180 mg/dL (ICU)", alarm: "< 70 or > 250 mg/dL" },
  ];

  // Header row
  const headerY = 1.2;
  [["Parameter", 0.35, 2.5], ["Normal Range", 2.9, 3.0], ["Alarm Threshold", 5.95, 3.6]].forEach(([txt, x, w]) => {
    s.addShape(pres.ShapeType.rect, { x, y: headerY, w, h: 0.42, fill: { color: C.navy }, line: { type: "none" } });
    s.addText(txt, { x, y: headerY + 0.04, w, h: 0.35, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
  });

  params.forEach((p, i) => {
    const y = 1.65 + i * 0.48;
    const bg = i % 2 === 0 ? "E8F0F7" : C.white;
    s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 9.2, h: 0.46, fill: { color: bg }, line: { type: "none" } });
    s.addText(p.label, { x: 0.45, y: y + 0.07, w: 2.4, h: 0.32, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
    s.addText(p.normal, { x: 2.9, y: y + 0.07, w: 2.95, h: 0.32, fontSize: 12, color: C.teal, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(p.alarm, { x: 5.95, y: y + 0.07, w: 3.5, h: 0.32, fontSize: 12, color: C.red, fontFace: "Calibri", align: "center", margin: 0 });
  });

  slideNum(s, 6, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – SEVERITY SCORING
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, "0D2438");
  accentBar(s, C.gold);

  s.addText("ICU Severity Scoring Systems", {
    x: 0.5, y: 0.15, w: 9, h: 0.6, fontSize: 26, bold: true,
    color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.8, w: 9, h: 0.04, fill: { color: C.gold }, line: { type: "none" } });

  const scores = [
    {
      name: "APACHE II",
      full: "Acute Physiology And Chronic Health Evaluation II",
      vars: "12 acute physiology variables + age + chronic health",
      range: "0 – 71",
      use: "Predicts hospital mortality; score > 25 = high mortality",
      color: C.sky,
    },
    {
      name: "SOFA",
      full: "Sequential Organ Failure Assessment",
      vars: "6 organs: Respiratory, Coagulation, Liver, CVS, CNS, Renal",
      range: "0 – 24",
      use: "Quantifies organ dysfunction; also defines sepsis (SOFA ≥ 2)",
      color: C.teal,
    },
    {
      name: "GCS",
      full: "Glasgow Coma Scale",
      vars: "Eye (E1-4) + Verbal (V1-5) + Motor (M1-6)",
      range: "3 – 15",
      use: "Neurological assessment; ≤ 8 indicates coma, need to secure airway",
      color: C.gold,
    },
  ];

  scores.forEach((sc, i) => {
    const y = 1.0 + i * 1.48;
    s.addShape(pres.ShapeType.rect, { x: 0.5, y, w: 9, h: 1.32, fill: { color: "1A2E42" }, line: { color: sc.color, width: 1.5 }, rectRadius: 0.08 });
    s.addShape(pres.ShapeType.rect, { x: 0.5, y, w: 1.4, h: 1.32, fill: { color: sc.color }, line: { type: "none" }, rectRadius: 0.08 });
    s.addText(sc.name, { x: 0.5, y: y + 0.38, w: 1.4, h: 0.5, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(sc.full, { x: 2.05, y: y + 0.08, w: 7.2, h: 0.35, fontSize: 12, bold: true, color: sc.color, fontFace: "Calibri", margin: 0 });
    s.addText(`Variables: ${sc.vars}`, { x: 2.05, y: y + 0.42, w: 7.2, h: 0.3, fontSize: 11, color: C.lightgray, fontFace: "Calibri", margin: 0 });
    s.addText(`Range: ${sc.range}  |  Use: ${sc.use}`, { x: 2.05, y: y + 0.74, w: 7.2, h: 0.45, fontSize: 11, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });

  slideNum(s, 7, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – AIRWAY MANAGEMENT
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "Airway Management in ICU", "From Basic to Advanced (NMC: AN29.3, SU17.2)");
  accentBar(s, C.red);

  // Left column - ladder
  const steps = [
    { step: "Step 1", label: "Positioning & Jaw Thrust / Chin Lift", color: C.green },
    { step: "Step 2", label: "Oropharyngeal / Nasopharyngeal Airway", color: C.teal },
    { step: "Step 3", label: "Oxygen Mask / Non-Rebreather Mask", color: C.sky },
    { step: "Step 4", label: "Bag-Valve-Mask (BVM) Ventilation", color: C.gold },
    { step: "Step 5", label: "Endotracheal Intubation (ETT)", color: C.red },
    { step: "Step 6", label: "Surgical Airway (Cricothyrotomy)", color: "8B0000" },
  ];

  steps.forEach((st, i) => {
    const y = 1.2 + i * 0.69;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.2, h: 0.52, fill: { color: st.color }, line: { type: "none" }, rectRadius: 0.05 });
    s.addText(st.step, { x: 0.3, y: y + 0.08, w: 1.2, h: 0.36, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addShape(pres.ShapeType.rect, { x: 1.6, y: y + 0.06, w: 4.0, h: 0.42, fill: { color: "E8F0F7" }, line: { type: "none" }, rectRadius: 0.04 });
    s.addText(st.label, { x: 1.72, y: y + 0.1, w: 3.75, h: 0.34, fontSize: 12, color: C.navy, fontFace: "Calibri", margin: 0 });
  });

  // Right column - Intubation tips box
  s.addShape(pres.ShapeType.rect, { x: 5.9, y: 1.18, w: 3.75, h: 4.2, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.1 });
  s.addText("Endotracheal Intubation\n– Key Points", { x: 6.05, y: 1.28, w: 3.45, h: 0.65, fontSize: 14, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  const tips = [
    "Pre-oxygenate: SpO₂ ≥ 95% before attempt",
    "Rapid Sequence Intubation (RSI): Fentanyl + Propofol + Succinylcholine",
    "Confirm with: Capnography + bilateral chest auscultation",
    "Tube position: Tip 2–3 cm above carina (confirm on CXR)",
    "Cuff pressure: 20–30 cmH₂O",
    "Fix tube at 21–23 cm at lip (adult)",
    "Daily re-assess for extubation readiness",
  ];
  tips.forEach((t, i) => {
    s.addText("• " + t, { x: 6.05, y: 2.0 + i * 0.47, w: 3.45, h: 0.43, fontSize: 11, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });

  slideNum(s, 8, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – OXYGEN THERAPY
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "Oxygen Therapy in ICU", "Devices, Flow Rates & Targets");
  accentBar(s, C.sky);

  const devices = [
    { dev: "Nasal Cannula", flow: "1–6 L/min", fio2: "24–44%", use: "Mild hypoxaemia, comfortable" },
    { dev: "Simple Face Mask", flow: "5–10 L/min", fio2: "35–55%", use: "Moderate hypoxaemia" },
    { dev: "Venturi Mask", flow: "2–15 L/min", fio2: "24, 28, 35, 40, 60%", use: "COPD – precise FiO₂ needed" },
    { dev: "Non-Rebreather Mask", flow: "10–15 L/min", fio2: "60–90%", use: "Severe hypoxaemia, near 100% O₂" },
    { dev: "HFNO (High-Flow Nasal O₂)", flow: "20–60 L/min", fio2: "21–100%", use: "ARDS, COVID-19, avoids intubation" },
    { dev: "NIV (BiPAP/CPAP)", flow: "Variable", fio2: "21–100%", use: "COPD exacerbation, pulm. oedema" },
    { dev: "Mechanical Ventilator", flow: "Variable", fio2: "21–100%", use: "Respiratory failure, need for sedation" },
  ];

  const headerY = 1.2;
  [["Device", 0.3, 2.5], ["Flow Rate", 2.85, 1.7], ["FiO₂", 4.6, 1.6], ["Clinical Use", 6.25, 3.4]].forEach(([txt, x, w]) => {
    s.addShape(pres.ShapeType.rect, { x, y: headerY, w, h: 0.4, fill: { color: C.navy }, line: { type: "none" } });
    s.addText(txt, { x, y: headerY + 0.04, w, h: 0.32, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
  });

  devices.forEach((d, i) => {
    const y = 1.63 + i * 0.53;
    const bg = i % 2 === 0 ? "E8F4FB" : C.white;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.35, h: 0.51, fill: { color: bg }, line: { type: "none" } });
    s.addText(d.dev, { x: 0.38, y: y + 0.09, w: 2.4, h: 0.34, fontSize: 11, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
    s.addText(d.flow, { x: 2.85, y: y + 0.09, w: 1.6, h: 0.34, fontSize: 11, color: C.teal, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(d.fio2, { x: 4.6, y: y + 0.09, w: 1.55, h: 0.34, fontSize: 11, color: C.sky, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(d.use, { x: 6.25, y: y + 0.09, w: 3.35, h: 0.34, fontSize: 11, color: C.gray, fontFace: "Calibri", margin: 0 });
  });

  slideNum(s, 9, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – MECHANICAL VENTILATION BASICS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, "0B1E30");
  accentBar(s, C.sky);

  s.addText("Mechanical Ventilation – Basics", {
    x: 0.5, y: 0.15, w: 9, h: 0.65, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.82, w: 9, h: 0.04, fill: { color: C.sky }, line: { type: "none" } });

  // Indications
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.0, w: 4.55, h: 2.0, fill: { color: "1A3050" }, line: { type: "none" }, rectRadius: 0.1 });
  s.addText("Indications for Intubation", { x: 0.45, y: 1.05, w: 4.2, h: 0.4, fontSize: 14, bold: true, color: C.sky, fontFace: "Calibri", margin: 0 });
  ["Apnoea or severe hypoventilation", "GCS ≤ 8 (airway protection)", "Refractory hypoxaemia (SpO₂ < 90% on high O₂)", "Respiratory failure Type I or II", "Impending airway obstruction"].forEach((t, i) => {
    s.addText("• " + t, { x: 0.45, y: 1.5 + i * 0.3, w: 4.2, h: 0.28, fontSize: 11, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });

  // Modes
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.0, w: 4.6, h: 2.0, fill: { color: "1A3050" }, line: { type: "none" }, rectRadius: 0.1 });
  s.addText("Common Ventilator Modes", { x: 5.25, y: 1.05, w: 4.2, h: 0.4, fontSize: 14, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  [
    ["AC/VC", "Assist-Control Volume Control – full support"],
    ["SIMV", "Synchronised Intermittent Mandatory Vent."],
    ["PSV", "Pressure Support – weaning mode"],
    ["CPAP/BiPAP", "Non-invasive support"],
  ].forEach(([mode, desc], i) => {
    s.addText([
      { text: mode + ": ", options: { bold: true, color: C.gold } },
      { text: desc, options: { color: C.offwhite } },
    ], { x: 5.25, y: 1.5 + i * 0.37, w: 4.3, h: 0.33, fontSize: 11, fontFace: "Calibri", margin: 0 });
  });

  // Key settings
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.15, w: 9.4, h: 2.2, fill: { color: "1A3050" }, line: { type: "none" }, rectRadius: 0.1 });
  s.addText("Key Ventilator Settings (Lung-Protective Strategy – ARDS)", { x: 0.45, y: 3.2, w: 9.1, h: 0.4, fontSize: 14, bold: true, color: C.sky, fontFace: "Calibri", margin: 0 });
  const settings = [
    ["Tidal Volume (VT)", "6 mL/kg Ideal Body Weight"],
    ["PEEP", "5–15 cmH₂O (maintains alveolar recruitment)"],
    ["FiO₂", "Titrate to SpO₂ 88–95%"],
    ["Respiratory Rate", "12–20 /min"],
    ["Plateau Pressure", "< 30 cmH₂O"],
    ["I:E Ratio", "1:2 (normal), 1:3 in COPD"],
  ];
  settings.forEach((st, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.45 : 5.2;
    s.addText([
      { text: st[0] + ": ", options: { bold: true, color: C.gold } },
      { text: st[1], options: { color: C.offwhite } },
    ], { x, y: 3.7 + row * 0.42, w: 4.5, h: 0.38, fontSize: 11, fontFace: "Calibri", margin: 0 });
  });

  slideNum(s, 10, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – HEMODYNAMIC MONITORING & SHOCK
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "Hemodynamic Monitoring & Shock", "Recognition & Approach (NMC Competency: IM8.5)");
  accentBar(s, C.red);

  // Shock types
  const shocks = [
    { type: "Distributive", eg: "Septic, Anaphylactic, Neurogenic", mechanism: "↓SVR, maldistribution of flow", HR: "↑", BP: "↓", CO: "↑", SVR: "↓↓", color: C.red },
    { type: "Cardiogenic", eg: "MI, Arrhythmia, Myocarditis", mechanism: "Pump failure: ↓CO despite ↑filling", HR: "↑", BP: "↓", CO: "↓↓", SVR: "↑", color: C.sky },
    { type: "Hypovolemic", eg: "Haemorrhage, Burns, Dehydration", mechanism: "↓Preload → ↓CO", HR: "↑", BP: "↓", CO: "↓", SVR: "↑", color: C.gold },
    { type: "Obstructive", eg: "PE, Tension Pneumothorax, Cardiac Tamponade", mechanism: "Mechanical obstruction to flow", HR: "↑", BP: "↓", CO: "↓", SVR: "↑", color: C.teal },
  ];

  // Table header
  const cols = [["Shock Type", 0.3, 1.9], ["Example", 2.25, 2.3], ["Mechanism", 4.6, 2.2], ["HR", 6.85, 0.55], ["BP", 7.45, 0.55], ["CO", 8.05, 0.55], ["SVR", 8.65, 0.9]];
  cols.forEach(([txt, x, w]) => {
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w, h: 0.42, fill: { color: C.navy }, line: { type: "none" } });
    s.addText(txt, { x: x + 0.04, y: 1.24, w: w - 0.08, h: 0.34, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
  });

  shocks.forEach((sh, i) => {
    const y = 1.65 + i * 0.75;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.25, h: 0.7, fill: { color: i % 2 === 0 ? "EEF3F8" : C.white }, line: { type: "none" } });
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.18, h: 0.7, fill: { color: sh.color }, line: { type: "none" } });
    s.addText(sh.type, { x: 0.55, y: y + 0.17, w: 1.62, h: 0.36, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });
    s.addText(sh.eg, { x: 2.25, y: y + 0.1, w: 2.25, h: 0.52, fontSize: 10, color: C.gray, fontFace: "Calibri", margin: 0 });
    s.addText(sh.mechanism, { x: 4.6, y: y + 0.1, w: 2.15, h: 0.52, fontSize: 10, color: C.gray, fontFace: "Calibri", margin: 0 });
    [sh.HR, sh.BP, sh.CO, sh.SVR].forEach((val, j) => {
      const xv = [6.85, 7.45, 8.05, 8.65][j];
      const wv = [0.55, 0.55, 0.55, 0.9][j];
      s.addText(val, { x: xv, y: y + 0.17, w: wv, h: 0.36, fontSize: 12, bold: true, color: val.includes("↓") ? C.red : C.green, fontFace: "Calibri", align: "center", margin: 0 });
    });
  });

  // MAP target note
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.95, w: 9.25, h: 0.45, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.06 });
  s.addText("Target MAP ≥ 65 mmHg in shock  |  Lactate < 2 mmol/L  |  Urine output ≥ 0.5 mL/kg/hr as resuscitation endpoints", {
    x: 0.45, y: 5.0, w: 9.0, h: 0.35, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", align: "center", margin: 0,
  });

  slideNum(s, 11, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – FLUID THERAPY & VASOPRESSORS
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "Fluid Therapy & Vasopressors in ICU", "Resuscitation Principles");
  accentBar(s, C.teal);

  // Left: Fluid therapy
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 4.5, h: 4.1, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.1 });
  s.addText("Fluid Therapy", { x: 0.45, y: 1.28, w: 4.1, h: 0.45, fontSize: 16, bold: true, color: C.sky, fontFace: "Calibri", margin: 0 });

  const fluids = [
    ["Normal Saline (0.9%)", "Isotonic; caution: hyperchloraemic acidosis"],
    ["Ringer's Lactate", "Preferred balanced crystalloid"],
    ["5% Dextrose", "Hypotonic; avoid for resuscitation"],
    ["Colloids (Albumin 4%)", "Volume expansion; used in hypoalbuminaemia"],
    ["Blood Products", "pRBC if Hb < 7 g/dL (< 10 if cardiac)"],
  ];
  fluids.forEach(([name, note], i) => {
    s.addText(name, { x: 0.48, y: 1.85 + i * 0.63, w: 4.0, h: 0.28, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
    s.addText(note, { x: 0.48, y: 2.13 + i * 0.63, w: 4.0, h: 0.3, fontSize: 11, color: C.lightgray, fontFace: "Calibri", margin: 0 });
  });

  // Right: Vasopressors
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.2, w: 4.55, h: 4.1, fill: { color: "0D2438" }, line: { type: "none" }, rectRadius: 0.1 });
  s.addText("Vasopressors / Inotropes", { x: 5.25, y: 1.28, w: 4.2, h: 0.45, fontSize: 16, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });

  const vasopressors = [
    { drug: "Norepinephrine", dose: "0.01–3 mcg/kg/min", note: "1st line in septic shock (alpha>beta)" },
    { drug: "Vasopressin", dose: "0.01–0.04 U/min", note: "Adjunct to NE; preserves vasopressin deficiency" },
    { drug: "Dopamine", dose: "5–20 mcg/kg/min", note: "Dose-dependent effects; less preferred" },
    { drug: "Epinephrine", dose: "0.01–1 mcg/kg/min", note: "Anaphylaxis; cardiac arrest; cardiogenic shock" },
    { drug: "Dobutamine", dose: "2.5–20 mcg/kg/min", note: "Inotrope – cardiogenic shock; ↑CO" },
  ];
  vasopressors.forEach((v, i) => {
    s.addText(v.drug, { x: 5.28, y: 1.85 + i * 0.63, w: 4.2, h: 0.28, fontSize: 12, bold: true, color: C.sky, fontFace: "Calibri", margin: 0 });
    s.addText(`${v.dose}  –  ${v.note}`, { x: 5.28, y: 2.13 + i * 0.63, w: 4.2, h: 0.3, fontSize: 10, color: C.lightgray, fontFace: "Calibri", margin: 0 });
  });

  slideNum(s, 12, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – SEPSIS & SEPTIC SHOCK
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, "180A0A");
  accentBar(s, C.red);

  s.addText("Sepsis & Septic Shock", {
    x: 0.5, y: 0.15, w: 9, h: 0.65, fontSize: 28, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.83, w: 9, h: 0.04, fill: { color: C.red }, line: { type: "none" } });

  // Definitions
  const defs = [
    { term: "Sepsis", def: "Life-threatening organ dysfunction caused by a dysregulated host response to infection. SOFA score increase ≥ 2 points.", color: C.gold },
    { term: "Septic Shock", def: "Subset of sepsis with circulatory & cellular/metabolic abnormalities. MAP < 65 despite adequate fluids + vasopressor need + lactate > 2 mmol/L.", color: C.red },
    { term: "qSOFA", def: "Bedside screening: Altered mentation + RR ≥ 22/min + SBP ≤ 100 mmHg. Score ≥ 2 = high risk. Use outside ICU.", color: C.sky },
  ];

  defs.forEach((d, i) => {
    s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.0 + i * 1.1, w: 9.3, h: 0.98, fill: { color: "2A1010" }, line: { color: d.color, width: 1.5 }, rectRadius: 0.08 });
    s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.0 + i * 1.1, w: 1.5, h: 0.98, fill: { color: d.color }, line: { type: "none" }, rectRadius: 0.08 });
    s.addText(d.term, { x: 0.3, y: 1.22 + i * 1.1, w: 1.5, h: 0.5, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(d.def, { x: 1.95, y: 1.05 + i * 1.1, w: 7.5, h: 0.9, fontSize: 12, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });

  // Surviving Sepsis - Hour-1 Bundle
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.35, w: 9.3, h: 1.05, fill: { color: "2A1010" }, line: { color: C.gold, width: 1.5 }, rectRadius: 0.08 });
  s.addText("Surviving Sepsis Campaign – Hour-1 Bundle:", { x: 0.45, y: 4.4, w: 9.1, h: 0.35, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  s.addText("1. Measure lactate  2. Blood cultures before antibiotics  3. Broad-spectrum antibiotics within 1 hour  4. 30 mL/kg crystalloid for hypotension/lactate ≥ 4  5. Vasopressors if MAP < 65 after fluids", {
    x: 0.45, y: 4.78, w: 9.1, h: 0.55, fontSize: 11, color: C.offwhite, fontFace: "Calibri", margin: 0,
  });

  slideNum(s, 13, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – RENAL FAILURE IN ICU
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "Acute Kidney Injury (AKI) in ICU", "KDIGO Criteria & Management");
  accentBar(s, C.sky);

  // Left column
  s.addText("KDIGO AKI Staging", { x: 0.3, y: 1.25, w: 4.5, h: 0.42, fontSize: 16, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });

  const stages = [
    { stage: "Stage 1", scr: "1.5–1.9× baseline OR ≥ 0.3 mg/dL rise", uo: "< 0.5 mL/kg/h × 6–12 h" },
    { stage: "Stage 2", scr: "2.0–2.9× baseline", uo: "< 0.5 mL/kg/h × ≥ 12 h" },
    { stage: "Stage 3", scr: "≥ 3× baseline OR ≥ 4 mg/dL OR RRT", uo: "< 0.3 mL/kg/h × ≥ 24 h OR anuria ≥ 12 h" },
  ];
  const stageColors = [C.gold, C.red, "8B0000"];
  stages.forEach((st, i) => {
    const y = 1.75 + i * 1.05;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 4.5, h: 0.95, fill: { color: i % 2 === 0 ? "EEF3F8" : "E0EAF3" }, line: { type: "none" }, rectRadius: 0.06 });
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.15, h: 0.95, fill: { color: stageColors[i] }, line: { type: "none" } });
    s.addText(st.stage, { x: 0.53, y: y + 0.08, w: 1.1, h: 0.35, fontSize: 13, bold: true, color: stageColors[i], fontFace: "Calibri", margin: 0 });
    s.addText("SCr: " + st.scr, { x: 0.53, y: y + 0.42, w: 4.2, h: 0.28, fontSize: 10, color: C.gray, fontFace: "Calibri", margin: 0 });
    s.addText("UO: " + st.uo, { x: 0.53, y: y + 0.65, w: 4.2, h: 0.26, fontSize: 10, color: C.gray, fontFace: "Calibri", italic: true, margin: 0 });
  });

  // Right column
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.2, w: 4.55, h: 3.95, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.1 });
  s.addText("ICU AKI Management", { x: 5.25, y: 1.28, w: 4.2, h: 0.42, fontSize: 15, bold: true, color: C.sky, fontFace: "Calibri", margin: 0 });
  [
    "Identify & treat cause (pre-renal, renal, post-renal)",
    "Optimise haemodynamics: MAP ≥ 65 mmHg",
    "Stop nephrotoxic drugs (NSAIDs, aminoglycosides, contrast)",
    "Fluid resuscitation if pre-renal",
    "Avoid over/under-diuresis",
    "Monitor electrolytes (K⁺, Na⁺, HCO₃⁻, phosphate)",
    "Renal Replacement Therapy (CRRT/IHD) indications:\n  • Severe acidosis (pH < 7.1)\n  • Refractory hyperkalemia (K⁺ > 6.5)\n  • Severe fluid overload\n  • Uraemic encephalopathy",
  ].forEach((t, i) => {
    s.addText("• " + t, { x: 5.25, y: 1.8 + i * 0.47, w: 4.25, h: 0.44, fontSize: 11, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });

  slideNum(s, 14, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – NUTRITION IN ICU
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "Nutrition Support in ICU", "Early & Goal-Directed Feeding");
  accentBar(s, C.green);

  // 2 columns
  const leftBoxes = [
    { title: "Why Nutrition Matters in ICU", items: ["Prevents muscle catabolism & ICU-acquired weakness", "Supports immune function & wound healing", "Reduces infections & length of ICU stay", "Maintains gut mucosal integrity (EN route)"] },
    { title: "Caloric Requirements", items: ["Energy: 25–30 kcal/kg/day (non-obese)", "Protein: 1.2–2.0 g/kg/day", "Carbohydrates: 50–60% of calories", "Lipids: 20–35%", "Target blood glucose: 140–180 mg/dL"] },
  ];
  leftBoxes.forEach((b, i) => {
    const y = 1.2 + i * 2.0;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 4.5, h: 1.82, fill: { color: i === 0 ? C.navy : "1B4030" }, line: { type: "none" }, rectRadius: 0.1 });
    s.addText(b.title, { x: 0.45, y: y + 0.1, w: 4.2, h: 0.42, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
    b.items.forEach((item, j) => {
      s.addText("• " + item, { x: 0.45, y: y + 0.55 + j * 0.31, w: 4.2, h: 0.29, fontSize: 11, color: C.offwhite, fontFace: "Calibri", margin: 0 });
    });
  });

  // Right: EN vs PN comparison
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.2, w: 4.55, h: 4.1, fill: { color: C.offwhite }, line: { color: C.teal, width: 1.5 }, rectRadius: 0.1 });
  s.addText("Enteral (EN) vs Parenteral (PN) Nutrition", { x: 5.25, y: 1.28, w: 4.2, h: 0.5, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri", margin: 0 });

  [[C.teal, "Enteral Nutrition (EN) – PREFERRED"], ["8B0000", "Parenteral Nutrition (PN) – Backup"]].forEach(([col, head], j) => {
    const y2 = 1.85 + j * 1.95;
    s.addShape(pres.ShapeType.rect, { x: 5.25, y: y2, w: 4.2, h: 0.38, fill: { color: col }, line: { type: "none" }, rectRadius: 0.05 });
    s.addText(head, { x: 5.3, y: y2 + 0.05, w: 4.1, h: 0.28, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", margin: 0 });
    const items = j === 0
      ? ["Start within 24–48 hrs if haemodynamically stable", "Maintains gut flora & barrier", "Nasogastric (NGT) or nasoduodenal tube", "Check residual volume if on opioids"]
      : ["Use if EN not tolerated > 7 days", "Higher infection & line-related risks", "Requires central venous access", "Strict glucose monitoring essential"];
    items.forEach((it, k) => {
      s.addText("• " + it, { x: 5.28, y: y2 + 0.45 + k * 0.36, w: 4.15, h: 0.34, fontSize: 10.5, color: C.navy, fontFace: "Calibri", margin: 0 });
    });
  });

  slideNum(s, 15, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – INFECTION CONTROL IN ICU
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, "0A1F0A");
  accentBar(s, C.green);

  s.addText("Infection Control & Prevention in ICU", {
    x: 0.5, y: 0.15, w: 9, h: 0.65, fontSize: 25, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.83, w: 9, h: 0.04, fill: { color: C.green }, line: { type: "none" } });

  const bundles = [
    {
      title: "VAP Prevention Bundle (Ventilator-Associated Pneumonia)",
      color: C.sky,
      items: ["Head of bed elevation 30–45°", "Daily interruption of sedation + SBT (Spontaneous Breathing Trial)", "Oral hygiene with chlorhexidine", "Stress ulcer prophylaxis (PPI/H2RA)", "DVT prophylaxis (LMWH + compression stockings)", "Subglottic secretion drainage ETT"],
    },
    {
      title: "CLABSI Prevention (Central-Line Associated Bloodstream Infection)",
      color: C.gold,
      items: ["Full sterile barrier during CVC insertion", "Chlorhexidine skin antisepsis", "Subclavian preferred site (lowest infection)", "Daily review: Is catheter still needed?", "Remove catheters when no longer needed"],
    },
    {
      title: "CAUTI Prevention (Catheter-Associated UTI)",
      color: C.teal,
      items: ["Insert catheter only when indicated", "Maintain closed drainage system", "Daily review of catheter necessity", "Perineal hygiene & aseptic insertion"],
    },
  ];

  bundles.forEach((b, i) => {
    const y = 1.0 + i * 1.52;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.3, h: 1.4, fill: { color: "0D2010" }, line: { color: b.color, width: 1.2 }, rectRadius: 0.08 });
    s.addText(b.title, { x: 0.45, y: y + 0.07, w: 9.1, h: 0.38, fontSize: 13, bold: true, color: b.color, fontFace: "Calibri", margin: 0 });
    const half = Math.ceil(b.items.length / 2);
    b.items.slice(0, half).forEach((it, j) => {
      s.addText("• " + it, { x: 0.45, y: y + 0.5 + j * 0.3, w: 4.5, h: 0.28, fontSize: 10.5, color: C.offwhite, fontFace: "Calibri", margin: 0 });
    });
    b.items.slice(half).forEach((it, j) => {
      s.addText("• " + it, { x: 5.1, y: y + 0.5 + j * 0.3, w: 4.4, h: 0.28, fontSize: 10.5, color: C.offwhite, fontFace: "Calibri", margin: 0 });
    });
  });

  slideNum(s, 16, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 – SEDATION, ANALGESIA & DELIRIUM
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "Sedation, Analgesia & Delirium in ICU", "Pain-Agitation-Delirium (PAD) Bundle");
  accentBar(s, C.gold);

  const cols = [
    {
      head: "Analgesia – FIRST",
      color: C.green,
      items: [
        ["Morphine / Fentanyl", "Opioid – IV infusion; fentanyl preferred in renal failure"],
        ["Paracetamol", "Adjunct – reduces opioid requirements"],
        ["NSAIDs", "Caution in ICU: renal & GI effects"],
        ["Assess with NRS or CPOT scale", "Target: CPOT ≤ 2"],
      ],
    },
    {
      head: "Sedation – Lightest Effective",
      color: C.sky,
      items: [
        ["Propofol", "Short-acting, easily titratable; monitor for PRIS"],
        ["Midazolam", "Avoid in elderly; accumulates, prolonged weaning"],
        ["Dexmedetomidine", "Light sedation; allows verbal response; reduces delirium"],
        ["RASS Target: -1 to 0", "Light sedation or alert is goal"],
      ],
    },
    {
      head: "Delirium – Monitor & Prevent",
      color: C.red,
      items: [
        ["CAM-ICU", "Validated delirium screening tool in ICU"],
        ["Risk factors", "Age, dementia, sedation, sleep deprivation, immobility"],
        ["Non-pharm", "Reorientation, day-night cycle, early mobilisation, family"],
        ["Pharmacologic", "Haloperidol (mild evidence); avoid in Parkinson's"],
      ],
    },
  ];

  cols.forEach((col, i) => {
    const x = 0.3 + i * 3.22;
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.0, h: 4.1, fill: { color: C.navy }, line: { type: "none" }, rectRadius: 0.1 });
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.0, h: 0.52, fill: { color: col.color }, line: { type: "none" }, rectRadius: 0.1 });
    s.addText(col.head, { x: x + 0.1, y: 1.25, w: 2.8, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    col.items.forEach(([drug, note], j) => {
      s.addText(drug, { x: x + 0.12, y: 1.82 + j * 0.82, w: 2.76, h: 0.3, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
      s.addText(note, { x: x + 0.12, y: 2.12 + j * 0.82, w: 2.76, h: 0.45, fontSize: 10, color: C.lightgray, fontFace: "Calibri", margin: 0 });
    });
  });

  slideNum(s, 17, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 18 – ETHICS & COMMUNICATION IN ICU
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, "0D0D25");
  accentBar(s, C.gold);

  s.addText("Ethics & Communication in ICU", {
    x: 0.5, y: 0.15, w: 9, h: 0.65, fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.83, w: 9, h: 0.04, fill: { color: C.gold }, line: { type: "none" } });

  const ethicsTopics = [
    {
      head: "Informed Consent in ICU",
      body: "Patients may lack capacity due to sedation, delirium, or unconsciousness. Substitute decision-maker (family/legal guardian) acts. Emergency consent implied when life-threatening. Document clearly.",
      color: C.sky,
    },
    {
      head: "Withholding & Withdrawing Treatment",
      body: "Both are ethically equivalent. Based on patient's best interest, expressed wishes (advance directives), and futility. Shared decision-making with family. Refer to ethics committee if conflict arises.",
      color: C.gold,
    },
    {
      head: "Do Not Resuscitate (DNR) Orders",
      body: "Must be clearly documented and communicated to team. Based on patient/surrogate wishes and clinical assessment of CPR benefit. DNR does not mean withholding comfort care.",
      color: C.red,
    },
    {
      head: "Family Communication",
      body: "Daily family meetings recommended. Use SPIKES protocol: Setting, Perception, Invitation, Knowledge, Empathy, Summary. Avoid jargon. Be honest about prognosis. Cultural sensitivity essential.",
      color: C.teal,
    },
  ];

  ethicsTopics.forEach((et, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.3 : 5.15;
    const y = 1.05 + row * 2.18;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.65, h: 2.0, fill: { color: "1A1A35" }, line: { color: et.color, width: 1.2 }, rectRadius: 0.09 });
    s.addText(et.head, { x: x + 0.15, y: y + 0.1, w: 4.35, h: 0.42, fontSize: 13, bold: true, color: et.color, fontFace: "Calibri", margin: 0 });
    s.addText(et.body, { x: x + 0.15, y: y + 0.55, w: 4.35, h: 1.35, fontSize: 11, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });

  slideNum(s, 18, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 19 – ICU COMPETENCIES FOR MBBS (NMC)
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addLightSlide(pres);
  topBanner(s, "ICU Competencies for MBBS – NMC CBME Framework", "What the MBBS Graduate Must Know & Do");
  accentBar(s, C.navy);

  const comps = [
    { domain: "Knowledge (KT)", items: ["Principles of organ support in ICU", "Pathophysiology of sepsis, ARDS, AKI", "Types of ventilatory support & oxygenation", "Pharmacology of vasopressors & sedatives", "Fluid physiology & acid-base balance"], color: C.navy },
    { domain: "Skills (ST)", items: ["Assess and document AVPU / GCS", "ABG interpretation", "Interpret ECG & monitor alarms", "Assist in CPR (BLS & ACLS)", "Nasogastric tube insertion", "Blood/urine/culture sample collection"], color: C.teal },
    { domain: "Attitude (AT)", items: ["Communicate sensitively with ICU families", "Apply ethical principles to end-of-life care", "Work effectively in multidisciplinary team", "Follow infection control protocols diligently", "Document clearly and accurately"], color: C.green },
  ];

  comps.forEach((c, i) => {
    const x = 0.3 + i * 3.22;
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.0, h: 4.15, fill: { color: "EEF3F8" }, line: { color: c.color, width: 1.5 }, rectRadius: 0.1 });
    s.addShape(pres.ShapeType.rect, { x, y: 1.2, w: 3.0, h: 0.52, fill: { color: c.color }, line: { type: "none" }, rectRadius: 0.1 });
    s.addText(c.domain, { x: x + 0.1, y: 1.25, w: 2.8, h: 0.42, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    c.items.forEach((item, j) => {
      s.addShape(pres.ShapeType.ellipse, { x: x + 0.15, y: 1.88 + j * 0.65, w: 0.2, h: 0.2, fill: { color: c.color }, line: { type: "none" } });
      s.addText(item, { x: x + 0.42, y: 1.83 + j * 0.65, w: 2.45, h: 0.55, fontSize: 11, color: C.navy, fontFace: "Calibri", margin: 0 });
    });
  });

  slideNum(s, 19, TOTAL);
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 20 – SUMMARY / THANK YOU
// ══════════════════════════════════════════════════════════════════════════════
{
  const s = addDarkSlide(pres, C.navy);

  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { type: "none" } });
  // Decorative diagonal shape
  s.addShape(pres.ShapeType.rect, { x: 6.5, y: 0, w: 3.5, h: 5.625, fill: { color: C.teal }, line: { type: "none" } });
  s.addShape(pres.ShapeType.rect, { x: 6.2, y: 0, w: 0.08, h: 5.625, fill: { color: C.gold }, line: { type: "none" } });

  s.addText("Key Takeaways", {
    x: 0.5, y: 0.3, w: 5.4, h: 0.6, fontSize: 24, bold: true, color: C.gold, fontFace: "Calibri", margin: 0,
  });

  const takeaways = [
    "ICU is a life-support environment – monitoring is continuous",
    "Early recognition & treatment saves lives (Sepsis Hour-1 Bundle)",
    "Airway first – Intubate when GCS ≤ 8 or impending respiratory failure",
    "Lung-protective ventilation: 6 mL/kg VT, Plateau < 30 cmH₂O",
    "Shock management: identify type, target MAP ≥ 65 mmHg",
    "Prevention = Outcome: VAP, CLABSI, CAUTI bundles matter",
    "Communicate, empathise, document – ethics is not optional",
  ];
  takeaways.forEach((t, i) => {
    s.addShape(pres.ShapeType.rect, { x: 0.5, y: 1.05 + i * 0.6, w: 0.35, h: 0.35, fill: { color: C.teal }, line: { type: "none" }, rectRadius: 0.05 });
    s.addText((i + 1).toString(), { x: 0.5, y: 1.08 + i * 0.6, w: 0.35, h: 0.28, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0 });
    s.addText(t, { x: 0.95, y: 1.06 + i * 0.6, w: 5.0, h: 0.5, fontSize: 12, color: C.offwhite, fontFace: "Calibri", margin: 0 });
  });

  s.addText("Thank You", {
    x: 6.5, y: 1.5, w: 3.2, h: 0.75, fontSize: 32, bold: true, color: C.white, fontFace: "Calibri", align: "center", margin: 0,
  });
  s.addText("Basics of ICU Care\nMBBS – NMC CBME", {
    x: 6.5, y: 2.35, w: 3.2, h: 0.8, fontSize: 14, color: C.navy, fontFace: "Calibri", align: "center", margin: 0,
  });
  s.addShape(pres.ShapeType.rect, { x: 6.8, y: 3.25, w: 2.6, h: 0.06, fill: { color: C.gold }, line: { type: "none" } });
  s.addText("Questions & Discussion", {
    x: 6.5, y: 3.4, w: 3.2, h: 0.45, fontSize: 14, bold: true, color: C.gold, fontFace: "Calibri", align: "center", margin: 0,
  });
  s.addText("NMC CBME | June 2026", {
    x: 6.5, y: 5.1, w: 3.2, h: 0.3, fontSize: 10, color: C.navy, fontFace: "Calibri", align: "center", margin: 0,
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ══════════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/icu-basics-ppt/ICU_Basics_MBBS_NMC.pptx" })
  .then(() => console.log("PPT created successfully!"))
  .catch(err => { console.error("Error:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/icu-basics-ppt && node create_icu_ppt.js

Running Command

ls -lh /home/daytona/workspace/icu-basics-ppt/ICU_Basics_MBBS_NMC.pptx

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

ICU Basics MBBS NMC

Presentation · PPTX


What's inside – 20 slides, fully designed:
SlideTopic
1Title slide – bold navy/teal design
2Table of Contents (10 topic cards)
3What is an ICU? – Definition, Purpose, Types
4ICU Admission Criteria – Priority 1–4 triage
5The ICU Multidisciplinary Team – 6 roles
6Vital Signs Monitoring – Normal ranges & alarm thresholds
7Severity Scoring – APACHE II, SOFA, GCS
8Airway Management – 6-step ladder + intubation tips
9Oxygen Therapy – All devices from nasal cannula to ventilator
10Mechanical Ventilation – Indications, modes, lung-protective settings
11Hemodynamic Monitoring & Shock – 4 types, comparison table
12Fluid Therapy & Vasopressors – Types + doses
13Sepsis & Septic Shock – Definitions, qSOFA, Hour-1 Bundle
14AKI in ICU – KDIGO staging + management
15Nutrition in ICU – EN vs PN, caloric goals
16Infection Control – VAP, CLABSI, CAUTI bundles
17Sedation, Analgesia & Delirium – PAD bundle, drug options
18Ethics & Communication – Consent, DNR, family communication
19NMC CBME Competencies – Knowledge, Skills, Attitude domains
20Key Takeaways + Thank You
The color scheme uses dark navy as dominant, with teal and gold accents - distinct per section for easy visual navigation. All content is aligned with NMC CBME MBBS curriculum competencies.
This is a shared conversation. Sign in to Orris to start your own chat.