Monitoring during neurosurgery in MD Anesthesia….Make a ppt

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

neurosurgery intraoperative monitoring evoked potentials EEG

Running Command

mkdir -p /home/daytona/workspace/neuro-monitoring-ppt && ls /home/daytona/workspace/neuro-monitoring-ppt/

Writing File

~/neuro-monitoring-ppt/build.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE";
pres.title = "Monitoring During Neurosurgery";
pres.author = "MD Anesthesia";

// ─── Color palette ───────────────────────────────────────────────────────────
const C = {
  navy:    "0D1B3E",   // dominant dark background
  teal:    "1A8C8C",   // accent / headers
  tealLt:  "2EC4B6",   // sub-accent
  gold:    "F4A261",   // highlight / callout
  white:   "FFFFFF",
  ltGray:  "E8EEF4",
  mdGray:  "9AAFC4",
  slate:   "1E2F45",   // slide bodies
  red:     "E63946",
};

// ─── Master helpers ──────────────────────────────────────────────────────────
function addSlide(bg) {
  const s = pres.addSlide();
  s.background = { color: bg || C.navy };
  return s;
}

function slideHeader(s, title, subtitle) {
  // Accent bar left
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: 5.625, fill: { color: C.teal } });
  s.addText(title, {
    x: 0.2, y: 0.15, w: 12.9, h: 0.65,
    fontSize: 26, bold: true, color: C.white, fontFace: "Calibri",
    margin: 0,
  });
  if (subtitle) {
    s.addText(subtitle, {
      x: 0.2, y: 0.82, w: 12.9, h: 0.35,
      fontSize: 14, color: C.tealLt, fontFace: "Calibri", italic: true, margin: 0,
    });
  }
  // thin separator
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.18, w: 12.9, h: 0.04, fill: { color: C.teal } });
}

function bullet(text, level, sub) {
  return {
    text,
    options: {
      bullet: level === 0 ? { type: "bullet", code: "2022" } : { type: "bullet", indent: 30, code: "25B8" },
      color: level === 0 ? C.white : C.ltGray,
      fontSize: level === 0 ? 16 : 14,
      bold: level === 0 && !sub,
      breakLine: true,
      indentLevel: level,
    }
  };
}

function addBulletBox(s, items, x, y, w, h) {
  s.addText(items, { x, y, w, h, fontFace: "Calibri", valign: "top", margin: 6 });
}

function footerSlide(s, src) {
  s.addText(src || "Source: Barash Clinical Anesthesia 9e | Miller's Anesthesia 10e", {
    x: 0.2, y: 5.3, w: 12.9, h: 0.25, fontSize: 9, color: C.mdGray, fontFace: "Calibri", italic: true, margin: 0,
  });
}

// ─── SLIDE 1: TITLE ──────────────────────────────────────────────────────────
{
  const s = addSlide(C.navy);
  // Large decorative block
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5.2, h: 5.625, fill: { color: C.slate } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal } });
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 4.5, w: 8.1, h: 0.1, fill: { color: C.gold } });

  s.addText("MONITORING\nDURING\nNEUROSURGERY", {
    x: 0.35, y: 0.6, w: 4.7, h: 3.2,
    fontSize: 36, bold: true, color: C.white, fontFace: "Calibri",
    charSpacing: 2, valign: "top", margin: 0,
  });
  s.addText("A Comprehensive Guide for\nMD Anesthesia", {
    x: 0.35, y: 3.9, w: 4.7, h: 0.9,
    fontSize: 16, color: C.tealLt, fontFace: "Calibri", italic: true, margin: 0,
  });

  // Right column key topics
  s.addText("KEY TOPICS", {
    x: 5.5, y: 0.5, w: 7.5, h: 0.45,
    fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", charSpacing: 4, margin: 0,
  });
  const topics = [
    "Cerebral Physiology Review",
    "Standard Intraoperative Monitoring",
    "Neurophysiological Monitoring (IONM)",
    "Cerebral Perfusion Monitoring",
    "Depth of Anesthesia Monitoring",
    "ICP Monitoring",
    "Effect of Anesthetic Agents on Monitoring",
    "Specific Procedures",
  ];
  topics.forEach((t, i) => {
    s.addShape(pres.ShapeType.rect, { x: 5.5, y: 1.1 + i * 0.52, w: 0.08, h: 0.35, fill: { color: C.teal } });
    s.addText(t, {
      x: 5.72, y: 1.1 + i * 0.52, w: 7.2, h: 0.38,
      fontSize: 14, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0,
    });
  });
}

