~/viva-flashcards/generate.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Surgical Viva Flashcards";
pres.author = "Orris Medical";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const C = {
navy: "0D1B2A", // dominant dark bg
teal: "1A7A6E", // section header bg
tealLight: "22A394", // question card bg
gold: "F5A623", // accent / question label
answerBg: "E8F5F3", // light mint for answer panels
white: "FFFFFF",
offWhite: "F0F4F3",
textDark: "0D1B2A",
textMid: "2C4A52",
red: "C0392B",
green: "1E8449",
purple: "6C3483",
blue: "1A5276",
};
// ─── HELPERS ─────────────────────────────────────────────────────
function titleSlide(title, subtitle) {
const s = pres.addSlide();
// Dark bg
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: C.navy }, line:{ color: C.navy } });
// Teal accent bar left
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.18, h:5.625, fill:{ color: C.tealLight }, line:{ color: C.tealLight } });
// Gold bottom strip
s.addShape(pres.shapes.RECTANGLE, { x:0, y:5.1, w:10, h:0.525, fill:{ color: C.gold }, line:{ color: C.gold } });
// Scalpel icon (decorative rect)
s.addShape(pres.shapes.RECTANGLE, { x:8.2, y:0.5, w:1.5, h:0.08, fill:{ color: C.tealLight }, line:{ color: C.tealLight } });
s.addShape(pres.shapes.RECTANGLE, { x:8.2, y:0.72, w:1.1, h:0.08, fill:{ color: C.gold }, line:{ color: C.gold } });
s.addShape(pres.shapes.RECTANGLE, { x:8.2, y:0.94, w:1.3, h:0.08, fill:{ color: C.tealLight }, line:{ color: C.tealLight } });
// Main title
s.addText(title, {
x:0.4, y:1.4, w:9.2, h:1.5,
fontSize:40, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle", margin:0
});
// Subtitle
s.addText(subtitle, {
x:0.4, y:3.0, w:9.2, h:0.8,
fontSize:20, color:C.gold, fontFace:"Calibri",
align:"center", valign:"middle", margin:0, italic:true
});
// Bottom label
s.addText("SURGICAL VIVA PREPARATION | 2026", {
x:0.4, y:5.1, w:9.2, h:0.525,
fontSize:13, color:C.navy, fontFace:"Calibri",
align:"center", valign:"middle", bold:true, margin:0
});
}
function sectionSlide(num, title, items) {
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: C.navy }, line:{ color: C.navy } });
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.3, fill:{ color: C.teal }, line:{ color: C.teal } });
s.addShape(pres.shapes.RECTANGLE, { x:0, y:5.2, w:10, h:0.425, fill:{ color: C.gold }, line:{ color: C.gold } });
s.addText(`SECTION ${num}`, {
x:0.4, y:0.1, w:9.2, h:0.45,
fontSize:13, bold:true, color:C.gold, fontFace:"Calibri",
charSpacing:5, margin:0, align:"left"
});
s.addText(title, {
x:0.4, y:0.5, w:9.2, h:0.7,
fontSize:28, bold:true, color:C.white, fontFace:"Calibri",
align:"left", valign:"middle", margin:0
});
// Items as two columns
const half = Math.ceil(items.length / 2);
const col1 = items.slice(0, half);
const col2 = items.slice(half);
const makeItems = (arr) => arr.map((t,i) => ({
text: `${String.fromCharCode(9658)} ${t}`,
options: { breakLine: i < arr.length - 1, fontSize:16, color: C.offWhite, fontFace:"Calibri" }
}));
s.addText(makeItems(col1), { x:0.5, y:1.5, w:4.5, h:3.5, valign:"top" });
if (col2.length > 0) {
s.addText(makeItems(col2), { x:5.2, y:1.5, w:4.5, h:3.5, valign:"top" });
}
}
// Flashcard: Q on left (teal), A on right (white/light)
function flashcard(qText, aLines, category, cardNum, total) {
const s = pres.addSlide();
// Light background
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: C.offWhite }, line:{ color: C.offWhite } });
// LEFT PANEL - Question
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:4.7, h:5.625, fill:{ color: C.teal }, line:{ color: C.teal } });
// gold top accent on left
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:4.7, h:0.18, fill:{ color: C.gold }, line:{ color: C.gold } });
// Category pill
s.addShape(pres.shapes.RECTANGLE, {
x:0.25, y:0.35, w:2.5, h:0.38,
fill:{ color: C.navy }, line:{ color: C.navy }
});
s.addText(category.toUpperCase(), {
x:0.25, y:0.35, w:2.5, h:0.38,
fontSize:10, bold:true, color:C.gold, fontFace:"Calibri",
align:"center", valign:"middle", charSpacing:2, margin:0
});
// Q label
s.addText("Q", {
x:0.3, y:0.9, w:0.6, h:0.6,
fontSize:32, bold:true, color:C.gold, fontFace:"Calibri",
align:"center", valign:"middle", margin:0
});
// Question text
s.addText(qText, {
x:0.25, y:1.55, w:4.2, h:3.4,
fontSize:18, color:C.white, fontFace:"Calibri",
bold:true, align:"left", valign:"top", margin:0,
wrap:true
});
// Card counter (bottom left)
s.addText(`${cardNum} / ${total}`, {
x:0.25, y:5.2, w:2, h:0.38,
fontSize:11, color:C.gold, fontFace:"Calibri", align:"left", valign:"middle", margin:0
});
// RIGHT PANEL - Answer
// White answer area with subtle shadow shape
s.addShape(pres.shapes.RECTANGLE, {
x:4.85, y:0.35, w:4.8, h:4.9,
fill:{ color: C.white },
line:{ color:"D0E8E4", size:1 },
shadow:{ type:"outer", color:"000000", blur:8, offset:3, angle:135, opacity:0.1 }
});
// "A" label
s.addText("A", {
x:4.95, y:0.42, w:0.55, h:0.55,
fontSize:26, bold:true, color:C.teal, fontFace:"Calibri",
align:"center", valign:"middle", margin:0
});
// Answer content
const answerContent = aLines.map((line, i) => {
if (line.type === "heading") {
return { text: line.text, options: { bold:true, color:C.teal, fontSize:14, fontFace:"Calibri", breakLine: true } };
} else if (line.type === "bullet") {
return { text: `\u2022 ${line.text}`, options: { color:C.textDark, fontSize:13, fontFace:"Calibri", breakLine: true, indent:10 } };
} else if (line.type === "highlight") {
return { text: line.text, options: { bold:true, color: C.red, fontSize:13, fontFace:"Calibri", breakLine: true } };
} else if (line.type === "green") {
return { text: line.text, options: { bold:true, color: C.green, fontSize:13, fontFace:"Calibri", breakLine: true } };
} else {
return { text: line.text, options: { color:C.textDark, fontSize:13, fontFace:"Calibri", breakLine: true } };
}
});
// remove last breakLine
if (answerContent.length > 0) {
answerContent[answerContent.length-1].options.breakLine = false;
}
s.addText(answerContent, {
x:4.9, y:1.05, w:4.65, h:4.1,
valign:"top", margin:0, wrap:true
});
}
// ─── TABLE SLIDE ─────────────────────────────────────────────────
function tableSlide(title, headers, rows, category) {
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: C.offWhite }, line:{ color: C.offWhite } });
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.95, fill:{ color: C.navy }, line:{ color: C.navy } });
s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.12, fill:{ color: C.gold }, line:{ color: C.gold } });
s.addText(category.toUpperCase(), {
x:0.3, y:0.12, w:3, h:0.3,
fontSize:10, bold:true, color:C.gold, fontFace:"Calibri", charSpacing:3, margin:0
});
s.addText(title, {
x:0.3, y:0.42, w:9.4, h:0.48,
fontSize:22, bold:true, color:C.white, fontFace:"Calibri",
align:"left", valign:"middle", margin:0
});
const colW = 9.4 / headers.length;
const tableData = [
headers.map(h => ({ text:h, options:{ bold:true, color:C.white, fontSize:12, fontFace:"Calibri", fill:{ color: C.teal }, align:"center" }})),
...rows.map((row, ri) => row.map(cell => ({
text: cell,
options:{ color:C.textDark, fontSize:11, fontFace:"Calibri",
fill:{ color: ri%2===0 ? C.white : "EAF5F3" }, align:"left" }
})))
];
s.addTable(tableData, {
x:0.3, y:1.05, w:9.4,
rowH:0.44,
border:{ type:"solid", color:"C8DDD9", size:0.5 },
margin:5
});
}
// ══════════════════════════════════════════════════════════════════
// BUILD PRESENTATION
// ══════════════════════════════════════════════════════════════════
// TITLE SLIDE
titleSlide(
"Surgical Viva Flashcards",
"Instruments · Tubes · Drains · Sutures · Diathermy · Medications"
);
// ─── SECTION 1: SURGICAL INSTRUMENTS ─────────────────────────────
sectionSlide(1, "Surgical Instruments", [
"Backhaus Towel Clamps",
"Artery Forceps (Crile / Kelly / Mosquito)",
"Tissue Forceps (Toothed & Non-toothed)",
"Needle Holders (Mayo-Hegar)",
"Suture Needles – Types & Selection",
]);
let card = 1;
const TOTAL = 60;
flashcard(
"What is a Backhaus towel clamp used for, and can it be repositioned once applied?",
[
{ type:"bullet", text:"Secures sterile drapes to the patient's skin/table edges" },
{ type:"bullet", text:"Sharp pointed tips pierce through drape and grip skin" },
{ type:"heading", text:"IMPORTANT:" },
{ type:"highlight", text:"Once applied to skin — CANNOT be repositioned" },
{ type:"normal", text:"Removal breaks the sterile field (tips contaminated by skin flora)" },
{ type:"heading", text:"Doyen clamp vs Backhaus:" },
{ type:"bullet", text:"Backhaus = sharp, piercing tips" },
{ type:"bullet", text:"Doyen = blunt, non-piercing" },
],
"Surgical Instruments", card++, TOTAL
);
flashcard(
"What is the difference between Crile, Kelly, and Mosquito artery forceps?",
[
{ type:"bullet", text:"Mosquito: Smallest (5-6\"), superficial/fine vessels" },
{ type:"bullet", text:"Kelly: Medium; serrated DISTAL HALF of jaw only" },
{ type:"bullet", text:"Crile: Medium; FULLY serrated jaws — stronger grip" },
{ type:"bullet", text:"Rochester-Pean: Large, heavy — for major vessels" },
{ type:"heading", text:"Key Point:" },
{ type:"green", text:"Kelly = half-serrated | Crile = fully serrated" },
{ type:"normal", text:"All have ring handles, box joint, and ratchet lock" },
],
"Surgical Instruments", card++, TOTAL
);
flashcard(
"How do you correctly apply an artery forceps to a vessel?",
[
{ type:"bullet", text:"Apply at RIGHT ANGLES to the vessel" },
{ type:"bullet", text:"Only the TIPS should grip (not full jaw length)" },
{ type:"bullet", text:"Apply 1st or 2nd ratchet click only (avoid crush injury)" },
{ type:"bullet", text:"Apply a 2nd forceps distal to the first" },
{ type:"bullet", text:"Divide vessel between the two clamps" },
{ type:"heading", text:"Ratchet Rule:" },
{ type:"highlight", text:"Never fully lock (3rd click) — excessive crush damages vessel wall" },
],
"Surgical Instruments", card++, TOTAL
);
flashcard(
"When do you use toothed vs non-toothed thumb forceps?",
[
{ type:"heading", text:"TOOTHED (Rat-tooth / Adson):" },
{ type:"bullet", text:"Skin, fascia, tendon, dense connective tissue, bone" },
{ type:"heading", text:"NON-TOOTHED (Dressing / DeBakey):" },
{ type:"bullet", text:"Bowel, blood vessels, nerves, peritoneum, delicate mucosa" },
{ type:"heading", text:"Why NOT toothed on bowel/vessels?" },
{ type:"highlight", text:"Teeth lacerate/puncture delicate tissue → bleeding, perforation" },
{ type:"normal", text:"DeBakey forceps = fine longitudinal serrations, atraumatic for vascular work" },
],
"Surgical Instruments", card++, TOTAL
);
flashcard(
"How do you correctly load a suture needle onto a needle holder?",
[
{ type:"bullet", text:"Grasp needle at junction of PROXIMAL 1/3 and MIDDLE 1/3" },
{ type:"bullet", text:"Needle must be PERPENDICULAR to the jaw" },
{ type:"bullet", text:"Apply only FIRST ratchet click (prevents needle damage)" },
{ type:"bullet", text:"Needle tip should point upward and slightly toward surgeon" },
{ type:"heading", text:"Needle Holder vs Artery Forceps:" },
{ type:"bullet", text:"Needle holder: shorter, wider jaw; cross-serrated; heavier shank" },
{ type:"bullet", text:"Artery forceps: longer jaw; longitudinal serrations; lighter" },
],
"Surgical Instruments", card++, TOTAL
);
flashcard(
"Classify suture needles by tip type, shape, and attachment method",
[
{ type:"heading", text:"BY TIP:" },
{ type:"bullet", text:"Cutting (triangular) — skin, fascia; Reverse cutting — skin" },
{ type:"bullet", text:"Round/Tapered — bowel, peritoneum, muscle (atraumatic)" },
{ type:"heading", text:"BY SHAPE:" },
{ type:"bullet", text:"Straight, J-needle, 3/8 circle (most common), 1/2 circle (deep), 5/8 circle (pelvis)" },
{ type:"heading", text:"BY ATTACHMENT:" },
{ type:"bullet", text:"Atraumatic/Swaged: needle fused to suture (no eye) — less trauma" },
{ type:"bullet", text:"Traumatic: suture threaded through needle eye" },
],
"Surgical Instruments", card++, TOTAL
);
// ─── SECTION 2: TUBES & CATHETERS ────────────────────────────────
sectionSlide(2, "Tubes & Catheters", [
"Foley Catheter (2-way & 3-way)",
"Ryle's Tube (Nasogastric Tube)",
"Endotracheal Tube (ETT)",
"Yankauer Suction Set",
"Urethral Catheterization Technique",
]);
flashcard(
"What are the indications for Foley catheterization and how is placement confirmed?",
[
{ type:"heading", text:"INDICATIONS:" },
{ type:"bullet", text:"Acute urinary retention, monitoring urine output" },
{ type:"bullet", text:"Peri-operative, bladder decompression, neurogenic bladder" },
{ type:"bullet", text:"Continuous bladder irrigation (haematuria/clot retention)" },
{ type:"heading", text:"CONFIRM PLACEMENT BEFORE BALLOON INFLATION:" },
{ type:"green", text:"Drainage of clear urine = correct position" },
{ type:"highlight", text:"NEVER inflate balloon without seeing urine flow first!" },
{ type:"normal", text:"Balloon: 10 mL sterile WATER (not saline — crystallizes in valve)" },
],
"Tubes & Catheters", card++, TOTAL
);
flashcard(
"What is the difference between 2-way and 3-way Foley catheters? What is the French gauge?",
[
{ type:"bullet", text:"2-way: Drainage channel + balloon inflation channel (standard)" },
{ type:"bullet", text:"3-way: Additional irrigation channel — used for haematuria, clot retention, post-TURP" },
{ type:"heading", text:"FRENCH GAUGE (Fr):" },
{ type:"normal", text:"1 Fr = 0.33 mm diameter → Larger number = Larger catheter" },
{ type:"bullet", text:"Adult male standard: 14-16 Fr" },
{ type:"bullet", text:"3-way (irrigation): 20-24 Fr" },
{ type:"bullet", text:"Pediatric: 6-10 Fr" },
],
"Tubes & Catheters", card++, TOTAL
);
flashcard(
"What are the complications of urethral catheterization?",
[
{ type:"heading", text:"IMMEDIATE:" },
{ type:"bullet", text:"Failed insertion (stricture, BPH)" },
{ type:"highlight", text:"Balloon inflation in urethra → urethral rupture" },
{ type:"bullet", text:"False passage creation, trauma, bleeding" },
{ type:"heading", text:"SHORT-TERM:" },
{ type:"bullet", text:"CAUTI (most common complication)" },
{ type:"bullet", text:"Bladder spasm, paraphimosis (if foreskin unreduced)" },
{ type:"heading", text:"LONG-TERM:" },
{ type:"bullet", text:"Urethral stricture, bladder calculi, squamous metaplasia" },
],
"Tubes & Catheters", card++, TOTAL
);
flashcard(
"How do you confirm correct placement of a Ryle's (nasogastric) tube?",
[
{ type:"heading", text:"GOLD STANDARD:" },
{ type:"green", text:"CXR — tube visible below diaphragm, tip in stomach" },
{ type:"heading", text:"BEDSIDE METHOD (UK NPSA recommended):" },
{ type:"green", text:"pH of aspirate ≤ 5.5 = gastric position" },
{ type:"heading", text:"UNRELIABLE — Do NOT rely on alone:" },
{ type:"highlight", text:"Whoosh/Air auscultation test — NOT reliable" },
{ type:"normal", text:"NEX measurement: Nose → Earlobe → Xiphisternum ≈ 55-65 cm" },
{ type:"normal", text:"Wide-bore (Ryle's): aspiration/decompression | Fine-bore: feeding" },
],
"Tubes & Catheters", card++, TOTAL
);
flashcard(
"What is the Murphy eye on an ETT? How do you confirm correct placement?",
[
{ type:"heading", text:"MURPHY EYE:" },
{ type:"normal", text:"A lateral hole 1-2 cm from the beveled tip. If tip abuts carina/wall, gas exchange continues through Murphy eye — safety backup." },
{ type:"heading", text:"CONFIRM ETT PLACEMENT (ABCDE):" },
{ type:"bullet", text:"A: Auscultation — bilateral breath sounds" },
{ type:"bullet", text:"B: Bilateral chest rise" },
{ type:"green", text:"C: Capnography (ETCO2) — GOLD STANDARD" },
{ type:"bullet", text:"D: Direct visualization through cords at laryngoscopy" },
{ type:"bullet", text:"E: CXR — tip 2-3 cm above carina (T4-5)" },
],
"Tubes & Catheters", card++, TOTAL
);
flashcard(
"What is a Low Pressure High Volume ETT cuff? What is the correct cuff pressure?",
[
{ type:"heading", text:"LPHV CUFF:" },
{ type:"normal", text:"Large volume cuff (15-20 mL) seals trachea at low pressure by conforming to irregular tracheal wall — prevents aspiration without causing ischemia" },
{ type:"heading", text:"CORRECT CUFF PRESSURE:" },
{ type:"green", text:"20-30 cmH2O (15-22 mmHg)" },
{ type:"highlight", text:"< 20 cmH2O → aspiration risk" },
{ type:"highlight", text:"> 30 cmH2O → tracheal mucosal ischemia → stenosis" },
{ type:"normal", text:"ETT depth: Male 23 cm | Female 21 cm | Rule: 3 × ID" },
],
"Tubes & Catheters", card++, TOTAL
);
flashcard(
"What is a Yankauer suction set? How does it differ from a flexible suction catheter?",
[
{ type:"heading", text:"YANKAUER:" },
{ type:"bullet", text:"Rigid, angled oropharyngeal suction catheter" },
{ type:"bullet", text:"Wide-bore tip + side holes for high-flow suctioning" },
{ type:"bullet", text:"Used for: blood, vomit, secretions from oropharynx" },
{ type:"heading", text:"Yankauer vs Flexible Catheter:" },
{ type:"bullet", text:"Yankauer: Rigid, oropharynx only, high flow" },
{ type:"bullet", text:"Flexible: Soft, goes via ETT into trachea, lower flow" },
{ type:"heading", text:"Suction pressure (adults):" },
{ type:"green", text:"-100 to -150 mmHg (excessive = mucosal trauma)" },
],
"Tubes & Catheters", card++, TOTAL
);
// ─── SECTION 3: DRAINAGE SYSTEMS ─────────────────────────────────
sectionSlide(3, "Drainage Systems", [
"Water Sealed (Underwater Seal) Drainage",
"Intercostal Drain — Site & Technique",
"Swinging vs Bubbling in Chest Drain",
"Romovac / Closed Wound Suction Drain",
"Abdominal Drain — Indications & Monitoring",
]);
flashcard(
"Explain the principle of underwater seal drainage. What are the indications for chest drain?",
[
{ type:"heading", text:"PRINCIPLE:" },
{ type:"normal", text:"Water (2-3 cm depth) acts as a one-way flutter valve. Air/fluid exits pleural space (pleural pressure > water column) but atmospheric air cannot re-enter (would need to overcome water seal)." },
{ type:"heading", text:"INDICATIONS:" },
{ type:"bullet", text:"Pneumothorax (tension, large, symptomatic, bilateral)" },
{ type:"bullet", text:"Haemothorax, Empyema, Chylothorax" },
{ type:"bullet", text:"Pleural effusion (therapeutic), Post-thoracic surgery" },
],
"Drainage Systems", card++, TOTAL
);
flashcard(
"Where do you insert a chest drain and which structure must you avoid?",
[
{ type:"heading", text:"SAFE TRIANGLE (recommended):" },
{ type:"green", text:"5th ICS, Mid-Axillary Line" },
{ type:"normal", text:"Borders: Lat. pectoralis major (ant.), Lat. latissimus dorsi (post.), Horizontal line from nipple (inf.), Apex of axilla (sup.)" },
{ type:"heading", text:"CRITICAL — Insert ABOVE upper border of rib:" },
{ type:"highlight", text:"Neurovascular bundle (VAN) runs in SUBCOSTAL groove" },
{ type:"normal", text:"V = Vein | A = Artery | N = Nerve (from above downward)" },
{ type:"bullet", text:"Pneumothorax tube directed to apex; Haemothorax: posterior/lateral" },
],
"Drainage Systems", card++, TOTAL
);
flashcard(
"What do 'swinging' and 'bubbling' mean in a chest drain? When should you NEVER clamp a drain?",
[
{ type:"heading", text:"SWINGING (Tidaling):" },
{ type:"green", text:"Water rises on inspiration, falls on expiration = tube PATENT, in pleural space" },
{ type:"normal", text:"No swinging = tube blocked/kinked OR lung fully expanded" },
{ type:"heading", text:"BUBBLING:" },
{ type:"bullet", text:"Intermittent bubbling = air leaving pleural space (expected)" },
{ type:"highlight", text:"Continuous bubbling = ongoing air leak (bronchopleural fistula?)" },
{ type:"heading", text:"NEVER clamp when:" },
{ type:"highlight", text:"Active bubbling is present → risk of tension pneumothorax" },
],
"Drainage Systems", card++, TOTAL
);
flashcard(
"How does a Romovac drain work? What are the types of surgical drains?",
[
{ type:"heading", text:"ROMOVAC:" },
{ type:"normal", text:"Bulb compressed flat then capped → creates ~70-100 mmHg negative pressure → draws fluid actively from wound as bulb re-expands" },
{ type:"heading", text:"DRAIN TYPES:" },
{ type:"bullet", text:"Passive open: Corrugated rubber (gravity + capillary)" },
{ type:"bullet", text:"Passive closed: Robinson drain (gravity → bag)" },
{ type:"bullet", text:"Active closed: Romovac, Redivac, Jackson-Pratt (suction)" },
{ type:"bullet", text:"Active open: Sump drain (suction + air vent)" },
{ type:"green", text:"Remove when: output < 30-50 mL/24 h" },
],
"Drainage Systems", card++, TOTAL
);
// ─── SECTION 4: DIATHERMY ────────────────────────────────────────
sectionSlide(4, "Electrosurgical Diathermy", [
"Principle of Surgical Diathermy",
"Cut vs Coagulation Mode",
"Monopolar vs Bipolar Diathermy",
"Grounding Pad Placement",
"Complications of Diathermy",
]);
flashcard(
"What is the principle of surgical diathermy? Why doesn't it cause cardiac arrhythmia?",
[
{ type:"heading", text:"PRINCIPLE:" },
{ type:"normal", text:"High-frequency AC current (300 kHz – 3 MHz) passed through tissue. Resistance of tissue converts electrical energy to HEAT." },
{ type:"bullet", text:"Cut: >100°C rapid heating → cell water vaporizes (explosive cut)" },
{ type:"bullet", text:"Coag: Slower heating → protein denaturation → hemostasis" },
{ type:"heading", text:"WHY NO CARDIAC FIBRILLATION?" },
{ type:"green", text:"Frequency > 100 kHz does not depolarize cardiac cells" },
{ type:"highlight", text:"Domestic AC (50 Hz) DOES cause ventricular fibrillation" },
],
"Electrosurgical Diathermy", card++, TOTAL
);
flashcard(
"What is the difference between CUT and COAGULATION modes in diathermy?",
[
{ type:"heading", text:"CUT MODE:" },
{ type:"bullet", text:"Continuous undamped sine wave" },
{ type:"bullet", text:"Rapid, even tissue heating → explosive vaporization" },
{ type:"green", text:"Clean cut with minimal lateral thermal damage" },
{ type:"heading", text:"COAGULATION (FULGURATION) MODE:" },
{ type:"bullet", text:"Interrupted/damped waveform, high peak voltage" },
{ type:"bullet", text:"Slower heating → protein denaturation, charring" },
{ type:"highlight", text:"More lateral tissue damage (useful for hemostasis)" },
{ type:"heading", text:"BLEND MODE:" },
{ type:"bullet", text:"Mix of cut + coag — cutting with hemostasis" },
],
"Electrosurgical Diathermy", card++, TOTAL
);
flashcard(
"Monopolar vs Bipolar diathermy — differences, uses, and safety",
[
{ type:"heading", text:"MONOPOLAR:" },
{ type:"bullet", text:"Current: Active tip → through patient body → return pad" },
{ type:"bullet", text:"Grounding pad required on thigh/back" },
{ type:"bullet", text:"Uses: Cutting, general coagulation, laparoscopy" },
{ type:"highlight", text:"Risk with pacemakers | Avoid near penis (circumferential burn)" },
{ type:"heading", text:"BIPOLAR:" },
{ type:"bullet", text:"Current only between two forceps tips — localized" },
{ type:"bullet", text:"No return pad needed" },
{ type:"green", text:"Safe near nerves, metal implants, pacemakers" },
{ type:"bullet", text:"Uses: Neurosurgery, fallopian tube ligation, fine tissue" },
],
"Electrosurgical Diathermy", card++, TOTAL
);
flashcard(
"What are the complications of diathermy?",
[
{ type:"bullet", text:"Burns at return pad site (poor contact, skin fold, metal)" },
{ type:"bullet", text:"Alternate site burns (via ECG electrodes, IV lines)" },
{ type:"highlight", text:"Pacemaker/ICD malfunction — use bipolar or reprogram device" },
{ type:"highlight", text:"Fire/explosion — alcohol prep, bowel gas (methane, H2) in closed spaces" },
{ type:"bullet", text:"Insulation failure → electrocution" },
{ type:"bullet", text:"Capacitative coupling in laparoscopy → unintended bowel injury" },
{ type:"bullet", text:"Surgical smoke (diathermy plume): carcinogens, HPV DNA" },
{ type:"bullet", text:"Tracheal fire if diathermy used near ignited airway gases" },
],
"Electrosurgical Diathermy", card++, TOTAL
);
// ─── SECTION 5: SUTURES ──────────────────────────────────────────
sectionSlide(5, "Sutures", [
"Classification — Absorbable vs Non-absorbable",
"Monofilament vs Braided / Natural vs Synthetic",
"Tensile Strength & Absorption Timeline",
"Suture Selection by Tissue Type",
"Ideal Suture Properties",
]);
flashcard(
"Classify sutures with examples of each type",
[
{ type:"heading", text:"BY ABSORPTION:" },
{ type:"bullet", text:"Absorbable: Catgut (plain/chromic), Vicryl, PDS, Monocryl" },
{ type:"bullet", text:"Non-absorbable: Silk, Nylon, Prolene, Polyester (Mersilene)" },
{ type:"heading", text:"BY ORIGIN:" },
{ type:"bullet", text:"Natural: Catgut, Silk | Synthetic: Vicryl, PDS, Nylon, Prolene" },
{ type:"heading", text:"BY STRUCTURE:" },
{ type:"bullet", text:"Monofilament: Nylon, Prolene, PDS — less drag, less bacteria" },
{ type:"bullet", text:"Braided: Silk, Vicryl — easier handling, better knot security" },
{ type:"highlight", text:"Braided = higher capillarity → bacteria travel along suture" },
],
"Sutures", card++, TOTAL
);
flashcard(
"What is the absorption time and strength retention of key sutures?",
[
{ type:"heading", text:"ABSORBABLE:" },
{ type:"bullet", text:"Plain Catgut: 7-10 days absorption, 50% strength lost by 7-10 days" },
{ type:"bullet", text:"Vicryl (PGA 910): 60-90 days absorption, 50% lost at 21 days" },
{ type:"green", text:"PDS: 180-210 days absorption, 50% strength retained at 42 days" },
{ type:"bullet", text:"Monocryl: 91-119 days, very fast early strength loss" },
{ type:"heading", text:"NON-ABSORBABLE:" },
{ type:"bullet", text:"Silk: Never absorbed (degrades slowly over years)" },
{ type:"bullet", text:"Nylon, Prolene: Never absorbed, retain strength permanently" },
{ type:"green", text:"PDS = best choice for fascia closure (long-lasting strength)" },
],
"Sutures", card++, TOTAL
);
flashcard(
"Which suture is used for which tissue?",
[
{ type:"bullet", text:"Skin: Nylon 3-0/4-0, Prolene, or Monocryl (subcuticular)" },
{ type:"bullet", text:"Subcutaneous: Vicryl 2-0 or 3-0" },
{ type:"bullet", text:"Fascia: PDS (long-lasting) or Prolene" },
{ type:"bullet", text:"Bowel: Vicryl 2-0 or 3-0 (absorbable)" },
{ type:"green", text:"Vascular anastomosis: Prolene 4-0 to 7-0 (non-thrombogenic, monofilament)" },
{ type:"bullet", text:"Tendon: Ethibond (polyester) or PDS" },
{ type:"bullet", text:"Nerve repair: Nylon 8-0 to 10-0" },
{ type:"bullet", text:"Bile duct / Urological: Vicryl or PDS" },
],
"Sutures", card++, TOTAL
);
flashcard(
"Why is Prolene used for vascular anastomosis? What are properties of an ideal suture?",
[
{ type:"heading", text:"PROLENE (Polypropylene) for vascular surgery:" },
{ type:"bullet", text:"Monofilament — minimal tissue reaction" },
{ type:"green", text:"Non-thrombogenic — does not promote clot formation" },
{ type:"bullet", text:"Retains tensile strength permanently" },
{ type:"bullet", text:"High elongation memory — accommodates vessel pulsations" },
{ type:"bullet", text:"Minimal capillarity — no bacterial wicking" },
{ type:"heading", text:"IDEAL SUTURE PROPERTIES:" },
{ type:"bullet", text:"Adequate tensile strength, predictable absorption" },
{ type:"bullet", text:"Minimal reaction, non-carcinogenic, non-allergenic" },
{ type:"bullet", text:"Easy to handle, secure knots, inexpensive" },
],
"Sutures", card++, TOTAL
);
// ─── SECTION 6: IV & BLOOD TRANSFUSION ───────────────────────────
sectionSlide(6, "IV Sets & Blood Transfusion", [
"Blood Transfusion Set — Filter & Duration",
"Types of Transfusion Reactions",
"Management of Transfusion Reaction",
"IV Infusion Sets — Macro vs Microdrip",
"IV Drip Rate Calculation",
]);
flashcard(
"Why does a blood transfusion set have a filter? What is the maximum duration per unit?",
[
{ type:"heading", text:"FILTER (170-200 micron mesh):" },
{ type:"normal", text:"Removes microaggregates (fibrin strands, platelet clumps, denatured proteins) that form in stored blood → prevents microemboli and transfusion-related lung injury (TRALI)" },
{ type:"heading", text:"MAXIMUM DURATION:" },
{ type:"green", text:"4 hours from removal from blood bank fridge" },
{ type:"highlight", text:"Beyond 4 h: bacterial proliferation risk → transfusion-transmitted bacteraemia" },
{ type:"heading", text:"Drip rate: 15 drops/mL (macrodrip)" },
],
"IV & Blood Transfusion", card++, TOTAL
);
flashcard(
"Classify blood transfusion reactions with mechanism and onset",
[
{ type:"bullet", text:"Acute Hemolytic: ABO incompatibility (wrong blood) — MOST DANGEROUS, immediate" },
{ type:"bullet", text:"Febrile Non-Hemolytic: Cytokines in stored blood — MOST COMMON" },
{ type:"bullet", text:"Allergic/Anaphylaxis: Anti-IgA antibodies (IgA-deficient patients)" },
{ type:"bullet", text:"TRALI: Anti-HLA antibodies → lung injury, within 6 h" },
{ type:"bullet", text:"TACO: Circulatory overload (elderly, cardiac patients)" },
{ type:"bullet", text:"Delayed Hemolytic: 3-10 days (alloantibodies from prior sensitization)" },
{ type:"highlight", text:"Septic: Bacterial contamination — Yersinia, Pseudomonas" },
],
"IV & Blood Transfusion", card++, TOTAL
);
flashcard(
"What should you do if a transfusion reaction is suspected?",
[
{ type:"heading", text:"IMMEDIATE STEPS:" },
{ type:"highlight", text:"1. STOP the transfusion immediately" },
{ type:"bullet", text:"2. Keep IV access — run normal saline" },
{ type:"bullet", text:"3. Check: patient ID vs blood bag label (rule out wrong blood)" },
{ type:"bullet", text:"4. Notify blood bank and senior" },
{ type:"heading", text:"SAMPLES TO SEND:" },
{ type:"bullet", text:"Blood bag + giving set, patient blood (EDTA + clot tube), urine" },
{ type:"heading", text:"TREATMENT:" },
{ type:"bullet", text:"Antihistamine (urticaria), Steroids, Adrenaline (anaphylaxis), Furosemide (TACO)" },
],
"IV & Blood Transfusion", card++, TOTAL
);
flashcard(
"How do you calculate IV drip rate? What is the difference between macrodrip and microdrip sets?",
[
{ type:"heading", text:"FORMULA:" },
{ type:"green", text:"Drops/min = (Volume mL × Drop factor) ÷ Time (min)" },
{ type:"normal", text:"Example: 1000 mL NS over 8 hrs, 20 drops/mL set:" },
{ type:"normal", text:"= (1000 × 20) ÷ 480 = 41.7 ≈ 42 drops/min" },
{ type:"heading", text:"MACRODRIP vs MICRODRIP:" },
{ type:"bullet", text:"Macrodrip: 10, 15, or 20 drops/mL — adult fluid replacement" },
{ type:"bullet", text:"Microdrip: 60 drops/mL — pediatric/precise dosing" },
{ type:"normal", text:"Blood transfusion set: 15 drops/mL with 170-200 µm filter" },
],
"IV & Blood Transfusion", card++, TOTAL
);
// ─── SECTION 7: NEEDLES & BLOOD COLLECTION ───────────────────────
sectionSlide(7, "Needles, Vacutainers & Blades", [
"Needle Gauge Color Coding & Uses",
"Vacutainer Tube Colors & Tests",
"Order of Draw",
"Surgical Blade Numbers & Uses",
"Safe Blade Mounting & Removal",
]);
flashcard(
"What do needle gauge colors mean and which gauge is used for what?",
[
{ type:"bullet", text:"Orange 25G: SC injection (insulin, heparin)" },
{ type:"bullet", text:"Blue 23G: SC injection, intradermal tests" },
{ type:"bullet", text:"Green 21G: IM injection, blood drawing (standard)" },
{ type:"bullet", text:"Pink 18G: IV cannulation, thick drugs (IM), blood drawing" },
{ type:"bullet", text:"Grey 16G: Rapid IV fluid infusion" },
{ type:"heading", text:"GAUGE RULE (paradoxical):" },
{ type:"highlight", text:"LARGER gauge number = SMALLER diameter (BWG system)" },
{ type:"normal", text:"25G is finer than 18G; based on Birmingham Wire Gauge" },
],
"Needles & Vacutainers", card++, TOTAL
);
flashcard(
"What is the order of draw for vacutainer blood collection and why?",
[
{ type:"heading", text:"ORDER OF DRAW:" },
{ type:"bullet", text:"1. Blood culture bottles (aerobic then anaerobic)" },
{ type:"green", text:"2. Blue (Sodium Citrate) — must be FIRST clear tube" },
{ type:"bullet", text:"3. Red/Gold (Serum — plain or SST)" },
{ type:"bullet", text:"4. Green (Lithium Heparin)" },
{ type:"bullet", text:"5. Purple/Lavender (EDTA)" },
{ type:"bullet", text:"6. Grey (Fluoride Oxalate)" },
{ type:"heading", text:"WHY THIS ORDER?" },
{ type:"highlight", text:"Prevents additive carryover between tubes that interferes with tests" },
],
"Needles & Vacutainers", card++, TOTAL
);
flashcard(
"Which surgical blade is used for which incision? How do you safely mount a blade?",
[
{ type:"bullet", text:"No. 10: Large curved belly — general skin/subcutaneous incision" },
{ type:"bullet", text:"No. 11: Pointed straight — stab incisions, abscess drainage, arteriotomy" },
{ type:"bullet", text:"No. 15: Small curve — delicate face/hand surgery, lesion excision" },
{ type:"bullet", text:"No. 20/22: Large — major incisions, amputation" },
{ type:"bullet", text:"No. 12: Sickle — ENT/tonsillectomy, inaccessible areas" },
{ type:"heading", text:"SAFE MOUNTING/REMOVAL:" },
{ type:"green", text:"Always use a NEEDLE HOLDER — never fingers (sharps injury!)" },
{ type:"bullet", text:"Handle 3 = blades 10,11,12,15 | Handle 4 = blades 20-24" },
],
"Needles & Vacutainers", card++, TOTAL
);
// ─── SECTION 8: MEDICATIONS ──────────────────────────────────────
sectionSlide(8, "Medications & Fluids", [
"Paracetamol IV — Mechanism, Dose, Antidote",
"Glycerin — Uses & Mechanism",
"Neomycin Ointment — Class, Coverage, Why Topical Only",
"Local Anaesthetics — Mechanism & Max Doses",
"Ampoule vs Vial Differences",
]);
flashcard(
"What is the mechanism of IV Paracetamol? What is the antidote for overdose?",
[
{ type:"heading", text:"MECHANISM OF ACTION:" },
{ type:"bullet", text:"Central COX inhibition (COX-1/COX-2) — prostaglandin synthesis" },
{ type:"bullet", text:"Activates descending serotonergic pain inhibitory pathway" },
{ type:"bullet", text:"AM404 metabolite → endocannabinoid system activation" },
{ type:"highlight", text:"Minimal peripheral anti-inflammatory action (unlike NSAIDs)" },
{ type:"heading", text:"DOSE: 1g IV over 15 min every 6 hours (max 4g/day)" },
{ type:"heading", text:"ANTIDOTE FOR OVERDOSE:" },
{ type:"green", text:"N-Acetylcysteine (NAC) — replenishes glutathione, prevents NAPQI toxicity → centrilobular hepatic necrosis" },
],
"Medications & Fluids", card++, TOTAL
);
flashcard(
"What is the mechanism of local anaesthetics? What are the maximum doses for Lignocaine?",
[
{ type:"heading", text:"MECHANISM:" },
{ type:"normal", text:"Block voltage-gated Na+ channels in neuronal membrane → prevent depolarization → block nerve impulse conduction. Effect is REVERSIBLE." },
{ type:"heading", text:"MAXIMUM DOSES — LIGNOCAINE (Lidocaine):" },
{ type:"green", text:"Plain: 3-4 mg/kg" },
{ type:"green", text:"With Adrenaline (1:200,000): 7 mg/kg" },
{ type:"heading", text:"BUPIVACAINE (longer acting 4-8 h):" },
{ type:"bullet", text:"Max dose: 2 mg/kg (with or without adrenaline)" },
{ type:"highlight", text:"Why adrenaline increases dose? Vasoconstriction reduces absorption, prolongs effect" },
],
"Medications & Fluids", card++, TOTAL
);
flashcard(
"Why is Neomycin only used topically? What class is it and what does it cover?",
[
{ type:"heading", text:"CLASS: Aminoglycoside antibiotic" },
{ type:"normal", text:"Mechanism: Binds 30S ribosomal subunit → misreading of mRNA → aberrant non-functional proteins → bactericidal" },
{ type:"heading", text:"WHY TOPICAL ONLY?" },
{ type:"highlight", text:"Systemic aminoglycosides → nephrotoxicity (proximal tubule necrosis) + irreversible ototoxicity (cochlear & vestibular)" },
{ type:"heading", text:"COVERAGE:" },
{ type:"bullet", text:"Gram-negative: E. coli, Klebsiella, Proteus, Pseudomonas (variable)" },
{ type:"bullet", text:"Staphylococcus aureus (gram-positive exception)" },
{ type:"highlight", text:"NOT effective against Streptococci or anaerobes" },
],
"Medications & Fluids", card++, TOTAL
);
flashcard(
"What is the difference between an ampoule and a vial? What is glycerin used for?",
[
{ type:"heading", text:"AMPOULE vs VIAL:" },
{ type:"bullet", text:"Ampoule: Sealed glass, broken at neck to open, single-use only" },
{ type:"bullet", text:"Vial: Rubber stopper + crimp cap, can be multi-dose (with preservative)" },
{ type:"bullet", text:"Vials can contain lyophilized (freeze-dried) powder or solution" },
{ type:"heading", text:"GLYCERIN USES:" },
{ type:"bullet", text:"Lubricant for catheters, endoscopes, speculums" },
{ type:"bullet", text:"Glycerin suppository/enema: osmotic laxative (draws water into rectum)" },
{ type:"bullet", text:"Skin moisturizer/humectant in topical preparations" },
{ type:"green", text:"IV Glycerol: cerebral oedema management (osmotherapy)" },
],
"Medications & Fluids", card++, TOTAL
);
// ─── TABLE SLIDES ─────────────────────────────────────────────────
tableSlide(
"Vacutainer Tube Color Reference",
["Color", "Additive", "Sample Type", "Tests"],
[
["Red / Plain", "None / Clot activator", "Serum", "LFT, RFT, Cardiac enzymes, Serology"],
["Gold (SST)", "Gel + Clot activator", "Serum separator", "Biochemistry panel"],
["Purple (EDTA)", "EDTA (Ca chelator)", "Whole blood", "CBC, Blood group, HbA1c"],
["Light Blue", "Sodium Citrate 3.2%", "Plasma", "PT/INR, APTT, Fibrinogen, D-dimer"],
["Green", "Lithium Heparin", "Plasma", "ABG, Ammonia, Chromosomes"],
["Grey", "KOx + NaF (fluoride)", "Whole blood", "Blood glucose (fluoride inhibits glycolysis)"],
["Black", "Sodium Citrate 3.8%", "Whole blood", "ESR"],
],
"Quick Reference"
);
tableSlide(
"Suture Selection by Tissue",
["Tissue", "Preferred Suture", "Rationale"],
[
["Skin", "Nylon 3-0/4-0, Prolene, Monocryl (subcuticular)", "Non-absorbable — skin heals with minimal support needed long-term"],
["Subcutaneous", "Vicryl 2-0, 3-0", "Absorbable — eliminates dead space, absorbed cleanly"],
["Fascia", "PDS (polydioxanone)", "Long tensile strength retention (42 days at 50%)"],
["Bowel", "Vicryl 2-0, 3-0", "Absorbable, minimal reaction, strength adequate for healing"],
["Vascular anastomosis", "Prolene 4-0 to 7-0", "Non-thrombogenic, monofilament, permanent strength"],
["Tendon", "Ethibond (polyester) / PDS", "High tensile strength, low stretch"],
["Nerve", "Nylon 8-0 to 10-0", "Monofilament, precise, minimal reaction"],
],
"Quick Reference"
);
tableSlide(
"Monopolar vs Bipolar Diathermy — At a Glance",
["Feature", "Monopolar", "Bipolar"],
[
["Current path", "Active tip → through patient body → return pad", "Only between the two tips of bipolar forceps"],
["Return pad (grounding plate)", "REQUIRED on thigh/back", "NOT required"],
["Pacemaker safety", "RISK — avoid or reprogram pacemaker", "SAFE"],
["Near metallic implants", "Caution required", "Safe"],
["Use near penis/nerves", "AVOID (circumferential burn risk)", "PREFERRED"],
["Uses", "Cutting, general coagulation, laparoscopy", "Neurosurgery, fallopian tube, fine tissue"],
["Power requirement", "Higher output needed", "Lower (localised tissue)"],
],
"Quick Reference"
);
tableSlide(
"Surgical Instrument Quick Reference",
["Instrument", "Key Feature", "Primary Use"],
[
["Backhaus Towel Clamp", "Sharp piercing tips; once applied cannot reposition", "Securing sterile drapes to patient"],
["Mosquito Forceps", "Smallest artery forceps (5-6 inch)", "Fine/superficial vessel hemostasis"],
["Kelly Forceps", "Half-serrated jaw (distal half only)", "Medium vessel hemostasis"],
["Crile Forceps", "Fully serrated jaw entire length", "Medium-large vessel hemostasis"],
["Rochester-Pean", "Large, heavy, fully serrated", "Major vessel hemostasis"],
["Adson Forceps", "Fine toothed (1x2 teeth), slim handle", "Delicate skin closure (face/hand)"],
["DeBakey Forceps", "Fine longitudinal serrations, non-toothed", "Atraumatic vessel/anastomosis handling"],
["Mayo-Hegar Needle Holder", "Short wide cross-serrated jaw, ring handle", "Driving suture needle"],
],
"Quick Reference"
);
// ─── FINAL REVISION SUMMARY SLIDE ────────────────────────────────
const finalSlide = pres.addSlide();
finalSlide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: C.navy }, line:{ color: C.navy } });
finalSlide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:0.12, fill:{ color: C.gold }, line:{ color: C.gold } });
finalSlide.addShape(pres.shapes.RECTANGLE, { x:0, y:5.2, w:10, h:0.425, fill:{ color: C.teal }, line:{ color: C.teal } });
finalSlide.addText("RAPID REVISION", {
x:0.5, y:0.25, w:9, h:0.5,
fontSize:14, bold:true, color:C.gold, fontFace:"Calibri",
align:"center", charSpacing:6, margin:0
});
finalSlide.addText("Key Facts to Remember", {
x:0.5, y:0.75, w:9, h:0.55,
fontSize:26, bold:true, color:C.white, fontFace:"Calibri",
align:"center", margin:0
});
const facts = [
["Backhaus clamp", "Once applied to skin — CANNOT be repositioned (sterile field broken)"],
["Kelly vs Crile", "Kelly = HALF serrated | Crile = FULLY serrated"],
["Foley balloon", "10 mL sterile WATER (never saline — crystallizes)"],
["NG tube confirm", "pH ≤5.5 = gastric | CXR = gold standard | Whoosh test = UNRELIABLE"],
["ETT cuff pressure", "20-30 cmH2O — <20 = aspiration risk, >30 = tracheal stenosis"],
["Chest drain site", "5th ICS mid-axillary (Safe Triangle) — insert ABOVE rib (VAN bundle below)"],
["Diathermy modes", "Cut = continuous wave | Coag = interrupted damped wave"],
["Vacutainer order", "Blood cultures → Blue → Red → Green → Purple → Grey"],
["PDS suture", "Best for fascia — 180-210 day absorption, 50% strength at 42 days"],
["Lignocaine dose", "Plain: 3-4 mg/kg | With adrenaline: 7 mg/kg"],
];
const col1Facts = facts.slice(0, 5);
const col2Facts = facts.slice(5);
col1Facts.forEach((f, i) => {
const yPos = 1.42 + i * 0.77;
finalSlide.addShape(pres.shapes.RECTANGLE, { x:0.25, y:yPos, w:4.55, h:0.65, fill:{ color:"122035" }, line:{ color:"1A7A6E", size:0.8 } });
finalSlide.addText([
{ text: f[0] + ": ", options:{ bold:true, color:C.gold, fontSize:11, fontFace:"Calibri" } },
{ text: f[1], options:{ color:C.white, fontSize:11, fontFace:"Calibri" } },
], { x:0.35, y:yPos+0.05, w:4.3, h:0.55, valign:"middle", margin:0, wrap:true });
});
col2Facts.forEach((f, i) => {
const yPos = 1.42 + i * 0.77;
finalSlide.addShape(pres.shapes.RECTANGLE, { x:5.2, y:yPos, w:4.55, h:0.65, fill:{ color:"122035" }, line:{ color:"1A7A6E", size:0.8 } });
finalSlide.addText([
{ text: f[0] + ": ", options:{ bold:true, color:C.gold, fontSize:11, fontFace:"Calibri" } },
{ text: f[1], options:{ color:C.white, fontSize:11, fontFace:"Calibri" } },
], { x:5.3, y:yPos+0.05, w:4.3, h:0.55, valign:"middle", margin:0, wrap:true });
});
finalSlide.addText("Good Luck with Your Viva!", {
x:0.5, y:5.2, w:9, h:0.425,
fontSize:14, bold:true, color:C.white, fontFace:"Calibri",
align:"center", valign:"middle", margin:0
});
// ─── WRITE FILE ───────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/viva-flashcards/Surgical_Viva_Flashcards.pptx" })
.then(() => console.log("SUCCESS: Surgical_Viva_Flashcards.pptx written"))
.catch(e => console.error("ERROR:", e));