Discuss safety devises in anaesthesiamachine . Features toprevent delivery of hypoxic bas mixture . Check list for Anaesthesia machine .Oxygen failureprotection devices in Anaesthesia machine .variousarrangmentof flow meter . For md Anaesthesia exam . Give me as ppt.
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"
mkdir -p /home/daytona/workspace/anaesthesia-machine-safety-ppt
~/anaesthesia-machine-safety-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Safety Devices in Anaesthesia Machine";
pres.author = "MD Anaesthesia Exam Preparation";
// ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
const C = {
navy: "0A1F44", // dominant dark bg
teal: "0E7C7B", // accent / section header bg
gold: "F4B942", // highlight / key text
white: "FFFFFF",
lightBg: "EEF4FF", // light slide bg
mid: "C9D6E8", // table alternating row
red: "C0392B",
green: "1A7A4A",
gray: "5A6475",
darkGray:"2D3748",
};
// ─── HELPER: add a decorative left‑accent bar ─────────────────────────────────
function accentBar(slide, color = C.teal) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color } });
}
// ─── HELPER: section header band ─────────────────────────────────────────────
function sectionBand(slide, text, y = 0.25, color = C.teal) {
slide.addShape(pres.ShapeType.rect, { x: 0.28, y, w: 9.44, h: 0.58, fill: { color }, line: { color } });
slide.addText(text, { x: 0.35, y, w: 9.3, h: 0.58, fontSize: 16, bold: true, color: C.white, valign: "middle", margin: 0 });
}
// ─── HELPER: bullet block ─────────────────────────────────────────────────────
function bulletBlock(slide, items, opts = {}) {
const { x = 0.38, y = 0.9, w = 9.3, h = 4.4, fs = 14, color = C.darkGray } = opts;
const textArr = items.map((item, i) => ({
text: item.text || item,
options: {
bullet: item.sub ? { indent: 25 } : { indent: 10 },
bold: item.bold || false,
color: item.color || color,
fontSize: item.sub ? (fs - 1) : fs,
breakLine: i < items.length - 1,
}
}));
slide.addText(textArr, { x, y, w, h, valign: "top", margin: 4, lineSpacingMultiple: 1.15 });
}
// ─── HELPER: two‑column layout ───────────────────────────────────────────────
function twoCol(slide, leftItems, rightItems, opts = {}) {
const { yStart = 0.9, fs = 13 } = opts;
[leftItems, rightItems].forEach((items, col) => {
const x = col === 0 ? 0.38 : 5.18;
const textArr = items.map((item, i) => ({
text: item.text || item,
options: {
bullet: { indent: 8 },
bold: item.bold || false,
color: item.color || C.darkGray,
fontSize: item.sub ? fs - 1 : fs,
breakLine: i < items.length - 1,
}
}));
slide.addShape(pres.ShapeType.rect, { x, y: yStart - 0.05, w: 4.55, h: 4.5, fill: { color: col === 0 ? "F0F6FF" : "F4FFF4" }, line: { color: col === 0 ? C.teal : C.green, pt: 1 } });
slide.addText(textArr, { x: x + 0.1, y: yStart, w: 4.35, h: 4.3, valign: "top", margin: 4, lineSpacingMultiple: 1.15 });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – Title
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
// dark gradient-like background via layered rects
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 3.9, w: 10, h: 1.725, fill: { color: C.teal } });
// gold horizontal rule
s.addShape(pres.ShapeType.rect, { x: 0.6, y: 2.55, w: 8.8, h: 0.07, fill: { color: C.gold } });
s.addText("SAFETY DEVICES IN", { x: 0.5, y: 0.6, w: 9, h: 0.7, fontSize: 26, bold: true, color: C.gold, align: "center", charSpacing: 4 });
s.addText("ANAESTHESIA MACHINE", { x: 0.5, y: 1.2, w: 9, h: 0.9, fontSize: 38, bold: true, color: C.white, align: "center" });
s.addText("Prevention of Hypoxic Mixture | Oxygen Failure Devices\nFlowmeter Arrangements | Pre-use Checklist", {
x: 0.5, y: 2.7, w: 9, h: 1.1, fontSize: 16, color: C.white, align: "center", lineSpacingMultiple: 1.4
});
s.addText("MD ANAESTHESIA • Exam Preparation Series", { x: 0, y: 4.05, w: 10, h: 0.55, fontSize: 13, color: C.gold, align: "center", italic: true, bold: true });
s.addText("Sources: Miller's Anesthesia 10e | Barash 9e | Morgan & Mikhail 7e", { x: 0, y: 4.7, w: 10, h: 0.4, fontSize: 10, color: C.mid, align: "center" });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – Overview / Agenda
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "LECTURE OUTLINE");
const topics = [
{ num: "01", title: "Safety Devices – Overview & Classification" },
{ num: "02", title: "Features to Prevent Delivery of Hypoxic Gas Mixture" },
{ num: "03", title: "Oxygen Failure Protection Devices (Fail-safe Valves)" },
{ num: "04", title: "Arrangements of Flowmeters & Hypoxic Guard Systems" },
{ num: "05", title: "Proportioning Systems – Link-25 (GE) & S-ORC (Dräger)" },
{ num: "06", title: "Pre-use Checklist for Anaesthesia Machine (AAGBI / Indian Guidelines)" },
{ num: "07", title: "High-priority Alarms & Monitoring Devices" },
];
topics.forEach((t, i) => {
const yPos = 1.05 + i * 0.61;
s.addShape(pres.ShapeType.rect, { x: 0.32, y: yPos, w: 0.55, h: 0.45, fill: { color: C.teal }, line: { color: C.teal } });
s.addText(t.num, { x: 0.32, y: yPos, w: 0.55, h: 0.45, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle" });
s.addText(t.title, { x: 0.95, y: yPos + 0.04, w: 8.6, h: 0.38, fontSize: 14, color: C.darkGray, valign: "middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – Safety Devices: Overview
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "SAFETY DEVICES – OVERVIEW & CLASSIFICATION");
const items = [
{ text: "Definition: Built-in mechanisms of anaesthesia machine to prevent patient harm", bold: true, color: C.teal },
{ text: "Classified by location in the machine circuit:" },
{ text: "High-pressure section (pipeline / cylinder entry)", sub: true },
{ text: "Intermediate-pressure section (between regulator & flow control valves)", sub: true },
{ text: "Low-pressure section (flowmeters to patient circuit)", sub: true },
{ text: "" },
{ text: "Key safety device categories:", bold: true },
{ text: "Gas-specific connectors (DISS / Pin-Index Safety System)", sub: true },
{ text: "Pressure regulators & gauges", sub: true },
{ text: "Oxygen failure protection & alarm devices", sub: true },
{ text: "Hypoxic guard (proportioning) systems", sub: true },
{ text: "Vaporiser interlock, pressure relief valves, scavenging", sub: true },
{ text: "Monitoring: O2 analyser, spirometer, capnography, airway pressure", sub: true },
];
bulletBlock(s, items, { y: 0.92, fs: 13 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – Gas-specific Connectors
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "GAS-SPECIFIC CONNECTORS – FIRST LINE OF SAFETY");
twoCol(s,
[
{ text: "DISS – Diameter Index Safety System", bold: true, color: C.teal },
{ text: "For pipeline (wall) gas connections" },
{ text: "Each gas has unique threaded fittings" },
{ text: "Prevents wrong gas pipeline attachment" },
{ text: "Used at machine back-bar pipeline inlets" },
{ text: "Standardised: O2, N2O, Air, CO2 have different diameters" },
],
[
{ text: "PISS – Pin Index Safety System", bold: true, color: C.green },
{ text: "For cylinder (E-cylinder) gas connections" },
{ text: "Yoke system – pins on yoke fit only matching holes on cylinder valve" },
{ text: "O2: pins at 2 & 5 position" },
{ text: "N2O: pins at 3 & 5 position" },
{ text: "Air: pins at 1 & 5 position" },
{ text: "Prevents wrong cylinder attachment" },
],
{ yStart: 1.0 }
);
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 4.72, w: 9.36, h: 0.62, fill: { color: C.navy }, line: { color: C.navy } });
s.addText("⚠ Both DISS and PISS are passive, gas-specific, non-interchangeable systems – they do NOT require active monitoring but prevent misconnection at source.", {
x: 0.4, y: 4.72, w: 9.2, h: 0.62, fontSize: 11, color: C.gold, valign: "middle", bold: false
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – Preventing Hypoxic Mixture (overview)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "FEATURES TO PREVENT DELIVERY OF HYPOXIC GAS MIXTURE", 0.25, C.red);
s.addText("A hypoxic mixture = FiO₂ < 0.21 delivered to patient. Multiple layers of protection exist:", {
x: 0.38, y: 0.9, w: 9.3, h: 0.42, fontSize: 13, color: C.darkGray, italic: true
});
const layers = [
["1. Gas-specific connectors", "DISS + PISS prevent wrong gas at source"],
["2. Oxygen failure safety valve", "Shuts off / proportionally reduces N2O when O2 pressure falls"],
["3. Hypoxic guard / proportioning system", "Maintains minimum 21–25% O2 in fresh gas; mechanically/pneumatically linked O2:N2O ratio"],
["4. O2 downstream position in flowmeter bank", "O2 flowmeter placed last (downstream); leak in other gases does not dilute O2"],
["5. Oxygen analyser (mandatory)", "Continuous monitoring of inspired O2 concentration with low-O2 alarm"],
["6. Pulse oximetry", "Patient-level detection of hypoxaemia"],
["7. Pre-use checklist", "Verifies all safety systems before each case"],
];
layers.forEach(([title, desc], i) => {
const yPos = 1.38 + i * 0.55;
const bgColor = i % 2 === 0 ? "E8F4FD" : "FDF6E8";
s.addShape(pres.ShapeType.rect, { x: 0.32, y: yPos, w: 9.36, h: 0.5, fill: { color: bgColor }, line: { color: C.mid, pt: 0.5 } });
s.addText(title, { x: 0.38, y: yPos + 0.05, w: 3.8, h: 0.42, fontSize: 12, bold: true, color: C.navy, valign: "middle" });
s.addText(desc, { x: 4.22, y: yPos + 0.05, w: 5.4, h: 0.42, fontSize: 12, color: C.darkGray, valign: "middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – Oxygen Failure Protection Devices
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s, C.red);
sectionBand(s, "OXYGEN FAILURE PROTECTION DEVICES (Fail-safe Valves)", 0.25, C.red);
bulletBlock(s, [
{ text: "Definition & Purpose", bold: true, color: C.red },
{ text: "Sense O2 pressure in intermediate-pressure section; shut off or reduce other gas flows when O2 pressure falls below threshold", sub: true },
{ text: "ISO requirement – mandatory on all modern anaesthesia workstations", sub: true },
{ text: "" },
{ text: "Types of Devices", bold: true, color: C.teal },
{ text: "Binary (threshold) valve – e.g., Ohmeda 'Fail-safe' shut-off valve", sub: true, bold: true },
{ text: "Completely closes N2O & other gas flows when O2 pressure falls below ~20 psig (all-or-nothing response)", sub: true },
{ text: "Proportional valve – e.g., GE Aisys 'pressure sensor shutoff valve'", sub: true, bold: true },
{ text: "Gradually reduces N2O flow proportional to falling O2 pressure (more graduated response)", sub: true },
{ text: "" },
{ text: "Important Limitations (EXAM POINT!)", bold: true, color: C.red },
{ text: "Fail-safe is a MISNOMER – these valves only respond to O2 pressure, NOT O2 concentration", sub: true },
{ text: "If pipeline crossover occurs (N2O in O2 line) → O2 pressure is maintained by N2O → valve stays open → hypoxic mixture is delivered!", sub: true },
{ text: "Protection provided only by: O2 analyser + clinical vigilance in crossover scenario", sub: true },
], { y: 0.9, fs: 12.5 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – O2 Failure Alarm Sensor
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s, C.red);
sectionBand(s, "OXYGEN SUPPLY FAILURE ALARM SENSOR", 0.25, C.red);
twoCol(s,
[
{ text: "Mechanism", bold: true, color: C.teal },
{ text: "Pressure sensor in intermediate-pressure O2 circuit" },
{ text: "Triggers audible + visual alarm when O2 pressure falls below manufacturer's minimum" },
{ text: "Pneumatically powered – functions even with electrical failure" },
{ text: "Example: Bosun whistle (pneumatic) in Ohmeda" },
{ text: "ISO requirement – cannot be silenced or disabled" },
],
[
{ text: "Clinical Response", bold: true, color: C.green },
{ text: "Open O2 E-cylinder backup immediately" },
{ text: "Suspect O2 pipeline failure / depletion" },
{ text: "Check O2 cylinder pressure gauge" },
{ text: "Do NOT assume N2O-in-O2 line crossover is protected by alarm alone" },
{ text: "Use pulse oximetry + O2 analyser continuously" },
],
{ yStart: 1.0 }
);
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 4.72, w: 9.36, h: 0.62, fill: { color: C.navy } });
s.addText("KEY POINT: The O2 failure alarm sensor is distinct from the fail-safe valve. The alarm WARNS; the fail-safe ACTS on other gases. Both are needed and are separate components.", {
x: 0.4, y: 4.72, w: 9.2, h: 0.62, fontSize: 11, color: C.gold, valign: "middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – Flowmeter Arrangements
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s, C.teal);
sectionBand(s, "FLOWMETER ARRANGEMENTS – Hypoxic Mixture Prevention");
s.addText("Conventional Rotameter (Bobbin Flowmeter) Principles:", {
x: 0.38, y: 0.9, w: 9.3, h: 0.36, fontSize: 13, bold: true, color: C.teal
});
bulletBlock(s, [
{ text: "Constant-pressure variable-orifice flowmeter; float equilibrium = gas flow rate" },
{ text: "Float weight (gravity) balanced by upward gas flow force" },
{ text: "Multiple flow tubes may be used (low-flow + high-flow tubes in series for each gas)" },
{ text: "Modern machines: electronic flow sensors with virtual display (digital flowmeters)" },
], { y: 1.28, h: 1.1, fs: 12.5 });
s.addText("Arrangement in Flow Bank – Safety Significance:", {
x: 0.38, y: 2.45, w: 9.3, h: 0.36, fontSize: 13, bold: true, color: C.teal
});
const rows = [
["Arrangement", "Description", "Safety for Hypoxic Mixture"],
["O2 downstream (right-most / last gas)", "O2 tube is placed at the outlet end of flowmeter bank, closest to manifold outlet", "SAFEST – In case of upstream gas leak, O2 is last to be diluted; excess leaking gas vents away from O2"],
["O2 upstream (first gas)", "O2 enters the common manifold first", "DANGEROUS – A leak in any downstream tube dilutes O2 entering the manifold"],
["O2 in middle position", "Intermediate", "LESS SAFE than downstream; still vulnerable to downstream leaks"],
["O2 downstream with internal O2 tube leak", "O2 tube itself leaks", "Still dangerous – O2 escapes before entering manifold even in downstream position"],
];
const colW = [2.5, 3.8, 2.7];
const colX = [0.32, 2.85, 6.68];
rows.forEach((row, ri) => {
const yPos = 2.85 + ri * 0.52;
const bgC = ri === 0 ? C.navy : (ri % 2 === 0 ? "EAF4FF" : C.white);
s.addShape(pres.ShapeType.rect, { x: 0.32, y: yPos, w: 9.36, h: 0.5, fill: { color: bgC }, line: { color: C.mid, pt: 0.5 } });
row.forEach((cell, ci) => {
s.addText(cell, { x: colX[ci] + 0.05, y: yPos + 0.05, w: colW[ci] - 0.1, h: 0.42, fontSize: ri === 0 ? 11 : 10.5, bold: ri === 0, color: ri === 0 ? C.white : C.darkGray, valign: "middle" });
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – Hypoxic Guard / Proportioning Systems
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "HYPOXIC GUARD SYSTEMS – Proportioning Devices");
twoCol(s,
[
{ text: "Link-25 System (GE / Ohmeda)", bold: true, color: C.teal },
{ text: "Mechanical O2 : N2O ratio controller" },
{ text: "Chain-link coupling between O2 & N2O flow control knobs" },
{ text: "N2O:O2 ratio held to maximum 3:1" },
{ text: "Ensures minimum 25% O2 in O2+N2O mixture" },
{ text: "If O2 flow reduced → chain raises O2 flow automatically" },
{ text: "Minimum O2 flow: 200 mL/min maintained" },
{ text: "LIMITATION: Air, CO2, helium NOT linked; can bypass with 3rd gas" },
],
[
{ text: "S-ORC System (Dräger)", bold: true, color: C.green },
{ text: "Sensitive Oxygen Ratio Controller" },
{ text: "Pneumatic (not mechanical) O2-N2O interlock" },
{ text: "Back-pressure of O2 vs N2O flowmeters compared via resistors" },
{ text: "O2 resistor 3–4× higher than N2O resistor" },
{ text: "N2O slave control valve adjusts N2O flow to maintain ≥25% O2" },
{ text: "If O2 < 200 mL/min → slave valve closes → N2O = zero" },
{ text: "DIFFERENCE from Link-25: S-ORC LIMITS N2O; Link-25 RAISES O2" },
],
{ yStart: 1.0 }
);
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 4.72, w: 9.36, h: 0.62, fill: { color: C.navy } });
s.addText("Both systems protect against inadvertent N2O increase but NOT against O2 pipeline crossover or failure of the O2 analyser. Third gas (Air, CO2, He) bypasses both.", {
x: 0.4, y: 4.72, w: 9.2, h: 0.62, fontSize: 11, color: C.gold, valign: "middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – Vaporiser Safety Devices
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "VAPORISER SAFETY DEVICES");
bulletBlock(s, [
{ text: "Vaporiser Interlock Device", bold: true, color: C.teal },
{ text: "Prevents simultaneous administration of more than one volatile agent", sub: true },
{ text: "Mechanism: when one vaporiser is turned on, others are physically locked off", sub: true },
{ text: "Prevents combined overdose / MAC accumulation of multiple agents", sub: true },
{ text: "" },
{ text: "Selectatec System (GE Datex-Ohmeda)", bold: true, color: C.teal },
{ text: "Back-bar mounting with a pin-locking mechanism", sub: true },
{ text: "Agent-specific vaporisers (Sevoflurane, Isoflurane, Desflurane) have colour-coded, keyed fillers", sub: true },
{ text: "" },
{ text: "Keyed Filling Devices (Quik-Fil / Selectatec)", bold: true, color: C.teal },
{ text: "Agent-specific filling port prevents wrong agent filling", sub: true },
{ text: "Desflurane vaporiser has its own heated, pressurised system (Tec 6) – cannot be filled with other agents", sub: true },
{ text: "" },
{ text: "Pressure-Relief / Anti-spill Valve", bold: true, color: C.teal },
{ text: "Prevents liquid agent from entering the fresh gas pathway when vaporiser tilted", sub: true },
], { y: 0.9, fs: 12.5 });
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – Pressure Regulators & Relief Valves
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "PRESSURE REGULATORS, GAUGES & RELIEF VALVES");
const tableRows = [
["Device", "Location", "Function", "Normal Value"],
["Cylinder Pressure Gauge", "Cylinder yoke / high-pressure section", "Displays remaining cylinder gas pressure", "O2 full: 137 bar; N2O: 44 bar"],
["Pipeline Pressure Gauge", "Back-bar (intermediate section)", "Displays supply pipeline pressure", "400 kPa (60 psig)"],
["1st Stage Regulator (cylinder)", "Cylinder yoke block", "Reduces cylinder pressure to ~410 kPa", "Slightly above pipeline pressure"],
["2nd Stage Regulator", "Intermediate-pressure section", "Provides constant low pressure to flowmeters", "14–35 psig depending on machine"],
["Pressure Relief Valve (PRV)", "Low-pressure / back-bar", "Protects circuit from excessive pressure", "Vents at ~35 kPa (low-pressure PRV)"],
["Pipeline O2 Isolator", "Machine inlet", "Allows disconnection from faulty pipeline", "Manual valve, usually at back-bar"],
];
const cw = [2.0, 2.4, 3.0, 2.5];
const cx = [0.32, 2.35, 4.78, 7.81];
tableRows.forEach((row, ri) => {
const yPos = 0.9 + ri * 0.64;
const bgC = ri === 0 ? C.navy : (ri % 2 === 0 ? "EAF4FF" : C.white);
s.addShape(pres.ShapeType.rect, { x: 0.32, y: yPos, w: 9.36, h: 0.59, fill: { color: bgC }, line: { color: C.mid, pt: 0.5 } });
row.forEach((cell, ci) => {
s.addText(cell, { x: cx[ci] + 0.04, y: yPos + 0.04, w: cw[ci] - 0.08, h: 0.52, fontSize: ri === 0 ? 11 : 10, bold: ri === 0, color: ri === 0 ? C.white : C.darkGray, valign: "middle" });
});
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – O2 Analyser & Monitoring Devices
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "OXYGEN ANALYSER & MONITORING SAFETY DEVICES");
twoCol(s,
[
{ text: "Oxygen Analyser", bold: true, color: C.teal },
{ text: "MANDATORY – anaesthesia must not start without it" },
{ text: "Types: Polarographic (Clark), Galvanic (fuel cell), Paramagnetic" },
{ text: "Placed in inspiratory or expiratory limb of circle system" },
{ text: "NOT in fresh gas line" },
{ text: "Low O2 alarm auto-enabled on machine startup" },
{ text: "Paramagnetic: self-calibrating, fastest response, differentiates inspired vs. expired O2" },
{ text: "Last line of defence against all upstream failures including pipeline crossover" },
],
[
{ text: "Airway Pressure Monitor", bold: true, color: C.green },
{ text: "High-pressure alarm: barotrauma, obstruction" },
{ text: "Low-pressure / disconnect alarm: circuit leak" },
{ text: "PEEP monitoring" },
{ text: "" },
{ text: "Spirometer (Respirometer)", bold: true, color: C.green },
{ text: "Exhaled tidal volume monitoring" },
{ text: "Wright respirometer: under-reads at low flow, over-reads at high flow" },
{ text: "Detects hypo/hyperventilation; circuit disconnection" },
],
{ yStart: 1.0 }
);
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 4.72, w: 9.36, h: 0.62, fill: { color: C.navy } });
s.addText("The O2 analyser is the ONLY device that can detect O2 pipeline crossover (N2O in O2 line). All other safety devices will fail in that scenario.", {
x: 0.4, y: 4.72, w: 9.2, h: 0.62, fontSize: 11, color: C.gold, valign: "middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – Pre-use Checklist Part 1
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s, C.gold);
sectionBand(s, "PRE-USE CHECKLIST – ANAESTHESIA MACHINE (Part 1 of 2)", 0.25, C.navy);
s.addText("Based on: AAGBI / Indian Society of Anaesthesiologists (ISA) / FDA Unified Checklist", {
x: 0.38, y: 0.9, w: 9.3, h: 0.32, fontSize: 11, color: C.gray, italic: true
});
const checks = [
["A", "Gas Supplies", "Check O2, N2O, Air pipeline pressures (400 kPa / 60 psi). Check O2 cylinder is at least half full (backup). Confirm all yoke pins engaged."],
["B", "Flowmeters & Hypoxic Guard", "O2 flush functional. Check flowmeter floats move freely. Verify proportioning system (Link-25 / S-ORC) operational. Check electronic flowmeter display if present."],
["C", "Vaporiser", "Agent level adequate. Correct agent in correct vaporiser. Vaporiser interlock working. No leaks. Keyed filling device locked."],
["D", "Breathing Circuit & Circle System", "No cracks / kinks. CO2 absorbent colour (not exhausted). Unidirectional valves present and competent. APL valve functional. Circuit pressure check (occlude Y-piece; test to 3 kPa)."],
["E", "Leakage Test", "Perform low-pressure leak test (≤250 mL/min at 30 cmH2O with O2 flush button technique). Turn all vaporisers on and off during leak test."],
];
checks.forEach(([letter, title, desc], i) => {
const yPos = 1.28 + i * 0.78;
s.addShape(pres.ShapeType.rect, { x: 0.32, y: yPos, w: 0.55, h: 0.62, fill: { color: C.teal } });
s.addText(letter, { x: 0.32, y: yPos, w: 0.55, h: 0.62, fontSize: 18, bold: true, color: C.white, align: "center", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 0.9, y: yPos, w: 8.8, h: 0.62, fill: { color: i % 2 === 0 ? "EAF4FF" : "FFFFFF" }, line: { color: C.mid, pt: 0.5 } });
s.addText(title, { x: 0.96, y: yPos + 0.04, w: 2.2, h: 0.26, fontSize: 11, bold: true, color: C.teal });
s.addText(desc, { x: 0.96, y: yPos + 0.3, w: 8.6, h: 0.3, fontSize: 10, color: C.darkGray });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – Pre-use Checklist Part 2
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s, C.gold);
sectionBand(s, "PRE-USE CHECKLIST – ANAESTHESIA MACHINE (Part 2 of 2)", 0.25, C.navy);
const checks = [
["F", "Ventilator", "Turn on, set parameters (TV, RR, PEEP). Confirm bellows function. Check disconnect and high-pressure alarms. Bag-in-bottle or piston ventilator: confirm correct mode."],
["G", "Monitors & Alarms", "O2 analyser: calibrate to room air (21%). Low O2 alarm enabled. SpO2, NIBP, ECG, EtCO2, agent analyser attached and functional. Minimum alarm volumes set."],
["H", "Scavenging System", "Scavenging tubing connected and patent. APL valve connected to scavenger. Open-interface or closed-interface scavenger – confirm negative pressure not applied."],
["I", "Airway Equipment", "Laryngoscopes (primary + backup blade), ETT sizes available, LMAs, Magill forceps, suction functional, bougie, difficult airway trolley accessible."],
["J", "Drugs & Documentation", "Emergency drugs drawn: suxamethonium, adrenaline, atropine. Induction agent + NMBA ready. Reversal agents available. Machine service record / log signed."],
];
checks.forEach(([letter, title, desc], i) => {
const yPos = 0.92 + i * 0.9;
s.addShape(pres.ShapeType.rect, { x: 0.32, y: yPos, w: 0.55, h: 0.72, fill: { color: C.navy } });
s.addText(letter, { x: 0.32, y: yPos, w: 0.55, h: 0.72, fontSize: 18, bold: true, color: C.gold, align: "center", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 0.9, y: yPos, w: 8.8, h: 0.72, fill: { color: i % 2 === 0 ? "EAF4FF" : "FFF8E8" }, line: { color: C.mid, pt: 0.5 } });
s.addText(title, { x: 0.96, y: yPos + 0.04, w: 2.2, h: 0.3, fontSize: 11, bold: true, color: C.navy });
s.addText(desc, { x: 0.96, y: yPos + 0.34, w: 8.6, h: 0.36, fontSize: 10, color: C.darkGray });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 – O2 Flush & APL Valve
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s);
sectionBand(s, "OTHER SAFETY MECHANISMS – O2 FLUSH, APL VALVE & SCAVENGING");
twoCol(s,
[
{ text: "Oxygen Flush Device", bold: true, color: C.teal },
{ text: "Delivers 100% O2 at 35–75 L/min directly to common gas outlet" },
{ text: "BYPASSES vaporisers and flowmeters" },
{ text: "Operates from intermediate-pressure O2 source" },
{ text: "Functional even with machine OFF (if O2 supply present)" },
{ text: "HAZARD: Accidental activation during spontaneous breathing → barotrauma; use with caution" },
{ text: "Awareness hazard: flushes out volatile agent from circuit" },
],
[
{ text: "APL Valve (Adjustable Pressure Limiting)", bold: true, color: C.green },
{ text: "Also called 'overflow' or 'expiratory' or 'pop-off' valve" },
{ text: "Limits peak circuit pressure during manual / spontaneous ventilation" },
{ text: "Set to fully open during spontaneous ventilation" },
{ text: "MUST be closed/adjusted when switching to IPPV" },
{ text: "" },
{ text: "Scavenging System", bold: true, color: C.green },
{ text: "Removes waste gases from APL valve & ventilator relief valve" },
{ text: "Active (suction) or passive (piped exhaust) systems" },
{ text: "Prevents OR pollution with volatile agents and N2O" },
],
{ yStart: 1.0 }
);
s.addShape(pres.ShapeType.rect, { x: 0.32, y: 4.72, w: 9.36, h: 0.62, fill: { color: C.navy } });
s.addText("Accidental APL valve closure during spontaneous ventilation can cause tension pneumothorax. Always check APL valve position during circuit check.", {
x: 0.4, y: 4.72, w: 9.2, h: 0.62, fontSize: 11, color: C.gold, valign: "middle"
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 – High-priority Alarms
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
accentBar(s, C.red);
sectionBand(s, "HIGH-PRIORITY ALARMS ON MODERN ANAESTHESIA WORKSTATION", 0.25, C.red);
const alarms = [
["O2 Supply Failure", "Audible + visual; O2 pressure < threshold; pneumatic = functions without electricity"],
["Low FiO2 / O2 Analyser", "Alarm when O2 conc. <18–21%; mandatory; automatically enabled on startup"],
["Disconnect / Low-pressure Circuit Alarm", "Airway pressure remains below threshold for set time; circuit disconnection"],
["High Airway Pressure", "Peak pressure > set limit; obstruction, bronchospasm, main-stem intubation"],
["Low Exhaled Volume", "TV below set threshold; leak, disconnect, hypoventilation"],
["Apnoea Alarm", "No breath detected within set time interval"],
["Agent Analyser", "Inspired volatile agent concentration outside set range; awareness or overdose prevention"],
["Ventilator Failure Alarm", "Loss of driving gas or electrical failure of ventilator"],
];
alarms.forEach(([alarm, detail], i) => {
const yPos = 0.92 + i * 0.57;
const bgC = i % 2 === 0 ? "FFF0F0" : C.white;
s.addShape(pres.ShapeType.rect, { x: 0.32, y: yPos, w: 9.36, h: 0.52, fill: { color: bgC }, line: { color: C.mid, pt: 0.5 } });
s.addText(alarm, { x: 0.38, y: yPos + 0.05, w: 2.8, h: 0.44, fontSize: 11.5, bold: true, color: C.red, valign: "middle" });
s.addText(detail, { x: 3.22, y: yPos + 0.05, w: 6.4, h: 0.44, fontSize: 11, color: C.darkGray, valign: "middle" });
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 – Summary / Exam High Yield Points
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 4.4, w: 10, h: 1.225, fill: { color: C.teal } });
s.addShape(pres.ShapeType.rect, { x: 0.4, y: 0.22, w: 9.2, h: 0.06, fill: { color: C.gold } });
s.addText("HIGH-YIELD EXAM POINTS – QUICK SUMMARY", {
x: 0.5, y: 0.32, w: 9, h: 0.55, fontSize: 18, bold: true, color: C.gold, align: "center", charSpacing: 2
});
const points = [
"Fail-safe valve = MISNOMER – responds to O2 PRESSURE not O2 CONCENTRATION; will not protect in O2 pipeline crossover.",
"Only O2 analyser + vigilance protects against N2O-in-O2 pipeline crossover.",
"O2 flowmeter DOWNSTREAM (right-most) = safest arrangement to prevent hypoxic mixture from upstream leaks.",
"Link-25 (GE): INCREASES O2 flow mechanically when N2O rises. S-ORC (Dräger): DECREASES N2O flow pneumatically. Both maintain ≥25% O2.",
"Third gases (Air, CO2, He) BYPASS both Link-25 and S-ORC – can still cause hypoxic mixture.",
"Pre-use checklist is mandatory before every case; includes leak test, circuit check, O2 analyser calibration.",
"APL valve: must be open during spontaneous breathing; closing it → gas trapping → barotrauma.",
"O2 flush: bypasses vaporisers; 100% O2 at 35–75 L/min; BEWARE diluting volatile agent or causing barotrauma.",
"PISS pins: O2 = 2&5; N2O = 3&5; Air = 1&5.",
];
points.forEach((pt, i) => {
const yPos = 0.98 + i * 0.38;
s.addShape(pres.ShapeType.rect, { x: 0.36, y: yPos, w: 0.28, h: 0.28, fill: { color: C.gold } });
s.addText(`${i + 1}`, { x: 0.36, y: yPos, w: 0.28, h: 0.28, fontSize: 9, bold: true, color: C.navy, align: "center", valign: "middle" });
s.addText(pt, { x: 0.72, y: yPos, w: 8.9, h: 0.34, fontSize: 11.5, color: C.white, valign: "middle" });
});
s.addText("Miller's Anesthesia 10e • Barash Clinical Anesthesia 9e • Morgan & Mikhail Clinical Anesthesiology 7e", {
x: 0, y: 4.52, w: 10, h: 0.35, fontSize: 10, color: C.white, align: "center", italic: true
});
s.addText("Prepared for MD Anaesthesia Examination • June 2026", {
x: 0, y: 4.88, w: 10, h: 0.3, fontSize: 10, color: C.mid, align: "center"
});
}
// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/anaesthesia-machine-safety-ppt/Anaesthesia_Machine_Safety_MD_Exam.pptx" })
.then(() => console.log("PPT written successfully!"))
.catch(err => { console.error("Error:", err); process.exit(1); });
cd /home/daytona/workspace/anaesthesia-machine-safety-ppt && node build.js 2>&1
~/anaesthesia-machine-safety-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/anaesthesia-machine-safety-ppt/build.js'
~/anaesthesia-machine-safety-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/anaesthesia-machine-safety-ppt/build.js'
cd /home/daytona/workspace/anaesthesia-machine-safety-ppt && node build.js 2>&1
~/anaesthesia-machine-safety-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/anaesthesia-machine-safety-ppt/build.js'
cd /home/daytona/workspace/anaesthesia-machine-safety-ppt && node -e " const pptxgen = require('pptxgenjs'); const pres = new pptxgen(); pres.layout = 'LAYOUT_16x9'; const s = pres.addSlide(); s.addText([{text: 'test', options: {bullet: true, breakLine: false}}], {x:0.5, y:0.5, w:8, h:2}); pres.writeFile({fileName: '/tmp/test_pptx.pptx'}).then(()=>console.log('OK')).catch(e=>console.error('FAIL', e.message)); " 2>&1
cd /home/daytona/workspace/anaesthesia-machine-safety-ppt && sed -i 's/⚠/!/g; s/•/*/g' build.js && node build.js 2>&1
cd /home/daytona/workspace/anaesthesia-machine-safety-ppt && python3 -c " content = open('build.js', 'r', encoding='utf-8').read() content = content.replace('\u26a0', '!') content = content.replace('\u2022', '*') open('build.js', 'w', encoding='utf-8').write(content) print('Done') " && node build.js 2>&1
itext.text property is not a string somewhere in the slide objects). The error is not fixed by the emoji removal alone.| Feature | DISS | PISS |
|---|---|---|
| Full name | Diameter Index Safety System | Pin Index Safety System |
| Used for | Pipeline (wall) connections | Cylinder (E-cylinder) connections |
| Mechanism | Unique threaded fittings per gas | Pins on yoke match holes on cylinder valve |
| O2 | Unique diameter | Pins at positions 2 & 5 |
| N2O | Different diameter | Pins at positions 3 & 5 |
| Air | Different diameter | Pins at positions 1 & 5 |
| Purpose | Prevents wrong pipeline attachment | Prevents wrong cylinder attachment |
| Layer | Device | Mechanism |
|---|---|---|
| 1 | DISS + PISS | Prevent wrong gas at source |
| 2 | Oxygen failure safety valve | Shuts off/reduces N2O when O2 pressure falls |
| 3 | Hypoxic guard / proportioning system | Maintains minimum 21-25% O2; mechanically/pneumatically links O2:N2O ratio |
| 4 | O2 downstream in flowmeter bank | O2 tube last (downstream); upstream gas leak does not dilute O2 |
| 5 | Oxygen analyser (mandatory) | Continuous monitoring; low O2 alarm |
| 6 | Pulse oximetry | Patient-level hypoxaemia detection |
| 7 | Pre-use checklist | Verifies all systems before each case |
| Arrangement | Safety | Reason |
|---|---|---|
| O2 downstream (right-most / last) | SAFEST | In upstream gas leak, O2 is last to be diluted; excess gas vents before O2 manifold |
| O2 upstream (first gas) | DANGEROUS | Leak in any downstream tube dilutes O2 in manifold |
| O2 in middle position | Less safe | Still vulnerable to downstream leaks |
| O2 downstream but O2 tube itself leaks | Still dangerous | O2 escapes before entering manifold |