// ─── SLIDE 2: CEREBRAL PHYSIOLOGY ───────────────────────────────────────────
{
  const s = addSlide(C.slate);
  slideHeader(s, "Cerebral Physiology — The Foundation", "Understanding physiology before monitoring");

  const data = [
    ["Parameter", "Normal Value"],
    ["Cerebral Blood Flow (CBF)", "50 mL/100 g/min (750 mL/min total)"],
    ["CMRO₂", "3 – 3.8 mL/100 g/min"],
    ["CPP", "MAP – ICP (or CVP, whichever higher)"],
    ["Autoregulation Range (MAP)", "60 – 160 mmHg"],
    ["Normal ICP", "5 – 15 mmHg"],
    ["Brain % of body weight", "2% body weight → 20% O₂ consumption"],
  ];

  s.addTable(data, {
    x: 0.3, y: 1.35, w: 6.5, h: 3.6,
    fontFace: "Calibri", fontSize: 13,
    rowH: 0.46,
    firstRowH: 0.46,
    border: { type: "solid", pt: 1, color: C.teal },
    fill: C.slate,
    color: C.white,
    bold: false,
    autoPage: false,
    colW: [3.2, 3.3],
  });

  // Right panel
  s.addShape(pres.ShapeType.rect, { x: 7.1, y: 1.35, w: 5.8, h: 3.9, fill: { color: C.navy }, line: { color: C.teal, pt: 1 } });
  s.addText("KEY PRINCIPLES", { x: 7.2, y: 1.4, w: 5.6, h: 0.4, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  const pts = [
    "Flow-Metabolism Coupling: CBF matches CMRO₂ in seconds",
    "CO₂ Reactivity: ↑PaCO₂ → ↑CBF; ΔPaCO₂ 1 mmHg ≈ Δ1–2 mL/100g/min",
    "Ischemia: Irreversible injury after only 4–5 min global ischemia",
    "Monro-Kellie Doctrine: Brain + CSF + Blood = fixed volume; ↑one → ↑ICP",
    "CPP = MAP – ICP; maintain CPP ≥ 60 mmHg",
  ];
  addBulletBox(s, pts.map((p, i) => bullet(p, 0)), 7.2, 1.85, 5.6, 3.2);
  footerSlide(s);
}

// ─── SLIDE 3: OVERVIEW — MONITORING CATEGORIES ──────────────────────────────
{
  const s = addSlide(C.navy);
  slideHeader(s, "Overview: Monitoring Categories in Neuroanesthesia", "");

  const boxes = [
    { title: "Standard Monitoring", icon: "♥", color: C.teal, x: 0.2, y: 1.35,
      items: ["ECG (5-lead)", "SpO₂", "NIBP / IBP", "EtCO₂", "Temperature", "Urine output", "CVP / PA line (selected)"] },
    { title: "Neurophysiological (IONM)", icon: "⚡", color: C.gold, x: 3.6, y: 1.35,
      items: ["EEG", "Somatosensory EPs (SSEP)", "Motor EPs (MEP)", "Brainstem AEPs (BAEP)", "Visual EPs (VEP)", "EMG (free-run / triggered)"] },
    { title: "Cerebral Perfusion", icon: "🩸", color: C.tealLt, x: 7.0, y: 1.35,
      items: ["Transcranial Doppler (TCD)", "Near-Infrared Spectroscopy (NIRS)", "Laser Doppler Flowmetry", "Jugular bulb O₂ sat (SjvO₂)"] },
    { title: "ICP / Brain Compliance", icon: "📊", color: "#C77DFF", x: 10.4, y: 1.35,
      items: ["Ventriculostomy (gold standard)", "Intraparenchymal probe", "Subdural / epidural devices", "Optic nerve sheath diam."] },
  ];

  boxes.forEach(b => {
    s.addShape(pres.ShapeType.rect, { x: b.x, y: b.y, w: 3.2, h: 3.9, fill: { color: C.slate }, line: { color: b.color, pt: 2 } });
    s.addText(b.title, { x: b.x + 0.1, y: b.y + 0.08, w: 3.0, h: 0.45, fontSize: 14, bold: true, color: b.color, fontFace: "Calibri", margin: 0 });
    addBulletBox(s, b.items.map(i => bullet(i, 0)), b.x + 0.1, b.y + 0.55, 3.0, 3.2);
  });
  footerSlide(s);
}

// ─── SLIDE 4: EEG ────────────────────────────────────────────────────────────
{
  const s = addSlide(C.slate);
  slideHeader(s, "Electroencephalography (EEG)", "Continuous cortical electrical activity monitoring");

  addBulletBox(s, [
    bullet("Principle", 0),
    bullet("Records spontaneous electrical activity of cerebral cortex", 1),
    bullet("Reflects cerebral metabolic and perfusion status in real-time", 1),
    bullet("Indications", 0),
    bullet("Carotid endarterectomy (CEA) — detecting ischemia during cross-clamp", 1),
    bullet("Epilepsy surgery — cortical mapping; seizure focus localization", 1),
    bullet("Barbiturate coma monitoring — burst suppression endpoint", 1),
    bullet("Aneurysm surgery with temporary clip application", 1),
    bullet("EEG Patterns", 0),
    bullet("Normal awake: Fast, low amplitude (beta/alpha)", 1),
    bullet("Light anesthesia: Increased amplitude, slowing", 1),
    bullet("Deep anesthesia: Burst suppression", 1),
    bullet("Ischemia / anoxia: Slowing → flat (isoelectric)", 1),
    bullet("Advantages", 0),
    bullet("Non-invasive, continuous, real-time cortical assessment", 1),
    bullet("Processed EEG (BIS, Entropy) widely used for anesthetic depth", 1),
  ], 0.2, 1.35, 6.5, 4.0);

  // Right: Anesthetic effect box
  s.addShape(pres.ShapeType.rect, { x: 7.0, y: 1.35, w: 6.1, h: 3.95, fill: { color: C.navy }, line: { color: C.gold, pt: 1.5 } });
  s.addText("⚠  ANESTHETIC DRUG EFFECTS ON EEG", { x: 7.1, y: 1.42, w: 5.9, h: 0.4, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });

  const drugRows = [
    ["Drug / Agent", "EEG Effect"],
    ["Volatile agents (dose↑)", "Burst suppression → isoelectric"],
    ["Propofol", "High-freq → burst suppression"],
    ["Ketamine", "↑ High-frequency activity; activates"],
    ["Benzodiazepines", "Beta activation → slow/suppress"],
    ["Etomidate", "Burst suppression"],
    ["N₂O", "↑ Frequency; little suppression alone"],
    ["Opioids", "Mild slowing; minimal effect"],
  ];
  s.addTable(drugRows, {
    x: 7.1, y: 1.9, w: 5.9, h: 3.2,
    fontFace: "Calibri", fontSize: 12,
    rowH: 0.37,
    border: { type: "solid", pt: 0.5, color: C.teal },
    fill: C.slate,
    color: C.white,
    colW: [2.9, 3.0],
  });
  footerSlide(s);
}

// ─── SLIDE 5: SSEP ───────────────────────────────────────────────────────────
{
  const s = addSlide(C.navy);
  slideHeader(s, "Somatosensory Evoked Potentials (SSEP)", "Monitoring dorsal column / medial lemniscal pathways");

  addBulletBox(s, [
    bullet("Principle", 0),
    bullet("Peripheral nerve stimulated → cortical response recorded", 1),
    bullet("Monitors SENSORY pathways (posterior spinal cord / thalamocortical tracts)", 1),
    bullet("Upper limb: median/ulnar nerve → contralateral cortex", 1),
    bullet("Lower limb: tibial/peroneal nerve → cortex", 1),
    bullet("Indications", 0),
    bullet("Spinal cord surgeries (scoliosis, tumor, vascular)", 1),
    bullet("Cerebral aneurysm / AVM surgery", 1),
    bullet("Carotid endarterectomy", 1),
    bullet("Posterior fossa tumors", 1),
    bullet("Alert Criteria (50-10 rule)", 0),
    bullet("⚠ ≥50% decrease in AMPLITUDE or ≥10% increase in LATENCY", 1),
    bullet("Prompt surgical / anesthetic corrective action required", 1),
  ], 0.2, 1.35, 6.5, 4.0);

  s.addShape(pres.ShapeType.rect, { x: 7.0, y: 1.35, w: 6.1, h: 3.95, fill: { color: C.slate }, line: { color: C.tealLt, pt: 1.5 } });
  s.addText("ANESTHETIC EFFECTS ON SSEP", { x: 7.1, y: 1.42, w: 5.9, h: 0.4, fontSize: 13, bold: true, color: C.tealLt, fontFace: "Calibri", margin: 0 });

  addBulletBox(s, [
    bullet("Volatile Agents: Dose-dependent ↓ amplitude, ↑ latency", 0),
    bullet("Preferred: ≤0.5 MAC; avoid >1 MAC during critical periods", 1),
    bullet("Propofol (TIVA): Minimal effect; preferred for SSEP monitoring", 0),
    bullet("N₂O: Significant ↓ amplitude (additive with volatiles)", 0),
    bullet("Opioids: Minimal effect on cortical SSEP", 0),
    bullet("NMBs: No direct effect (peripheral origin of stimulus)", 0),
    bullet("Hypothermia: ↑ latency (1°C drop → ~5% latency increase)", 0),
    bullet("Hypotension: ↓ amplitude; MAP > 60–65 mmHg target", 0),
    bullet("TIVA (propofol + remifentanil): GOLD STANDARD for SSEP monitoring", 0),
  ], 7.1, 1.9, 5.9, 3.3);
  footerSlide(s);
}

// ─── SLIDE 6: MEP ────────────────────────────────────────────────────────────
{
  const s = addSlide(C.slate);
  slideHeader(s, "Motor Evoked Potentials (MEP)", "Monitoring corticospinal / anterior spinal cord pathways");

  // Left column
  addBulletBox(s, [
    bullet("Principle", 0),
    bullet("Transcranial electrical stimulation → recording from limb muscles (CMAP)", 1),
    bullet("Monitors MOTOR pathways (anterior corticospinal tract)", 1),
    bullet("Complements SSEP (anterior vs. posterior cord)", 1),
    bullet("Types", 0),
    bullet("TcMEP: Transcranial electrical motor EP (most common)", 1),
    bullet("Direct Cortical: D-wave (epidural electrode) — most sensitive", 1),
    bullet("Indications", 0),
    bullet("Spinal cord surgery (especially anterior pathology)", 1),
    bullet("Intracranial tumor near motor cortex / pyramidal tracts", 1),
    bullet("Cerebrovascular surgery (aneurysm, AVM)", 1),
    bullet("Alert Criteria", 0),
    bullet("⚠ >50% decrease in amplitude = significant warning", 1),
    bullet("Total loss of response = immediate surgical alert", 1),
    bullet("D-wave <50% despite TcMEP loss: transient deficit likely", 1),
  ], 0.2, 1.35, 6.4, 4.0);

  s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.35, w: 6.2, h: 3.95, fill: { color: C.navy }, line: { color: C.gold, pt: 1.5 } });
  s.addText("CRITICAL ANESTHETIC CONSIDERATIONS", { x: 7.0, y: 1.42, w: 6.0, h: 0.4, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("NMBs: MUST AVOID or use only for intubation (partial block abolishes CMAP)", 0),
    bullet("Volatile agents: Profound dose-dependent suppression; avoid >0.5 MAC", 0),
    bullet("N₂O: Significant suppression; avoid when MEP essential", 0),
    bullet("TIVA (propofol + remifentanil): PREFERRED anesthetic technique", 0),
    bullet("Ketamine (sub-anesthetic dose): May enhance MEP amplitude", 0),
    bullet("Temperature: Hypothermia markedly ↑ latency and ↓ amplitude", 0),
    bullet("Patient Movement: Stimulation can cause sudden movement — bite block essential, secure ETT", 0),
    bullet("Contraindications", 0),
    bullet("Cardiac pacemaker, cochlear implants, cortical electrodes in situ", 1),
    bullet("Epilepsy (relative)", 1),
    bullet("Skull defects near stimulation sites", 1),
  ], 7.0, 1.9, 6.0, 3.3);
  footerSlide(s);
}

