Make a ppt on Guedels stage of Anaesthesia in MD Anesthesia

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Searching Images

Guedel stages of anaesthesia classification

Running Command

mkdir -p /home/daytona/workspace/guedel-anaesthesia-ppt && ls /home/daytona/workspace/guedel-anaesthesia-ppt

Writing File

~/guedel-anaesthesia-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");

let pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.author = 'MD Anaesthesia';
pres.title = "Guedel's Stages of Anaesthesia";

// ── Color Palette ────────────────────────────────────────────
const C = {
  navy:     "0A1931",   // dominant dark background
  deepBlue: "102A5E",   // header bar
  teal:     "0E7C7B",   // accent / stage colors
  tealDark: "055A59",
  gold:     "F0A500",   // highlight accent
  goldLight:"FFC947",
  white:    "FFFFFF",
  offWhite: "E8EEF7",
  lightGray:"C5D0E6",
  stageColors: ["1565C0","0E7C7B","6A0DAD","B22222","C47700"],
  // Stage 1 blue, Stage 2 teal, Stage 3 purple, Stage 4 red, overall gold
};

// ── Helper: slide background ─────────────────────────────────
function darkBg(slide) {
  slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color: C.navy} });
}

function headerBar(slide, title, subtitle) {
  // top bar
  slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.1, fill:{color: C.deepBlue} });
  slide.addShape(pres.shapes.RECTANGLE, { x:0, y:1.05, w:10, h:0.06, fill:{color: C.gold} });
  slide.addText(title, {
    x:0.3, y:0.1, w:9.4, h:0.7,
    fontSize:26, fontFace:"Calibri", bold:true, color:C.white, align:"left", margin:0
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x:0.3, y:0.72, w:9.4, h:0.32,
      fontSize:12, fontFace:"Calibri", italic:true, color:C.goldLight, align:"left", margin:0
    });
  }
}

