Barbiturate drugs in MD Anesthesia make a PPT
mkdir -p /home/daytona/workspace/barbiturates-ppt && ls /home/daytona/workspace/
~/barbiturates-ppt/make_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "MD Anesthesia";
pres.title = "Barbiturate Drugs in Anesthesia";
// ─── THEME ───────────────────────────────────────────────────────────────────
const C = {
navy: "0B1F4B", // dominant background
teal: "1A8C8C", // accent headers
gold: "E8A020", // highlight / numbers
white: "FFFFFF",
silver: "D6E4F0", // body text
dark: "071230", // deep bg variant
lightbg: "132654", // card bg
red: "C0392B", // warning/contraindications
};
function slide_bg(slide) {
slide.background = { color: C.navy };
}
function header_bar(slide, label) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.68,
fill: { color: C.teal },
line: { type: "none" },
});
slide.addText(label, {
x: 0.18, y: 0, w: 9.6, h: 0.68,
fontSize: 22, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle", margin: 0,
});
}
function left_accent(slide) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0.68, w: 0.12, h: 4.94,
fill: { color: C.gold },
line: { type: "none" },
});
}
// ─── SLIDE 1 — TITLE ─────────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.dark };
// gradient-like overlay block
s.addShape(pres.ShapeType.rect, {
x: 0, y: 3.3, w: 10, h: 2.32,
fill: { color: C.navy }, line: { type: "none" },
});
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 3.3,
fill: { color: C.teal }, line: { type: "none" },
});
// decorative circles
s.addShape(pres.ShapeType.ellipse, {
x: 7.5, y: -0.5, w: 3.5, h: 3.5,
fill: { color: "1EA0A0" }, line: { type: "none" },
});
s.addShape(pres.ShapeType.ellipse, {
x: 8.2, y: 0.8, w: 2.2, h: 2.2,
fill: { color: C.navy }, line: { type: "none" },
});
s.addText("BARBITURATE DRUGS", {
x: 0.4, y: 0.55, w: 7.5, h: 1.0,
fontSize: 38, bold: true, color: C.white,
fontFace: "Calibri", charSpacing: 2,
});
s.addText("IN ANESTHESIA", {
x: 0.4, y: 1.5, w: 7.5, h: 0.75,
fontSize: 30, bold: false, color: C.gold,
fontFace: "Calibri", charSpacing: 4,
});
// bottom strip
s.addShape(pres.ShapeType.rect, {
x: 0, y: 3.3, w: 2.5, h: 0.08,
fill: { color: C.gold }, line: { type: "none" },
});
s.addText("MD Anesthesia | Pharmacology of Intravenous Induction Agents", {
x: 0.4, y: 3.6, w: 9.2, h: 0.5,
fontSize: 14, color: C.silver, fontFace: "Calibri", italic: true,
});
s.addText([
{ text: "Source: ", options: { bold: true, color: C.gold } },
{ text: "Morgan & Mikhail's Clinical Anesthesiology, 7e | Miller's Anesthesia, 10e | Katzung's Pharmacology, 16e", options: { color: C.silver } },
], {
x: 0.4, y: 4.3, w: 9.2, h: 0.5,
fontSize: 10, fontFace: "Calibri",
});
}
// ─── SLIDE 2 — OVERVIEW ──────────────────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Overview | Historical Context");
left_accent(s);
const boxes = [
{ title: "History", body: "Barbituric acid synthesised 1864; thiopental introduced clinically 1934 — 'gold standard' IV induction agent for 50 years." },
{ title: "Current Role", body: "Largely replaced by propofol but still used for specific indications: RSI in some centres, neuro-protection, ECT, control of status epilepticus." },
{ title: "Key Agents", body: "Thiopental (thiobarbiturate) • Thiamylal (thiobarbiturate) • Methohexital (oxybarbiturate) • Phenobarbital (anticonvulsant)" },
{ title: "Classification", body: "Oxybarbiturates (C2 = O): lower potency\nThiobarbiturates (C2 = S): higher lipid solubility, faster onset, greater potency" },
];
const cols = 2, rows = 2;
const bw = 4.4, bh = 1.9, bx0 = 0.25, by0 = 0.85, gx = 0.2, gy = 0.2;
boxes.forEach((b, i) => {
const col = i % cols, row = Math.floor(i / cols);
const bx = bx0 + col * (bw + gx);
const by = by0 + row * (bh + gy);
s.addShape(pres.ShapeType.roundRect, {
x: bx, y: by, w: bw, h: bh,
fill: { color: C.lightbg }, line: { color: C.teal, pt: 1.5 },
rectRadius: 0.08,
});
s.addText(b.title, {
x: bx + 0.1, y: by + 0.08, w: bw - 0.2, h: 0.38,
fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri",
});
s.addText(b.body, {
x: bx + 0.1, y: by + 0.48, w: bw - 0.2, h: bh - 0.58,
fontSize: 11.5, color: C.silver, fontFace: "Calibri",
wrap: true, valign: "top",
});
});
}
// ─── SLIDE 3 — STRUCTURE & SAR ───────────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Structure–Activity Relationships (SAR)");
left_accent(s);
const points = [
{ label: "Core", text: "All barbiturates derived from barbituric acid (pyrimidine ring)." },
{ label: "C5 substitution", text: "Determines hypnotic potency and anticonvulsant activity." },
{ label: "Phenyl at C5", text: "Anticonvulsant (phenobarbital). Methyl at C5 (methohexital) — NOT anticonvulsant → useful for ECT." },
{ label: "C2 oxygen → sulfur", text: "Thiobarbiturates (thiopental, thiamylal): ↑ lipid solubility → ↑ potency, faster onset, shorter single-dose duration." },
{ label: "N1 methylation", text: "Methohexital: increases potency; increases incidence of excitatory side effects (tremors, hiccups)." },
{ label: "Sodium salts", text: "Highly alkaline (pH ≥10 for 2.3% thiopental); precipitate with acidic drugs (suxamethonium, rocuronium)." },
];
points.forEach((p, i) => {
const yy = 0.82 + i * 0.73;
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: yy, w: 2.1, h: 0.55,
fill: { color: C.teal }, line: { type: "none" },
});
s.addText(p.label, {
x: 0.25, y: yy, w: 2.1, h: 0.55,
fontSize: 11, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle",
});
s.addText(p.text, {
x: 2.55, y: yy + 0.04, w: 7.2, h: 0.48,
fontSize: 12, color: C.silver, fontFace: "Calibri", valign: "middle",
});
});
}
// ─── SLIDE 4 — MECHANISM OF ACTION ──────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Mechanism of Action");
left_accent(s);
// Central circle
s.addShape(pres.ShapeType.ellipse, {
x: 3.8, y: 1.2, w: 2.4, h: 2.4,
fill: { color: C.teal }, line: { color: C.gold, pt: 2 },
});
s.addText("GABA\u2090\nReceptor", {
x: 3.8, y: 1.8, w: 2.4, h: 1.2,
fontSize: 15, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle",
});
// Satellite boxes
const items = [
{ x: 0.2, y: 0.85, text: "Separate binding site from benzodiazepines", arrow: "right" },
{ x: 0.2, y: 2.5, text: "↑ Duration of Cl⁻ channel opening\n(vs BZD: ↑ frequency)", arrow: "right" },
{ x: 6.6, y: 0.85, text: "Also inhibits kainate & AMPA receptors", arrow: "left" },
{ x: 6.6, y: 2.5, text: "Depresses reticular activating system (RAS) in brainstem → ↓ consciousness", arrow: "left" },
];
items.forEach(it => {
s.addShape(pres.ShapeType.roundRect, {
x: it.x, y: it.y, w: 3.2, h: 1.0,
fill: { color: C.lightbg }, line: { color: C.gold, pt: 1 },
rectRadius: 0.07,
});
s.addText(it.text, {
x: it.x + 0.1, y: it.y + 0.05, w: 3.0, h: 0.9,
fontSize: 11.5, color: C.silver, fontFace: "Calibri",
wrap: true, valign: "middle",
});
});
s.addText("Key distinction: barbiturates can activate GABA\u2090 channels even without GABA (at high doses)\n— benzodiazepines cannot.", {
x: 0.25, y: 4.55, w: 9.5, h: 0.7,
fontSize: 11.5, color: C.gold, fontFace: "Calibri",
italic: true, align: "center",
});
}
// ─── SLIDE 5 — PHARMACOKINETICS ──────────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Pharmacokinetics");
left_accent(s);
const rows_ = [
["Parameter", "Thiopental", "Methohexital", "Phenobarbital"],
["Onset (IV)", "30 sec", "30 sec", "Slow (min)"],
["Duration (single dose)", "5–8 min (redistrib.)", "4–7 min (redistrib.)", "Hours"],
["Protein binding", "85%", "73%", "40–60%"],
["Elimination t½", "10–12 h", "3–5 h", "80–120 h"],
["Clearance", "Hepatic oxidation", "Hepatic (faster)", "Hepatic / renal"],
["Lipid solubility", "Very high", "High", "Moderate"],
["pKa / % non-ionised", "7.6 / ~60%", "7.9 / ~75%", "7.2"],
];
const colW = [2.8, 2.1, 2.1, 2.1];
const rowH = 0.48;
const tx0 = 0.15, ty0 = 0.75;
rows_.forEach((row, ri) => {
row.forEach((cell, ci) => {
const cx = tx0 + colW.slice(0, ci).reduce((a, v) => a + v, 0);
const cy = ty0 + ri * rowH;
const isHeader = ri === 0;
const isLabelCol = ci === 0;
s.addShape(pres.ShapeType.rect, {
x: cx, y: cy, w: colW[ci], h: rowH,
fill: { color: isHeader ? C.teal : (ri % 2 === 0 ? C.navy : C.lightbg) },
line: { color: C.teal, pt: 0.5 },
});
s.addText(cell, {
x: cx + 0.06, y: cy, w: colW[ci] - 0.1, h: rowH,
fontSize: isHeader ? 12 : 10.5,
bold: isHeader || isLabelCol,
color: isHeader ? C.white : (isLabelCol ? C.gold : C.silver),
fontFace: "Calibri", valign: "middle",
});
});
});
s.addText("Duration of induction doses determined by REDISTRIBUTION, not elimination (context-sensitive beyond single dose).", {
x: 0.25, y: 4.7, w: 9.5, h: 0.55,
fontSize: 11, color: C.gold, fontFace: "Calibri", italic: true,
});
}
// ─── SLIDE 6 — ORGAN EFFECTS ─────────────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Effects on Organ Systems");
left_accent(s);
const systems = [
{
sys: "CNS",
icon: "🧠",
col: C.teal,
points: [
"Dose-dependent depression: sedation → hypnosis → burst suppression → isoelectric EEG",
"↓ CBF ~30% at induction dose; ↓ CMRO₂ up to 50%; ↓ ICP",
"CPP usually maintained or ↑ (ICP falls more than MAP)",
"No analgesia — may paradoxically increase pain perception at sub-anaesthetic doses",
"Methohexital: excitatory (tremors, hiccoughs) — useful for ECT",
],
},
{
sys: "CVS",
icon: "❤️",
col: C.red,
points: [
"↓ BP (medullary vasomotor depression → peripheral pooling)",
"Compensatory ↑ HR (central vagolytic + baroreceptor reflex)",
"Cardiac output usually maintained in normovolaemic patients",
"Exaggerated hypotension in hypovolaemia, CCF, β-blockade",
"Slow injection + adequate prehydration attenuates CVS effects",
],
},
{
sys: "Resp",
icon: "🫁",
col: C.gold,
points: [
"Depresses medullary ventilatory centre",
"↓ Ventilatory response to hypercapnia and hypoxia",
"Apnoea common after induction dose",
"Incompletely suppresses laryngeal reflexes (cf. propofol) → risk laryngospasm / bronchospasm",
"Avoid in acute asthma (propofol / ketamine preferred)",
],
},
];
systems.forEach((sys, si) => {
const xb = 0.18 + si * 3.27;
s.addShape(pres.ShapeType.roundRect, {
x: xb, y: 0.72, w: 3.1, h: 4.55,
fill: { color: C.lightbg }, line: { color: sys.col, pt: 2 },
rectRadius: 0.1,
});
s.addShape(pres.ShapeType.rect, {
x: xb, y: 0.72, w: 3.1, h: 0.55,
fill: { color: sys.col }, line: { type: "none" },
});
s.addText(`${sys.icon} ${sys.sys}`, {
x: xb, y: 0.72, w: 3.1, h: 0.55,
fontSize: 15, bold: true, color: C.white,
fontFace: "Calibri", align: "center", valign: "middle",
});
sys.points.forEach((pt, pi) => {
s.addText([{ text: "• ", options: { color: sys.col, bold: true } }, { text: pt, options: { color: C.silver } }], {
x: xb + 0.1, y: 1.32 + pi * 0.72, w: 2.88, h: 0.68,
fontSize: 10.5, fontFace: "Calibri", wrap: true, valign: "top",
});
});
});
}
// ─── SLIDE 7 — CLINICAL USES & DOSING ────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Clinical Uses & Dosing");
left_accent(s);
const data = [
{ use: "IV Induction of GA", drug: "Thiopental", dose: "3–6 mg/kg IV", note: "2.5% solution; smooth rapid onset" },
{ use: "IV Induction of GA", drug: "Methohexital", dose: "1–2 mg/kg IV", note: "1% solution; faster recovery" },
{ use: "Sedation", drug: "Methohexital", dose: "0.2–0.4 mg/kg IV", note: "" },
{ use: "Rectal induction (paeds)", drug: "Methohexital", dose: "25 mg/kg rectal", note: "10% solution in children" },
{ use: "ECT anaesthesia", drug: "Methohexital", dose: "0.5–1 mg/kg IV", note: "Preferred (pro-convulsant, no anticonvulsant activity)" },
{ use: "Seizure control (status)", drug: "Thiopental", dose: "50–100 mg IV (bolus)", note: "Short-acting; controls grand mal briefly" },
{ use: "ICP reduction / cerebral protection", drug: "Thiopental infusion", dose: "Titrate to EEG burst suppression", note: "Barbiturate coma; monitor plasma levels" },
{ use: "Anticonvulsant (chronic)", drug: "Phenobarbital", dose: "1–3 mg/kg/day oral", note: "Long t½; enzyme inducer" },
];
const headers = ["Indication", "Drug", "Dose", "Notes"];
const cw = [2.6, 1.7, 2.3, 3.1];
const rh = 0.46;
const tx0 = 0.13, ty0 = 0.74;
headers.forEach((h, ci) => {
const cx = tx0 + cw.slice(0, ci).reduce((a, v) => a + v, 0);
s.addShape(pres.ShapeType.rect, {
x: cx, y: ty0, w: cw[ci], h: rh,
fill: { color: C.teal }, line: { color: C.teal, pt: 0.5 },
});
s.addText(h, {
x: cx + 0.05, y: ty0, w: cw[ci] - 0.08, h: rh,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
});
});
data.forEach((row, ri) => {
const cells = [row.use, row.drug, row.dose, row.note];
cells.forEach((cell, ci) => {
const cx = tx0 + cw.slice(0, ci).reduce((a, v) => a + v, 0);
const cy = ty0 + (ri + 1) * rh;
s.addShape(pres.ShapeType.rect, {
x: cx, y: cy, w: cw[ci], h: rh,
fill: { color: ri % 2 === 0 ? C.navy : C.lightbg },
line: { color: C.teal, pt: 0.4 },
});
s.addText(cell, {
x: cx + 0.05, y: cy, w: cw[ci] - 0.08, h: rh,
fontSize: ci === 2 ? 11.5 : 10.5, bold: ci === 1,
color: ci === 1 ? C.gold : C.silver,
fontFace: "Calibri", valign: "middle",
});
});
});
}
// ─── SLIDE 8 — CONTRAINDICATIONS & CAUTIONS ──────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Contraindications & Cautions");
left_accent(s);
const contra = [
"Acute intermittent porphyria (AIP) — absolute contraindication: barbiturates induce δ-ALA synthetase → precipitate acute porphyric crisis",
"Absence of suitable veins (solution is highly alkaline; extravasation → tissue necrosis)",
"Intra-arterial injection — causes crystallisation → arterial spasm, thrombosis, gangrene",
"Obstruction of airway (incomplete suppression of laryngeal reflexes)",
"Severe bronchospasm / status asthmaticus",
];
const cautions = [
"Hypovolaemia / haemodynamic instability — exaggerated hypotension",
"Congestive cardiac failure — reduced cardiac output",
"β-blocker therapy — baroreceptor reflex blunted",
"Severe hepatic disease — reduced protein binding → ↑ free drug",
"Acidosis — ↑ non-ionised fraction → ↑ CNS penetration",
"Elderly patients — reduced induction dose required",
"Neonates — immature hepatic enzymes, prolonged effect",
];
s.addShape(pres.ShapeType.rect, {
x: 0.18, y: 0.72, w: 4.6, h: 0.42,
fill: { color: C.red }, line: { type: "none" },
});
s.addText("⛔ Absolute / Relative Contraindications", {
x: 0.18, y: 0.72, w: 4.6, h: 0.42,
fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
});
contra.forEach((c, i) => {
s.addShape(pres.ShapeType.roundRect, {
x: 0.18, y: 1.18 + i * 0.72, w: 4.6, h: 0.66,
fill: { color: C.lightbg }, line: { color: C.red, pt: 1 }, rectRadius: 0.06,
});
s.addText([{ text: "✗ ", options: { color: C.red, bold: true } }, { text: c, options: { color: C.silver } }], {
x: 0.28, y: 1.21 + i * 0.72, w: 4.4, h: 0.6,
fontSize: 10.5, fontFace: "Calibri", wrap: true, valign: "middle",
});
});
s.addShape(pres.ShapeType.rect, {
x: 5.1, y: 0.72, w: 4.7, h: 0.42,
fill: { color: C.gold }, line: { type: "none" },
});
s.addText("⚠️ Use with Caution", {
x: 5.1, y: 0.72, w: 4.7, h: 0.42,
fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle",
});
cautions.forEach((c, i) => {
s.addShape(pres.ShapeType.roundRect, {
x: 5.1, y: 1.18 + i * 0.5, w: 4.7, h: 0.46,
fill: { color: C.lightbg }, line: { color: C.gold, pt: 0.8 }, rectRadius: 0.06,
});
s.addText([{ text: "▶ ", options: { color: C.gold, bold: true } }, { text: c, options: { color: C.silver } }], {
x: 5.2, y: 1.2 + i * 0.5, w: 4.55, h: 0.42,
fontSize: 10.5, fontFace: "Calibri", valign: "middle",
});
});
}
// ─── SLIDE 9 — COMPARISON: THIOPENTAL vs PROPOFOL ────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Thiopental vs Propofol — Key Comparison");
left_accent(s);
const rows_ = [
["Feature", "Thiopental", "Propofol"],
["Onset", "30 sec", "30 sec"],
["Recovery quality", "Prolonged / hangover", "Clean & rapid"],
["Antiemetic effect", "None", "Antiemetic"],
["Analgesia", "None (↑ pain)", "None"],
["Cardiovascular", "Moderate ↓ BP", "Greater ↓ BP"],
["Resp depression", "Moderate", "Similar / greater"],
["ICP effect", "↓ ICP", "↓ ICP"],
["ECT use", "Methohexital preferred", "↑ seizure threshold"],
["Porphyria", "⛔ Contraindicated", "Safe"],
["Pain on injection", "Minimal", "Common (lipid emulsion)"],
["Availability", "Limited / discontinued in US", "Widely available"],
];
const cw = [3.5, 2.9, 2.9];
const rh = 0.41;
const tx0 = 0.18, ty0 = 0.72;
rows_.forEach((row, ri) => {
row.forEach((cell, ci) => {
const cx = tx0 + cw.slice(0, ci).reduce((a, v) => a + v, 0);
const cy = ty0 + ri * rh;
const isHead = ri === 0;
s.addShape(pres.ShapeType.rect, {
x: cx, y: cy, w: cw[ci], h: rh,
fill: { color: isHead ? C.teal : (ri % 2 === 0 ? C.navy : C.lightbg) },
line: { color: C.teal, pt: 0.4 },
});
s.addText(cell, {
x: cx + 0.06, y: cy, w: cw[ci] - 0.1, h: rh,
fontSize: isHead ? 12 : 10.5, bold: isHead || ci === 0,
color: isHead ? C.white : (ci === 0 ? C.gold : C.silver),
fontFace: "Calibri", valign: "middle",
});
});
});
}
// ─── SLIDE 10 — SPECIAL USES ─────────────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Special Clinical Applications");
left_accent(s);
const cards = [
{
title: "Barbiturate Coma (Neuro ICU)",
col: C.teal,
body: "High-dose thiopental/pentobarbital infusion to achieve EEG burst suppression.\n• Refractory raised ICP after TBI or status epilepticus\n• ↓ CMRO₂ ~50% → neuroprotection\n• Tolerance develops within 24–48 h\n• Risks: hypotension requiring vasopressors, immunosuppression, ileus",
},
{
title: "ECT Anaesthesia",
col: C.gold,
body: "Methohexital 0.5–1 mg/kg IV preferred over thiopental:\n• No anticonvulsant activity (C5-methyl group)\n• Thiopental ↑ seizure threshold → inadequate seizures\n• Methohexital has excitatory properties that facilitate seizure\n• Recovery rapid, suitable for day-case ECT",
},
{
title: "Cerebral Protection",
col: C.silver,
body: "Thiopental infusion during carotid endarterectomy or open cardiac surgery (limited evidence):\n• Protects from focal, not global ischaemia\n• Burst suppression doses prolong awakening & require inotropes\n• Clinical benefit uncertain — landmark trials inconsistent",
},
{
title: "Anticonvulsant Use",
col: C.red,
body: "Phenobarbital:\n• First-line for neonatal seizures\n• Second-line in status epilepticus (after benzodiazepines + phenytoin)\n• Long half-life (80–120 h) → once daily dosing\n• Potent enzyme inducer (CYP2C9, 3A4) → multiple drug interactions",
},
];
const bw = 4.55, bh = 2.0;
cards.forEach((c, i) => {
const col = i % 2, row = Math.floor(i / 2);
const bx = 0.15 + col * (bw + 0.3);
const by = 0.75 + row * (bh + 0.2);
s.addShape(pres.ShapeType.roundRect, {
x: bx, y: by, w: bw, h: bh,
fill: { color: C.lightbg }, line: { color: c.col, pt: 2 },
rectRadius: 0.09,
});
s.addShape(pres.ShapeType.rect, {
x: bx, y: by, w: bw, h: 0.42,
fill: { color: c.col }, line: { type: "none" },
});
s.addText(c.title, {
x: bx + 0.08, y: by, w: bw - 0.1, h: 0.42,
fontSize: 12, bold: true,
color: c.col === C.gold ? C.navy : C.white,
fontFace: "Calibri", valign: "middle",
});
s.addText(c.body, {
x: bx + 0.1, y: by + 0.46, w: bw - 0.18, h: bh - 0.52,
fontSize: 10.5, color: C.silver, fontFace: "Calibri", wrap: true, valign: "top",
});
});
}
// ─── SLIDE 11 — ADVERSE EFFECTS ──────────────────────────────────────────────
{
const s = pres.addSlide();
slide_bg(s);
header_bar(s, "Adverse Effects");
left_accent(s);
const aes = [
{ cat: "Respiratory", items: ["Dose-dependent respiratory depression", "Apnoea on induction", "Laryngospasm / bronchospasm if lightly anaesthetised", "Hiccoughs & tremors (methohexital)"] },
{ cat: "Cardiovascular", items: ["Hypotension (vasodilation + peripheral pooling)", "Tachycardia (baroreceptor-mediated)", "Cardiac depression in compromised patients", "Rapid IV bolus → cardiovascular collapse before anaesthesia"] },
{ cat: "Local / Injection", items: ["Intra-arterial injection → crystallisation → spasm → gangrene", "Extravasation → tissue necrosis (alkaline pH ≥10)", "Pain on injection (less than propofol)"] },
{ cat: "Metabolic", items: ["Precipitates acute porphyria (AIP)", "Enzyme induction (phenobarbital): ↓ efficacy of warfarin, OCP, steroids", "Prolonged recovery after repeated doses (context sensitivity)"] },
{ cat: "Neurological", items: ["Paradoxical excitement at sub-anaesthetic doses", "Hyperalgesia (↑ pain sensitivity)", "Involuntary muscle movements (methohexital)", "Tolerance and dependence with chronic use"] },
];
const nx = 5, bw_ = 1.88, bh_ = 2.5, gx_ = 0.04;
aes.forEach((ae, i) => {
const bx = 0.12 + i * (bw_ + gx_);
s.addShape(pres.ShapeType.roundRect, {
x: bx, y: 0.72, w: bw_, h: bh_,
fill: { color: C.lightbg }, line: { color: C.teal, pt: 1.2 }, rectRadius: 0.08,
});
s.addShape(pres.ShapeType.rect, {
x: bx, y: 0.72, w: bw_, h: 0.42,
fill: { color: C.teal }, line: { type: "none" },
});
s.addText(ae.cat, {
x: bx, y: 0.72, w: bw_, h: 0.42,
fontSize: 11, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle",
});
ae.items.forEach((it, ii) => {
s.addText([{ text: "• ", options: { color: C.gold, bold: true } }, { text: it, options: { color: C.silver } }], {
x: bx + 0.07, y: 1.18 + ii * 0.48, w: bw_ - 0.12, h: 0.46,
fontSize: 9.5, fontFace: "Calibri", wrap: true, valign: "top",
});
});
});
s.addText("Porphyria Warning: ALA synthetase induction → ↑ toxic porphyrin intermediates → acute neurovisceral crisis. Thiopental is ABSOLUTELY contraindicated in AIP, VP, and HCP.", {
x: 0.15, y: 3.42, w: 9.6, h: 0.65,
fontSize: 11, color: C.gold, fontFace: "Calibri",
bold: true, italic: true, align: "center",
});
// Extra row
const aes2 = [
{ cat: "Drug Interactions", items: ["Additive CNS depression with opioids, BZDs, alcohol", "Precipitates with acidic solutions (muscle relaxants)", "Phenobarbital: multiple CYP inductions", "MAOIs: potentiate CNS depression"] },
];
s.addShape(pres.ShapeType.roundRect, {
x: 0.12, y: 4.1, w: 9.7, h: 1.08,
fill: { color: C.lightbg }, line: { color: C.red, pt: 1.2 }, rectRadius: 0.08,
});
s.addText("⚠️ Drug Interactions", {
x: 0.2, y: 4.14, w: 2.2, h: 0.44,
fontSize: 11, bold: true, color: C.red, fontFace: "Calibri",
});
s.addText(aes2[0].items.join(" | "), {
x: 2.4, y: 4.14, w: 7.3, h: 0.9,
fontSize: 10.5, color: C.silver, fontFace: "Calibri", valign: "middle",
});
}
// ─── SLIDE 12 — SUMMARY ──────────────────────────────────────────────────────
{
const s = pres.addSlide();
s.background = { color: C.dark };
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.0,
fill: { color: C.teal }, line: { type: "none" },
});
s.addText("Summary & Key Takeaways", {
x: 0.25, y: 0, w: 9.5, h: 1.0,
fontSize: 24, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
});
const pts = [
{ n: "01", h: "Mechanism", t: "GABA\u2090 receptor → ↑ Cl⁻ channel DURATION; also inhibits AMPA/kainate receptors; depresses RAS" },
{ n: "02", h: "Key Agents", t: "Thiopental (IV induction), Methohexital (ECT), Phenobarbital (anticonvulsant)" },
{ n: "03", h: "Pharmacokinetics", t: "Onset 30 sec; duration determined by REDISTRIBUTION; elimination 10–12 h (thiopental)" },
{ n: "04", h: "CNS Effects", t: "↓ CBF, ↓ CMRO₂ ~50% max, ↓ ICP → neuroprotective; useful in raised ICP; no analgesia" },
{ n: "05", h: "CVS / Resp", t: "↓ BP + ↑ HR; apnoea on induction; incomplete laryngeal reflex suppression" },
{ n: "06", h: "Contraindication", t: "ABSOLUTE: Acute Intermittent Porphyria (AIP) — precipitates crisis via ALA synthetase induction" },
{ n: "07", h: "Vs Propofol", t: "Replaced by propofol for routine induction; thiopental still preferred in some haemodynamic scenarios" },
];
pts.forEach((p, i) => {
const col = i % 2 === 0 ? 0 : 1;
const row = Math.floor(i / 2);
const bx = col === 0 ? 0.18 : 5.1;
const by = 1.1 + row * 1.1;
if (i === 6) {
// last item spans full width
}
const bw_ = i === 6 ? 9.6 : 4.7;
const bx_ = i === 6 ? 0.18 : bx;
s.addShape(pres.ShapeType.ellipse, {
x: bx_, y: by + 0.08, w: 0.52, h: 0.52,
fill: { color: C.teal }, line: { type: "none" },
});
s.addText(p.n, {
x: bx_, y: by + 0.08, w: 0.52, h: 0.52,
fontSize: 11, bold: true, color: C.white, fontFace: "Calibri",
align: "center", valign: "middle",
});
s.addText(p.h + ": ", {
x: bx_ + 0.58, y: by + 0.08, w: 1.2, h: 0.52,
fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", valign: "middle",
});
s.addText(p.t, {
x: bx_ + 1.78, y: by + 0.08, w: bw_ - 1.82, h: 0.52,
fontSize: 10.5, color: C.silver, fontFace: "Calibri", valign: "middle",
});
});
s.addShape(pres.ShapeType.rect, {
x: 0, y: 5.35, w: 10, h: 0.28,
fill: { color: C.gold }, line: { type: "none" },
});
s.addText("Sources: Morgan & Mikhail's Clinical Anesthesiology 7e | Miller's Anesthesia 10e | Katzung's Basic & Clinical Pharmacology 16e | Goodman & Gilman's 14e", {
x: 0.2, y: 5.35, w: 9.6, h: 0.28,
fontSize: 8, color: C.navy, fontFace: "Calibri", valign: "middle",
});
}
// ─── WRITE ────────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/barbiturates-ppt/Barbiturates_in_Anesthesia.pptx" })
.then(() => console.log("PPT created successfully"))
.catch(e => { console.error(e); process.exit(1); });