// ─── SLIDE 7: BAEP + VEP + EMG ──────────────────────────────────────────────
{
  const s = addSlide(C.navy);
  slideHeader(s, "BAEP | VEP | EMG", "Cranial nerve and auditory pathway monitoring");

  const cols = [
    {
      title: "Brainstem AEP (BAEP)", color: C.teal, x: 0.2,
      items: [
        "Auditory click → cochlear nerve → brainstem waves (I–VII)",
        "Wave I = cochlear nerve; Wave V = inferior colliculus",
        "Indications: Acoustic neuroma, CP angle tumors, posterior fossa surgery",
        "Alert: ≥50% amplitude↓ or ≥1 ms latency prolongation of Wave V",
        "Relatively resistant to anesthetic agents (compared to SSEP/MEP)",
        "Most stable EP modality under anesthesia",
      ]
    },
    {
      title: "Visual EP (VEP)", color: C.tealLt, x: 4.55,
      items: [
        "Flash/LED goggles → visual pathway → occipital cortex",
        "Indications: Pituitary / parasellar surgery, optic nerve-adjacent tumors",
        "Highly variable; most susceptible to anesthetic effects",
        "Alert: Loss of N75 wave or >20 ms latency change",
        "Technically challenging; limited routine use",
        "Growing role with LED-based intraocular stimulation",
      ]
    },
    {
      title: "EMG (Electromyography)", color: C.gold, x: 8.9,
      items: [
        "Free-run EMG: Continuous spontaneous activity → detects nerve irritation",
        "Triggered EMG: Confirms screw/electrode placement near nerve",
        "Cranial nerve monitoring: CN VII (facial), IX, X, XI, XII",
        "Alert: Sustained neurotonic discharge → nerve at risk",
        "NMB: Must avoid for EMG monitoring",
        "Indications: Acoustic neuroma, skull base, posterior fossa",
      ]
    },
  ];

  cols.forEach(c => {
    s.addShape(pres.ShapeType.rect, { x: c.x, y: 1.35, w: 4.2, h: 3.95, fill: { color: C.slate }, line: { color: c.color, pt: 1.5 } });
    s.addText(c.title, { x: c.x + 0.1, y: 1.4, w: 4.0, h: 0.42, fontSize: 14, bold: true, color: c.color, fontFace: "Calibri", margin: 0 });
    addBulletBox(s, c.items.map(i => bullet(i, 0)), c.x + 0.1, 1.88, 4.0, 3.3);
  });
  footerSlide(s);
}