function footer(slide) {
  slide.addShape(pres.shapes.RECTANGLE, { x:0, y:5.3, w:10, h:0.325, fill:{color: C.deepBlue} });
  slide.addText("Guedel's Classification of Anaesthesia  |  MD Anaesthesia", {
    x:0.2, y:5.32, w:9.6, h:0.25,
    fontSize:8.5, fontFace:"Calibri", color:C.lightGray, align:"left", margin:0
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  // Full dark bg
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color: C.navy} });

  // Left accent bar
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.18, h:5.625, fill:{color: C.gold} });

  // Large decorative circle
  s.addShape(pres.shapes.OVAL, { x:5.8, y:-1.2, w:5.5, h:5.5, fill:{color:"102A5E"}, line:{color:"1A3A7A", width:1} });
  s.addShape(pres.shapes.OVAL, { x:6.2, y:-0.8, w:4.5, h:4.5, fill:{color:"0E2050"}, line:{color:"1A3A7A", width:0.5} });

  // Title
  s.addText("Guedel's Stages of", {
    x:0.5, y:1.0, w:8.5, h:0.9,
    fontSize:38, fontFace:"Calibri", bold:true, color:C.gold, align:"left", margin:0
  });
  s.addText("General Anaesthesia", {
    x:0.5, y:1.85, w:8.5, h:0.9,
    fontSize:38, fontFace:"Calibri", bold:true, color:C.white, align:"left", margin:0
  });

  // Divider line
  s.addShape(pres.shapes.RECTANGLE, { x:0.5, y:2.8, w:6, h:0.05, fill:{color: C.gold} });

  // Subtitle
  s.addText("Classical Classification of Ether Anaesthesia (1937)", {
    x:0.5, y:2.95, w:8.5, h:0.45,
    fontSize:15, fontFace:"Calibri", italic:true, color:C.offWhite, align:"left", margin:0
  });

  // Pills
  const pills = ["Stage I: Analgesia","Stage II: Excitement","Stage III: Surgical","Stage IV: Medullary Depression"];
  const pillColors = ["1565C0","0E7C7B","6A0DAD","B22222"];
  pills.forEach((p, i) => {
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x:0.5 + i*2.35, y:3.65, w:2.2, h:0.45,
      fill:{color: pillColors[i]}, rectRadius:0.06
    });
    s.addText(p, {
      x:0.5 + i*2.35, y:3.65, w:2.2, h:0.45,
      fontSize:8.5, fontFace:"Calibri", bold:true, color:C.white, align:"center", margin:0, valign:"middle"
    });
  });

  // Presenter info
  s.addText("MD Anaesthesia  |  Department of Anaesthesiology", {
    x:0.5, y:4.9, w:9, h:0.3,
    fontSize:10, fontFace:"Calibri", color:C.lightGray, align:"left", margin:0
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 2 – HISTORICAL BACKGROUND
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  headerBar(s, "Historical Background", "Arthur Ernest Guedel (1883–1956)");
  footer(s);

  // Left column — biography card
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.3, y:1.3, w:3.2, h:3.75, fill:{color:"102A5E"}, rectRadius:0.1, shadow:{type:"outer",color:"000000",blur:8,offset:3,angle:135,opacity:0.3} });
  s.addShape(pres.shapes.RECTANGLE, { x:0.3, y:1.3, w:3.2, h:0.55, fill:{color: C.gold} });
  s.addText("Arthur E. Guedel", { x:0.35, y:1.32, w:3.1, h:0.5, fontSize:13, bold:true, color:C.navy, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });

  const bioItems = [
    "Born: January 13, 1883 (Indiana, USA)",
    "American anesthesiologist & pioneer",
    "Published classic stages in 1920 (field notes) and refined in 1937 textbook",
    "Based observations on open-drop diethyl ether anesthesia",
    "Also known for the Guedel oropharyngeal airway (1933)",
    "Died: February 18, 1956",
  ];
  bioItems.forEach((item, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:0.42, y:2.0 + i*0.47, w:0.06, h:0.22, fill:{color:C.gold} });
    s.addText(item, { x:0.55, y:1.98 + i*0.47, w:2.85, h:0.3, fontSize:9, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });

  // Right column — context
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:3.8, y:1.3, w:5.9, h:3.75, fill:{color:"0D2244"}, rectRadius:0.1 });

  const contextTitle = "Why Guedel's Classification Matters";
  s.addShape(pres.shapes.RECTANGLE, { x:3.8, y:1.3, w:5.9, h:0.55, fill:{color: C.teal} });
  s.addText(contextTitle, { x:3.85, y:1.32, w:5.8, h:0.5, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });

  const contextItems = [
    ["Historical Context", "Developed during the ether era — single-agent, open-drop technique. Provided the first systematic description of CNS depression depth."],
    ["Clinical Utility", "Allowed anesthetists to monitor depth of anesthesia using observable physical signs without modern monitoring."],
    ["Modern Relevance", "Taught as foundational framework in anesthesia education; modern monitoring (BIS, entropy) evolved from these principles."],
    ["Limitation", "Developed for ether alone; modern balanced anesthesia uses IV agents + muscle relaxants, altering the classic signs."],
  ];
  contextItems.forEach(([title, desc], i) => {
    s.addText(title + ":", { x:4.0, y:2.05 + i*0.82, w:5.5, h:0.28, fontSize:10.5, bold:true, color:C.gold, fontFace:"Calibri", margin:0 });
    s.addText(desc, { x:4.0, y:2.3 + i*0.82, w:5.5, h:0.38, fontSize:9, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 3 – OVERVIEW TABLE of 4 Stages
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  headerBar(s, "Overview: Guedel's 4 Stages of Anaesthesia", "From consciousness to medullary paralysis");
  footer(s);

  const stages = [
    { num:"I",   name:"Analgesia",             color:"1565C0", sub:"Conscious & responsive",        breath:"Normal",       eyes:"Open, voluntary", reflexes:"Intact", other:"Pain ↓, amnesia begins" },
    { num:"II",  name:"Excitement",             color:"6A0DAD", sub:"Delirium & uninhibited",        breath:"Irregular",    eyes:"Open, involuntary", reflexes:"Exaggerated", other:"Vomiting, laryngospasm risk" },
    { num:"III", name:"Surgical Anaesthesia",   color:"0E7C7B", sub:"4 Planes — target for surgery", breath:"Regular→Paralysis", eyes:"Closed", reflexes:"Progressive loss", other:"4 planes within this stage" },
    { num:"IV",  name:"Medullary Depression",   color:"B22222", sub:"DANGER — impending death",      breath:"Paralysed",    eyes:"Fixed dilated", reflexes:"Absent", other:"Circulatory collapse, DEATH" },
  ];

  // Table header
  const headers = ["Stage", "Name", "Respiration", "Eye Signs", "Reflexes", "Key Features"];
  const colW    = [0.6,  2.1,  1.6,  1.7,  1.5,  2.3];
  let xPos = 0.18;
  headers.forEach((h, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:xPos, y:1.25, w:colW[i]-0.04, h:0.42, fill:{color: C.teal} });
    s.addText(h, { x:xPos, y:1.25, w:colW[i]-0.04, h:0.42, fontSize:9.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
    xPos += colW[i];
  });

  // Table rows
  stages.forEach((st, r) => {
    const rowBg = r % 2 === 0 ? "0D2244" : "081530";
    const cols = [st.num, st.name, st.breath, st.eyes, st.reflexes, st.other];
    let xp = 0.18;
    cols.forEach((cell, c) => {
      s.addShape(pres.shapes.RECTANGLE, { x:xp, y:1.72 + r*0.75, w:colW[c]-0.04, h:0.7, fill:{color: rowBg} });
      if (c === 0) {
        // Stage number with colored badge
        s.addShape(pres.shapes.OVAL, { x:xp+0.1, y:1.78 + r*0.75, w:0.4, h:0.4, fill:{color: st.color} });
        s.addText(st.num, { x:xp+0.1, y:1.78 + r*0.75, w:0.4, h:0.4, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
      } else if (c === 1) {
        s.addText(cell, { x:xp+0.06, y:1.74 + r*0.75, w:colW[c]-0.1, h:0.34, fontSize:9.5, bold:true, color:"FFD700", fontFace:"Calibri", margin:0, valign:"middle" });
        s.addText(st.sub, { x:xp+0.06, y:2.06 + r*0.75, w:colW[c]-0.1, h:0.32, fontSize:7.5, italic:true, color:C.lightGray, fontFace:"Calibri", margin:0 });
      } else {
        const textColor = (c === 5 && r === 3) ? "FF6B6B" : C.offWhite;
        s.addText(cell, { x:xp+0.06, y:1.74 + r*0.75, w:colW[c]-0.1, h:0.7, fontSize:8.5, color:textColor, fontFace:"Calibri", margin:0, valign:"middle" });
      }
      xp += colW[c];
    });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 4 – STAGE I: ANALGESIA
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  // Stage badge
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.1, fill:{color:"0D1E5A"} });
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:1.05, w:10, h:0.06, fill:{color:"1565C0"} });
  s.addShape(pres.shapes.OVAL, { x:0.2, y:0.1, w:0.82, h:0.82, fill:{color:"1565C0"} });
  s.addText("I", { x:0.2, y:0.1, w:0.82, h:0.82, fontSize:28, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
  s.addText("Stage I — Analgesia", { x:1.15, y:0.1, w:8, h:0.52, fontSize:26, bold:true, color:C.white, fontFace:"Calibri", align:"left", margin:0 });
  s.addText("Induction begins → Loss of consciousness", { x:1.15, y:0.62, w:8.5, h:0.4, fontSize:12, italic:true, color:"89B4FF", fontFace:"Calibri", align:"left", margin:0 });
  footer(s);

  // Two column layout
  // LEFT
  const leftData = [
    ["Also known as","Induction stage / Remi-anaesthesia stage"],
    ["Onset","From start of inhalation to loss of consciousness"],
    ["Consciousness","Present and fully cooperative"],
    ["Amnesia","Begins progressively (partial amnesia)"],
    ["Analgesia","Pain perception decreased; threshold raised"],
    ["Communication","Can respond to verbal commands"],
  ];
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.2, y:1.2, w:4.6, h:3.9, fill:{color:"0C1E4A"}, rectRadius:0.08 });
  s.addShape(pres.shapes.RECTANGLE, { x:0.2, y:1.2, w:4.6, h:0.42, fill:{color:"1565C0"} });
  s.addText("Characteristics", { x:0.25, y:1.22, w:4.5, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  leftData.forEach(([label, val], i) => {
    s.addText(label + ":", { x:0.35, y:1.72 + i*0.55, w:1.6, h:0.3, fontSize:9, bold:true, color:"89B4FF", fontFace:"Calibri", margin:0 });
    s.addText(val, { x:1.98, y:1.72 + i*0.55, w:2.7, h:0.42, fontSize:9, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });

  // RIGHT
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:5.1, y:1.2, w:4.7, h:1.78, fill:{color:"0C1E4A"}, rectRadius:0.08 });
  s.addShape(pres.shapes.RECTANGLE, { x:5.1, y:1.2, w:4.7, h:0.42, fill:{color:"1565C0"} });
  s.addText("Clinical Signs", { x:5.15, y:1.22, w:4.6, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  const signs = [
    "Respiration: Normal, regular",
    "Eyes: Open, normal movements",
    "Pupils: Normal size & reactive",
    "Muscle tone: Normal",
    "Reflexes: All intact",
  ];
  signs.forEach((sg, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:5.22, y:1.72 + i*0.28, w:0.07, h:0.18, fill:{color:"1565C0"} });
    s.addText(sg, { x:5.35, y:1.70 + i*0.28, w:4.3, h:0.27, fontSize:9, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });

  // Clinical notes box
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:5.1, y:3.1, w:4.7, h:2.0, fill:{color:"0E1E35"}, rectRadius:0.08, line:{color:"1565C0",width:1.5} });
  s.addText("Clinical Importance", { x:5.2, y:3.15, w:4.5, h:0.32, fontSize:10, bold:true, color:"89B4FF", fontFace:"Calibri", margin:0 });
  const notes = [
    "• Minor procedures can be performed (dental extractions, dressing changes)",
    "• Target for relative analgesia in dentistry (N₂O/O₂ 20–40% mixture)",
    "• Patient remains cooperative — important for positioning",
    "• Rapid eye opening on verbal command confirms Stage I",
  ];
  notes.forEach((n, i) => {
    s.addText(n, { x:5.2, y:3.5 + i*0.35, w:4.5, h:0.34, fontSize:8.5, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 5 – STAGE II: EXCITEMENT
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.1, fill:{color:"2D0A5A"} });
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:1.05, w:10, h:0.06, fill:{color:"6A0DAD"} });
  s.addShape(pres.shapes.OVAL, { x:0.2, y:0.1, w:0.82, h:0.82, fill:{color:"6A0DAD"} });
  s.addText("II", { x:0.2, y:0.1, w:0.82, h:0.82, fontSize:24, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
  s.addText("Stage II — Excitement / Delirium", { x:1.15, y:0.1, w:8, h:0.52, fontSize:26, bold:true, color:C.white, fontFace:"Calibri", align:"left", margin:0 });
  s.addText("Loss of consciousness → Regular respiration resumes", { x:1.15, y:0.62, w:8.5, h:0.4, fontSize:12, italic:true, color:"CC99FF", fontFace:"Calibri", align:"left", margin:0 });
  footer(s);

  // Warning banner
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.2, y:1.2, w:9.6, h:0.5, fill:{color:"4A0000"}, rectRadius:0.06, line:{color:"FF4444", width:1.5} });
  s.addText("⚠  DANGER ZONE — Pass through this stage as RAPIDLY as possible. DO NOT stimulate the patient!", {
    x:0.3, y:1.22, w:9.4, h:0.45, fontSize:10.5, bold:true, color:"FF8888", fontFace:"Calibri", align:"center", margin:0, valign:"middle"
  });

  // Two columns
  const leftData2 = [
    ["Consciousness","Lost — patient uncooperative"],
    ["Behaviour","Excited, delirious, combative"],
    ["Breathing","Irregular, breath-holding common"],
    ["Muscle tone","Increased (tense)"],
    ["Vomiting","High risk — silent regurgitation"],
    ["Eyes","Roving, nystagmus, lacrimation"],
    ["Pupils","Dilated, reactive"],
  ];
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.2, y:1.85, w:4.5, h:3.5, fill:{color:"1A0830"}, rectRadius:0.08 });
  s.addShape(pres.shapes.RECTANGLE, { x:0.2, y:1.85, w:4.5, h:0.42, fill:{color:"6A0DAD"} });
  s.addText("Signs & Symptoms", { x:0.25, y:1.87, w:4.4, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  leftData2.forEach(([label, val], i) => {
    s.addText(label + ":", { x:0.35, y:2.37 + i*0.43, w:1.5, h:0.3, fontSize:9, bold:true, color:"CC99FF", fontFace:"Calibri", margin:0 });
    s.addText(val, { x:1.9, y:2.37 + i*0.43, w:2.65, h:0.42, fontSize:9, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });

  // Right — complications and management
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:5.0, y:1.85, w:4.8, h:1.65, fill:{color:"1A0830"}, rectRadius:0.08 });
  s.addShape(pres.shapes.RECTANGLE, { x:5.0, y:1.85, w:4.8, h:0.42, fill:{color:"6A0DAD"} });
  s.addText("Complications", { x:5.05, y:1.87, w:4.7, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  const comps = ["Laryngospasm", "Bronchospasm", "Vomiting & Aspiration", "Breath-holding → Hypoxia", "Cardiac arrhythmias (vagal)"];
  comps.forEach((c, i) => {
    s.addShape(pres.shapes.OVAL, { x:5.12, y:2.34 + i*0.22, w:0.13, h:0.13, fill:{color:"FF4444"} });
    s.addText(c, { x:5.3, y:2.31 + i*0.22, w:4.4, h:0.22, fontSize:9, color:"FF8888", fontFace:"Calibri", margin:0 });
  });

  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:5.0, y:3.6, w:4.8, h:1.75, fill:{color:"1A0830"}, rectRadius:0.08 });
  s.addShape(pres.shapes.RECTANGLE, { x:5.0, y:3.6, w:4.8, h:0.42, fill:{color:"6A0DAD"} });
  s.addText("Management", { x:5.05, y:3.62, w:4.7, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  const mgmt = ["Rapid induction (IV agents preferred)", "Avoid surgical stimulation", "Maintain airway — head tilt/jaw thrust", "Avoid suctioning in Stage II", "Premed with opioids/midazolam to minimize"];
  mgmt.forEach((m, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:5.12, y:4.1 + i*0.22, w:0.07, h:0.15, fill:{color:"CC99FF"} });
    s.addText(m, { x:5.24, y:4.08 + i*0.22, w:4.5, h:0.22, fontSize:9, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 6 – STAGE III: OVERVIEW + PLANES TABLE
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.1, fill:{color:"073030"} });
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:1.05, w:10, h:0.06, fill:{color: C.teal} });
  s.addShape(pres.shapes.OVAL, { x:0.2, y:0.1, w:0.82, h:0.82, fill:{color: C.teal} });
  s.addText("III", { x:0.2, y:0.1, w:0.82, h:0.82, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
  s.addText("Stage III — Surgical Anaesthesia (4 Planes)", { x:1.15, y:0.1, w:8.5, h:0.52, fontSize:24, bold:true, color:C.white, fontFace:"Calibri", align:"left", margin:0 });
  s.addText("Regular respiration → Cessation of intercostal movement", { x:1.15, y:0.62, w:8.5, h:0.4, fontSize:12, italic:true, color:"77DDCC", fontFace:"Calibri", align:"left", margin:0 });
  footer(s);

  // Planes table
  const planesData = [
    {
      plane:"Plane 1\n(Light)",
      resp:"Regular, thoracoabdominal",
      eyes:"Closed; eyeball movement present",
      pupil:"Normal, reactive",
      reflexes:"Conjunctival reflex ↓\nSwallowing reflex lost",
      muscle:"Normal",
      use:"Light procedures, positioning",
      color:"155E75"
    },
    {
      plane:"Plane 2\n(Medium)",
      resp:"Regular, thoracoabdominal",
      eyes:"Fixed centrally, loss of corneal reflex",
      pupil:"Slightly dilated",
      reflexes:"Corneal reflex lost\nLaryngeal reflex present",
      muscle:"Slight ↓",
      use:"Abdominal surface surgery",
      color:"0E7C7B"
    },
    {
      plane:"Plane 3\n(Deep)",
      resp:"Abdominal type, thoracic ↓",
      eyes:"Fixed, divergent",
      pupil:"Dilated, sluggish",
      reflexes:"Laryngeal reflex lost\nSphincter relax",
      muscle:"Moderate relaxation",
      use:"Intra-abdominal surgery",
      color:"0A5F60"
    },
    {
      plane:"Plane 4\n(Very Deep)",
      resp:"Diaphragmatic only",
      eyes:"Fixed, dilated",
      pupil:"Max dilated, non-reactive",
      reflexes:"All reflexes absent",
      muscle:"Complete flaccidity",
      use:"AVOID — approaches Stage IV",
      color:"B22222"
    },
  ];

  // Header row
  const ph = ["Plane","Respiration","Eye Signs","Pupil","Reflexes","Muscle Tone","Use"];
  const pw = [0.9,  1.5,  1.85, 1.1,  1.85, 1.25, 1.4];
  let xh = 0.15;
  ph.forEach((h, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:xh, y:1.2, w:pw[i]-0.04, h:0.38, fill:{color: C.teal} });
    s.addText(h, { x:xh, y:1.2, w:pw[i]-0.04, h:0.38, fontSize:8.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
    xh += pw[i];
  });

  planesData.forEach((pl, r) => {
    const rowCells = [pl.plane, pl.resp, pl.eyes, pl.pupil, pl.reflexes, pl.muscle, pl.use];
    let xp2 = 0.15;
    rowCells.forEach((cell, c) => {
      const rowH = 0.85;
      const rowBg = c === 6 && r === 3 ? "4A0000" : (r % 2 === 0 ? "0B2A2A" : "071C1C");
      s.addShape(pres.shapes.RECTANGLE, { x:xp2, y:1.62 + r*rowH, w:pw[c]-0.04, h:rowH-0.04, fill:{color: rowBg} });
      if (c === 0) {
        s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:xp2+0.05, y:1.66 + r*rowH, w:pw[c]-0.14, h:rowH-0.16, fill:{color: pl.color}, rectRadius:0.05 });
        s.addText(cell, { x:xp2+0.05, y:1.66 + r*rowH, w:pw[c]-0.14, h:rowH-0.16, fontSize:9, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
      } else {
        const tc = (c === 6 && r === 3) ? "FF8888" : (c === 6 ? "#9EFFDB" : C.offWhite);
        s.addText(cell, { x:xp2+0.05, y:1.64 + r*rowH, w:pw[c]-0.1, h:rowH-0.08, fontSize:8, color:tc, fontFace:"Calibri", margin:0, valign:"middle" });
      }
      xp2 += pw[c];
    });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 7 – STAGE III: Planes Deep Dive
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  headerBar(s, "Stage III — Planes: Key Signs in Detail", "Focus: Eye movements, Respiration, Reflexes");
  footer(s);

  // 4 plane cards in a row
  const cards = [
    { plane:"Plane 1", nick:"Light Surgical", color:"155E75",
      signs:["Eyeballs: Moving","Conjunctival reflex: Lost","Swallowing & vomiting\nreflex: Lost","Resp: Regular\nthoracoabdominal","Muscle tone: Normal"],
      tip:"Entry into surgical plane. Ideal for minor surgeries." },
    { plane:"Plane 2", nick:"Medium Surgical", color:"0E7C7B",
      signs:["Eyeballs: Fixed centrally","Corneal reflex: Lost","Loss of laryngeal\nspasm reflex","Resp: Regular\npredominantly thoracic","Muscle tone: Slight ↓"],
      tip:"Ideal for most general surgeries." },
    { plane:"Plane 3", nick:"Deep Surgical", color:"0A5F60",
      signs:["Eyeballs: Fixed, divergent","Pupil: Dilated, sluggish","Intercostal: Begins↓\n(abdominal breathing)","Resp: Abdominal only","Sphincter relaxation"],
      tip:"Required for intra-abdominal procedures; caution." },
    { plane:"Plane 4", nick:"Dangerously Deep", color:"8B0000",
      signs:["Pupils: Max dilated\nnon-reactive","All reflexes: Absent","Intercostal: Paralysed","Resp: Diaphragm only","Total muscle flaccidity"],
      tip:"⚠ Approaching Stage IV — immediately lighten!" },
  ];

  cards.forEach((card, i) => {
    const cx = 0.2 + i * 2.45;
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:cx, y:1.2, w:2.3, h:3.95, fill:{color:"0B2020"}, rectRadius:0.1, shadow:{type:"outer",color:"000000",blur:6,offset:2,angle:135,opacity:0.25} });
    s.addShape(pres.shapes.RECTANGLE, { x:cx, y:1.2, w:2.3, h:0.55, fill:{color: card.color} });
    s.addText(card.plane, { x:cx, y:1.22, w:2.3, h:0.3, fontSize:14, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0 });
    s.addText(card.nick, { x:cx, y:1.5, w:2.3, h:0.22, fontSize:8.5, italic:true, color:"AAFFEE", fontFace:"Calibri", align:"center", margin:0 });

    card.signs.forEach((sg, j) => {
      s.addShape(pres.shapes.RECTANGLE, { x:cx+0.1, y:1.85 + j*0.48, w:0.07, h:0.26, fill:{color: card.color} });
      s.addText(sg, { x:cx+0.22, y:1.83 + j*0.48, w:2.0, h:0.45, fontSize:8.2, color:C.offWhite, fontFace:"Calibri", margin:0 });
    });

    // Tip box
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:cx+0.06, y:4.52, w:2.18, h:0.5, fill:{color: card.color}, rectRadius:0.05 });
    s.addText(card.tip, { x:cx+0.08, y:4.53, w:2.14, h:0.48, fontSize:7.5, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 8 – STAGE IV: MEDULLARY DEPRESSION
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.1, fill:{color:"2A0000"} });
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:1.05, w:10, h:0.06, fill:{color:"B22222"} });
  s.addShape(pres.shapes.OVAL, { x:0.2, y:0.1, w:0.82, h:0.82, fill:{color:"B22222"} });
  s.addText("IV", { x:0.2, y:0.1, w:0.82, h:0.82, fontSize:22, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
  s.addText("Stage IV — Medullary Depression", { x:1.15, y:0.1, w:8, h:0.52, fontSize:24, bold:true, color:C.white, fontFace:"Calibri", align:"left", margin:0 });
  s.addText("Complete respiratory & cardiovascular collapse → Death", { x:1.15, y:0.62, w:8.5, h:0.4, fontSize:12, italic:true, color:"FF9999", fontFace:"Calibri", align:"left", margin:0 });
  footer(s);

  // Full-width danger strip
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.2, y:1.2, w:9.6, h:0.5, fill:{color:"5A0000"}, rectRadius:0.06, line:{color:"FF2222", width:2} });
  s.addText("☠  NOT A SURGICAL STAGE — Represents anaesthetic overdose / DEATH",
    { x:0.3, y:1.22, w:9.4, h:0.45, fontSize:11.5, bold:true, color:"FF6666", fontFace:"Calibri", align:"center", margin:0, valign:"middle" });

  // Three columns
  // Column 1 — Signs
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.2, y:1.85, w:3.0, h:3.5, fill:{color:"200000"}, rectRadius:0.08, line:{color:"B22222", width:1} });
  s.addShape(pres.shapes.RECTANGLE, { x:0.2, y:1.85, w:3.0, h:0.42, fill:{color:"B22222"} });
  s.addText("Clinical Signs", { x:0.25, y:1.87, w:2.9, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  const iv_signs = [
    "Respiration: Absent (apnoea)",
    "Eyes: Fixed, fully dilated",
    "Pupils: Maximally dilated,\nnon-reactive to light",
    "Reflexes: ALL absent",
    "Muscle tone: Complete flaccidity",
    "BP: Profoundly hypotensive",
    "Pulse: Weak & rapid → absent",
  ];
  iv_signs.forEach((sg, i) => {
    s.addShape(pres.shapes.OVAL, { x:0.32, y:2.36 + i*0.41, w:0.12, h:0.12, fill:{color:"FF4444"} });
    s.addText(sg, { x:0.48, y:2.33 + i*0.41, w:2.65, h:0.38, fontSize:9, color:"FF9999", fontFace:"Calibri", margin:0 });
  });

  // Column 2 — Mechanism
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:3.5, y:1.85, w:3.0, h:3.5, fill:{color:"200000"}, rectRadius:0.08, line:{color:"B22222", width:1} });
  s.addShape(pres.shapes.RECTANGLE, { x:3.5, y:1.85, w:3.0, h:0.42, fill:{color:"8B0000"} });
  s.addText("Mechanism", { x:3.55, y:1.87, w:2.9, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  const mechanism = [
    ["Medullary centres","Respiratory centre paralysed; vasomotor centre fails"],
    ["Cardiovascular","Loss of vasomotor tone → profound hypotension & CV collapse"],
    ["Brainstem","Complete shutdown of vital centres"],
    ["Outcome","Death within minutes if not reversed immediately"],
  ];
  mechanism.forEach(([t, desc], i) => {
    s.addText(t + ":", { x:3.6, y:2.36 + i*0.77, w:2.8, h:0.28, fontSize:9.5, bold:true, color:"FF8888", fontFace:"Calibri", margin:0 });
    s.addText(desc, { x:3.6, y:2.63 + i*0.77, w:2.8, h:0.42, fontSize:8.5, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });

  // Column 3 — Resuscitation
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:6.8, y:1.85, w:3.0, h:3.5, fill:{color:"200000"}, rectRadius:0.08, line:{color:"B22222", width:1} });
  s.addShape(pres.shapes.RECTANGLE, { x:6.8, y:1.85, w:3.0, h:0.42, fill:{color:"C47700"} });
  s.addText("Immediate Action", { x:6.85, y:1.87, w:2.9, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
  const actions = [
    "STOP all anaesthetic agents immediately",
    "100% O₂ ventilation (mask/ETT)",
    "IPPV — initiate manual ventilation",
    "IV fluids & vasopressors (adrenaline)",
    "CPR if cardiac arrest occurs",
    "Reversal agents if applicable\n(Sugammadex, Flumazenil)",
    "Call for emergency help (Code Blue)",
  ];
  actions.forEach((a, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:6.9, y:2.36 + i*0.41, w:0.08, h:0.22, fill:{color:"FFA500"} });
    s.addText(a, { x:7.02, y:2.34 + i*0.41, w:2.65, h:0.38, fontSize:8.5, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 9 – PROGRESSIVE DEPTH DIAGRAM
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  headerBar(s, "Progressive Depth of Anaesthesia", "Continuous spectrum from consciousness to medullary depression");
  footer(s);

  // Draw a continuous horizontal depth bar
  const barY = 2.0;
  const barH = 0.65;
  const segments = [
    { label:"Stage I\nAnalgesia",          w:1.8, color:"1565C0" },
    { label:"Stage II\nExcitement",         w:1.6, color:"6A0DAD" },
    { label:"Stage III P1\nLight",          w:1.2, color:"155E75" },
    { label:"Stage III P2\nMedium",         w:1.2, color:"0E7C7B" },
    { label:"Stage III P3\nDeep",           w:1.2, color:"0A5F60" },
    { label:"Stage III P4\nVery Deep",      w:1.1, color:"8B0000" },
    { label:"Stage IV\nMedullary",          w:1.7, color:"B22222" },
  ];
  let sx = 0.0;
  segments.forEach((seg, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:sx, y:barY, w:seg.w, h:barH, fill:{color: seg.color} });
    s.addText(seg.label, { x:sx+0.03, y:barY, w:seg.w-0.06, h:barH, fontSize:7.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
    sx += seg.w;
  });

  // Arrow beneath bar
  s.addShape(pres.shapes.RECTANGLE, { x:0.1, y:2.75, w:9.2, h:0.1, fill:{color:C.gold} });
  s.addShape(pres.shapes.RECTANGLE, { x:9.15, y:2.68, w:0.2, h:0.24, fill:{color:C.gold} });
  s.addText("← Conscious", { x:0.1, y:2.86, w:2, h:0.28, fontSize:9, color:C.gold, fontFace:"Calibri", margin:0 });
  s.addText("DEPTH OF ANAESTHESIA INCREASES →", { x:3.5, y:2.86, w:4, h:0.28, fontSize:9, bold:true, color:C.gold, fontFace:"Calibri", align:"center", margin:0 });
  s.addText("Death →", { x:8.2, y:2.86, w:1.5, h:0.28, fontSize:9, color:"FF4444", fontFace:"Calibri", margin:0 });

  // Pupil changes row
  s.addText("Pupil Changes:", { x:0.15, y:3.25, w:2, h:0.3, fontSize:10, bold:true, color:C.gold, fontFace:"Calibri", margin:0 });
  const pupilStates = ["Normal","Dilated\n(reactive)","Normal\n(reactive)","Slightly\ndilated","Dilated\nsluggish","Max dilated\nnon-reactive","Max dilated\nnon-reactive"];
  let px = 0;
  segments.forEach((seg, i) => {
    s.addText(pupilStates[i], { x:px+0.05, y:3.22, w:seg.w-0.1, h:0.55, fontSize:7, color:C.lightGray, fontFace:"Calibri", align:"center", margin:0 });
    px += seg.w;
  });

  // Surgical utility row
  s.addText("Surgical Use:", { x:0.15, y:3.85, w:2, h:0.3, fontSize:10, bold:true, color:C.gold, fontFace:"Calibri", margin:0 });
  const surgUse = ["Minor / relative\nanaesthesia","AVOID\nstimulation","Minor surgery","General surgery","Intra-abdominal","Avoid — lighten\nimmediately","STOP —\nresuscitate"];
  const useColors = ["1565C0","6A0DAD","155E75","0E7C7B","0A5F60","8B4513","B22222"];
  let ux = 0;
  segments.forEach((seg, i) => {
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:ux+0.04, y:3.82, w:seg.w-0.08, h:0.62, fill:{color: useColors[i]}, rectRadius:0.04 });
    s.addText(surgUse[i], { x:ux+0.06, y:3.83, w:seg.w-0.12, h:0.6, fontSize:7, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
    ux += seg.w;
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 10 – SIGNS AT EACH STAGE (MNEMONICS / QUICK REFERENCE)
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  headerBar(s, "Quick Reference: Signs at Each Stage", "Respiratory, Ocular, Cardiovascular & Reflex Changes");
  footer(s);

  const signRows = [
    { param:"Consciousness",  s1:"Present", s2:"Lost", s3p1:"Lost", s3p2:"Lost", s3p3:"Lost", s3p4:"Lost", s4:"Lost" },
    { param:"Respiration",    s1:"Regular, thoracoabdominal", s2:"Irregular", s3p1:"Regular, thoracoabdominal", s3p2:"Regular, thoracoabdominal", s3p3:"Abdominal (thoracic ↓)", s3p4:"Diaphragmatic only", s4:"Absent (apnoea)" },
    { param:"Eye movement",   s1:"Present (voluntary)", s2:"Involuntary (roving)", s3p1:"Present (involuntary)", s3p2:"Fixed centrally", s3p3:"Fixed, divergent", s3p4:"Fixed", s4:"Fixed" },
    { param:"Pupils",         s1:"Normal", s2:"Dilated, reactive", s3p1:"Normal, reactive", s3p2:"Slightly dilated", s3p3:"Dilated, sluggish", s3p4:"Max dilated, NR", s4:"Max dilated, NR" },
    { param:"Corneal reflex", s1:"Present", s2:"Exaggerated", s3p1:"Present", s3p2:"LOST", s3p3:"Absent", s3p4:"Absent", s4:"Absent" },
    { param:"Laryngeal reflex",s1:"Present", s2:"Exaggerated", s3p1:"Present", s3p2:"Present", s3p3:"LOST", s3p4:"Absent", s4:"Absent" },
    { param:"Muscle tone",    s1:"Normal", s2:"Increased", s3p1:"Normal", s3p2:"Slight ↓", s3p3:"Moderate ↓", s3p4:"Flaccid", s4:"Complete flaccidity" },
    { param:"BP / Pulse",     s1:"Normal", s2:"↑ (excitation)", s3p1:"Normal", s3p2:"Normal", s3p3:"Slight ↓", s3p4:"↓↓", s4:"Collapse" },
  ];

  const headers2 = ["Parameter","Stage I","Stage II","III-P1","III-P2","III-P3","III-P4","Stage IV"];
  const cw2 = [1.55, 1.18, 1.15, 1.05, 1.05, 1.15, 1.15, 1.42];
  const hColors = ["0A3050","1565C0","6A0DAD","155E75","0E7C7B","0A5F60","8B0000","B22222"];
  let hx = 0.1;
  headers2.forEach((h, i) => {
    s.addShape(pres.shapes.RECTANGLE, { x:hx, y:1.22, w:cw2[i]-0.04, h:0.38, fill:{color: hColors[i]} });
    s.addText(h, { x:hx, y:1.22, w:cw2[i]-0.04, h:0.38, fontSize:8.5, bold:true, color:C.white, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
    hx += cw2[i];
  });

  signRows.forEach((row, r) => {
    const cells = [row.param, row.s1, row.s2, row.s3p1, row.s3p2, row.s3p3, row.s3p4, row.s4];
    let rx = 0.1;
    cells.forEach((cell, c) => {
      const rowBg = r % 2 === 0 ? "0C1F30" : "081525";
      s.addShape(pres.shapes.RECTANGLE, { x:rx, y:1.64 + r*0.48, w:cw2[c]-0.04, h:0.46, fill:{color: rowBg} });
      const isLost = cell === "LOST" || cell === "Absent" || cell === "Absent (apnoea)" || cell === "Collapse";
      const textColor = c === 0 ? C.gold : (isLost ? "FF7777" : C.offWhite);
      s.addText(cell, { x:rx+0.04, y:1.65 + r*0.48, w:cw2[c]-0.1, h:0.44, fontSize:7.5, bold:(c===0), color:textColor, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
      rx += cw2[c];
    });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 11 – COMPARISON: ETHER ERA vs MODERN ANAESTHESIA
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  headerBar(s, "Classical vs Modern Anaesthesia", "Limitations of Guedel's Classification in Contemporary Practice");
  footer(s);

  // Two large cards
  // Left — Classical Ether
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.2, y:1.25, w:4.6, h:3.9, fill:{color:"0A1E10"}, rectRadius:0.1 });
  s.addShape(pres.shapes.RECTANGLE, { x:0.2, y:1.25, w:4.6, h:0.5, fill:{color:"1B5E20"} });
  s.addText("Classical Ether Anaesthesia", { x:0.25, y:1.27, w:4.5, h:0.46, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });

  const etherPoints = [
    ["Single agent","Diethyl ether — slow induction/recovery; predictable depth"],
    ["Slow progression","Clear, gradual transition between stages (easily observable)"],
    ["Muscle relaxation","Achieved through depth alone (Stage III P3)"],
    ["Signs reliable","Eye signs, pupil changes, breathing patterns all intact"],
    ["Monitoring","Clinical signs were the ONLY monitoring available"],
    ["Usage today","No longer used clinically; historical interest only"],
  ];
  etherPoints.forEach(([t, d], i) => {
    s.addShape(pres.shapes.OVAL, { x:0.35, y:1.88 + i*0.52, w:0.14, h:0.14, fill:{color:"4CAF50"} });
    s.addText(t + ":", { x:0.54, y:1.86 + i*0.52, w:1.4, h:0.26, fontSize:9, bold:true, color:"88FF88", fontFace:"Calibri", margin:0 });
    s.addText(d, { x:0.54, y:2.1 + i*0.52, w:4.1, h:0.28, fontSize:8.5, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });

  // Right — Modern
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:5.1, y:1.25, w:4.7, h:3.9, fill:{color:"0A1025"}, rectRadius:0.1 });
  s.addShape(pres.shapes.RECTANGLE, { x:5.1, y:1.25, w:4.7, h:0.5, fill:{color:"0E7C7B"} });
  s.addText("Modern Balanced Anaesthesia", { x:5.15, y:1.27, w:4.6, h:0.46, fontSize:13, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });

  const modernPoints = [
    ["Multiple agents","IV induction (propofol) + volatile + opioids + NMBA"],
    ["Rapid induction","Jumps Stage II rapidly with IV agents"],
    ["NMB drugs","Muscle relaxation independent of anaesthetic depth"],
    ["Signs unreliable","Paralysis masks motor signs; autonomic changes predominate"],
    ["Monitoring","BIS, Entropy, NMT monitoring, hemodynamic monitoring"],
    ["Guedel's role","Still taught as conceptual framework; not directly applied"],
  ];
  modernPoints.forEach(([t, d], i) => {
    s.addShape(pres.shapes.OVAL, { x:5.22, y:1.88 + i*0.52, w:0.14, h:0.14, fill:{color:"0E7C7B"} });
    s.addText(t + ":", { x:5.4, y:1.86 + i*0.52, w:1.4, h:0.26, fontSize:9, bold:true, color:"77DDCC", fontFace:"Calibri", margin:0 });
    s.addText(d, { x:5.4, y:2.1 + i*0.52, w:4.25, h:0.28, fontSize:8.5, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 12 – CLINICAL PEARLS & MCQ POINTS
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  darkBg(s);
  headerBar(s, "Clinical Pearls & Exam Points", "High-yield facts for MD Anaesthesia");
  footer(s);

  const pearls = [
    { cat:"Exam Favourite", color:"F0A500", items:[
      "Corneal reflex is LOST at start of Plane 2 of Stage III",
      "Laryngeal reflex is LOST at start of Plane 3 of Stage III",
      "Stage III Plane 3 = ideal plane for intra-abdominal surgery (ether era)",
      "Swallowing & vomiting reflex: lost at beginning of Stage III",
    ]},
    { cat:"Stage II Pearls", color:"6A0DAD", items:[
      "Most dangerous stage — avoid any stimulation",
      "Irregular breathing, coughing, vomiting, laryngospasm occur",
      "Premedication (opioids, midazolam, anticholinergics) minimises Stage II",
      "IV induction (propofol, thiopental) shortens Stage II exposure",
    ]},
    { cat:"Pupil Changes", color:"0E7C7B", items:[
      "Stage I: Normal",
      "Stage II: Dilated, reactive",
      "Stage III P1: Normal reactive → P2: Slightly dilated → P3: Dilated sluggish → P4: Max dilated NR",
      "Stage IV: Maximally dilated, non-reactive (mydriasis = overdose sign)",
    ]},
    { cat:"Respiratory Pattern", color:"1565C0", items:[
      "Stage I–III P2: Regular thoracoabdominal breathing",
      "Stage III P3: Predominantly abdominal (intercostal paralysis begins)",
      "Stage III P4: Diaphragmatic breathing only",
      "Stage IV: Apnoea → death without intervention",
    ]},
  ];

  const colPositions = [0.15, 5.05];
  pearls.forEach((pearl, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const cx = colPositions[col];
    const cy = 1.22 + row * 2.1;
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:cx, y:cy, w:4.75, h:2.0, fill:{color:"0C1A30"}, rectRadius:0.08 });
    s.addShape(pres.shapes.RECTANGLE, { x:cx, y:cy, w:4.75, h:0.42, fill:{color: pearl.color} });
    s.addText(pearl.cat, { x:cx+0.05, y:cy+0.02, w:4.65, h:0.38, fontSize:11, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0, valign:"middle" });
    pearl.items.forEach((item, j) => {
      s.addShape(pres.shapes.RECTANGLE, { x:cx+0.12, y:cy+0.5 + j*0.37, w:0.07, h:0.22, fill:{color: pearl.color} });
      s.addText(item, { x:cx+0.24, y:cy+0.48 + j*0.37, w:4.4, h:0.35, fontSize:8.5, color:C.offWhite, fontFace:"Calibri", margin:0 });
    });
  });
}

// ═══════════════════════════════════════════════════════════════
// SLIDE 13 – THANK YOU / SUMMARY
// ═══════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color: C.navy} });
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.18, h:5.625, fill:{color: C.gold} });
  s.addShape(pres.shapes.OVAL, { x:5.5, y:0.5, w:5, h:5, fill:{color:"0D2244"}, line:{color:"1A3A7A", width:1} });

  s.addText("Summary", { x:0.4, y:0.6, w:5, h:0.6, fontSize:32, bold:true, color:C.gold, fontFace:"Calibri", margin:0 });
  s.addShape(pres.shapes.RECTANGLE, { x:0.4, y:1.25, w:4.5, h:0.05, fill:{color: C.gold} });

  const summaryPoints = [
    "Guedel (1937) described 4 stages based on ether anaesthesia",
    "Stage I: Analgesia — conscious, cooperative",
    "Stage II: Excitement — AVOID stimulation",
    "Stage III: Surgical (4 planes) — target zone",
    "Stage IV: Medullary depression — EMERGENCY",
    "Modern anaesthesia bypasses Stage II with IV induction",
    "Conceptual foundation for all depth-of-anaesthesia monitoring",
  ];
  summaryPoints.forEach((pt, i) => {
    s.addShape(pres.shapes.OVAL, { x:0.42, y:1.42 + i*0.48, w:0.14, h:0.14, fill:{color: C.gold} });
    s.addText(pt, { x:0.62, y:1.39 + i*0.48, w:4.7, h:0.45, fontSize:10, color:C.offWhite, fontFace:"Calibri", margin:0 });
  });

  // Thank you
  s.addText("Thank You", { x:5.7, y:1.8, w:3.5, h:0.8, fontSize:36, bold:true, color:C.white, fontFace:"Calibri", align:"center", margin:0 });
  s.addShape(pres.shapes.RECTANGLE, { x:6.2, y:2.65, w:2.5, h:0.05, fill:{color: C.gold} });
  s.addText("MD Anaesthesia\nDepartment of Anaesthesiology", { x:5.7, y:2.75, w:3.5, h:0.8, fontSize:13, color:C.lightGray, fontFace:"Calibri", align:"center", margin:0, italic:true });

  // Reference
  s.addText("Reference: Guedel AE. Inhalation Anesthesia: A Fundamental Guide. New York: Macmillan; 1937.", {
    x:0.4, y:5.25, w:9.2, h:0.3, fontSize:7.5, italic:true, color:C.lightGray, fontFace:"Calibri", margin:0
  });
}

// ── Write file ───────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/guedel-anaesthesia-ppt/Guedel_Stages_of_Anaesthesia.pptx" })
  .then(() => console.log("DONE: Guedel_Stages_of_Anaesthesia.pptx created"))
  .catch(err => console.error("ERROR:", err));
Running Command

cd /home/daytona/workspace/guedel-anaesthesia-ppt && node create_ppt.js

Running Command

ls -lh /home/daytona/workspace/guedel-anaesthesia-ppt/

You've run out of free credits. Sign up for a free account to continue using Orris.
This is a shared conversation. Sign in to Orris to start your own chat.