Monitoring during neurosurgery in MD Anaesthesia….Make a ppt
neuromonitoring intraoperative EEG evoked potentials neurosurgery
mkdir -p /home/daytona/workspace/neuro-monitoring-ppt && ls /home/daytona/workspace/neuro-monitoring-ppt/
~/neuro-monitoring-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Monitoring During Neurosurgery";
pres.subject = "MD Anaesthesia";
pres.author = "MD Anaesthesia";
// ── Color Palette ──────────────────────────────────────
const C = {
deepNavy: "0A1628", // dominant dark background
navy: "0D2545", // slide background
accent: "00C6FF", // bright cyan accent
gold: "F5C518", // warning / highlight gold
white: "FFFFFF",
lightGray: "C8D6E5",
midGray: "8FA3B8",
darkCard: "112240", // card background
green: "2ECC71",
orange: "E67E22",
red: "E74C3C",
};
// ── Helper: slide background ────────────────────────────
function bgNavy(slide) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: C.navy },
line: { type: "none" },
});
}
// ── Helper: accent bar (top) ────────────────────────────
function accentBar(slide, w = "100%") {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: w, h: 0.06,
fill: { color: C.accent },
line: { type: "none" },
});
}
// ── Helper: section label (top-right) ───────────────────
function sectionLabel(slide, text) {
slide.addText(text, {
x: 7.5, y: 0.08, w: 2.3, h: 0.3,
fontSize: 8, color: C.midGray, italic: true, align: "right",
});
}
// ── Helper: slide title ─────────────────────────────────
function slideTitle(slide, text, y = 0.18) {
slide.addText(text, {
x: 0.4, y: y, w: 9.2, h: 0.55,
fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
});
}
// ── Helper: divider line ────────────────────────────────
function divider(slide, y = 0.75) {
slide.addShape(pres.ShapeType.line, {
x: 0.4, y: y, w: 9.2, h: 0,
line: { color: C.accent, width: 1.2 },
});
}
// ── Helper: card box ────────────────────────────────────
function card(slide, x, y, w, h, fillColor = C.darkCard) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: fillColor },
line: { color: C.accent, width: 0.5 },
rectRadius: 0.08,
});
}
// ── Helper: bullet text ─────────────────────────────────
function bullets(slide, items, x, y, w, h, opts = {}) {
const textArr = items.map((item, i) => ({
text: item,
options: {
bullet: { type: "bullet" },
breakLine: i < items.length - 1,
fontSize: opts.fontSize || 13,
color: opts.color || C.lightGray,
fontFace: "Calibri",
},
}));
slide.addText(textArr, { x, y, w, h, valign: "top", ...opts });
}
// ── Helper: colored badge ───────────────────────────────
function badge(slide, text, x, y, color = C.accent) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w: 2.1, h: 0.32,
fill: { color: color },
line: { type: "none" },
rectRadius: 0.06,
});
slide.addText(text, {
x, y, w: 2.1, h: 0.32,
fontSize: 10, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 1 – TITLE SLIDE
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
// Full dark background
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: C.deepNavy }, line: { type: "none" },
});
// Left accent stripe
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.18, h: "100%",
fill: { color: C.accent }, line: { type: "none" },
});
// Decorative circle
s.addShape(pres.ShapeType.ellipse, {
x: 7.2, y: -0.8, w: 3.5, h: 3.5,
fill: { color: "0D2545" }, line: { color: C.accent, width: 1 },
});
s.addShape(pres.ShapeType.ellipse, {
x: 7.8, y: 3.2, w: 2.4, h: 2.4,
fill: { color: "091830" }, line: { color: C.accent, width: 0.5 },
});
s.addText("MONITORING DURING", {
x: 0.5, y: 1.1, w: 7, h: 0.65,
fontSize: 30, bold: true, color: C.accent, fontFace: "Calibri",
charSpacing: 3,
});
s.addText("NEUROSURGERY", {
x: 0.5, y: 1.75, w: 7, h: 1.0,
fontSize: 46, bold: true, color: C.white, fontFace: "Calibri",
});
s.addShape(pres.ShapeType.rect, {
x: 0.5, y: 2.85, w: 4.5, h: 0.05,
fill: { color: C.gold }, line: { type: "none" },
});
s.addText("MD Anaesthesia • Neuroanaesthesia", {
x: 0.5, y: 3.0, w: 6, h: 0.4,
fontSize: 14, color: C.lightGray, fontFace: "Calibri",
});
s.addText("Miller's Anesthesia 10e | Barash Clinical Anesthesia 9e | Morgan & Mikhail 7e", {
x: 0.5, y: 4.9, w: 7, h: 0.3,
fontSize: 9, color: C.midGray, italic: true,
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 2 – OVERVIEW / TABLE OF CONTENTS
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Overview");
divider(s);
sectionLabel(s, "Contents");
const topics = [
["01", "Goals of Neuromonitoring", C.accent],
["02", "Standard Monitoring", C.green],
["03", "ICP Monitoring", C.gold],
["04", "EEG & Processed EEG", C.accent],
["05", "Evoked Potentials (SSEP/MEP/AEP)", C.orange],
["06", "Cerebral Oxygenation (NIRS/SjO₂)", C.green],
["07", "Transcranial Doppler (TCD)", C.gold],
["08", "Cerebral Microdialysis", C.accent],
["09", "Multimodality Monitoring", C.orange],
["10", "Anaesthetic Considerations", C.red],
];
const colX = [0.35, 5.15];
topics.forEach((t, i) => {
const col = Math.floor(i / 5);
const row = i % 5;
const x = colX[col];
const y = 0.9 + row * 0.9;
card(s, x, y, 4.55, 0.72);
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 0.5, h: 0.72,
fill: { color: t[2] }, line: { type: "none" },
});
s.addText(t[0], {
x: x, y: y, w: 0.5, h: 0.72,
fontSize: 14, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
s.addText(t[1], {
x: x + 0.6, y: y + 0.12, w: 3.8, h: 0.45,
fontSize: 13, color: C.white, fontFace: "Calibri", valign: "middle",
});
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 3 – GOALS OF NEUROMONITORING
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Goals of Neuromonitoring");
divider(s);
sectionLabel(s, "Introduction");
const goals = [
{ icon: "🧠", title: "Detect Ischemia", body: "Identify cerebral ischemia before irreversible damage — enabling timely intervention" },
{ icon: "⚡", title: "Assess CNS Function", body: "Continuous real-time assessment of cortical, subcortical, and brainstem function during surgery" },
{ icon: "🩺", title: "Guide Therapy", body: "Adjust BP targets, anesthetic depth, CPP, and surgical technique based on physiologic data" },
{ icon: "🛡️", title: "Prevent Deficits", body: "Protect motor, sensory, and auditory pathways during tumor resection, vascular, and spinal surgery" },
{ icon: "📊", title: "Prognostication", body: "Provide data to guide post-operative neurological prognostication and ICU management" },
{ icon: "🔗", title: "Multimodality Integration", body: "Combine ICP, EEG, CBF, and oxygenation data for comprehensive individualized brain care" },
];
const cols = 3, rows = 2;
const cw = 2.95, ch = 1.7;
goals.forEach((g, i) => {
const col = i % cols, row = Math.floor(i / cols);
const x = 0.3 + col * (cw + 0.22);
const y = 0.88 + row * (ch + 0.15);
card(s, x, y, cw, ch);
s.addText(g.icon + " " + g.title, {
x: x + 0.15, y: y + 0.1, w: cw - 0.3, h: 0.4,
fontSize: 12, bold: true, color: C.accent,
});
s.addText(g.body, {
x: x + 0.15, y: y + 0.52, w: cw - 0.3, h: 1.0,
fontSize: 11, color: C.lightGray, wrap: true,
});
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 4 – STANDARD MONITORING IN NEUROSURGERY
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Standard Intraoperative Monitoring");
divider(s);
sectionLabel(s, "Basic Monitoring");
// Left column – mandatory monitors
card(s, 0.3, 0.88, 4.4, 4.3, C.darkCard);
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 0.88, w: 4.4, h: 0.38,
fill: { color: C.green }, line: { type: "none" },
});
s.addText("MANDATORY (ALL CASES)", {
x: 0.3, y: 0.88, w: 4.4, h: 0.38,
fontSize: 11, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
bullets(s, [
"ECG – 5-lead continuous",
"SpO₂ – pulse oximetry",
"NIBP / Invasive arterial BP (IBP)",
"Capnography (EtCO₂) – critical for ICP control",
"Temperature – core (nasopharyngeal/rectal/bladder)",
"Urine output – catheterisation",
"Airway: airway pressure, tidal volume, FiO₂",
"Neuromuscular blockade monitoring",
], 0.45, 1.35, 4.1, 3.7, { fontSize: 12 });
// Right column – extended monitors
card(s, 5.0, 0.88, 4.7, 4.3, C.darkCard);
s.addShape(pres.ShapeType.rect, {
x: 5.0, y: 0.88, w: 4.7, h: 0.38,
fill: { color: C.gold }, line: { type: "none" },
});
s.addText("EXTENDED (SELECTED CASES)", {
x: 5.0, y: 0.88, w: 4.7, h: 0.38,
fontSize: 11, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
bullets(s, [
"Central venous pressure (CVP)",
"Pulmonary artery / PA catheter",
"Transoesophageal echocardiography (TEE)",
"Precordial Doppler (VAE detection)",
"BIS / Depth of anaesthesia monitor",
"Blood glucose monitoring",
"ACT during heparinised procedures",
"Haemoglobin / Hct (point-of-care)",
], 5.15, 1.35, 4.4, 3.7, { fontSize: 12 });
}
// ─────────────────────────────────────────────────────────
// SLIDE 5 – ICP MONITORING
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Intracranial Pressure (ICP) Monitoring");
divider(s);
sectionLabel(s, "ICP");
// Key fact banner
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 0.82, w: 9.4, h: 0.4,
fill: { color: C.gold + "33" }, line: { color: C.gold, width: 1 },
});
s.addText("Normal ICP: 5–15 mmHg | Raised ICP: >20 mmHg | CPP = MAP − ICP | Target CPP: 60–70 mmHg", {
x: 0.3, y: 0.82, w: 9.4, h: 0.4,
fontSize: 11, bold: true, color: C.gold, align: "center", valign: "middle",
});
// Modalities
const mods = [
{ name: "Intraventricular Catheter\n(Gold Standard)", pros: "Allows CSF drainage, accurate, recalibrated", cons: "Risk of haemorrhage & infection", color: C.accent },
{ name: "Intraparenchymal Probe\n(Fiberoptic / Strain gauge)", pros: "Less infection risk, accurate", cons: "Cannot drain CSF, cannot recalibrate", color: C.green },
{ name: "Subdural / Epidural\nBolt", pros: "Easier insertion, low risk", cons: "Less accurate, dampening over time", color: C.orange },
{ name: "Non-invasive\n(Optic nerve USG, TCD)", pros: "No procedural risk, repeatable", cons: "Not continuous, less precise", color: C.midGray },
];
mods.forEach((m, i) => {
const x = 0.3 + i * 2.42;
card(s, x, 1.35, 2.2, 3.85);
s.addShape(pres.ShapeType.rect, {
x: x, y: 1.35, w: 2.2, h: 0.45,
fill: { color: m.color }, line: { type: "none" },
});
s.addText(m.name, {
x: x + 0.05, y: 1.35, w: 2.1, h: 0.45,
fontSize: 9, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
s.addText("✔ " + m.pros, {
x: x + 0.1, y: 1.88, w: 2.0, h: 1.3,
fontSize: 10, color: C.lightGray, wrap: true,
});
s.addText("✘ " + m.cons, {
x: x + 0.1, y: 3.22, w: 2.0, h: 0.9,
fontSize: 10, color: C.red, wrap: true,
});
});
// Indications bar
card(s, 0.3, 5.28, 9.4, 0.32, "091830");
s.addText("Indications: Severe TBI (GCS ≤8) • Post-craniotomy • SAH with HH Grade III-IV • Hydrocephalus • Large MCA infarct with oedema", {
x: 0.4, y: 5.3, w: 9.2, h: 0.28,
fontSize: 10, color: C.midGray, italic: true, align: "center",
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 6 – EEG & PROCESSED EEG
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "EEG & Processed EEG (BIS/Entropy)");
divider(s);
sectionLabel(s, "EEG Monitoring");
// Two columns
card(s, 0.3, 0.88, 4.5, 4.65, C.darkCard);
s.addText("EEG Monitoring", {
x: 0.4, y: 0.92, w: 4.2, h: 0.35,
fontSize: 14, bold: true, color: C.accent,
});
bullets(s, [
"Detects cortical ischemia → slowing / silence",
"Used during carotid endarterectomy (CEA) to detect ischemia after clamping",
"Deep hypothermic circulatory arrest: guides cooling to isoelectric EEG",
"Detects non-convulsive seizures (NCS) post-cardiac arrest",
"Helps titrate burst-suppression for cerebral protection",
"Epilepsy surgery: identifies seizure foci",
"Continuous cEEG in neuro-ICU for seizure surveillance",
"4 waves: Delta (<4Hz), Theta (4-8Hz), Alpha (8-13Hz), Beta (>13Hz)",
"Anaesthetic agents → dose-dependent slowing → isoelectric",
], 0.4, 1.3, 4.2, 4.1, { fontSize: 11 });
card(s, 5.05, 0.88, 4.65, 4.65, C.darkCard);
s.addText("Processed EEG (BIS / Entropy)", {
x: 5.15, y: 0.92, w: 4.3, h: 0.35,
fontSize: 14, bold: true, color: C.gold,
});
bullets(s, [
"BIS: 0–100 scale; target 40–60 for general anaesthesia",
"Reduces awareness risk in neurosurgery with NMB",
"Entropy (State/Response): derived from EEG + EMG",
"Narcotrend: classifies anaesthetic depth A→F",
"SNAP index: similar processed EEG parameter",
"Limitations:",
" – Artefact-prone (EMG, electrocautery)",
" – Ketamine/N₂O may falsely ↑ BIS",
" – Less reliable with hypothermia",
"Special: Auditory evoked potential (AEP) index for depth monitoring",
], 5.15, 1.3, 4.4, 4.1, { fontSize: 11 });
}
// ─────────────────────────────────────────────────────────
// SLIDE 7 – EVOKED POTENTIALS
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Intraoperative Neurophysiological Monitoring (IONM)");
divider(s);
sectionLabel(s, "Evoked Potentials");
const eps = [
{
name: "SSEP", full: "Somatosensory Evoked Potentials",
color: C.accent,
body: [
"Peripheral nerve stimulation → cortical recording",
"Monitors dorsal column / sensory pathways",
"Alert: >50% amplitude ↓ or >10% latency ↑",
"Uses: spine surgery, aneurysm clipping, CEA",
"Sensitive to ischaemia & mechanical injury",
"Preserved by TIVA (propofol + opioid) – preferred",
]
},
{
name: "MEP", full: "Motor Evoked Potentials",
color: C.green,
body: [
"Transcranial electrical stimulation → limb EMG",
"Monitors corticospinal (motor) tract",
"Alert: >50% amplitude ↓ (most common criterion)",
"No NMB during recording — requires TIVA",
"Uses: intramedullary spinal tumour, aortic surgery",
"Avoid single-breath volatile >0.5 MAC",
]
},
{
name: "BAEP", full: "Brainstem Auditory Evoked Potentials",
color: C.gold,
body: [
"Click stimulation → wave I–VII (cochlea to cortex)",
"Monitors auditory / brainstem pathways",
"Alert: wave V latency ↑ >1ms or amplitude ↓ >50%",
"Most resistant to anaesthetic effects",
"Uses: acoustic neuroma, CPA tumour, posterior fossa",
"Identifies cochlear nerve at risk from retraction",
]
},
{
name: "VEP", full: "Visual Evoked Potentials",
color: C.orange,
body: [
"Light flash → occipital cortical recording",
"Monitors optic pathway integrity",
"Highly sensitive to volatile agents (limited utility)",
"Uses: optic nerve / chiasm surgery (seldom)",
"Largely unreliable intraoperatively",
"SSEP of median nerve surrogate for cortical function",
]
},
];
eps.forEach((ep, i) => {
const x = 0.28 + i * 2.44;
card(s, x, 0.88, 2.24, 4.65);
s.addShape(pres.ShapeType.rect, {
x: x, y: 0.88, w: 2.24, h: 0.42,
fill: { color: ep.color }, line: { type: "none" },
});
s.addText(ep.name, {
x: x + 0.05, y: 0.88, w: 2.14, h: 0.22,
fontSize: 14, bold: true, color: C.deepNavy, align: "center",
});
s.addText(ep.full, {
x: x + 0.05, y: 1.08, w: 2.14, h: 0.22,
fontSize: 8, color: C.deepNavy, align: "center",
});
ep.body.forEach((line, li) => {
s.addText("• " + line, {
x: x + 0.1, y: 1.4 + li * 0.52, w: 2.0, h: 0.5,
fontSize: 10, color: C.lightGray, wrap: true,
});
});
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 8 – CEREBRAL OXYGENATION
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Cerebral Oxygenation Monitoring");
divider(s);
sectionLabel(s, "Oxygenation");
// NIRS box
card(s, 0.3, 0.88, 4.55, 4.6, C.darkCard);
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 0.88, w: 4.55, h: 0.4,
fill: { color: C.accent }, line: { type: "none" },
});
s.addText("Near-Infrared Spectroscopy (NIRS / rSO₂)", {
x: 0.35, y: 0.88, w: 4.45, h: 0.4,
fontSize: 12, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
bullets(s, [
"Non-invasive, continuous cerebral oximetry",
"Measures regional cerebral O₂ saturation (rSO₂)",
"Normal: 55–75%; clinically significant ↓: >20% from baseline or <50%",
"Reflects venous-weighted (~75% venous) frontal lobe saturation",
"Probes placed on forehead bilaterally",
"Detects cerebral desaturation during cardiac surgery (CPB), CEA, sitting position",
"Correlated with jugular venous bulb saturation (SjO₂)",
"FORE-SIGHT, INVOS, CAS Medical systems commercially available",
], 0.4, 1.38, 4.3, 3.95, { fontSize: 11 });
// SjO2 box
card(s, 5.1, 0.88, 4.6, 4.6, C.darkCard);
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 0.88, w: 4.6, h: 0.4,
fill: { color: C.green }, line: { type: "none" },
});
s.addText("Jugular Venous Bulb Oxygen Saturation (SjO₂)", {
x: 5.15, y: 0.88, w: 4.5, h: 0.4,
fontSize: 12, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
bullets(s, [
"Retrograde catheterisation of internal jugular vein to jugular bulb",
"Normal SjO₂: 55–75%",
"SjO₂ <50% → cerebral ischaemia / oligaemia",
"SjO₂ >75% → luxury perfusion / infarction / hyperaemia",
"Used in TBI management to guide CPP optimisation",
"Intermittent (co-oximetry) or continuous (fiberoptic catheter)",
"Right IJV preferred (dominant side); verify with X-ray",
"Pitfalls: extracerebral contamination, catheter position",
], 5.2, 1.38, 4.35, 3.95, { fontSize: 11 });
// PbrO2 footnote
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 5.28, w: 9.4, h: 0.32,
fill: { color: "091830" }, line: { type: "none" },
});
s.addText("Brain Tissue O₂ (PbrO₂) — Licox/Neurovent probe: Normal >20 mmHg; <15 mmHg = critical ischaemia. Invasive, requires parenchymal insertion.", {
x: 0.35, y: 5.3, w: 9.3, h: 0.28,
fontSize: 9.5, color: C.midGray, italic: true, align: "center",
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 9 – TRANSCRANIAL DOPPLER
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Transcranial Doppler (TCD) Ultrasonography");
divider(s);
sectionLabel(s, "TCD");
// 3-column layout
const cols = [
{
title: "Principle & Technique", color: C.accent,
items: [
"Low-frequency (2 MHz) pulsed-wave Doppler",
"Insonation through temporal, suboccipital, or orbital windows",
"Measures blood flow velocity in basal cerebral arteries",
"MCA most commonly monitored",
"Gives mean flow velocity (MFV), systolic, diastolic values",
"Bilateral probes held by frame (hands-free) during surgery",
]
},
{
title: "Clinical Applications", color: C.green,
items: [
"Vasospasm detection after SAH (MFV >120 cm/s = vasospasm)",
"Emboli detection (HITS – high-intensity transient signals) during CEA",
"Cerebral autoregulation assessment (Mx index)",
"CPB management – guides flow & perfusion pressure",
"Cerebral circulatory arrest (flat waveform)",
"ICP estimation via pulsatility index (PI = systolic−diastolic/mean)",
]
},
{
title: "Waveform Interpretation", color: C.gold,
items: [
"Normal MCA mean velocity: 55–90 cm/s",
"Lindegaard ratio >3: vasospasm vs. hyperaemia",
"↑ PI (>1.2): raised ICP / distal resistance",
"↓ Diastolic flow → cerebrovascular resistance ↑",
"Absent/reversed diastolic flow → cerebral circulatory arrest",
"HITS: >3 dB above background = microembolic signals",
]
},
];
cols.forEach((col, i) => {
const x = 0.3 + i * 3.25;
card(s, x, 0.88, 3.1, 4.65);
s.addShape(pres.ShapeType.rect, {
x: x, y: 0.88, w: 3.1, h: 0.4,
fill: { color: col.color }, line: { type: "none" },
});
s.addText(col.title, {
x: x + 0.05, y: 0.88, w: 3.0, h: 0.4,
fontSize: 11, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
col.items.forEach((item, j) => {
s.addText("• " + item, {
x: x + 0.12, y: 1.38 + j * 0.55, w: 2.85, h: 0.52,
fontSize: 10.5, color: C.lightGray, wrap: true,
});
});
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 10 – CEREBRAL MICRODIALYSIS
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Cerebral Microdialysis & Multimodality Monitoring");
divider(s);
sectionLabel(s, "Microdialysis / MMM");
// Left: microdialysis
card(s, 0.3, 0.88, 4.55, 4.65, C.darkCard);
s.addText("Cerebral Microdialysis", {
x: 0.4, y: 0.92, w: 4.2, h: 0.38,
fontSize: 14, bold: true, color: C.accent,
});
bullets(s, [
"Thin catheter (CMA 70) inserted into brain parenchyma",
"Semipermeable membrane perfused with artificial CSF",
"Samples interstitial fluid — hourly bedside analysis",
"Biomarkers measured:",
" Glucose: normal 1–2 mmol/L",
" Lactate/Pyruvate ratio (LPR): normal <25; >40 = crisis",
" Glutamate (excitotoxicity marker)",
" Glycerol (membrane disruption)",
"Energy crisis = ↑LPR + ↓glucose + ↑glutamate",
"Primarily ICU tool (severe TBI, SAH, malignant MCA infarct)",
], 0.4, 1.38, 4.25, 3.95, { fontSize: 11 });
// Right: multimodality
card(s, 5.1, 0.88, 4.6, 4.65, C.darkCard);
s.addText("Multimodality Monitoring (MMM)", {
x: 5.2, y: 0.92, w: 4.25, h: 0.38,
fontSize: 14, bold: true, color: C.orange,
});
bullets(s, [
"Combines: ICP + CPP + PbrO₂ + cEEG + SjO₂ + Microdialysis",
"Individualised therapy targeting secondary brain injury",
"ICM+, CNS Monitor, Moberg CNS: multistream platforms",
"PRx (pressure-reactivity index): autoregulation monitoring",
"Optimal CPP = CPP at which autoregulation is best preserved",
"Cortical spreading depolarisations (CSD) detection",
"EEG-based seizure burden quantification",
"Future: AI-driven decision support for real-time therapy",
], 5.2, 1.38, 4.3, 3.95, { fontSize: 11 });
}
// ─────────────────────────────────────────────────────────
// SLIDE 11 – ANAESTHETIC CONSIDERATIONS
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Anaesthetic Considerations for Neuromonitoring");
divider(s);
sectionLabel(s, "Anaesthetic Impact");
// Table header
const hx = [0.3, 2.15, 4.1, 6.1, 8.1];
const hLabels = ["Agent / Parameter", "EEG / BIS", "SSEP", "MEP", "BAEP"];
const hColors = [C.navy, C.accent, C.green, C.orange, C.gold];
hLabels.forEach((lbl, i) => {
s.addShape(pres.ShapeType.rect, {
x: hx[i], y: 0.88, w: i === 0 ? 1.8 : 1.95, h: 0.38,
fill: { color: hColors[i] }, line: { color: C.deepNavy, width: 0.5 },
});
s.addText(lbl, {
x: hx[i] + 0.05, y: 0.88, w: i === 0 ? 1.7 : 1.85, h: 0.38,
fontSize: 11, bold: true, color: i === 0 ? C.white : C.deepNavy, align: "center", valign: "middle",
});
});
const rows = [
["Propofol", "↓ dose-dep.", "↓ amplitude", "↓ amplitude", "Minimal"],
["Volatile agents", "↓ / burst supp.", "↓↓ amplitude", "↓↓↓ abolished", "Minimal"],
["Nitrous oxide", "↑ freq.", "↓ amplitude", "↓↓ amplitude", "Mild ↑ latency"],
["Opioids (remifentanil)", "Minimal", "Minimal", "Minimal", "Minimal"],
["Ketamine", "↑ / activates", "↑ amplitude", "↑ amplitude", "Minimal"],
["Dexmedetomidine", "Mild ↓", "Minimal", "Minimal", "Minimal"],
["Etomidate", "↑ amplitude", "↑↑ amplitude", "↑ amplitude", "Minimal"],
["Hypothermia", "Slowing / silence", "↑ latency ↓ amp.", "↑ latency ↓ amp.", "↑ latency"],
["Hypotension", "↓ / ischaemia", "↓ amplitude", "↓ amplitude", "↓ amplitude"],
["NMB", "No effect", "No effect", "Abolishes EMG", "No effect"],
];
rows.forEach((row, ri) => {
const rowBg = ri % 2 === 0 ? C.darkCard : "0D1F38";
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, {
x: hx[ci], y: 1.32 + ri * 0.4, w: ci === 0 ? 1.8 : 1.95, h: 0.4,
fill: { color: rowBg }, line: { color: C.deepNavy + "80", width: 0.3 },
});
const isDown = cell.includes("↓");
const isUp = cell.includes("↑");
const cellColor = isDown ? C.red : isUp && ci > 0 ? C.green : C.lightGray;
s.addText(cell, {
x: hx[ci] + 0.05, y: 1.32 + ri * 0.4, w: ci === 0 ? 1.7 : 1.85, h: 0.4,
fontSize: 10.5, color: cellColor, align: "center", valign: "middle",
});
});
});
// TIVA footnote
s.addText("★ TIVA (Propofol + Remifentanil/Sufentanil) is the preferred anaesthetic technique when MEP monitoring is essential", {
x: 0.3, y: 5.28, w: 9.4, h: 0.3,
fontSize: 10.5, color: C.gold, italic: true, align: "center",
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 12 – MONITORING IN SPECIFIC NEUROSURGICAL PROCEDURES
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Monitoring in Specific Neurosurgical Procedures");
divider(s);
sectionLabel(s, "Procedure-Specific");
const procs = [
{
name: "Craniotomy (Supratentorial)", color: C.accent,
items: ["IBP (beat-to-beat BP control)", "ICP (if pre-op raised ICP)", "BIS / AEP for depth", "EEG if eloquent cortex at risk", "Glucose monitoring"],
},
{
name: "Posterior Fossa / Sitting Position", color: C.green,
items: ["Precordial Doppler (VAE)", "TEE (paradoxical air embolism)", "BAEP (CN VIII tumours)", "CVP (VAE treatment)", "IBP — immediate hypotension detection"],
},
{
name: "Carotid Endarterectomy (CEA)", color: C.gold,
items: ["EEG / SSEP during carotid clamping", "TCD for emboli / stump pressure", "NIRS rSO₂ bilateral", "IBP — tight pressure control", "Shunt decision based on EEG/SSEP changes"],
},
{
name: "Intracranial Aneurysm Clipping", color: C.orange,
items: ["IBP for deliberate hypotension / adenosine", "SSEP ± MEP for eloquent areas", "EEG burst-suppression for temporary clipping", "Intraop angiography / ICG fluorescence", "Evoked potentials guide clip repositioning"],
},
{
name: "Spine & Spinal Cord Surgery", color: C.red,
items: ["SSEP + MEP (both for spinal cord monitoring)", "Free-run EMG (nerve root contact)", "Triggered EMG (pedicle screw placement)", "TIVA essential — no volatile >0.5 MAC", "No NMB during recording"],
},
{
name: "Awake Craniotomy", color: C.lightGray,
items: ["Conscious sedation monitoring (BIS/Ramsay)", "Neurological testing = direct monitoring", "Cortical mapping with direct electrical stim.", "IBP + SpO₂ + EtCO₂", "EEG for after-discharge detection"],
},
];
const colsN = 3;
procs.forEach((p, i) => {
const col = i % colsN, row = Math.floor(i / colsN);
const x = 0.3 + col * 3.28;
const y = 0.9 + row * 2.35;
card(s, x, y, 3.1, 2.18);
s.addShape(pres.ShapeType.rect, {
x: x, y: y, w: 3.1, h: 0.38,
fill: { color: p.color }, line: { type: "none" },
});
s.addText(p.name, {
x: x + 0.05, y: y, w: 3.0, h: 0.38,
fontSize: 10.5, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
p.items.forEach((item, j) => {
s.addText("• " + item, {
x: x + 0.1, y: y + 0.45 + j * 0.34, w: 2.88, h: 0.32,
fontSize: 9.5, color: C.lightGray, wrap: true,
});
});
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 13 – VENOUS AIR EMBOLISM
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Venous Air Embolism (VAE) – Monitoring & Management");
divider(s);
sectionLabel(s, "VAE");
// Alert banner
s.addShape(pres.ShapeType.rect, {
x: 0.3, y: 0.82, w: 9.4, h: 0.38,
fill: { color: C.red + "33" }, line: { color: C.red, width: 1 },
});
s.addText("⚠ Risk: Sitting / semi-sitting position, posterior fossa, cervical spine, skull base surgery", {
x: 0.3, y: 0.82, w: 9.4, h: 0.38,
fontSize: 11, bold: true, color: C.red, align: "center", valign: "middle",
});
// Detection hierarchy
card(s, 0.3, 1.3, 5.8, 4.2, C.darkCard);
s.addText("Detection Methods — Sensitivity Hierarchy", {
x: 0.4, y: 1.34, w: 5.5, h: 0.38,
fontSize: 13, bold: true, color: C.accent,
});
const sens = [
["TEE", "Most sensitive — detects microbubbles", C.red],
["Precordial Doppler", "Noninvasive, high sensitivity", C.orange],
["EtCO₂", "Sudden ↓ — moderate sensitivity", C.gold],
["EtN₂ (nitrogen)", "Early indicator if available", C.green],
["PA pressure", "↑ with significant embolism", C.accent],
["BP / SpO₂", "Late, severe compromise", C.midGray],
["Mill-wheel murmur", "Auscultation — very late sign", C.midGray],
];
sens.forEach((row, i) => {
s.addShape(pres.ShapeType.rect, {
x: 0.4, y: 1.82 + i * 0.52, w: 1.5, h: 0.46,
fill: { color: row[2] }, line: { type: "none" },
});
s.addText(row[0], {
x: 0.4, y: 1.82 + i * 0.52, w: 1.5, h: 0.46,
fontSize: 10, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
s.addText(row[1], {
x: 2.05, y: 1.85 + i * 0.52, w: 3.85, h: 0.4,
fontSize: 11, color: C.lightGray,
});
});
// Management
card(s, 6.3, 1.3, 3.4, 4.2, C.darkCard);
s.addText("Management Steps", {
x: 6.4, y: 1.34, w: 3.2, h: 0.38,
fontSize: 13, bold: true, color: C.gold,
});
bullets(s, [
"Flood surgical field with saline",
"Pack wound / compress jugular veins",
"Left lateral Durant manoeuvre + Trendelenburg",
"Aspirate air through CVP catheter",
"Discontinue N₂O immediately",
"100% O₂",
"Vasopressors for haemodynamic support",
"CPR if cardiac arrest",
], 6.4, 1.82, 3.1, 3.55, { fontSize: 11 });
}
// ─────────────────────────────────────────────────────────
// SLIDE 14 – SUMMARY TABLE
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
bgNavy(s);
accentBar(s);
slideTitle(s, "Summary: Monitoring Modalities at a Glance");
divider(s);
sectionLabel(s, "Summary");
const hLabels2 = ["Modality", "What it Measures", "Key Indication", "Alert Criterion", "Invasive?"];
const hX2 = [0.25, 2.0, 4.0, 6.2, 8.9];
const hW2 = [1.7, 1.95, 2.15, 2.65, 0.85];
hLabels2.forEach((lbl, i) => {
s.addShape(pres.ShapeType.rect, {
x: hX2[i], y: 0.86, w: hW2[i], h: 0.38,
fill: { color: C.accent }, line: { color: C.deepNavy, width: 0.4 },
});
s.addText(lbl, {
x: hX2[i], y: 0.86, w: hW2[i], h: 0.38,
fontSize: 10, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
});
const summRows = [
["EEG / cEEG", "Cortical electrical activity", "CEA, epilepsy, DHCA", "Burst-suppression / silence", "No"],
["BIS / Entropy", "Anaesthetic depth", "Awareness prevention", "BIS < 40 or > 65", "No"],
["SSEP", "Sensory / dorsal column", "Spine, aneurysm, CEA", ">50% amp ↓ / >10% lat ↑", "No"],
["MEP", "Corticospinal tract", "Intramedullary tumour, aorta", ">50% amplitude ↓", "No"],
["BAEP", "Auditory / brainstem", "Acoustic neuroma, CPA tumour", "Wave V latency ↑ >1ms", "No"],
["ICP", "Intracranial pressure", "TBI, SAH, hydrocephalus", "ICP >20 mmHg", "Yes"],
["NIRS / rSO₂", "Regional cerebral O₂", "Cardiac surgery, CEA", ">20% ↓ from baseline", "No"],
["SjO₂", "Global cerebral O₂ extraction", "TBI ICU management", "<50% or >75%", "Yes"],
["PbrO₂", "Brain tissue oxygenation", "Severe TBI", "<15 mmHg", "Yes"],
["TCD", "Cerebral blood flow velocity", "SAH vasospasm, CEA emboli", "MFV >120 cm/s (vasospasm)", "No"],
["Microdialysis", "Brain metabolites", "Severe TBI, SAH", "LPR >40, glucose <0.8", "Yes"],
];
summRows.forEach((row, ri) => {
const rowBg = ri % 2 === 0 ? C.darkCard : "0D1F38";
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, {
x: hX2[ci], y: 1.3 + ri * 0.38, w: hW2[ci], h: 0.38,
fill: { color: rowBg }, line: { color: C.deepNavy + "60", width: 0.3 },
});
const isFavorable = cell === "No";
const isInvasive = cell === "Yes";
const cellColor = isInvasive ? C.red : isFavorable ? C.green : C.lightGray;
s.addText(cell, {
x: hX2[ci] + 0.04, y: 1.3 + ri * 0.38, w: hW2[ci] - 0.08, h: 0.38,
fontSize: 9.5, color: cellColor, align: "center", valign: "middle",
});
});
});
}
// ─────────────────────────────────────────────────────────
// SLIDE 15 – KEY TAKEAWAYS
// ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
// Full navy background
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color: C.deepNavy }, line: { type: "none" },
});
accentBar(s);
s.addText("Key Takeaways", {
x: 0.5, y: 0.18, w: 9, h: 0.55,
fontSize: 24, bold: true, color: C.white,
});
s.addShape(pres.ShapeType.line, {
x: 0.5, y: 0.78, w: 9, h: 0,
line: { color: C.gold, width: 1.2 },
});
const takes = [
{ num: "1", text: "Multimodality monitoring integrates ICP, CBF, oxygenation, electrophysiology, and metabolism — no single modality is sufficient.", col: C.accent },
{ num: "2", text: "TIVA (propofol + remifentanil) is the anaesthetic of choice when MEPs are monitored — volatile agents abolish MEPs at >1 MAC.", col: C.green },
{ num: "3", text: "Precordial Doppler + TEE are mandatory for sitting-position neurosurgery to detect venous air embolism (VAE) early.", col: C.gold },
{ num: "4", text: "CPP = MAP − ICP. Target CPP 60–70 mmHg in TBI. Autoregulation monitoring (PRx) can guide individualised CPP targets.", col: C.orange },
{ num: "5", text: "EEG/SSEP changes during carotid clamping drive the shunt decision in CEA. >50% amplitude fall or isoelectric EEG = shunt.", col: C.accent },
{ num: "6", text: "Cerebral microdialysis and PbrO₂ monitoring are bedside tools for early detection of secondary brain insults in neuro-ICU.", col: C.red },
];
takes.forEach((t, i) => {
const row = Math.floor(i / 2), col = i % 2;
const x = 0.4 + col * 4.9;
const y = 1.0 + row * 1.55;
card(s, x, y, 4.65, 1.35, "0D2545");
s.addShape(pres.ShapeType.ellipse, {
x: x + 0.12, y: y + 0.35, w: 0.5, h: 0.5,
fill: { color: t.col }, line: { type: "none" },
});
s.addText(t.num, {
x: x + 0.12, y: y + 0.35, w: 0.5, h: 0.5,
fontSize: 14, bold: true, color: C.deepNavy, align: "center", valign: "middle",
});
s.addText(t.text, {
x: x + 0.72, y: y + 0.1, w: 3.82, h: 1.12,
fontSize: 10.5, color: C.lightGray, wrap: true, valign: "middle",
});
});
}
// ─────────────────────────────────────────────────────────
// WRITE FILE
// ─────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/neuro-monitoring-ppt/Monitoring_During_Neurosurgery_MD_Anaesthesia.pptx" })
.then(() => console.log("✅ PPTX created successfully!"))
.catch(err => { console.error("Error:", err); process.exit(1); });
cd /home/daytona/workspace/neuro-monitoring-ppt && node create_ppt.js
ls -lh /home/daytona/workspace/neuro-monitoring-ppt/