// ─── SLIDE 8: CEREBRAL PERFUSION MONITORING ─────────────────────────────────
{
  const s = addSlide(C.slate);
  slideHeader(s, "Cerebral Perfusion Monitoring", "Ensuring adequate cerebral oxygen delivery");

  // TCD box
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.35, w: 6.3, h: 1.95, fill: { color: C.navy }, line: { color: C.teal, pt: 1.5 } });
  s.addText("Transcranial Doppler (TCD)", { x: 0.3, y: 1.38, w: 6.1, h: 0.4, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Measures MCA blood flow velocity (real-time)", 0),
    bullet("Uses: CEA (detect emboli, test clamp tolerance), vasospasm after SAH, CABG", 0),
    bullet("Detects microemboli (HITS — High Intensity Transient Signals)", 0),
    bullet("Probe: 2 MHz pulsed-wave Doppler through temporal window", 0),
  ], 0.3, 1.8, 6.1, 1.4);

  // NIRS box
  s.addShape(pres.ShapeType.rect, { x: 6.8, y: 1.35, w: 6.3, h: 1.95, fill: { color: C.navy }, line: { color: C.tealLt, pt: 1.5 } });
  s.addText("Near-Infrared Spectroscopy (NIRS / rSO₂)", { x: 6.9, y: 1.38, w: 6.1, h: 0.4, fontSize: 14, bold: true, color: C.tealLt, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Non-invasive regional cerebral O₂ saturation (normal ~55–75%)", 0),
    bullet("Alert: >20% drop from baseline OR absolute <50%", 0),
    bullet("Uses: CEA, cardiac surgery, beach chair position", 0),
    bullet("Reflects venous-weighted mixed cortical saturation", 0),
  ], 6.9, 1.8, 6.1, 1.4);

  // SjvO2 box
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 3.4, w: 6.3, h: 1.9, fill: { color: C.navy }, line: { color: C.gold, pt: 1.5 } });
  s.addText("Jugular Bulb O₂ Saturation (SjvO₂)", { x: 0.3, y: 3.43, w: 6.1, h: 0.4, fontSize: 14, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Normal: 55–75%; <50% = cerebral ischemia; >75% = hyperemia / neuronal death", 0),
    bullet("Internal jugular catheter (retrograde) → jugular bulb", 0),
    bullet("Continuous oximetry; guides CPP and ventilation targets", 0),
    bullet("Used in TBI, major neurosurgery, carotid surgery", 0),
  ], 0.3, 3.88, 6.1, 1.35);

  // Brain tissue O2
  s.addShape(pres.ShapeType.rect, { x: 6.8, y: 3.4, w: 6.3, h: 1.9, fill: { color: C.navy }, line: { color: "#C77DFF", pt: 1.5 } });
  s.addText("Brain Tissue O₂ (PbtO₂)", { x: 6.9, y: 3.43, w: 6.1, h: 0.4, fontSize: 14, bold: true, color: "#C77DFF", fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Licox or Neurovent probe inserted into brain parenchyma", 0),
    bullet("Normal PbtO₂: 20–35 mmHg; critical <15 mmHg; crisis <10 mmHg", 0),
    bullet("Guides O₂ therapy, CPP augmentation in TBI & major surgery", 0),
    bullet("Used in conjunction with ICP monitoring in neurocritical care", 0),
  ], 6.9, 3.88, 6.1, 1.35);
  footerSlide(s);
}

