kindly make a ppt for mbbs students under NMC "Emergency procedures during pandemics 1.indications for invasive procedures during pandemics 2.points to be verified before emergnecy procedures 3.steps to be taken to reduce transmission pf infections 4.attitude and communications issues related to complucated procedures"
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not foun…
mkdir -p /home/daytona/workspace/pandemic-ppt
~/pandemic-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Emergency Procedures During Pandemics";
pres.author = "NMC MBBS Curriculum";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const C = {
navy: "0D1B2A", // dominant dark background
teal: "1A7A8A", // section accent
gold: "F2A900", // highlights & bullets
white: "FFFFFF",
offWhite:"EEF4F7",
red: "C0392B",
green: "1E8449",
lightTeal:"A8D8E0",
dark: "0A1520",
mid: "163047",
};
// ─── HELPER: gradient-like dark header bar ────────────────────────
function addHeader(slide, title, subtitle) {
// Full-width dark header strip
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.15,
fill: { color: C.navy }
});
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 1.1, w: 10, h: 0.06,
fill: { color: C.gold }
});
slide.addText(title, {
x: 0.3, y: 0.08, w: 9.4, h: 0.72,
fontSize: 22, bold: true, color: C.white,
fontFace: "Calibri", valign: "middle", margin: 0
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.3, y: 0.76, w: 9.4, h: 0.35,
fontSize: 11, color: C.lightTeal, italic: true,
fontFace: "Calibri", valign: "top", margin: 0
});
}
// Slide background
slide.background = { color: C.offWhite };
}
function addFooter(slide, pageNum) {
slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.18, fill: { color: C.navy } });
slide.addText("NMC · Emergency Procedures During Pandemics · MBBS", {
x: 0.2, y: 5.44, w: 8, h: 0.2,
fontSize: 7, color: C.lightTeal, fontFace: "Calibri", valign: "middle"
});
slide.addText(`${pageNum}`, {
x: 9.5, y: 5.44, w: 0.4, h: 0.2,
fontSize: 7, color: C.gold, bold: true, fontFace: "Calibri", align: "right"
});
}
function bulletBox(slide, items, x, y, w, h, opts = {}) {
const baseColor = opts.baseColor || C.navy;
const accColor = opts.accColor || C.teal;
const fsize = opts.fsize || 13;
const textArr = items.map((item, i) => {
const isLast = i === items.length - 1;
if (typeof item === "object") {
// { text, sub: true }
return [
{ text: " – " + item.text, options: { color: accColor, fontSize: fsize - 1, breakLine: !isLast } }
];
}
return [
{ text: "▸ ", options: { color: C.gold, fontSize: fsize, bold: true } },
{ text: item, options: { color: baseColor, fontSize: fsize, breakLine: !isLast } }
];
});
slide.addText(textArr.flat(), { x, y, w, h, fontFace: "Calibri", valign: "top", wrap: true });
}
function sectionTag(slide, label, color) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 1.18, w: 2.8, h: 0.34,
fill: { color: color || C.teal }
});
slide.addText(label, {
x: 0.05, y: 1.18, w: 2.7, h: 0.34,
fontSize: 9.5, color: C.white, bold: true, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
}
function colorBox(slide, x, y, w, h, bg, text, textColor, fsize) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: bg }, line: { color: bg } });
slide.addText(text, {
x: x + 0.05, y, w: w - 0.1, h,
fontSize: fsize || 11, color: textColor || C.white,
fontFace: "Calibri", valign: "middle", align: "center", bold: true, wrap: true
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: C.navy };
// Top accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.gold } });
// Red cross icon (simulated with shapes)
s.addShape(pres.ShapeType.rect, { x: 0.55, y: 0.7, w: 0.18, h: 0.6, fill: { color: C.gold } });
s.addShape(pres.ShapeType.rect, { x: 0.38, y: 0.88, w: 0.52, h: 0.18, fill: { color: C.gold } });
s.addText("EMERGENCY PROCEDURES", {
x: 1.1, y: 0.6, w: 8.6, h: 0.7,
fontSize: 36, bold: true, color: C.white, fontFace: "Calibri",
charSpacing: 2, valign: "middle"
});
s.addText("DURING PANDEMICS", {
x: 1.1, y: 1.25, w: 8.6, h: 0.6,
fontSize: 36, bold: true, color: C.gold, fontFace: "Calibri",
charSpacing: 2, valign: "middle"
});
// Divider
s.addShape(pres.ShapeType.rect, { x: 1.1, y: 1.95, w: 6, h: 0.04, fill: { color: C.teal } });
s.addText("A Structured Guide for MBBS Students", {
x: 1.1, y: 2.1, w: 8, h: 0.4,
fontSize: 16, color: C.lightTeal, italic: true, fontFace: "Calibri"
});
// 4 topic pills
const topics = [
"Indications for Invasive Procedures",
"Pre-Procedure Verification",
"Reducing Infection Transmission",
"Attitude & Communication"
];
topics.forEach((t, i) => {
s.addShape(pres.ShapeType.rect, {
x: 1.1 + (i % 2) * 4.3, y: 2.75 + Math.floor(i / 2) * 0.55,
w: 4.0, h: 0.42, fill: { color: C.mid }, line: { color: C.teal, pt: 1 }
});
s.addText(`${i + 1}. ${t}`, {
x: 1.2 + (i % 2) * 4.3, y: 2.75 + Math.floor(i / 2) * 0.55,
w: 3.8, h: 0.42,
fontSize: 10.5, color: C.lightTeal, fontFace: "Calibri", valign: "middle", bold: true
});
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.18, fill: { color: C.dark } });
s.addText("National Medical Commission (NMC) · MBBS Phase II / Phase III · Community Medicine & Surgery", {
x: 0.3, y: 5.44, w: 9.4, h: 0.2,
fontSize: 7.5, color: C.lightTeal, fontFace: "Calibri", align: "center"
});
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Overview", "What this module covers");
sectionTag(s, "AGENDA", C.navy);
s.background = { color: C.offWhite };
const boxes = [
{ num: "01", title: "Indications for Invasive Procedures", desc: "When to proceed despite pandemic constraints", color: C.teal },
{ num: "02", title: "Pre-Procedure Verification Points", desc: "Safety checklist before performing any emergency procedure", color: C.mid },
{ num: "03", title: "Reducing Infection Transmission", desc: "PPE, zoning, aerosol precautions, waste management", color: C.green },
{ num: "04", title: "Attitude & Communication", desc: "Ethics, team dynamics, breaking bad news in crises", color: C.red },
];
boxes.forEach((b, i) => {
const x = (i % 2) * 4.85 + 0.2;
const y = Math.floor(i / 2) * 1.7 + 1.6;
s.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 1.5, fill: { color: b.color }, line: { color: b.color } });
s.addText(b.num, { x: x + 0.12, y: y + 0.08, w: 0.7, h: 0.5, fontSize: 28, color: "FFFFFF33", bold: true, fontFace: "Calibri" });
s.addText(b.title, { x: x + 0.15, y: y + 0.5, w: 4.3, h: 0.45, fontSize: 13, color: C.white, bold: true, fontFace: "Calibri", wrap: true });
s.addText(b.desc, { x: x + 0.15, y: y + 0.95, w: 4.3, h: 0.45, fontSize: 10, color: C.offWhite, fontFace: "Calibri", wrap: true });
});
addFooter(s, 2);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 3 — PANDEMIC CONTEXT
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Understanding Pandemic Emergencies", "Why normal protocols must adapt");
sectionTag(s, "CONTEXT", C.navy);
s.addText("What is a Pandemic Emergency?", {
x: 0.3, y: 1.6, w: 9.4, h: 0.38,
fontSize: 14, bold: true, color: C.navy, fontFace: "Calibri"
});
bulletBox(s, [
"A pandemic is an epidemic occurring worldwide, crossing international boundaries",
"Healthcare systems are overwhelmed — resources, staff, and space are constrained",
"Normal triage principles shift: utilitarian ethics may override individual-centered care",
"Emergency procedures must balance life-saving needs with infection control imperatives",
"Examples: COVID-19, Influenza (H1N1, H5N1), SARS, Ebola, Mpox"
], 0.3, 2.0, 9.2, 2.5, { fsize: 12 });
// Stat boxes
const stats = [
{ val: "~50M", label: "Deaths — 1918 Flu" },
{ val: "774", label: "Deaths — SARS 2003" },
{ val: ">6M", label: "Deaths — COVID-19" },
{ val: "WHO", label: "Declares Pandemic" },
];
stats.forEach((st, i) => {
s.addShape(pres.ShapeType.rect, {
x: 0.3 + i * 2.37, y: 4.6, w: 2.15, h: 0.75,
fill: { color: i % 2 === 0 ? C.navy : C.teal }
});
s.addText(st.val, { x: 0.3 + i * 2.37, y: 4.62, w: 2.15, h: 0.34, fontSize: 18, bold: true, color: C.gold, fontFace: "Calibri", align: "center" });
s.addText(st.label, { x: 0.3 + i * 2.37, y: 4.95, w: 2.15, h: 0.3, fontSize: 8.5, color: C.white, fontFace: "Calibri", align: "center" });
});
addFooter(s, 3);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 4 — SECTION 1 HEADER: Indications
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: C.teal };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("SECTION", { x: 0.35, y: 1.2, w: 9, h: 0.5, fontSize: 16, color: "FFFFFF88", bold: true, charSpacing: 8, fontFace: "Calibri" });
s.addText("01", { x: 0.35, y: 1.65, w: 9, h: 1.5, fontSize: 90, bold: true, color: C.gold, fontFace: "Calibri" });
s.addText("Indications for Invasive\nProcedures During Pandemics", {
x: 0.35, y: 3.1, w: 9, h: 1.4,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", wrap: true
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.18, fill: { color: C.dark } });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 5 — Indications: General Principles
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Indications — General Principles", "Section 1 | Indications for Invasive Procedures");
sectionTag(s, "SECTION 01", C.teal);
s.addText("Core Principle: Life-saving benefit must clearly outweigh procedural risk + transmission risk", {
x: 0.3, y: 1.6, w: 9.4, h: 0.42,
fontSize: 12, color: C.teal, italic: true, bold: true, fontFace: "Calibri", wrap: true
});
bulletBox(s, [
"Procedures should proceed if delay would result in death or permanent disability",
"All elective procedures must be deferred until pandemic conditions stabilize",
"Risk-benefit analysis: procedural urgency vs. transmission risk to staff & other patients",
"Multidisciplinary team (MDT) decision required for high-risk aerosol-generating procedures",
"Document clinical justification before every emergency invasive procedure",
"National/WHO pandemic phase and local surge status determine thresholds"
], 0.3, 2.1, 9.2, 3.1, { fsize: 12 });
addFooter(s, 5);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 6 — Life-Threatening Indications
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Life-Threatening Indications — Must Not Be Delayed", "Section 1 | Indications for Invasive Procedures");
sectionTag(s, "SECTION 01", C.teal);
// Two columns
const col1 = [
"Respiratory failure / acute hypoxia → Emergency intubation, cricothyroidotomy",
"Cardiac arrest → CPR, emergency defibrillation, central line",
"Tension pneumothorax → Needle decompression, chest tube insertion",
"Obstructed airway → Emergency tracheostomy",
"Haemorrhagic shock → Emergency surgery, damage control procedures",
"Anaphylaxis with airway compromise → Intubation",
];
const col2 = [
"Ruptured ectopic pregnancy → Emergency laparotomy",
"Acute appendicitis with perforation → Emergency appendicectomy",
"Severe septic shock → Central venous access, source control",
"Raised ICP / Extradural haematoma → Emergency burr hole / craniotomy",
"Acute limb ischaemia → Emergency embolectomy / fasciotomy",
"Obstructed labour with fetal distress → Emergency LSCS",
];
s.addText("MUST PROCEED — Immediate Threat to Life", {
x: 0.2, y: 1.6, w: 4.5, h: 0.32, fontSize: 10.5, bold: true, color: C.red, fontFace: "Calibri"
});
s.addText("MUST PROCEED — Organ / Function Threatening", {
x: 5.1, y: 1.6, w: 4.7, h: 0.32, fontSize: 10.5, bold: true, color: C.teal, fontFace: "Calibri"
});
col1.forEach((item, i) => {
const y = 2.0 + i * 0.52;
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 4.6, h: 0.44, fill: { color: i % 2 === 0 ? "FDECEA" : C.white }, line: { color: "FDECEA" } });
s.addText(item, { x: 0.3, y, w: 4.4, h: 0.44, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle", wrap: true });
});
col2.forEach((item, i) => {
const y = 2.0 + i * 0.52;
s.addShape(pres.ShapeType.rect, { x: 5.1, y, w: 4.7, h: 0.44, fill: { color: i % 2 === 0 ? "E8F6F3" : C.white }, line: { color: "E8F6F3" } });
s.addText(item, { x: 5.2, y, w: 4.5, h: 0.44, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle", wrap: true });
});
addFooter(s, 6);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 7 — Categorisation of Procedures
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Categorisation of Procedures During Pandemics", "Section 1 | Indications for Invasive Procedures");
sectionTag(s, "SECTION 01", C.teal);
const cats = [
{ label: "CATEGORY 1\nIMMEDIATE", desc: "Threat to life, limb or organ within hours.\nCannot be deferred. Must proceed with full PPE.", color: C.red },
{ label: "CATEGORY 2\nURGENT", desc: "Significant morbidity if delayed >24–72 hrs.\nProceed after rapid risk assessment.", color: "E67E22" },
{ label: "CATEGORY 3\nSEMI-URGENT", desc: "Required within days–weeks.\nDefer if possible; reassess when surge eases.", color: C.teal },
{ label: "CATEGORY 4\nELECTIVE", desc: "Routine procedures.\nPostpone during active pandemic surge.", color: C.green },
];
cats.forEach((c, i) => {
const x = 0.2 + i * 2.42;
s.addShape(pres.ShapeType.rect, { x, y: 1.6, w: 2.25, h: 1.1, fill: { color: c.color } });
s.addText(c.label, { x, y: 1.6, w: 2.25, h: 1.1, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", wrap: true });
s.addShape(pres.ShapeType.rect, { x, y: 2.75, w: 2.25, h: 1.6, fill: { color: C.offWhite }, line: { color: c.color, pt: 1.5 } });
s.addText(c.desc, { x: x + 0.08, y: 2.78, w: 2.1, h: 1.52, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "top", wrap: true });
});
s.addText("NMC Note: During declared public health emergencies, all Category 1 and 2 procedures remain mandatory. Treating physicians must document triage rationale.", {
x: 0.2, y: 4.5, w: 9.6, h: 0.55,
fontSize: 9.5, color: C.teal, italic: true, fontFace: "Calibri", wrap: true,
line: { pt: 0.5, color: C.teal }
});
addFooter(s, 7);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 8 — SECTION 2 HEADER
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: C.mid };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("SECTION", { x: 0.35, y: 1.2, w: 9, h: 0.5, fontSize: 16, color: "FFFFFF88", bold: true, charSpacing: 8, fontFace: "Calibri" });
s.addText("02", { x: 0.35, y: 1.65, w: 9, h: 1.5, fontSize: 90, bold: true, color: C.gold, fontFace: "Calibri" });
s.addText("Points to be Verified Before\nEmergency Procedures", {
x: 0.35, y: 3.1, w: 9, h: 1.4,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", wrap: true
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.18, fill: { color: C.dark } });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 9 — Pre-Procedure Verification Checklist
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Pre-Procedure Verification Checklist", "Section 2 | Points to be Verified Before Emergency Procedures");
sectionTag(s, "SECTION 02", C.mid);
const items = [
{ cat: "PATIENT", pts: ["Identity verified (2 identifiers)", "Informed consent obtained or surrogate decision", "Allergies documented", "COVID/pandemic status — tested/suspected/confirmed?"] },
{ cat: "CLINICAL", pts: ["Indication confirmed by senior physician", "Imaging/investigations reviewed", "Blood availability confirmed", "Anaesthesia team alerted"] },
{ cat: "INFECTION RISK", pts: ["Aerosol-generating procedure (AGP) status assessed", "Appropriate PPE level selected (standard vs. enhanced)", "Negative-pressure room / isolation bay allocated"] },
{ cat: "TEAM", pts: ["Briefing completed — roles assigned", "Emergency equipment checked (crash cart, suction, airway)", "Minimal personnel policy applied (only essential staff)"] },
];
items.forEach((item, i) => {
const x = (i % 2) * 4.85 + 0.2;
const y = Math.floor(i / 2) * 1.88 + 1.55;
s.addShape(pres.ShapeType.rect, { x, y, w: 1.1, h: 0.32, fill: { color: [C.teal, C.mid, C.red, C.green][i] } });
s.addText(item.cat, { x, y, w: 1.1, h: 0.32, fontSize: 8, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
item.pts.forEach((pt, j) => {
s.addShape(pres.ShapeType.rect, { x, y: y + 0.35 + j * 0.36, w: 4.6, h: 0.32, fill: { color: j % 2 === 0 ? "F0F4F8" : C.white }, line: { color: "DDDDDD" } });
s.addText(`☑ ${pt}`, { x: x + 0.1, y: y + 0.35 + j * 0.36, w: 4.45, h: 0.32, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle" });
});
});
addFooter(s, 9);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 10 — PPE Selection Guide
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "PPE Selection During Pandemic Procedures", "Section 2 | Points to be Verified Before Emergency Procedures");
sectionTag(s, "SECTION 02", C.mid);
s.addText("PPE Level Based on Procedure Type & Pandemic Pathogen", {
x: 0.3, y: 1.6, w: 9.2, h: 0.3, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri"
});
const rows = [
["Procedure Type", "Pathogen Risk", "Minimum PPE Required"],
["Non-AGP: wound suture, IV line", "Standard", "Gloves + surgical mask + apron"],
["AGP: intubation, bronchoscopy", "High / Droplet","N95/FFP2 + face shield + gown + double gloves"],
["AGP: CPR, nebulisation", "High / Aerosol","N95/FFP3 + full face shield + impermeable gown + gloves"],
["LSCS / obstetric emergency", "High", "N95 + eye protection + gown + double gloves"],
["Chest drain / thoracotomy", "High", "N95 + face shield + impermeable gown + double gloves"],
["Post-procedure waste handling", "Medium", "Heavy-duty gloves + apron + N95"],
];
rows.forEach((row, ri) => {
const y = 2.0 + ri * 0.48;
const bg = ri === 0 ? C.navy : ri % 2 === 0 ? "EEF4F7" : C.white;
const fc = ri === 0 ? C.gold : C.navy;
const fs = ri === 0 ? 10 : 9.5;
[0, 1, 2].forEach((ci) => {
const xArr = [0.2, 3.3, 5.8];
const wArr = [2.95, 2.35, 3.9];
s.addShape(pres.ShapeType.rect, { x: xArr[ci], y, w: wArr[ci] - 0.02, h: 0.44, fill: { color: bg }, line: { color: "DDDDDD" } });
s.addText(row[ci], { x: xArr[ci] + 0.06, y, w: wArr[ci] - 0.1, h: 0.44, fontSize: fs, color: fc, fontFace: "Calibri", valign: "middle", bold: ri === 0, wrap: true });
});
});
s.addText("AGP = Aerosol-Generating Procedure. Always follow local hospital protocol & prevailing WHO/MOHFW guidelines.", {
x: 0.2, y: 5.3, w: 9.6, h: 0.2, fontSize: 8, color: C.teal, italic: true, fontFace: "Calibri"
});
addFooter(s, 10);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 11 — SECTION 3 HEADER
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: C.green };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("SECTION", { x: 0.35, y: 1.2, w: 9, h: 0.5, fontSize: 16, color: "FFFFFF88", bold: true, charSpacing: 8, fontFace: "Calibri" });
s.addText("03", { x: 0.35, y: 1.65, w: 9, h: 1.5, fontSize: 90, bold: true, color: C.gold, fontFace: "Calibri" });
s.addText("Steps to Reduce\nTransmission of Infections", {
x: 0.35, y: 3.1, w: 9, h: 1.4,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", wrap: true
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.18, fill: { color: C.dark } });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 12 — Routes of Transmission
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Understanding Routes of Transmission", "Section 3 | Steps to Reduce Infection Transmission");
sectionTag(s, "SECTION 03", C.green);
const routes = [
{ icon: "💨", name: "Airborne", desc: "Droplet nuclei <5 µm; remain suspended (TB, measles, COVID-19)", color: C.red },
{ icon: "💧", name: "Droplet", desc: "Large droplets >5 µm; travel <1–2 m (influenza, COVID-19, SARS)", color: "E67E22" },
{ icon: "✋", name: "Contact", desc: "Direct/indirect touch; fomites (MRSA, C. diff, Ebola)", color: C.teal },
{ icon: "🩸", name: "Blood-borne", desc: "Needlestick, splash exposure (HIV, HBV, HCV)", color: C.mid },
{ icon: "💩", name: "Faecal-oral", desc: "Contaminated food/water/hands (cholera, typhoid)", color: C.green },
];
routes.forEach((r, i) => {
const x = i < 3 ? 0.2 + i * 3.25 : 1.57 + (i - 3) * 3.25;
const y = i < 3 ? 1.6 : 3.3;
s.addShape(pres.ShapeType.rect, { x, y, w: 3.0, h: 1.5, fill: { color: C.white }, line: { color: r.color, pt: 2 } });
s.addShape(pres.ShapeType.rect, { x, y, w: 3.0, h: 0.45, fill: { color: r.color } });
s.addText(`${r.icon} ${r.name}`, { x: x + 0.08, y, w: 2.85, h: 0.45, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
s.addText(r.desc, { x: x + 0.1, y: y + 0.5, w: 2.82, h: 0.9, fontSize: 9.5, color: C.navy, fontFace: "Calibri", wrap: true, valign: "top" });
});
addFooter(s, 12);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 13 — Hierarchy of Infection Controls
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Hierarchy of Infection Control Measures", "Section 3 | Steps to Reduce Infection Transmission");
sectionTag(s, "SECTION 03", C.green);
// Pyramid shape using stacked rectangles
const levels = [
{ label: "1. Elimination / Source Control", desc: "Isolate infectious patients; designate COVID/pandemic zones", color: C.red, w: 9.2, x: 0.25 },
{ label: "2. Engineering Controls", desc: "Negative-pressure rooms, improved ventilation, HEPA filters", color: "E67E22", w: 7.8, x: 1.0 },
{ label: "3. Administrative Controls", desc: "Triage protocols, cohorting, minimal staff policy, shifts", color: C.teal, w: 6.4, x: 1.7 },
{ label: "4. Personal Protective Equipment (PPE)", desc: "Last line of defence — N95, gowns, gloves, eye protection", color: C.green, w: 5.0, x: 2.4 },
];
levels.forEach((lv, i) => {
const y = 1.55 + i * 0.88;
s.addShape(pres.ShapeType.rect, { x: lv.x, y, w: lv.w, h: 0.72, fill: { color: lv.color } });
s.addText(lv.label, { x: lv.x + 0.12, y, w: lv.w * 0.44, h: 0.72, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", wrap: true });
s.addText(lv.desc, { x: lv.x + lv.w * 0.47, y, w: lv.w * 0.51, h: 0.72, fontSize: 9.5, color: C.white, fontFace: "Calibri", valign: "middle", wrap: true });
});
s.addText("MOST EFFECTIVE", { x: 0.0, y: 1.55, w: 0.22, h: 0.72, fontSize: 6, bold: true, color: C.red, fontFace: "Calibri", align: "center", valign: "middle", rotate: 90 });
s.addText("LEAST EFFECTIVE", { x: 0.0, y: 3.19, w: 0.22, h: 0.72, fontSize: 6, bold: true, color: C.green, fontFace: "Calibri", align: "center", valign: "middle", rotate: 90 });
addFooter(s, 13);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 14 — Specific Steps During Procedures
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Specific Infection Control Steps During Emergency Procedures", "Section 3 | Steps to Reduce Infection Transmission");
sectionTag(s, "SECTION 03", C.green);
const phases = [
{
title: "BEFORE (Preparation)",
color: C.teal,
pts: [
"Don PPE outside procedure room — buddy check",
"Allocate dedicated instruments; no sharing between zones",
"Prepare single-use equipment; avoid re-usable where possible",
"Brief all team members on infection status of patient",
]
},
{
title: "DURING (Procedure)",
color: C.green,
pts: [
"Video laryngoscopy preferred over direct — reduces aerosol exposure",
"Rapid Sequence Intubation (RSI) — minimises bag-mask ventilation",
"Closed suctioning systems; avoid open tracheal suctioning",
"Limit unnecessary door openings; maintain negative pressure",
]
},
{
title: "AFTER (Post-Procedure)",
color: C.mid,
pts: [
"Doff PPE in correct sequence; hand hygiene after each step",
"Disinfect all surfaces (1000 ppm chlorine or equivalent)",
"Biomedical waste: double-bag in yellow bags; label as pandemic waste",
"Document exposure; report needlestick injuries immediately",
]
},
];
phases.forEach((ph, i) => {
const x = 0.2 + i * 3.25;
s.addShape(pres.ShapeType.rect, { x, y: 1.55, w: 3.1, h: 0.38, fill: { color: ph.color } });
s.addText(ph.title, { x, y: 1.55, w: 3.1, h: 0.38, fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
ph.pts.forEach((pt, j) => {
s.addShape(pres.ShapeType.rect, { x, y: 1.97 + j * 0.82, w: 3.1, h: 0.76, fill: { color: j % 2 === 0 ? "F0F8F4" : C.white }, line: { color: "DDEEEE" } });
s.addText(`▸ ${pt}`, { x: x + 0.1, y: 2.0 + j * 0.82, w: 2.92, h: 0.72, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle", wrap: true });
});
});
addFooter(s, 14);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 15 — Zoning and Cohorting
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Hospital Zoning & Patient Cohorting", "Section 3 | Steps to Reduce Infection Transmission");
sectionTag(s, "SECTION 03", C.green);
const zones = [
{ label: "HOT ZONE\n(High-Risk)", desc: "Confirmed pandemic cases\nAGP procedures performed\nFull PPE mandatory", color: C.red },
{ label: "WARM ZONE\n(Intermediate)", desc: "Suspected / PUI cases\nNon-AGP care\nSurgical mask + gloves minimum", color: "E67E22" },
{ label: "COLD ZONE\n(Low-Risk)", desc: "Uninfected / routine patients\nAdministrative areas\nStandard precautions", color: C.green },
];
zones.forEach((z, i) => {
const x = 0.4 + i * 3.15;
s.addShape(pres.ShapeType.rect, { x, y: 1.55, w: 2.9, h: 3.55, fill: { color: z.color + "22" }, line: { color: z.color, pt: 2 } });
s.addShape(pres.ShapeType.rect, { x, y: 1.55, w: 2.9, h: 0.55, fill: { color: z.color } });
s.addText(z.label, { x, y: 1.55, w: 2.9, h: 0.55, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle", wrap: true });
s.addText(z.desc, { x: x + 0.1, y: 2.18, w: 2.7, h: 0.9, fontSize: 10.5, color: z.color, fontFace: "Calibri", wrap: true, valign: "top", bold: true });
// Cohorting points
const cohortPts = [
["Dedicated staff", "No cross-zone staff movement"],
["Separate entry/exit routes", "Air-lock vestibule"],
["Colour-coded wristbands", "Separate waste bins"],
];
cohortPts[i] && cohortPts[i].forEach((cp, j) => {
s.addText(`• ${cp}`, { x: x + 0.1, y: 3.2 + j * 0.44, w: 2.7, h: 0.38, fontSize: 9.5, color: C.navy, fontFace: "Calibri", wrap: true });
});
s.addText(["• Negative pressure rooms\n• Strict donning/doffing area\n• Minimum entry persons", "• Isolation bays\n• Regular environmental cleaning\n• PPE station at entry", "• Standard handwashing\n• Visitor restrictions\n• Screening at entry"][i], {
x: x + 0.1, y: 3.15, w: 2.7, h: 1.8, fontSize: 9.5, color: C.navy, fontFace: "Calibri", wrap: true, valign: "top"
});
});
s.addText("→ Movement is ONE-WAY: Cold → Warm → Hot only (never reverse without decontamination)", {
x: 0.2, y: 5.22, w: 9.6, h: 0.25, fontSize: 9, color: C.red, bold: true, fontFace: "Calibri"
});
addFooter(s, 15);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 16 — SECTION 4 HEADER
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: C.red };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.gold } });
s.addText("SECTION", { x: 0.35, y: 1.2, w: 9, h: 0.5, fontSize: 16, color: "FFFFFF88", bold: true, charSpacing: 8, fontFace: "Calibri" });
s.addText("04", { x: 0.35, y: 1.65, w: 9, h: 1.5, fontSize: 90, bold: true, color: C.gold, fontFace: "Calibri" });
s.addText("Attitude & Communication\nin Complicated Procedures", {
x: 0.35, y: 3.1, w: 9, h: 1.4,
fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", wrap: true
});
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: 10, h: 0.18, fill: { color: C.dark } });
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 17 — Ethical Challenges
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Ethical Challenges During Pandemic Procedures", "Section 4 | Attitude & Communication");
sectionTag(s, "SECTION 04", C.red);
s.addText("Pandemic conditions can create moral distress and ethical dilemmas rarely encountered in routine practice", {
x: 0.3, y: 1.6, w: 9.2, h: 0.36, fontSize: 11, italic: true, color: C.teal, fontFace: "Calibri", wrap: true
});
const challenges = [
{ issue: "Resource Scarcity", detail: "Ventilators, ICU beds, blood products may be unavailable for all who need them. Utilitarian triage may be required.", color: C.red },
{ issue: "Consent Challenges", detail: "Patient may be sedated/unconscious. Surrogate/guardian consent; document all attempts. Informed consent forms may need simplification.", color: "E67E22" },
{ issue: "Refusal of Treatment", detail: "Patient or family may refuse indicated procedures due to fear of pandemic infection in hospital. Respect autonomy; document clearly.", color: C.teal },
{ issue: "Equity & Discrimination", detail: "Avoid differential treatment based on COVID status, age, disability, socioeconomic status. Equal dignity for all patients.", color: C.mid },
{ issue: "Staff Refusal / Fear", detail: "HCWs may fear infection. Institutional obligation to provide PPE. Duty of care must be balanced with reasonable personal safety.", color: C.green },
];
challenges.forEach((ch, i) => {
const y = 2.05 + i * 0.64;
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 2.0, h: 0.56, fill: { color: ch.color } });
s.addText(ch.issue, { x: 0.22, y, w: 1.98, h: 0.56, fontSize: 10, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", align: "center", wrap: true });
s.addShape(pres.ShapeType.rect, { x: 2.25, y, w: 7.55, h: 0.56, fill: { color: i % 2 === 0 ? "F8F8F8" : C.white }, line: { color: "DDDDDD" } });
s.addText(ch.detail, { x: 2.35, y, w: 7.35, h: 0.56, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle", wrap: true });
});
addFooter(s, 17);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 18 — Communication Principles
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Communication During Complicated Procedures", "Section 4 | Attitude & Communication");
sectionTag(s, "SECTION 04", C.red);
// Left column: Doctor-Patient Communication
s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.55, w: 4.55, h: 0.38, fill: { color: C.teal } });
s.addText("DOCTOR ↔ PATIENT / FAMILY", { x: 0.2, y: 1.55, w: 4.55, h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
bulletBox(s, [
"Use simple, clear language — avoid jargon",
"Acknowledge fear & anxiety about pandemic",
"Explain why procedure is unavoidable right now",
"Describe infection risks to patient honestly",
"Allow questions; address concerns with empathy",
"Keep family informed via phone if not allowed in",
], 0.2, 1.96, 4.55, 3.3, { fsize: 11, baseColor: C.navy });
// Right column: Team Communication
s.addShape(pres.ShapeType.rect, { x: 5.15, y: 1.55, w: 4.65, h: 0.38, fill: { color: C.mid } });
s.addText("INTRA-TEAM COMMUNICATION", { x: 5.15, y: 1.55, w: 4.65, h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
bulletBox(s, [
"Pre-procedure briefing (SBAR tool): Situation, Background, Assessment, Recommendation",
"Closed-loop communication — repeat back all verbal orders",
"Designate a team leader; clear role allocation",
"PPE affects voice: use hand signals for key commands",
"Post-procedure debrief: technical + psychological",
"Escalate concerns early — no hierarchy paralysis",
], 5.15, 1.96, 4.65, 3.3, { fsize: 11, baseColor: C.navy });
addFooter(s, 18);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 19 — Attitude of the Healthcare Provider
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Professional Attitude During Pandemic Procedures", "Section 4 | Attitude & Communication");
sectionTag(s, "SECTION 04", C.red);
const virtues = [
{ v: "Compassion", desc: "Treat every patient with dignity regardless of pandemic status; do not abandon care", icon: "❤️" },
{ v: "Courage", desc: "Perform necessary procedures despite personal risk, when appropriate PPE is available", icon: "🦁" },
{ v: "Integrity", desc: "Honest documentation; do not conceal errors; transparent with patients & families", icon: "⚖️" },
{ v: "Humility", desc: "Know your limits; escalate complex cases; seek senior supervision when unsure", icon: "🎓" },
{ v: "Resilience", desc: "Maintain professional functioning under prolonged stress; seek mental health support", icon: "🔄" },
{ v: "Non-maleficence",desc: "Primum non nocere — avoid unnecessary procedures that increase transmission risk", icon: "🛡️" },
];
virtues.forEach((vt, i) => {
const x = (i % 3) * 3.2 + 0.2;
const y = Math.floor(i / 3) * 1.7 + 1.55;
s.addShape(pres.ShapeType.rect, { x, y, w: 3.05, h: 1.55, fill: { color: i % 2 === 0 ? C.offWhite : C.white }, line: { color: C.teal, pt: 1 } });
s.addText(vt.icon, { x: x + 0.08, y: y + 0.08, w: 0.5, h: 0.5, fontSize: 20, fontFace: "Calibri" });
s.addText(vt.v, { x: x + 0.55, y: y + 0.1, w: 2.4, h: 0.38, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri" });
s.addText(vt.desc, { x: x + 0.1, y: y + 0.55, w: 2.88, h: 0.88, fontSize: 9.5, color: C.navy, fontFace: "Calibri", wrap: true, valign: "top" });
});
addFooter(s, 19);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 20 — Breaking Bad News in Pandemic Context
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Breaking Bad News During Pandemics — SPIKES Protocol", "Section 4 | Attitude & Communication");
sectionTag(s, "SECTION 04", C.red);
const spikes = [
{ letter: "S", word: "SETTING", desc: "Private space (or video call); ensure comfort; minimize interruptions; appropriate PPE" },
{ letter: "P", word: "PERCEPTION", desc: "Assess what patient/family already knows — 'What have you been told so far?'" },
{ letter: "I", word: "INVITATION", desc: "Ask how much information they want: 'Would you like full details or an overview?'" },
{ letter: "K", word: "KNOWLEDGE", desc: "Deliver news in small chunks, plain language; pause for reaction; avoid euphemisms" },
{ letter: "E", word: "EMOTIONS", desc: "Acknowledge feelings; respond with empathy ('This must be very hard for you')" },
{ letter: "S", word: "STRATEGY", desc: "Outline the plan; give options; ensure follow-up. Provide written summary where possible" },
];
spikes.forEach((sp, i) => {
const y = 1.55 + i * 0.64;
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 0.48, h: 0.56, fill: { color: C.red } });
s.addText(sp.letter, { x: 0.2, y, w: 0.48, h: 0.56, fontSize: 20, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 0.72, y, w: 1.55, h: 0.56, fill: { color: C.navy } });
s.addText(sp.word, { x: 0.72, y, w: 1.55, h: 0.56, fontSize: 10, bold: true, color: C.gold, fontFace: "Calibri", valign: "middle", align: "center" });
s.addShape(pres.ShapeType.rect, { x: 2.32, y, w: 7.48, h: 0.56, fill: { color: i % 2 === 0 ? C.offWhite : C.white }, line: { color: "DDDDDD" } });
s.addText(sp.desc, { x: 2.42, y, w: 7.28, h: 0.56, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle", wrap: true });
});
s.addText("Adapted from Baile WF et al. SPIKES — A Six-Step Protocol for Delivering Bad News.", {
x: 0.2, y: 5.3, w: 9.6, h: 0.2, fontSize: 7.5, color: C.teal, italic: true, fontFace: "Calibri"
});
addFooter(s, 20);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 21 — Key Summary
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addHeader(s, "Key Takeaways", "Emergency Procedures During Pandemics");
s.background = { color: C.offWhite };
const takeaways = [
{ num: "01", text: "Indications: Proceed ONLY when delay means death/permanent disability — document all decisions", color: C.teal },
{ num: "02", text: "Verification: Use a systematic pre-procedure checklist — patient, clinical, infection risk, team", color: C.mid },
{ num: "03", text: "Transmission: Hierarchy of controls — source control first, PPE last; follow AGP precautions strictly", color: C.green },
{ num: "04", text: "Attitude: Compassion + courage + integrity. Use SPIKES for bad news; SBAR for team handoffs", color: C.red },
];
takeaways.forEach((tk, i) => {
const y = 1.55 + i * 0.94;
s.addShape(pres.ShapeType.rect, { x: 0.2, y, w: 0.72, h: 0.78, fill: { color: tk.color } });
s.addText(tk.num, { x: 0.2, y, w: 0.72, h: 0.78, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x: 0.97, y, w: 8.83, h: 0.78, fill: { color: C.white }, line: { color: tk.color, pt: 1.5 } });
s.addText(tk.text, { x: 1.1, y: y + 0.02, w: 8.6, h: 0.74, fontSize: 12, color: C.navy, fontFace: "Calibri", valign: "middle", wrap: true });
});
s.addText("Remember: Every decision in a pandemic emergency must balance immediate life-saving need with the ethical obligation to protect patients, staff, and community.", {
x: 0.2, y: 5.22, w: 9.6, h: 0.28, fontSize: 9, color: C.teal, italic: true, fontFace: "Calibri", wrap: true
});
addFooter(s, 21);
}
// ═══════════════════════════════════════════════════════════════
// SLIDE 22 — FINAL / THANK YOU
// ═══════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.gold } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.55, w: 10, h: 0.08, fill: { color: C.gold } });
// Cross symbol
s.addShape(pres.ShapeType.rect, { x: 4.59, y: 1.1, w: 0.12, h: 0.5, fill: { color: C.gold } });
s.addShape(pres.ShapeType.rect, { x: 4.44, y: 1.27, w: 0.42, h: 0.12, fill: { color: C.gold } });
s.addText("Thank You", {
x: 0.5, y: 1.75, w: 9, h: 0.8,
fontSize: 38, bold: true, color: C.white, fontFace: "Calibri", align: "center"
});
s.addShape(pres.ShapeType.rect, { x: 3, y: 2.62, w: 4, h: 0.05, fill: { color: C.teal } });
s.addText("Emergency Procedures During Pandemics", {
x: 0.5, y: 2.75, w: 9, h: 0.45,
fontSize: 16, color: C.lightTeal, fontFace: "Calibri", align: "center"
});
s.addText("NMC MBBS Curriculum | Community Medicine & Surgery", {
x: 0.5, y: 3.25, w: 9, h: 0.35,
fontSize: 11, color: C.gold, italic: true, fontFace: "Calibri", align: "center"
});
const refs = [
"Miller's Anesthesia, 10e (2023) — Pandemic preparedness & emergency protocols",
"WHO IPC Guidance for COVID-19 — Infection prevention and control",
"NMC Competency-Based Medical Education (CBME) Framework",
"SPIKES Protocol — Baile WF et al., Oncologist 2000",
"MCI/NMC Guidelines on Emergency & Disaster Medicine",
];
s.addText("References", { x: 1.2, y: 3.75, w: 7.6, h: 0.3, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", align: "center" });
refs.forEach((r, i) => {
s.addText(`${i + 1}. ${r}`, {
x: 1.0, y: 4.1 + i * 0.24, w: 8, h: 0.22,
fontSize: 8.5, color: C.lightTeal, fontFace: "Calibri", align: "center"
});
});
}
// WRITE FILE
pres.writeFile({ fileName: "/home/daytona/workspace/pandemic-ppt/Emergency_Procedures_During_Pandemics_NMC.pptx" })
.then(() => console.log("✅ PPT saved successfully!"))
.catch(err => console.error("❌ Error:", err));
cd /home/daytona/workspace/pandemic-ppt && node build.js 2>&1
~/pandemic-ppt/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/pandemic-ppt/build.js'
cd /home/daytona/workspace/pandemic-ppt && sed -i 's/"FFFFFF88"/"DDEEEE"/g; s/"F…
ls -lh /home/daytona/workspace/pandemic-ppt/Emergency_Procedures_During_Pandemic…