Give me a presentation on general anashtesia and local anasstheai and how it works
mkdir -p /home/daytona/workspace/anaesthesia-pptx && ls /home/daytona/workspace/anaesthesia-pptx
~/anaesthesia-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Anaesthesia: General & Local";
pres.author = "Orris Medical";
// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const DARK_BG = "0A1628"; // deep navy (dominant)
const MID_BG = "0D2137"; // slightly lighter navy
const ACCENT = "00C9A7"; // teal-green accent
const ACCENT2 = "4FC3F7"; // light-blue accent
const WHITE = "FFFFFF";
const OFF_WHITE = "E8F4F8";
const GOLD = "FFD166";
const LIGHT_CARD= "102545"; // card background
// ─── HELPER – background rectangle ───────────────────────────────────────────
function addBg(slide, color) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color } });
}
// ─── HELPER – accent bar ─────────────────────────────────────────────────────
function accentBar(slide, color, w = 1.2, x = 0.5, y = 1.1, h = 0.05) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color }, line: { type: "none" } });
}
// ─── HELPER – card box ───────────────────────────────────────────────────────
function card(slide, x, y, w, h, color = LIGHT_CARD) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color },
line: { color: ACCENT, width: 1.5 },
rectRadius: 0.12
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
// Top strip
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT }, line: { type: "none" } });
// Decorative circle
s.addShape(pres.ShapeType.ellipse, { x: 7.0, y: -0.5, w: 4.5, h: 4.5, fill: { color: MID_BG }, line: { type: "none" } });
s.addShape(pres.ShapeType.ellipse, { x: 7.5, y: -0.2, w: 3.5, h: 3.5, fill: { color: ACCENT, transparency: 88 }, line: { type: "none" } });
// Tag
s.addShape(pres.ShapeType.roundRect, { x: 0.5, y: 0.55, w: 2.6, h: 0.32, fill: { color: ACCENT }, line: { type: "none" }, rectRadius: 0.08 });
s.addText("MEDICAL EDUCATION", { x: 0.5, y: 0.55, w: 2.6, h: 0.32, fontSize: 8.5, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
// Main title
s.addText("Anaesthesia", { x: 0.5, y: 1.05, w: 8, h: 1.0, fontSize: 54, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
s.addText("General & Local", { x: 0.5, y: 1.95, w: 8, h: 0.65, fontSize: 30, bold: false, color: ACCENT, fontFace: "Calibri", margin: 0 });
accentBar(s, ACCENT, 3.5, 0.5, 2.72, 0.04);
s.addText("How It Works — Mechanisms, Agents & Techniques", {
x: 0.5, y: 2.88, w: 7.5, h: 0.5,
fontSize: 14, color: OFF_WHITE, fontFace: "Calibri", margin: 0
});
// Bottom strip
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.545, w: 10, h: 0.08, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("Sources: Bailey & Love's Surgery 28e · Scott-Brown's Otorhinolaryngology · Miller's Anesthesia 10e", {
x: 0.5, y: 5.2, w: 9, h: 0.3, fontSize: 7.5, color: "4A7A8A", align: "center"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – WHAT IS ANAESTHESIA?
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("What is Anaesthesia?", { x: 0.5, y: 0.18, w: 9, h: 0.6, fontSize: 28, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT, 2.2, 0.5, 0.85, 0.045);
s.addText(
"From Greek: \"an aesthesis\" — without sensation.\nIn 1846, Dr William Morton publicly demonstrated ether for surgery.\nModern anaesthesia keeps patients safe, pain-free and immobile during procedures.",
{ x: 0.5, y: 1.0, w: 9, h: 0.95, fontSize: 13, color: OFF_WHITE, fontFace: "Calibri" }
);
// Three cards
const cards = [
{ icon: "💤", label: "Hypnosis", desc: "Loss of consciousness &\nimplicit / explicit memory" },
{ icon: "🚫", label: "Akinesia", desc: "Prevention of movement\n& muscle relaxation" },
{ icon: "💊", label: "Analgesia", desc: "Suppression of pain\n& stress response" },
];
const cx = [0.4, 3.6, 6.8];
cards.forEach((c, i) => {
card(s, cx[i], 2.05, 2.9, 2.9);
s.addText(c.icon, { x: cx[i], y: 2.1, w: 2.9, h: 0.7, fontSize: 32, align: "center" });
s.addText(c.label, { x: cx[i], y: 2.78, w: 2.9, h: 0.38, fontSize: 15, bold: true, color: ACCENT, align: "center", margin: 0 });
s.addText(c.desc, { x: cx[i] + 0.1, y: 3.22, w: 2.7, h: 0.9, fontSize: 11, color: OFF_WHITE, align: "center" });
});
s.addText("The Triad of Anaesthesia (Bailey & Love's Surgery 28e)", {
x: 0, y: 5.25, w: 10, h: 0.28, fontSize: 8, color: "4A7A8A", align: "center"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – GENERAL ANAESTHESIA OVERVIEW
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 5.1, h: 5.625, fill: { color: MID_BG }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.06, h: 5.625, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("GENERAL\nANAESTHESIA", { x: 0.18, y: 0.22, w: 4.5, h: 1.0, fontSize: 26, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT, 2.5, 0.18, 1.28, 0.045);
s.addText("A reversible state of unconsciousness, analgesia and muscle relaxation achieved through drugs — allowing surgery without awareness or pain.",
{ x: 0.18, y: 1.38, w: 4.75, h: 0.85, fontSize: 11.5, color: OFF_WHITE }
);
const pts = [
"Induction most often IV (e.g. propofol)",
"Maintenance: inhaled vapour (sevoflurane, isoflurane, desflurane)",
"Muscle relaxants block the neuromuscular junction",
"Opioids (fentanyl, morphine) provide analgesia",
"Patient ventilated via endotracheal tube or LMA",
"Continuous monitoring of ECG, SpO₂, ETCO₂, BP",
];
pts.forEach((pt, i) => {
s.addText("▸ " + pt, {
x: 0.18, y: 2.32 + i * 0.45, w: 4.75, h: 0.4,
fontSize: 11, color: i % 2 === 0 ? OFF_WHITE : ACCENT2
});
});
// Right panel – label
s.addText("KEY CONCEPT", { x: 5.35, y: 0.22, w: 4.3, h: 0.3, fontSize: 9, bold: true, color: ACCENT, charSpacing: 3, margin: 0 });
s.addText("Balanced\nAnaesthesia", { x: 5.35, y: 0.52, w: 4.3, h: 0.9, fontSize: 26, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT2, 2.0, 5.35, 1.48, 0.04);
s.addText("Uses a combination of three drug classes — each addressing ONE arm of the triad — at much lower (safer) doses than a single agent alone.",
{ x: 5.35, y: 1.6, w: 4.3, h: 0.85, fontSize: 11.5, color: OFF_WHITE }
);
const trio = [
{ label: "Hypnotic", drug: "Sevoflurane / Propofol", col: ACCENT },
{ label: "Analgesic", drug: "Fentanyl / Morphine", col: GOLD },
{ label: "Relaxant", drug: "Rocuronium / Atracurium", col: ACCENT2 },
];
trio.forEach((t, i) => {
card(s, 5.35, 2.6 + i * 1.0, 4.3, 0.82, LIGHT_CARD);
s.addShape(pres.ShapeType.rect, { x: 5.35, y: 2.6 + i * 1.0, w: 0.06, h: 0.82, fill: { color: t.col }, line: { type: "none" } });
s.addText(t.label, { x: 5.46, y: 2.63 + i * 1.0, w: 1.5, h: 0.35, fontSize: 11, bold: true, color: t.col, margin: 0 });
s.addText(t.drug, { x: 5.46, y: 2.98 + i * 1.0, w: 4.1, h: 0.32, fontSize: 10, color: OFF_WHITE, margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – INDUCTION AGENTS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: GOLD }, line: { type: "none" } });
s.addText("IV Induction Agents", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 27, bold: true, color: WHITE, margin: 0 });
accentBar(s, GOLD, 2.0, 0.5, 0.8, 0.045);
s.addText("Most general anaesthetics start with an intravenous induction agent that rapidly renders the patient unconscious.",
{ x: 0.5, y: 0.9, w: 9, h: 0.4, fontSize: 11.5, color: OFF_WHITE }
);
const agents = [
{ name: "Propofol", sub: "Di-isopropyl phenol", notes: "Most widely used. Smooth induction, better haemodynamic stability, blunts autonomic reflexes. Can be used for maintenance via TIVA (total IV anaesthesia).", col: ACCENT },
{ name: "Thiopentone", sub: "Barbiturate", notes: "Rapid induction, myocardial depression. Reduces intracranial pressure — useful in neurosurgery. Can cause dangerous BP drop.", col: ACCENT2 },
{ name: "Etomidate", sub: "Steroid derivative", notes: "Excellent haemodynamic stability. Brief duration. Risk of adrenocortical depression limits use to single-dose induction.", col: GOLD },
{ name: "Ketamine", sub: "Phencyclidine derivative", notes: "Preserves blood pressure & airway reflexes. Excellent analgesia. Ideal for field / emergency anaesthesia. May cause emergence delirium.", col: "FF6B6B" },
];
agents.forEach((a, i) => {
const row = i < 2 ? 0 : 1;
const col = i % 2;
const x = 0.35 + col * 4.85;
const y = 1.48 + row * 2.05;
card(s, x, y, 4.5, 1.82, LIGHT_CARD);
s.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 0.06, fill: { color: a.col }, line: { type: "none" } });
s.addText(a.name, { x: x + 0.14, y: y + 0.1, w: 4.1, h: 0.38, fontSize: 15, bold: true, color: a.col, margin: 0 });
s.addText(a.sub, { x: x + 0.14, y: y + 0.47, w: 4.1, h: 0.25, fontSize: 9, color: "7FBCD2", italic: true, margin: 0 });
s.addText(a.notes, { x: x + 0.14, y: y + 0.72, w: 4.2, h: 1.0, fontSize: 10, color: OFF_WHITE });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – AIRWAY MANAGEMENT
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT2 }, line: { type: "none" } });
s.addText("Airway Management", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 27, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT2, 2.2, 0.5, 0.8, 0.045);
s.addText("Once unconscious, the airway must be secured. The choice of device depends on the procedure, aspiration risk and patient factors.",
{ x: 0.5, y: 0.9, w: 9, h: 0.42, fontSize: 11.5, color: OFF_WHITE }
);
const devices = [
{ title: "Endotracheal Tube (ETT)", icon: "🫁", pts: ["Gold standard for airway protection", "Cuffed tube prevents aspiration of gastric contents", "Enables controlled positive-pressure ventilation", "Rapid Sequence Induction (RSI) used for aspiration risk"] },
{ title: "Laryngeal Mask Airway (LMA)", icon: "😮", pts: ["Less traumatic than ETT — sits above glottis", "Classic & 2nd-generation devices (ProSeal, i-gel)", "i-gel has built-in oesophageal drain tube", "Easily taught to paramedics; also used in emergencies"] },
{ title: "Difficult Airway Strategies", icon: "⚠️", pts: ["Video laryngoscopes: McGrath, C-MAC, Airtraq", "Inhalational induction (sevoflurane) if difficult airway anticipated", "Awake fibreoptic intubation: lidocaine spray to airway", "Protocols from specialised societies guide management"] },
];
devices.forEach((d, i) => {
const x = 0.22 + i * 3.26;
card(s, x, 1.45, 3.1, 3.8, LIGHT_CARD);
s.addText(d.icon, { x, y: 1.48, w: 3.1, h: 0.55, fontSize: 26, align: "center" });
s.addText(d.title, { x: x + 0.1, y: 2.06, w: 2.9, h: 0.5, fontSize: 11.5, bold: true, color: ACCENT2, align: "center" });
d.pts.forEach((pt, j) => {
s.addText("• " + pt, { x: x + 0.12, y: 2.65 + j * 0.52, w: 2.85, h: 0.48, fontSize: 10, color: OFF_WHITE });
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – HOW GENERAL ANAESTHESIA WORKS (MECHANISM)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
// Left half dark navy, right half slightly lighter
s.addShape(pres.ShapeType.rect, { x: 5.0, y: 0, w: 5, h: 5.625, fill: { color: MID_BG }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("Mechanism of Action", { x: 0.4, y: 0.18, w: 9, h: 0.55, fontSize: 27, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT, 2.2, 0.4, 0.8, 0.045);
// LEFT: Inhaled agents
s.addText("INHALED AGENTS", { x: 0.4, y: 0.98, w: 4.5, h: 0.32, fontSize: 9.5, bold: true, color: ACCENT, charSpacing: 3, margin: 0 });
const inh = [
"Volatile anaesthetics (sevoflurane, isoflurane, desflurane) are thought to potentiate GABA-A receptors and inhibit NMDA receptors",
"GABA-A potentiation → increased inhibitory tone → sedation, amnesia, unconsciousness",
"NMDA inhibition → reduced excitatory transmission → analgesia and amnesia",
"Minimum Alveolar Concentration (MAC) = dose at which 50% of patients don't move to surgical incision",
"Delivered via calibrated vaporiser on an anaesthetic machine",
];
inh.forEach((t, i) => {
s.addText("▸ " + t, { x: 0.4, y: 1.35 + i * 0.72, w: 4.5, h: 0.68, fontSize: 10.5, color: i % 2 === 0 ? OFF_WHITE : ACCENT2 });
});
// RIGHT: IV/TIVA
s.addText("INTRAVENOUS AGENTS", { x: 5.25, y: 0.98, w: 4.4, h: 0.32, fontSize: 9.5, bold: true, color: GOLD, charSpacing: 3, margin: 0 });
const iv = [
"Propofol: potentiates GABA-A receptors at the β-subunit — enhancing chloride channel opening → hyperpolarisation",
"Ketamine: NMDA receptor antagonist — blocks glutamate-driven excitation (dissociative anaesthesia)",
"Barbiturates (thiopentone): also GABA-A potentiators — increase Cl⁻ channel open duration",
"Benzodiazepines: allosteric GABA-A modulators — increase frequency of Cl⁻ channel opening",
"Opioids (fentanyl, morphine): act on μ-opioid receptors in spinal cord & brain to reduce pain signalling",
];
iv.forEach((t, i) => {
s.addText("▸ " + t, { x: 5.25, y: 1.35 + i * 0.72, w: 4.4, h: 0.68, fontSize: 10.5, color: i % 2 === 0 ? OFF_WHITE : GOLD });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – MONITORING & STAGES OF GA
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("Stages & Monitoring", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 27, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT, 2.0, 0.5, 0.8, 0.045);
// Stages table-style
s.addText("GUEDEL'S STAGES", { x: 0.5, y: 0.95, w: 4.5, h: 0.28, fontSize: 9.5, bold: true, color: ACCENT, charSpacing: 3, margin: 0 });
const stages = [
{ n: "I", name: "Analgesia", desc: "Conscious, reduced pain sensation" },
{ n: "II", name: "Excitement", desc: "Loss of consciousness — irregular breathing, risk of laryngospasm" },
{ n: "III", name: "Surgical Anaesthesia", desc: "Regular breathing, muscle relaxation — ideal for surgery (4 planes)" },
{ n: "IV", name: "Medullary Depression", desc: "Respiratory & cardiovascular collapse — AVOID" },
];
stages.forEach((st, i) => {
const y = 1.3 + i * 0.92;
card(s, 0.5, y, 4.6, 0.8, LIGHT_CARD);
s.addShape(pres.ShapeType.ellipse, { x: 0.55, y: y + 0.12, w: 0.55, h: 0.55, fill: { color: i === 3 ? "FF6B6B" : ACCENT }, line: { type: "none" } });
s.addText(st.n, { x: 0.55, y: y + 0.12, w: 0.55, h: 0.55, fontSize: 13, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
s.addText(st.name, { x: 1.2, y: y + 0.06, w: 3.7, h: 0.32, fontSize: 12, bold: true, color: i === 3 ? "FF6B6B" : WHITE, margin: 0 });
s.addText(st.desc, { x: 1.2, y: y + 0.4, w: 3.7, h: 0.32, fontSize: 9.5, color: OFF_WHITE, margin: 0 });
});
// Monitoring checklist
s.addText("INTRAOPERATIVE MONITORING", { x: 5.5, y: 0.95, w: 4.1, h: 0.28, fontSize: 9.5, bold: true, color: ACCENT2, charSpacing: 3, margin: 0 });
const mons = [
{ icon: "❤️", item: "ECG – continuous cardiac rhythm" },
{ icon: "💉", item: "Non-invasive / invasive BP" },
{ icon: "🫁", item: "SpO₂ – pulse oximetry" },
{ icon: "💨", item: "End-tidal CO₂ (ETCO₂) capnography" },
{ icon: "🌡️", item: "Temperature" },
{ icon: "⚡", item: "Neuromuscular blockade monitor" },
{ icon: "🧠", item: "BIS/depth of anaesthesia monitor" },
];
mons.forEach((m, i) => {
s.addText(m.icon + " " + m.item, {
x: 5.5, y: 1.32 + i * 0.55, w: 4.1, h: 0.48,
fontSize: 11, color: i % 2 === 0 ? OFF_WHITE : ACCENT2
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – SECTION DIVIDER: LOCAL ANAESTHESIA
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "071220" }, line: { type: "none" } });
// Large circle decoration
s.addShape(pres.ShapeType.ellipse, { x: -1.2, y: -1.0, w: 5.5, h: 5.5, fill: { color: ACCENT, transparency: 92 }, line: { type: "none" } });
s.addShape(pres.ShapeType.ellipse, { x: 6.5, y: 2.0, w: 4.5, h: 4.5, fill: { color: "4FC3F7", transparency: 90 }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 2.3, w: 10, h: 0.06, fill: { color: ACCENT }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 2.4, w: 10, h: 0.06, fill: { color: "4FC3F7", transparency: 60 }, line: { type: "none" } });
s.addText("PART TWO", { x: 1, y: 1.1, w: 8, h: 0.4, fontSize: 14, bold: true, color: ACCENT, charSpacing: 6, align: "center", margin: 0 });
s.addText("Local\nAnaesthesia", { x: 1, y: 1.5, w: 8, h: 1.4, fontSize: 52, bold: true, color: WHITE, align: "center", fontFace: "Calibri", margin: 0 });
s.addText("Targeted nerve blockade without loss of consciousness", {
x: 1, y: 3.2, w: 8, h: 0.5, fontSize: 15, color: ACCENT2, align: "center"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – MECHANISM OF LOCAL ANAESTHESIA
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT2 }, line: { type: "none" } });
s.addText("How Local Anaesthetics Work", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 27, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT2, 2.5, 0.5, 0.8, 0.045);
// Mechanism steps flow
s.addText("MECHANISM", { x: 0.5, y: 0.95, w: 4.5, h: 0.3, fontSize: 9.5, bold: true, color: ACCENT2, charSpacing: 3, margin: 0 });
const steps = [
{ num: "1", text: "Local anaesthetic molecule diffuses through nerve membrane in unionised (free base) form" },
{ num: "2", text: "Inside the axon, re-ionises and binds to receptor site inside the voltage-gated Na⁺ channel" },
{ num: "3", text: "Channel blocked — sodium ions cannot flow in during depolarisation" },
{ num: "4", text: "Action potential cannot propagate — nerve impulse is halted" },
{ num: "5", text: "Result: loss of pain, temperature and touch sensation in the targeted region (patient remains conscious)" },
];
steps.forEach((st, i) => {
const y = 1.32 + i * 0.8;
s.addShape(pres.ShapeType.ellipse, { x: 0.5, y: y + 0.08, w: 0.45, h: 0.45, fill: { color: ACCENT2 }, line: { type: "none" } });
s.addText(st.num, { x: 0.5, y: y + 0.08, w: 0.45, h: 0.45, fontSize: 12, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
if (i < 4) s.addShape(pres.ShapeType.rect, { x: 0.7, y: y + 0.54, w: 0.04, h: 0.35, fill: { color: ACCENT2, transparency: 50 }, line: { type: "none" } });
s.addText(st.text, { x: 1.1, y: y, w: 3.8, h: 0.72, fontSize: 10.8, color: OFF_WHITE, valign: "middle" });
});
// Right: Classes
s.addText("TWO CHEMICAL CLASSES", { x: 5.3, y: 0.95, w: 4.3, h: 0.3, fontSize: 9.5, bold: true, color: GOLD, charSpacing: 3, margin: 0 });
card(s, 5.3, 1.32, 4.3, 1.6, LIGHT_CARD);
s.addShape(pres.ShapeType.rect, { x: 5.3, y: 1.32, w: 4.3, h: 0.055, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("AMIDES", { x: 5.45, y: 1.4, w: 4.0, h: 0.3, fontSize: 13, bold: true, color: ACCENT, margin: 0 });
s.addText("Lidocaine, Bupivacaine, Ropivacaine,\nPrilocaine, Levobupivacaine\n→ Metabolised in the LIVER", { x: 5.45, y: 1.72, w: 4.0, h: 0.65, fontSize: 10, color: OFF_WHITE });
s.addText("Memory: amide drugs have TWO 'i's in their name (lidoca-i-ne)", { x: 5.45, y: 2.38, w: 4.0, h: 0.42, fontSize: 9.5, color: "7FBCD2", italic: true });
card(s, 5.3, 3.08, 4.3, 1.6, LIGHT_CARD);
s.addShape(pres.ShapeType.rect, { x: 5.3, y: 3.08, w: 4.3, h: 0.055, fill: { color: GOLD }, line: { type: "none" } });
s.addText("ESTERS", { x: 5.45, y: 3.16, w: 4.0, h: 0.3, fontSize: 13, bold: true, color: GOLD, margin: 0 });
s.addText("Cocaine, Procaine, Benzocaine,\nTetracaine\n→ Metabolised by plasma CHOLINESTERASE", { x: 5.45, y: 3.48, w: 4.0, h: 0.65, fontSize: 10, color: OFF_WHITE });
s.addText("Higher risk of allergic reaction than amides", { x: 5.45, y: 4.14, w: 4.0, h: 0.42, fontSize: 9.5, color: "7FBCD2", italic: true });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – COMMON LOCAL ANAESTHETIC DRUGS TABLE
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: GOLD }, line: { type: "none" } });
s.addText("Common Local Anaesthetic Drugs", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 26, bold: true, color: WHITE, margin: 0 });
accentBar(s, GOLD, 2.5, 0.5, 0.8, 0.045);
const hdr = ["Drug", "Max Dose", "Key Features"];
const rows = [
["Lidocaine", "3 mg/kg (7 mg/kg with adrenaline)", "Early onset, short acting, good sensory block"],
["Bupivacaine", "2 mg/kg", "Long lasting, more cardiotoxic — NEVER IV"],
["Prilocaine", "6 mg/kg (9 mg/kg with adrenaline)", "Least systemic toxicity; causes methaemoglobinaemia"],
["Ropivacaine", "3–4 mg/kg", "Less cardiotoxic, greater sensory–motor separation"],
["Levobupivacaine", "2 mg/kg", "Isomer of bupivacaine with fewer cardiotoxic properties"],
];
const colW = [2.1, 2.9, 4.5];
const colX = [0.35, 2.5, 5.45];
// Header row
hdr.forEach((h, ci) => {
s.addShape(pres.ShapeType.rect, { x: colX[ci], y: 1.0, w: colW[ci], h: 0.42, fill: { color: GOLD }, line: { type: "none" } });
s.addText(h, { x: colX[ci] + 0.1, y: 1.0, w: colW[ci] - 0.1, h: 0.42, fontSize: 11.5, bold: true, color: DARK_BG, valign: "middle", margin: 0 });
});
rows.forEach((row, ri) => {
const y = 1.48 + ri * 0.75;
const bg = ri % 2 === 0 ? LIGHT_CARD : "0E2040";
s.addShape(pres.ShapeType.rect, { x: 0.35, y, w: 9.6, h: 0.7, fill: { color: bg }, line: { type: "none" } });
row.forEach((cell, ci) => {
const isFirst = ci === 0;
s.addText(cell, {
x: colX[ci] + 0.1, y: y + 0.04, w: colW[ci] - 0.15, h: 0.65,
fontSize: isFirst ? 12 : 10.5,
bold: isFirst,
color: isFirst ? ACCENT2 : OFF_WHITE,
valign: "middle",
margin: 0
});
});
});
s.addText("Source: Bailey & Love's Surgery 28e — Table 23.2", {
x: 0.5, y: 5.28, w: 9, h: 0.25, fontSize: 8, color: "4A7A8A", align: "right"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – TECHNIQUES OF LOCAL ANAESTHESIA
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("Techniques of Local Anaesthesia", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 26, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT, 2.5, 0.5, 0.8, 0.045);
const techs = [
{ title: "Topical", icon: "💧", color: ACCENT, pts: ["EMLA cream (lidocaine + prilocaine) — IV access in children", "Cocaine / Moffett's solution — nasal surgery", "Lidocaine spray 2–10% — awake airway intubation"] },
{ title: "Local Infiltration", icon: "💉", color: ACCENT2, pts: ["Injected directly at wound / procedure site", "Used for minor surgery, suturing, biopsies", "Adrenaline added to prolong effect & reduce bleeding"] },
{ title: "Nerve Blocks", icon: "⚡", color: GOLD, pts: ["Brachial plexus (interscalene, axillary) — upper limb", "Femoral & sciatic — lower limb surgery", "Ultrasound guidance improves accuracy & safety"] },
{ title: "Neuraxial Blocks", icon: "🦴", color: "FF6B6B", pts: ["Spinal (intrathecal) — rapid onset, lower limb & obstetrics", "Epidural — slower onset, catheter allows prolonged infusion", "Combined spinal-epidural (CSE) — flexibility of both"] },
{ title: "IV Regional (Bier's Block)", icon: "🩺", color: "B39DDB", pts: ["Local anaesthetic injected IV into exsanguinated limb", "Double tourniquet prevents systemic absorption", "Ideal for short upper limb surgery (e.g. carpal tunnel)"] },
];
const positions = [
[0.25, 1.05, 3.1, 2.6],
[3.45, 1.05, 3.1, 2.6],
[6.65, 1.05, 3.1, 2.6],
[0.25, 3.75, 4.65, 1.65],
[5.05, 3.75, 4.65, 1.65],
];
techs.forEach((t, i) => {
const [x, y, w, h] = positions[i];
card(s, x, y, w, h, LIGHT_CARD);
s.addShape(pres.ShapeType.rect, { x, y, w, h: 0.055, fill: { color: t.color }, line: { type: "none" } });
s.addText(t.icon + " " + t.title, { x: x + 0.12, y: y + 0.1, w: w - 0.2, h: 0.38, fontSize: 12.5, bold: true, color: t.color, margin: 0 });
t.pts.forEach((pt, j) => {
s.addText("• " + pt, { x: x + 0.12, y: y + 0.55 + j * 0.5, w: w - 0.2, h: 0.48, fontSize: 9.5, color: OFF_WHITE });
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – ADRENALINE & TOXICITY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: "FF6B6B" }, line: { type: "none" } });
s.addText("Adrenaline Adjunct & Toxicity", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 26, bold: true, color: WHITE, margin: 0 });
accentBar(s, "FF6B6B", 2.5, 0.5, 0.8, 0.045);
// Adrenaline card
card(s, 0.35, 1.0, 4.6, 2.4, LIGHT_CARD);
s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.0, w: 4.6, h: 0.055, fill: { color: GOLD }, line: { type: "none" } });
s.addText("⚗️ Adrenaline (Epinephrine) Addition", { x: 0.5, y: 1.08, w: 4.3, h: 0.38, fontSize: 12.5, bold: true, color: GOLD, margin: 0 });
const adPts = [
"Hastens onset of block",
"Prolongs duration of action (vasoconstriction ↓ absorption)",
"Allows a higher safe dose ceiling",
"AVOID in: cardiovascular disease, end-arterial sites\n(fingers, toes, penis, nose, ear), patients on TCAs / MAOIs",
];
adPts.forEach((pt, i) => {
s.addText("• " + pt, { x: 0.5, y: 1.52 + i * 0.44, w: 4.3, h: 0.42, fontSize: 10.5, color: OFF_WHITE });
});
// Toxicity card
card(s, 5.15, 1.0, 4.45, 2.4, LIGHT_CARD);
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.0, w: 4.45, h: 0.055, fill: { color: "FF6B6B" }, line: { type: "none" } });
s.addText("⚠️ Local Anaesthetic Systemic Toxicity (LAST)", { x: 5.3, y: 1.08, w: 4.1, h: 0.38, fontSize: 11.5, bold: true, color: "FF6B6B", margin: 0 });
const toxPts = [
"CNS: perioral tingling → dizziness → convulsions",
"CVS: arrhythmia → cardiac arrest",
"Bupivacaine: treatment-resistant ventricular arrhythmia",
"Prilocaine overdose: methaemoglobinaemia",
"Treatment: stop injection, IV lipid emulsion (Intralipid 20%)",
];
toxPts.forEach((pt, i) => {
s.addText("• " + pt, { x: 5.3, y: 1.52 + i * 0.44, w: 4.1, h: 0.42, fontSize: 10.5, color: OFF_WHITE });
});
// Safety reminder
s.addShape(pres.ShapeType.roundRect, { x: 0.35, y: 3.58, w: 9.25, h: 0.88, fill: { color: "1A0505" }, line: { color: "FF6B6B", width: 1.5 }, rectRadius: 0.1 });
s.addText("🔴 Safety Rule: Resuscitation equipment (oxygen, airway kit, IV access) and appropriately trained personnel MUST always be available whenever local anaesthetics are administered.",
{ x: 0.5, y: 3.62, w: 9.0, h: 0.82, fontSize: 11, color: "FFA0A0" }
);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – GA vs LOCAL: COMPARISON
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("General vs Local Anaesthesia", { x: 0.5, y: 0.18, w: 9, h: 0.55, fontSize: 26, bold: true, color: WHITE, margin: 0 });
accentBar(s, ACCENT, 2.5, 0.5, 0.8, 0.045);
// Headers
s.addShape(pres.ShapeType.rect, { x: 2.5, y: 0.98, w: 3.3, h: 0.4, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("GENERAL", { x: 2.5, y: 0.98, w: 3.3, h: 0.4, fontSize: 13, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
s.addShape(pres.ShapeType.rect, { x: 6.0, y: 0.98, w: 3.6, h: 0.4, fill: { color: ACCENT2 }, line: { type: "none" } });
s.addText("LOCAL / REGIONAL", { x: 6.0, y: 0.98, w: 3.6, h: 0.4, fontSize: 13, bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
const rows = [
{ label: "Consciousness", ga: "Unconscious", la: "Fully conscious" },
{ label: "Scope", ga: "Any body region / major surgery", la: "Targeted region only" },
{ label: "Airway", ga: "Requires airway management (ETT/LMA)", la: "No airway intervention needed" },
{ label: "Advantages", ga: "Patient unaware; full relaxation; any procedure", la: "No systemic CNS depression; safer in respiratory disease; good postop analgesia" },
{ label: "Risks", ga: "Nausea, sore throat, awareness, PONV, cognitive effects", la: "LAST toxicity, nerve injury, failed block, haematoma" },
{ label: "Recovery", ga: "Slower; recovery room required", la: "Faster; same-day discharge common" },
];
rows.forEach((r, i) => {
const y = 1.44 + i * 0.67;
const bg = i % 2 === 0 ? LIGHT_CARD : "0E2040";
s.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 9.5, h: 0.62, fill: { color: bg }, line: { type: "none" } });
s.addText(r.label, { x: 0.3, y, w: 2.1, h: 0.62, fontSize: 10.5, bold: true, color: GOLD, valign: "middle", margin: 0 });
s.addText(r.ga, { x: 2.5, y, w: 3.3, h: 0.62, fontSize: 10, color: OFF_WHITE, valign: "middle", align: "center" });
s.addText(r.la, { x: 6.0, y, w: 3.6, h: 0.62, fontSize: 10, color: OFF_WHITE, valign: "middle", align: "center" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – SUMMARY / KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addBg(s, DARK_BG);
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.12, fill: { color: MID_BG }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: ACCENT }, line: { type: "none" } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 1.08, w: 10, h: 0.07, fill: { color: ACCENT }, line: { type: "none" } });
s.addText("Key Takeaways", { x: 0.5, y: 0.18, w: 9, h: 0.65, fontSize: 28, bold: true, color: WHITE, align: "center", margin: 0 });
const takes = [
{ icon: "🔵", text: "General anaesthesia achieves the triad of hypnosis, analgesia and akinesia using balanced combinations of inhaled agents, opioids and muscle relaxants" },
{ icon: "🟢", text: "Inhaled anaesthetics (sevoflurane, isoflurane) act on GABA-A and NMDA receptors; IV agents (propofol, ketamine) share these targets with different selectivity" },
{ icon: "🟡", text: "Local anaesthetics block voltage-gated Na⁺ channels inside the axon — stopping nerve impulse conduction while the patient stays awake" },
{ icon: "🟠", text: "Amide LAs (lidocaine, bupivacaine) are metabolised hepatically; esters (cocaine, procaine) by plasma cholinesterase" },
{ icon: "🔴", text: "Toxicity of LAs is dose-dependent — CVS collapse and CNS convulsions. IV lipid emulsion is the antidote. Resuscitation equipment is mandatory" },
{ icon: "🟣", text: "Regional techniques (spinal, epidural, nerve blocks) are preferred in obstetrics and high respiratory-risk patients — providing superior postoperative analgesia" },
];
takes.forEach((t, i) => {
const col = i < 3 ? 0 : 1;
const row = i % 3;
const x = col === 0 ? 0.35 : 5.15;
const y = 1.28 + row * 1.38;
card(s, x, y, 4.55, 1.22, LIGHT_CARD);
s.addText(t.icon, { x: x + 0.1, y: y + 0.12, w: 0.5, h: 0.5, fontSize: 20, align: "center" });
s.addText(t.text, { x: x + 0.65, y: y + 0.08, w: 3.8, h: 1.1, fontSize: 10, color: OFF_WHITE, valign: "middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// WRITE FILE
// ═══════════════════════════════════════════════════════════════════════════════
pres.writeFile({ fileName: "/home/daytona/workspace/anaesthesia-pptx/Anaesthesia_General_and_Local.pptx" })
.then(() => console.log("✅ Done: Anaesthesia_General_and_Local.pptx"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });
cd /home/daytona/workspace/anaesthesia-pptx && node build.js
ls -lh /home/daytona/workspace/anaesthesia-pptx/
Anaesthesia General and Local
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title slide — Anaesthesia: General & Local |
| 2 | What is Anaesthesia? — the Triad: Hypnosis, Akinesia, Analgesia |
| 3 | General Anaesthesia Overview — balanced anaesthesia concept |
| 4 | IV Induction Agents — Propofol, Thiopentone, Etomidate, Ketamine |
| 5 | Airway Management — ETT, LMA, difficult airway strategies |
| 6 | Mechanism of GA — GABA-A / NMDA targets for inhaled & IV agents |
| 7 | Stages & Monitoring — Guedel's 4 stages + intraoperative monitoring checklist |
| 8 | Section divider — Part Two: Local Anaesthesia |
| 9 | How Local Anaesthetics Work — Na⁺ channel blockade step by step; amides vs esters |
| 10 | Drug table — Lidocaine, Bupivacaine, Prilocaine, Ropivacaine, Levobupivacaine with doses |
| 11 | Techniques — Topical, infiltration, nerve blocks, spinal/epidural, Bier's block |
| 12 | Adrenaline adjunct & LAST toxicity — with safety warning |
| 13 | GA vs Local: head-to-head comparison table |
| 14 | Key Takeaways — 6 summary cards |