// ─── SLIDE 9: ICP MONITORING ─────────────────────────────────────────────────
{
  const s = addSlide(C.navy);
  slideHeader(s, "Intracranial Pressure (ICP) Monitoring", "Monro-Kellie doctrine in clinical practice");

  // Methods table
  const rows = [
    ["Method", "Location", "Accuracy", "CSF Drain", "Infection Risk"],
    ["Ventriculostomy (EVD)", "Lateral ventricle", "Gold standard", "Yes ✓", "Moderate"],
    ["Intraparenchymal (Codman/Camino)", "Brain tissue", "Excellent", "No", "Low"],
    ["Subdural bolt/screw", "Subdural space", "Good", "No", "Low"],
    ["Epidural transducer", "Epidural space", "Moderate", "No", "Low"],
    ["Non-invasive (ONSD)", "Optic nerve sheath", "Screening only", "No", "None"],
  ];

  s.addTable(rows, {
    x: 0.2, y: 1.35, w: 12.9, h: 3.0,
    fontFace: "Calibri", fontSize: 12.5,
    rowH: 0.45,
    border: { type: "solid", pt: 0.8, color: C.teal },
    fill: C.slate,
    color: C.white,
    colW: [3.0, 2.4, 2.3, 2.0, 2.2],
    autoPage: false,
  });

  // Key principles
  s.addText("TREATMENT THRESHOLDS & TARGETS", { x: 0.2, y: 4.5, w: 6.5, h: 0.35, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Treat ICP > 20–22 mmHg (BTF guidelines)", 0),
    bullet("Target CPP ≥ 60 mmHg (CPP = MAP – ICP)", 0),
    bullet("Stepwise management: HOB 30°, euvolemia, mannitol, hypertonic saline, hyperventilation (temporary), decompressive craniectomy", 0),
  ], 0.2, 4.88, 6.4, 0.68);

  s.addText("ANESTHESIA EFFECTS ON ICP", { x: 7.0, y: 4.5, w: 6.1, h: 0.35, fontSize: 13, bold: true, color: C.tealLt, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Volatiles: ↑ICP (dose-dependent cerebral vasodilation); use ≤0.5 MAC", 0),
    bullet("Propofol: ↓ICP (↓CMRO₂ → ↓CBF); preferred for raised ICP", 0),
    bullet("Ketamine: Traditionally avoided (now controversial — may be safe with controlled ventilation)", 0),
    bullet("Succinylcholine: Transient ↑ICP; avoid if severely raised", 0),
  ], 7.0, 4.88, 6.1, 0.68);
  footerSlide(s);
}

// ─── SLIDE 10: DEPTH OF ANESTHESIA ──────────────────────────────────────────
{
  const s = addSlide(C.slate);
  slideHeader(s, "Depth of Anesthesia Monitoring", "Processed EEG — BIS, Entropy, Narcotrend");

  addBulletBox(s, [
    bullet("Bispectral Index (BIS)", 0),
    bullet("Derived from frontal EEG; scale 0–100 (awake=100; isoelectric=0)", 1),
    bullet("Target range: 40–60 for surgical anesthesia", 1),
    bullet("Critical in neurosurgery: prevents awareness; guides burst suppression (BIS 0–20)", 1),
    bullet("Essential during awake craniotomy — titrate to BIS 60–80 during awake phases", 1),
    bullet("Spectral Entropy (M-Entropy / S-Entropy)", 0),
    bullet("Response Entropy (RE): includes EMG component — detects arousal", 1),
    bullet("State Entropy (SE): pure EEG — reflects hypnotic depth", 1),
    bullet("Target: RE ≈ SE = 40–60 for adequate anesthesia", 1),
    bullet("Limitations of DoA Monitors", 0),
    bullet("Can be falsely suppressed by muscle relaxants (↓ EMG artifact)", 1),
    bullet("High-frequency EEG from ketamine/N₂O may give falsely high BIS", 1),
    bullet("Cannot replace clinical assessment; unreliable in hypothermia", 1),
    bullet("Awake Craniotomy — Special Consideration", 0),
    bullet("Dexmedetomidine + remifentanil ± propofol infusion", 1),
    bullet("Target: patient comfortable, cooperative, able to follow commands", 1),
    bullet("BIS 70–80 during asleep phases; allow arousal for motor/language testing", 1),
  ], 0.2, 1.35, 6.4, 4.0);

  // Right info panel
  s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.35, w: 6.2, h: 3.95, fill: { color: C.navy }, line: { color: C.teal, pt: 1.5 } });
  s.addText("BIS VALUE GUIDE", { x: 7.0, y: 1.42, w: 6.0, h: 0.38, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });

  const bisData = [
    ["BIS Range", "Clinical State"],
    ["100", "Fully awake"],
    ["80 – 100", "Sedation (light)"],
    ["60 – 80", "Light anesthesia / sedation"],
    ["40 – 60", "Surgical anesthesia (TARGET)"],
    ["20 – 40", "Deep anesthesia"],
    ["< 20", "Burst suppression / barbiturate coma"],
    ["0", "Isoelectric / flat EEG"],
  ];
  s.addTable(bisData, {
    x: 7.0, y: 1.88, w: 6.0, h: 3.35,
    fontFace: "Calibri", fontSize: 13,
    rowH: 0.42,
    border: { type: "solid", pt: 0.8, color: C.teal },
    fill: C.slate,
    color: C.white,
    colW: [2.5, 3.5],
  });
  footerSlide(s);
}

// ─── SLIDE 11: EFFECT OF AGENTS (TABLE) ─────────────────────────────────────
{
  const s = addSlide(C.navy);
  slideHeader(s, "Effect of Anesthetic Agents on IONM", "Critical knowledge for the neuroanesthesiologist");

  const tableData = [
    ["Agent", "EEG", "SSEP", "MEP", "BAEP", "ICP / CBF"],
    ["Propofol", "Burst suppression (high dose)", "Mild ↓amp", "Mild ↓amp", "Minimal", "↓ ICP, ↓ CBF ✓"],
    ["Volatile (Iso/Sevo/Des)", "Dose↑ → burst suppress", "↓ amp ↑ lat", "Major ↓↓", "Minimal", "↑ ICP, ↑ CBF ✗"],
    ["Nitrous Oxide (N₂O)", "↑ frequency", "↓ amp (sig)", "↓ amp (sig)", "Minimal", "↑ CBF (mild)"],
    ["Ketamine", "Activates (β↑)", "Minimal", "↑ or neutral", "Minimal", "↑ ICP (when no ventilation ctrl)"],
    ["Etomidate", "Burst suppression", "↑ amp", "Activates", "Minimal", "↓ ICP, ↓ CBF ✓"],
    ["Dexmedetomidine", "Slowing", "Minimal", "Minimal", "Minimal", "Minimal"],
    ["Opioids (Fentanyl)", "Mild slowing", "Minimal", "Minimal", "Minimal", "Minimal (preferred)"],
    ["NMBs", "No effect", "No effect", "↓↓ ABOLISH", "No effect", "No direct effect"],
    ["Hypothermia", "↑ latency / flat", "↑ latency ↓ amp", "↑ lat ↓ amp", "↑ latency", "↓ CMRO₂ protective"],
  ];

  s.addTable(tableData, {
    x: 0.15, y: 1.35, w: 13.0, h: 3.95,
    fontFace: "Calibri", fontSize: 11,
    rowH: 0.4,
    border: { type: "solid", pt: 0.6, color: C.teal },
    fill: C.slate,
    color: C.white,
    colW: [2.4, 2.0, 2.0, 2.0, 1.9, 2.7],
    autoPage: false,
  });

  s.addText("✓ = favourable for neuroanesthesia   ✗ = caution required   ↓↓ = major suppression", {
    x: 0.2, y: 5.33, w: 12.9, h: 0.22, fontSize: 10, color: C.gold, fontFace: "Calibri", italic: true, margin: 0,
  });
  footerSlide(s, "Source: Miller's Anesthesia 10e | Barash Clinical Anesthesia 9e");
}

// ─── SLIDE 12: SPECIAL PROCEDURES ──────────────────────────────────────────
{
  const s = addSlide(C.slate);
  slideHeader(s, "Monitoring in Specific Neurosurgical Procedures", "");

  const procs = [
    {
      title: "Carotid Endarterectomy (CEA)",
      items: ["EEG/SSEP: ischemia during cross-clamp", "TCD: detect emboli (HITS)", "NIRS (rSO₂): non-invasive option", "Awake technique: gold standard neurologic monitor"],
      x: 0.2, y: 1.35, color: C.teal,
    },
    {
      title: "Cerebral Aneurysm Surgery",
      items: ["SSEP + MEP: during temporary clipping", "TCD: vasospasm surveillance", "EEG: ischemia detection", "BIS: anesthetic depth"],
      x: 6.8, y: 1.35, color: C.gold,
    },
    {
      title: "Spinal Cord Surgery (Scoliosis/Tumor)",
      items: ["SSEP + MEP (combined multimodal IONM)", "Free-run EMG: nerve root irritation", "D-wave: most sensitive for cord integrity", "TIVA mandatory — avoid NMB"],
      x: 0.2, y: 3.25, color: C.tealLt,
    },
    {
      title: "Posterior Fossa / Acoustic Neuroma",
      items: ["BAEP: cochlear nerve monitoring (Wave V)", "Facial EMG (CN VII monitoring)", "Triggered EMG: CN IX, X, XI, XII", "ABR changes → adjust retraction / position"],
      x: 6.8, y: 3.25, color: "#C77DFF",
    },
  ];

  procs.forEach(p => {
    s.addShape(pres.ShapeType.rect, { x: p.x, y: p.y, w: 6.4, h: 1.75, fill: { color: C.navy }, line: { color: p.color, pt: 1.5 } });
    s.addText(p.title, { x: p.x + 0.1, y: p.y + 0.06, w: 6.2, h: 0.38, fontSize: 14, bold: true, color: p.color, fontFace: "Calibri", margin: 0 });
    addBulletBox(s, p.items.map(i => bullet(i, 0)), p.x + 0.1, p.y + 0.46, 6.2, 1.2);
  });
  footerSlide(s);
}

// ─── SLIDE 13: TIVA vs VOLATILE ─────────────────────────────────────────────
{
  const s = addSlide(C.navy);
  slideHeader(s, "TIVA vs. Volatile Anesthesia in Neuroanesthesia", "Choosing the right anesthetic technique");

  // TIVA column
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.35, w: 6.3, h: 3.9, fill: { color: C.slate }, line: { color: C.teal, pt: 2 } });
  s.addText("✓  TIVA (Propofol + Remifentanil)", { x: 0.3, y: 1.4, w: 6.1, h: 0.45, fontSize: 15, bold: true, color: C.teal, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Minimal effect on SSEP amplitude/latency", 0),
    bullet("Preserves MEP responses — preferred for spinal cord surgery", 0),
    bullet("Decreases ICP and CMRO₂", 0),
    bullet("Maintains cerebrovascular autoregulation and CO₂ reactivity", 0),
    bullet("Required when reliable IONM is essential", 0),
    bullet("Smooth, predictable emergence for early neurologic assessment", 0),
    bullet("Disadvantage: Risk of TIVA awareness if not monitored (use BIS)", 0),
    bullet("Propofol infusion syndrome (PRIS) — rare but monitor with long infusions", 0),
  ], 0.3, 1.92, 6.1, 3.2);

  // Volatile column
  s.addShape(pres.ShapeType.rect, { x: 6.8, y: 1.35, w: 6.3, h: 3.9, fill: { color: C.slate }, line: { color: C.gold, pt: 2 } });
  s.addText("⚠  Volatile (Iso / Sevo / Des)", { x: 6.9, y: 1.4, w: 6.1, h: 0.45, fontSize: 15, bold: true, color: C.gold, fontFace: "Calibri", margin: 0 });
  addBulletBox(s, [
    bullet("Acceptable at ≤0.5 MAC with N₂O-free technique", 0),
    bullet("Suppresses SSEP (dose-dependent ↓ amplitude)", 0),
    bullet("MEP severely impaired — AVOID if MEP monitoring required", 0),
    bullet("Dose-dependent ↑ CBF and ↑ ICP (especially >1 MAC)", 0),
    bullet("Impairs cerebral autoregulation at higher concentrations", 0),
    bullet("Advantage: Ease of administration; hemodynamic stability", 0),
    bullet("Isoflurane: preferred volatile (EEG burst suppression at high dose — neuroprotective)", 0),
    bullet("Desflurane: ↑ CBF acutely; ↑ ICP — use with caution", 0),
  ], 6.9, 1.92, 6.1, 3.2);
  footerSlide(s);
}

// ─── SLIDE 14: POSITIONING & SPECIAL CONSIDERATIONS ─────────────────────────
{
  const s = addSlide(C.slate);
  slideHeader(s, "Positioning & Special Monitoring Considerations", "Sitting position | Posterior fossa | Awake craniotomy");

  addBulletBox(s, [
    bullet("Sitting / Semi-Sitting (Beach Chair) Position", 0),
    bullet("↑ Risk of VAE (Venous Air Embolism) — monitor with precordial Doppler (most sensitive) + TEE", 1),
    bullet("NIRS: Bilateral cerebral oxygenation monitoring — 20% ↓ from baseline = concerning", 1),
    bullet("TCD: Detect air emboli in MCA", 1),
    bullet("Precordial Doppler: simple, sensitive, continuous", 1),
    bullet("ETCO₂: Sudden ↓ = large VAE; N₂ detectable if N₂O avoided", 1),
    bullet("IBP mandatory; CVP line for aspiration of air from right atrium", 1),
    bullet("Venous Air Embolism (VAE) Management", 0),
    bullet("Flood field with saline, compress jugular veins, lower head, aspirate CVP, 100% O₂, vasopressors", 1),
    bullet("Paradoxical embolism risk if PFO present — TOE/TEE assessment pre-op", 1),
    bullet("Posterior Fossa Surgery", 0),
    bullet("CN monitoring (BAEP, EMG CN VII/IX/X)", 1),
    bullet("SSEP monitoring for sensory tracts", 1),
    bullet("VAE monitoring (position-dependent)", 1),
    bullet("Awake Craniotomy", 0),
    bullet("Asleep-awake-asleep technique: Dexmedetomidine + Remifentanil + Propofol (bolus)", 1),
    bullet("Language and motor mapping during awake phase — SSEP/MEP supplement", 1),
    bullet("No NMBs; airway must be secured (LMA or ETT)", 1),
  ], 0.2, 1.35, 6.4, 4.0);

  // Quick reference box
  s.addShape(pres.ShapeType.rect, { x: 6.9, y: 1.35, w: 6.2, h: 3.95, fill: { color: C.navy }, line: { color: C.tealLt, pt: 1.5 } });
  s.addText("VAE DETECTION SENSITIVITY", { x: 7.0, y: 1.42, w: 6.0, h: 0.38, fontSize: 13, bold: true, color: C.tealLt, fontFace: "Calibri", margin: 0 });

  const vaeData = [
    ["Monitor", "Sensitivity"],
    ["TEE (Transoesophageal Echo)", "Most sensitive (0.02 mL/kg)"],
    ["Precordial Doppler", "Highly sensitive (0.05 mL/kg)"],
    ["PA Catheter", "Moderate"],
    ["EtCO₂ ↓", "Moderate — delayed"],
    ["EtN₂ ↑", "Sensitive if N₂O-free"],
    ["SpO₂ ↓ / BP ↓", "Late / large VAE only"],
  ];
  s.addTable(vaeData, {
    x: 7.0, y: 1.88, w: 6.0, h: 2.8,
    fontFace: "Calibri", fontSize: 12.5,
    rowH: 0.4,
    border: { type: "solid", pt: 0.7, color: C.teal },
    fill: C.slate, color: C.white,
    colW: [3.0, 3.0],
  });

  addBulletBox(s, [
    bullet("N₂O should be discontinued at first sign of VAE", 0),
    bullet("Paradoxical embolism (arterial): screen for PFO pre-op in sitting patients", 0),
  ], 7.0, 4.75, 6.0, 0.5);
  footerSlide(s);
}

// ─── SLIDE 15: SUMMARY ──────────────────────────────────────────────────────
{
  const s = addSlide(C.navy);
  slideHeader(s, "Summary & Key Take-Home Points", "Monitoring During Neurosurgery — MD Anesthesia");

  const pts = [
    { num: "01", text: "MULTIMODAL MONITORING: No single monitor is sufficient. Combine standard + neurophysiological + cerebral perfusion monitors for optimal patient safety.", c: C.teal },
    { num: "02", text: "ANESTHETIC CHOICE MATTERS: TIVA (propofol + remifentanil) is the gold standard when IONM (SSEP/MEP) is required. Volatile agents should be ≤0.5 MAC.", c: C.tealLt },
    { num: "03", text: "ALERT CRITERIA: SSEP/MEP — 50% amplitude decrease or 10% latency increase demands immediate response (surgical pause, correct hypotension/anemia, adjust anesthesia).", c: C.gold },
    { num: "04", text: "ICP MANAGEMENT: Maintain CPP ≥ 60 mmHg. Target MAP to preserve autoregulation. Ventriculostomy is gold standard for ICP monitoring and CSF drainage.", c: "#C77DFF },
    { num: "05", text: "SITTING POSITION: Always use precordial Doppler + NIRS + continuous IBP. Prepare for VAE. Discontinue N₂O if VAE occurs.", c: C.red },
    { num: "06", text: "NMBs: Avoid completely if EMG or MEP monitoring is used. Use only for intubation if required, then allow full reversal before monitoring begins.", c: C.mdGray },
  ];

  pts.forEach((p, i) => {
    const row = Math.floor(i / 2);
    const col = i % 2;
    const x = col === 0 ? 0.2 : 6.8;
    const y = 1.35 + row * 1.35;
    s.addShape(pres.ShapeType.rect, { x, y, w: 6.4, h: 1.25, fill: { color: C.slate }, line: { color: p.c, pt: 1.5 } });
    s.addText(p.num, { x: x + 0.1, y: y + 0.06, w: 0.65, h: 0.7, fontSize: 26, bold: true, color: p.c, fontFace: "Calibri", margin: 0 });
    s.addText(p.text, { x: x + 0.82, y: y + 0.06, w: 5.5, h: 1.1, fontSize: 12, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
  });
  footerSlide(s);
}

// ─── WRITE FILE ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/neuro-monitoring-ppt/Monitoring_During_Neurosurgery.pptx" })
  .then(() => console.log("SUCCESS: File written."))
  .catch(e => console.error("ERROR:", e));
Running Command

cd /home/daytona/workspace/neuro-monitoring-ppt && node build.js 2>&1

Editing File

~/neuro-monitoring-ppt/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/neuro-monitoring-ppt/build.js'
Running Command

cd /home/daytona/workspace/neuro-monitoring-ppt && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/neuro-monitoring-ppt/

Your presentation is ready!

Monitoring During Neurosurgery

Presentation · PPTX


What's inside — 15 slides, wide (16:9) format

SlideContent
1Title slide — key topic overview
2Cerebral Physiology — CBF, CMRO₂, CPP, autoregulation, Monro-Kellie
3Overview of Monitoring Categories — 4-column layout
4EEG — indications, patterns, drug effects table
5SSEP — principles, indications, 50-10 alert rule, anesthetic effects
6MEP — corticospinal monitoring, NMB contraindication, D-wave
7BAEP / VEP / EMG — cranial nerve and auditory monitoring
8Cerebral Perfusion — TCD, NIRS, SjvO₂, PbtO₂
9ICP Monitoring — all methods compared, treatment thresholds
10Depth of Anesthesia — BIS value guide, entropy, awake craniotomy
11Drug Effects on IONM — comprehensive comparison table
12Procedure-Specific Monitoring — CEA, aneurysm, spinal, posterior fossa
13TIVA vs. Volatile — head-to-head comparison
14Positioning — sitting position, VAE detection sensitivity table
15Summary — 6 key take-home points
Sources: Miller's Anesthesia 10e, Barash Clinical Anesthesia 9e, Morgan & Mikhail 7e

Retry

Running Command

ls /home/daytona/workspace/neuro-monitoring-ppt/ && node /home/daytona/workspace/neuro-monitoring-ppt/build.js 2>&1

Done! Here's your freshly regenerated file:

Monitoring During Neurosurgery

Presentation · PPTX

15 slides covering the full scope of neurosurgical monitoring for MD Anesthesia — EEG, SSEP, MEP, BAEP/VEP/EMG, TCD, NIRS, ICP, BIS, drug effects table, procedure-specific monitoring, TIVA vs. volatile, sitting position/VAE, and a summary slide. Let me know if you'd like any changes to content, layout, or design.
This is a shared conversation. Sign in to Orris to start your own chat.