Please provide notes on pacemaker troubleshooting
"pacemaker" AND "troubleshooting" AND "malfunction"
| Cause | Notes |
|---|---|
| Lead dislodgement | Most common cause; most likely in first month post-implant |
| Lead fracture / insulation break | Occurs at stress points — attachment to pulse generator or abrupt angulations; current leakage detected on interrogation |
| Lead–header connection problem | Inadequate contact between lead and generator header |
| Output programmed below threshold | Pacing output < capture threshold |
| Exit block | Adequate stimulus fails to capture due to endocardial changes — ischemia/infarction, hyperkalemia, class III antiarrhythmics (e.g., amiodarone) |
| Battery depletion | Gradual decline; output eventually falls below threshold |
| Functional failure to capture | Pacing spike falls within refractory period (physiologic, from undersensing) — not true malfunction |
Note: Auto-threshold algorithms in modern devices can detect and compensate for threshold elevation by automatically adjusting output.
A spike falling during the ventricular refractory period that does not produce a complex is not failure to pace — it is a normal consequence of undersensing.
| Cause | Mechanism |
|---|---|
| Pacemaker-mediated tachycardia (PMT) | PVC → retrograde VA conduction → atrial depolarization outside PVARP → tracked by device → VP → cycle repeats ("endless loop") |
| Tracking atrial arrhythmias | Atrial flutter/fibrillation waves sensed and tracked at upper rate limit (prevented by mode switch) |
| Runaway pacemaker | Rate above upper limit; rare; battery failure or external interference; magnet application may terminate |
| Sensor-driven pacing | Rate-responsive sensor (e.g., accelerometer) drives rate inappropriately |
| Rate smoothing algorithms | Designed to prevent abrupt rate changes |

| Test | Purpose |
|---|---|
| Chest radiograph | Lead tip position, fracture, number of leads, lead–generator connection |
| 12-lead ECG + rhythm strip | Pattern of malfunction (sensing vs. capture vs. rate) |
| Device interrogation | Battery status, lead impedances, pacing/sensing thresholds, stored electrograms, active algorithms |
| Magnet application | Converts to asynchronous mode → assesses capture; terminates PMT/runaway pacemaker |
A ventricular lead tip in the RVOT or atrial lead in the SVC or RV on CXR is always abnormal.
| Problem | Causes |
|---|---|
| Failure to capture | Lead disconnection/break/displacement, exit block, battery depletion |
| Undersensing | Lead displacement, inadequate endocardial contact, low-voltage P/QRS, lead fracture |
| Oversensing | Extracardiac signals (myopotentials), T-wave sensing |
| Inappropriate rate | Battery depletion, VA conduction with PMT, 1:1 response to atrial arrhythmias |
Please make ppt on subcutaneous icd
subcutaneous ICD device implant anatomy lead position
node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.…
mkdir -p /home/daytona/workspace/sicd-ppt && node /home/daytona/skills/shared/sc…
~/sicd-ppt/build.js
const pptxgen = require("pptxgenjs");
const fs = require("fs");
// Load images
const images = JSON.parse(fs.readFileSync("/home/daytona/workspace/sicd-ppt/images.json"));
const img0 = images[0].base64; // CXR showing S-ICD placement
const img1 = images[1].base64; // Lateral CXR S-ICD
const img2 = images[2].base64; // Braunwald comparison diagram
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Subcutaneous ICD (S-ICD)";
pres.author = "Orris Medical";
// ─── Color palette ───────────────────────────────────────────
const NAVY = "0A1F44"; // dominant dark background
const TEAL = "00A8A8"; // accent / highlights
const WHITE = "FFFFFF";
const LIGHT = "D6EAF8"; // soft highlight
const GRAY = "B0BEC5";
const AMBER = "FFC107"; // warning / caution callouts
// ─── Reusable helpers ────────────────────────────────────────
function addHeader(slide, title, subtitle) {
// dark header band
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 1.2,
fill: { color: NAVY },
line: { color: NAVY }
});
slide.addText(title, {
x: 0.3, y: 0.1, w: 9.4, h: 0.7,
fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.3, y: 0.78, w: 9.4, h: 0.38,
fontSize: 13, color: TEAL, fontFace: "Calibri", italic: true, margin: 0
});
}
// teal accent line
slide.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 1.2, w: 10, h: 0.07,
fill: { color: TEAL }, line: { color: TEAL }
});
}
function bullet(text, level) {
return { text, options: { bullet: { indent: 15 }, indentLevel: level || 0, breakLine: true, fontSize: 14, color: "1A1A2E", fontFace: "Calibri" } };
}
function bulletBold(text) {
return { text, options: { bullet: { indent: 15 }, bold: true, breakLine: true, fontSize: 14, color: NAVY, fontFace: "Calibri" } };
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 1 – Title ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
// full background
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY }, line: { color: NAVY } });
// teal band on left
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: TEAL }, line: { color: TEAL } });
// decorative circle
s.addShape(pres.shapes.OVAL, { x: 6.8, y: 0.2, w: 3.5, h: 3.5, fill: { color: "0D2B5E", transparency: 30 }, line: { color: TEAL, pt: 2 } });
s.addText("Subcutaneous ICD", {
x: 0.5, y: 1.1, w: 6.8, h: 1.3,
fontSize: 40, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
s.addText("S-ICD", {
x: 0.5, y: 2.35, w: 4, h: 0.7,
fontSize: 30, bold: true, color: TEAL, fontFace: "Calibri", margin: 0
});
s.addText("A Comprehensive Clinical Overview", {
x: 0.5, y: 3.0, w: 6.5, h: 0.5,
fontSize: 17, color: GRAY, fontFace: "Calibri", italic: true, margin: 0
});
s.addText("Cardiology · Electrophysiology", {
x: 0.5, y: 4.9, w: 6, h: 0.4,
fontSize: 12, color: GRAY, fontFace: "Calibri", margin: 0
});
// embed CXR image in the circle area
s.addImage({ data: img0, x: 7.0, y: 0.4, w: 2.8, h: 3.0, rounding: true });
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 2 – What is the S-ICD? ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "What is the S-ICD?", "Entirely subcutaneous — no transvenous leads");
// Left text column
s.addText([
bulletBold("Definition"),
bullet("A fully subcutaneous implantable cardioverter-defibrillator — no intravascular or intracardiac leads", 1),
bullet("Generator placed in left lateral subcutaneous tissue", 1),
bullet("Single lead tunneled along left parasternal border", 1),
{ text: "", options: { breakLine: true } },
bulletBold("Key Components"),
bullet("Pulse generator (PG): larger than transvenous ICD — houses bigger battery + capacitors", 1),
bullet("Subcutaneous sensing/defibrillation lead with 3 sensing electrodes", 1),
{ text: "", options: { breakLine: true } },
bulletBold("Primary Function"),
bullet("Detects and terminates ventricular tachycardia (VT) and ventricular fibrillation (VF)", 1),
bullet("Delivers up to 80 J defibrillation shocks subcutaneously", 1),
bullet("Does NOT provide ATP, resynchronization, or chronic bradycardia pacing", 1),
], { x: 0.3, y: 1.4, w: 5.6, h: 4.0, valign: "top" });
// Image right side
s.addImage({ data: img1, x: 6.0, y: 1.4, w: 3.7, h: 3.6 });
s.addText("Lateral CXR — S-ICD generator & parasternal lead", {
x: 5.9, y: 5.0, w: 4.0, h: 0.4,
fontSize: 9, color: GRAY, italic: true, fontFace: "Calibri"
});
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 3 – Anatomy & Implant Position ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "Anatomy & Implant Position", "Key anatomical landmarks for S-ICD placement");
s.addImage({ data: img0, x: 0.3, y: 1.4, w: 4.3, h: 3.8 });
s.addText("PA CXR: Generator in left mid-axillary region;\nlead ascending along left parasternal border (arrows)", {
x: 0.3, y: 5.2, w: 4.3, h: 0.3, fontSize: 9, color: GRAY, italic: true, fontFace: "Calibri"
});
// Right side info boxes
const boxes = [
{ label: "Generator", text: "Subcutaneous pocket, left mid-axillary line, 5th–6th intercostal space", y: 1.5 },
{ label: "Lead", text: "Tunneled subcutaneously → xiphoid → ascending parasternal border toward manubrium", y: 2.5 },
{ label: "Sensing Electrodes", text: "3 electrodes: distal tip, proximal ring, device can — form 2 sensing vectors", y: 3.5 },
{ label: "Screening", text: "Pre-implant ECG screening required to assess T-wave oversensing & R-wave double-counting", y: 4.5 },
];
boxes.forEach(b => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 4.8, y: b.y, w: 4.9, h: 0.82, fill: { color: WHITE }, line: { color: TEAL, pt: 1.5 }, rectRadius: 0.08, shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.1 } });
s.addText([{ text: b.label + ": ", options: { bold: true, color: NAVY } }, { text: b.text, options: { color: "333333" } }], { x: 4.95, y: b.y + 0.07, w: 4.6, h: 0.68, fontSize: 12, fontFace: "Calibri", valign: "middle" });
});
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 4 – Indications ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "Indications for S-ICD", "Patient selection criteria");
// Green "ideal" column
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.4, w: 4.3, h: 3.9, fill: { color: "E8F5E9" }, line: { color: "2E7D32", pt: 1.5 } });
s.addText("✔ IDEAL CANDIDATES", { x: 0.4, y: 1.45, w: 4.1, h: 0.45, fontSize: 13, bold: true, color: "2E7D32", fontFace: "Calibri", margin: 0 });
s.addText([
bullet("No need for pacing (anti-tachycardia pacing [ATP], resynchronization, or bradycardia pacing)"),
bullet("Young patients to avoid transvenous lead complications over lifetime"),
bullet("Patients with limited venous access or congenital heart disease"),
bullet("Prior device infection where new transvenous system is risky"),
bullet("Channelopathies: Brugada syndrome, LQTS, HCM"),
bullet("Hypertrophic cardiomyopathy (HCM)"),
bullet("Patients at high risk of lead-related complications (e.g. dialysis patients)"),
], { x: 0.4, y: 1.9, w: 4.1, h: 3.3, valign: "top" });
// Red "avoid" column
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 1.4, w: 4.3, h: 3.9, fill: { color: "FFEBEE" }, line: { color: "C62828", pt: 1.5 } });
s.addText("✘ AVOID / CONTRAINDICATIONS", { x: 5.4, y: 1.45, w: 4.1, h: 0.45, fontSize: 13, bold: true, color: "C62828", fontFace: "Calibri", margin: 0 });
s.addText([
bullet("Indication for anti-bradycardia pacing"),
bullet("Indication for CRT (cardiac resynchronization therapy)"),
bullet("Hemodynamically stable, pace-terminable VT requiring ATP"),
bullet("Fails pre-implant ECG screening (7–10% of candidates)"),
bullet("Patients needing His-bundle or LBB pacing"),
], { x: 5.4, y: 1.9, w: 4.1, h: 3.3, valign: "top" });
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 5 – S-ICD vs Transvenous ICD Comparison ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "S-ICD vs Transvenous ICD", "System selection comparison");
// Table
const rows = [
[{ text: "Feature", options: { bold: true, color: WHITE } }, { text: "S-ICD", options: { bold: true, color: WHITE } }, { text: "Transvenous ICD", options: { bold: true, color: WHITE } }],
["Lead type", "Subcutaneous only", "Intravascular + intracardiac"],
["Pacing (bradycardia)", "No (30 s post-shock only)", "Yes"],
["Anti-tachycardia pacing (ATP)", "No", "Yes"],
["CRT capability", "No", "Yes"],
["MRI compatibility", "Conditional", "Conditional"],
["Lead extraction risk", "Lower — no intravascular lead", "Higher — vascular extraction risk"],
["Inappropriate shocks (yr 1)", "5–10%", "<2%"],
["Pocket infection rate", "~1.1%", "Higher"],
["Systemic infection", "Not reported", "Possible"],
["Battery longevity", "Shorter", "Longer"],
["Vascular access complications", "None (no venous access)", "Pneumothorax, cardiac perforation"],
];
s.addTable(rows, {
x: 0.3, y: 1.35, w: 9.4, h: 4.05,
rowH: 0.32,
fontSize: 11,
fontFace: "Calibri",
border: { pt: 0.5, color: "BDBDBD" },
fill: "FFFFFF",
color: "1A1A2E",
align: "left",
valign: "middle",
colW: [2.2, 3.3, 3.9],
autoPage: false,
});
// Override header row fill manually via first row styling
// (pptxgenjs uses first row options from rows[0] cell options — just set fill on header row)
// Add header row overlay
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.35, w: 9.4, h: 0.32, fill: { color: NAVY }, line: { color: NAVY } });
s.addText("Feature", { x: 0.35, y: 1.38, w: 2.1, h: 0.28, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
s.addText("S-ICD", { x: 2.55, y: 1.38, w: 3.2, h: 0.28, fontSize: 11, bold: true, color: TEAL, fontFace: "Calibri", align: "center", margin: 0 });
s.addText("Transvenous ICD", { x: 5.85, y: 1.38, w: 3.8, h: 0.28, fontSize: 11, bold: true, color: AMBER, fontFace: "Calibri", align: "center", margin: 0 });
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 6 – Sensing & Detection ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "Sensing & Detection", "Dynamic sensing to detect VT/VF while avoiding oversensing");
const cards = [
{ title: "3 Sensing Vectors", body: "Distal tip → can\nProximal ring → can\nDistal tip → proximal ring\n\nBest vector chosen at implant", x: 0.3, y: 1.45, c: "E3F2FD" },
{ title: "Pre-implant Screening", body: "Surface ECG screening using 3 sensing vectors\n7–10% of candidates fail screening\nAssesses R:T wave ratio to predict oversensing", x: 3.55, y: 1.45, c: "E8F5E9" },
{ title: "Dynamic Sensing", body: "Sensitivity adjusts after each sensed event\nPrevents T-wave oversensing\nTailored to variable VF signal amplitude", x: 6.8, y: 1.45, c: "FFF8E1" },
{ title: "SMART Pass™ / Morphology Filter", body: "Manufacturer algorithms compare EGM morphology to template\nReduces inappropriate therapy for SVT and AF\nDifferentiates R waves from T waves by dV/dt", x: 0.3, y: 3.5, c: "FCE4EC" },
{ title: "Detection Zones", body: "Conditional zone: morphology discrimination applied\nShock zone: immediate therapy — no delay\nDuration criteria: number of fast intervals required", x: 3.55, y: 3.5, c: "EDE7F6" },
{ title: "Post-shock Pacing", body: "30 seconds of transcutaneous backup pacing at 50 bpm post-shock\nNOT a substitute for permanent bradycardia pacing", x: 6.8, y: 3.5, c: "E0F2F1" },
];
cards.forEach(card => {
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: card.x, y: card.y, w: 3.0, h: 1.85, fill: { color: card.c }, line: { color: TEAL, pt: 1 }, rectRadius: 0.1, shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.12 } });
s.addText(card.title, { x: card.x + 0.1, y: card.y + 0.08, w: 2.8, h: 0.38, fontSize: 12, bold: true, color: NAVY, fontFace: "Calibri", margin: 0 });
s.addText(card.body, { x: card.x + 0.1, y: card.y + 0.45, w: 2.8, h: 1.35, fontSize: 10.5, color: "333333", fontFace: "Calibri", valign: "top" });
});
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 7 – Advantages ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY }, line: { color: NAVY } });
// teal accent
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: TEAL }, line: { color: TEAL } });
s.addText("Advantages of S-ICD", { x: 0.4, y: 0.25, w: 9, h: 0.7, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 0.95, w: 9, h: 0.05, fill: { color: TEAL }, line: { color: TEAL } });
const advs = [
{ icon: "★", title: "No transvenous leads", desc: "Eliminates vascular access complications (pneumothorax, cardiac perforation, venous thrombosis)" },
{ icon: "★", title: "Lower systemic infection risk", desc: "No intravascular hardware — pocket infection rate ~1.1%; systemic infections not reported in major series" },
{ icon: "★", title: "No lead extraction hazard", desc: "Lead removal is straightforward subcutaneous procedure — avoids high-risk transvenous extraction" },
{ icon: "★", title: "Preserved venous access", desc: "All central veins remain intact for future IV access, hemodialysis, or future CRT if needed" },
{ icon: "★", title: "Ideal for young/channelopathy patients", desc: "Avoids decades of transvenous lead failure risk in Brugada, LQTS, HCM, ARVC patients" },
{ icon: "★", title: "Reduced procedural risk", desc: "Implant does not require fluoroscopy; no intravascular manipulation" },
];
advs.forEach((a, i) => {
const col = i < 3 ? 0 : 1;
const row = i % 3;
const x = 0.4 + col * 5.0;
const y = 1.15 + row * 1.42;
s.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.7, h: 1.28, fill: { color: "0D2B5E" }, line: { color: TEAL, pt: 1 } });
s.addText(a.icon + " " + a.title, { x: x + 0.15, y: y + 0.08, w: 4.4, h: 0.38, fontSize: 13, bold: true, color: TEAL, fontFace: "Calibri", margin: 0 });
s.addText(a.desc, { x: x + 0.15, y: y + 0.44, w: 4.4, h: 0.75, fontSize: 11, color: GRAY, fontFace: "Calibri", valign: "top" });
});
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 8 – Limitations & Complications ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "Limitations & Complications", "Compared with transvenous ICD systems");
// Limitations box left
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.4, w: 4.4, h: 3.9, fill: { color: "FFF9C4" }, line: { color: "F9A825", pt: 1.5 } });
s.addText("⚠ LIMITATIONS", { x: 0.4, y: 1.45, w: 4.1, h: 0.42, fontSize: 13, bold: true, color: "E65100", fontFace: "Calibri", margin: 0 });
s.addText([
bullet("No anti-tachycardia pacing (ATP)"),
bullet("No anti-bradycardia pacing (permanent)"),
bullet("No cardiac resynchronization therapy (CRT)"),
bullet("Higher rate of inappropriate shocks: 5–10% vs <2%/year for transvenous ICD"),
bullet("7–10% of candidates fail pre-implant ECG screening"),
bullet("Larger generator size — more conspicuous pocket"),
bullet("Shorter battery longevity than transvenous ICD"),
bullet("Cannot deliver ATP for pace-terminable VT"),
], { x: 0.4, y: 1.9, w: 4.2, h: 3.25, valign: "top" });
// Complications box right
s.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 1.4, w: 4.4, h: 3.9, fill: { color: "FFEBEE" }, line: { color: "C62828", pt: 1.5 } });
s.addText("✘ COMPLICATIONS", { x: 5.3, y: 1.45, w: 4.1, h: 0.42, fontSize: 13, bold: true, color: "C62828", fontFace: "Calibri", margin: 0 });
s.addText([
bullet("Inappropriate shocks — most common complication"),
bullet(" • T-wave oversensing"),
bullet(" • Myopotential oversensing"),
bullet(" • Double R-wave counting"),
bullet("Pocket infection: ~1.1% (lower than transvenous)"),
bullet("Lead migration / dislodgement"),
bullet("Pocket hematoma"),
bullet("Wound dehiscence"),
bullet("No vascular access, pneumothorax, or lead endocarditis"),
], { x: 5.3, y: 1.9, w: 4.2, h: 3.25, valign: "top" });
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 9 – Inappropriate Shocks ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "Inappropriate Shocks", "The most important complication of S-ICD");
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.35, w: 9.4, h: 0.68, fill: { color: "FFCDD2" }, line: { color: "C62828", pt: 1 } });
s.addText("Rate: 5–10% in year 1 (vs. <2% with modern transvenous ICD). New sensing algorithms have reduced but not eliminated this risk.", {
x: 0.5, y: 1.43, w: 9.0, h: 0.54, fontSize: 13, bold: true, color: "B71C1C", fontFace: "Calibri", valign: "middle"
});
const causes = [
{ title: "T-wave oversensing", body: "Most common. S-ICD sees T-wave as a second R-wave → double counts → detects VF. Minimised by screening and sensing vector selection." },
{ title: "Myopotential oversensing", body: "Signals from chest wall muscles (pectoralis, diaphragm) sensed as cardiac activity. More common with unipolar or suboptimal vectors." },
{ title: "Supraventricular tachycardia (SVT)", body: "Rapid SVT/AF detected in shock zone before morphology discrimination can suppress therapy. Rate-based detection at limits." },
{ title: "R-wave double counting", body: "Wide QRS (LBBB, ventricular pacing) or fragmented QRS counted twice per beat — appears as VF rate. Detected by pre-implant screening." },
];
causes.forEach((c, i) => {
const x = 0.3 + (i % 2) * 4.85;
const y = 2.15 + Math.floor(i / 2) * 1.7;
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w: 4.5, h: 1.55, fill: { color: WHITE }, line: { color: TEAL, pt: 1.5 }, rectRadius: 0.1 });
s.addText(c.title, { x: x + 0.15, y: y + 0.1, w: 4.2, h: 0.38, fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri", margin: 0 });
s.addText(c.body, { x: x + 0.15, y: y + 0.46, w: 4.2, h: 1.0, fontSize: 11, color: "444444", fontFace: "Calibri", valign: "top" });
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 5.2, w: 9.4, h: 0.3, fill: { color: "E3F2FD" }, line: { color: TEAL, pt: 1 } });
s.addText("Prevention: Careful sensing vector selection at implant | SMART Pass algorithm | Conditional zone morphology discrimination", {
x: 0.4, y: 5.22, w: 9.1, h: 0.26, fontSize: 10, color: NAVY, fontFace: "Calibri", italic: true
});
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 10 – Pre-implant Screening ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "Pre-implant ECG Screening", "Mandatory before S-ICD implantation");
s.addText([
bulletBold("Purpose"),
bullet("Identify patients at high risk for inappropriate shocks from T-wave oversensing or R-wave double counting", 1),
bullet("7–10% of candidates fail and should not receive an S-ICD", 1),
{ text: "", options: { breakLine: true } },
bulletBold("Method — SICD Screening Tool"),
bullet("Electrode positions simulate S-ICD sensing vectors using surface ECG electrodes", 1),
bullet("Three sensing vectors tested in supine and standing positions", 1),
bullet("R:T amplitude ratio assessed — R wave must be clearly larger than T wave", 1),
bullet("At least one vector must pass in both positions", 1),
{ text: "", options: { breakLine: true } },
bulletBold("Causes of Screening Failure"),
bullet("Tall T-waves relative to R-waves (e.g., Brugada type I pattern, LVH, electrolyte disturbance)", 1),
bullet("Low-amplitude R waves", 1),
bullet("Wide QRS with morphology changes", 1),
{ text: "", options: { breakLine: true } },
bulletBold("Clinical Note"),
bullet("Screening should be repeated in different body positions and with exercise if borderline", 1),
bullet("Patients with channelopathies (Brugada) may have dynamic changes — screen at rest and provoked", 1),
], { x: 0.5, y: 1.4, w: 5.3, h: 4.0, valign: "top" });
// Right: summary info box
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 6.1, y: 1.4, w: 3.55, h: 3.9, fill: { color: NAVY }, line: { color: TEAL, pt: 2 }, rectRadius: 0.12 });
s.addText("Screening Pass Criteria", { x: 6.2, y: 1.55, w: 3.3, h: 0.45, fontSize: 14, bold: true, color: TEAL, fontFace: "Calibri", margin: 0, align: "center" });
s.addShape(pres.shapes.RECTANGLE, { x: 6.3, y: 2.0, w: 3.15, h: 0.04, fill: { color: TEAL }, line: { color: TEAL } });
const criteria = [
"≥1 of 3 sensing vectors must pass",
"Must pass in BOTH supine & standing",
"R wave clearly dominant over T wave",
"No R-wave double counting",
"Failure rate: 7–10%",
];
criteria.forEach((c, i) => {
s.addText("→ " + c, { x: 6.2, y: 2.18 + i * 0.58, w: 3.3, h: 0.5, fontSize: 12, color: WHITE, fontFace: "Calibri", valign: "middle" });
});
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 11 – Key Clinical Trials ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: "F4F7FA" }, line: { color: "F4F7FA" } });
addHeader(s, "Key Clinical Trials & Evidence", "Supporting evidence base for S-ICD");
const trials = [
{ name: "PRAETORIAN Trial (2020)", result: "Non-inferior to transvenous ICD for complications + inappropriate shocks over 4 years. S-ICD: 15.1% events vs TV-ICD: 15.7%", color: "E3F2FD" },
{ name: "UNTOUCHED Trial (2020)", result: "Inappropriate shock rate reduced to 4.0% at 18 months with dual-zone programming + SMART Pass in low-EF patients", color: "E8F5E9" },
{ name: "EFFORTLESS Registry", result: "Prospective S-ICD registry. Confirmed safety and efficacy. Inappropriate shock rate declined over time with improved algorithms", color: "FFF9C4" },
{ name: "Pooled S-ICD IDE Trial", result: "First pivotal trial. Conversion success 98.2% for induced VF. Appropriate therapy 100% at 11 months follow-up", color: "F3E5F5" },
];
trials.forEach((t, i) => {
const y = 1.4 + i * 1.04;
s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.3, y, w: 9.4, h: 0.95, fill: { color: t.color }, line: { color: TEAL, pt: 1 }, rectRadius: 0.08 });
s.addText(t.name, { x: 0.5, y: y + 0.08, w: 2.8, h: 0.38, fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri", margin: 0 });
s.addText(t.result, { x: 3.3, y: y + 0.08, w: 6.2, h: 0.78, fontSize: 12, color: "333333", fontFace: "Calibri", valign: "middle" });
});
s.addText("Source: Braunwald's Heart Disease 2024 | PRAETORIAN NEJM 2020 | UNTOUCHED JACC 2020", {
x: 0.3, y: 5.3, w: 9.4, h: 0.22, fontSize: 9, color: GRAY, italic: true, fontFace: "Calibri"
});
}
// ╔══════════════════════════════════════════════════════════╗
// ║ SLIDE 12 – Summary / Key Takeaways ║
// ╚══════════════════════════════════════════════════════════╝
{
const s = pres.addSlide();
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY }, line: { color: NAVY } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: TEAL }, line: { color: TEAL } });
s.addText("Key Takeaways", { x: 0.4, y: 0.2, w: 9, h: 0.65, fontSize: 28, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 0.85, w: 9, h: 0.06, fill: { color: TEAL }, line: { color: TEAL } });
const pts = [
"S-ICD uses no intravascular or intracardiac leads — generator in left lateral chest, lead along parasternal border.",
"Best for patients who need shock protection only — no pacing, ATP, or CRT required.",
"Eliminates transvenous lead complications: vascular injury, lead extraction risk, and systemic infection.",
"Pre-implant ECG screening is mandatory — 7–10% of candidates fail due to T-wave oversensing risk.",
"Inappropriate shocks (5–10%/yr) are the dominant complication; new sensing algorithms (SMART Pass) are reducing this.",
"PRAETORIAN trial confirmed non-inferiority to transvenous ICD for overall adverse events.",
"Future development: wireless pairing with leadless pacemakers will extend functionality to pacing-dependent patients.",
];
pts.forEach((p, i) => {
const y = 1.05 + i * 0.63;
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y, w: 0.45, h: 0.45, fill: { color: TEAL }, line: { color: TEAL } });
s.addText(String(i + 1), { x: 0.4, y: y + 0.02, w: 0.45, h: 0.41, fontSize: 14, bold: true, color: WHITE, align: "center", fontFace: "Calibri", margin: 0 });
s.addText(p, { x: 1.05, y: y + 0.03, w: 8.5, h: 0.5, fontSize: 12, color: WHITE, fontFace: "Calibri", valign: "middle" });
});
}
// ─── Write file ──────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/sicd-ppt/Subcutaneous_ICD.pptx" })
.then(() => console.log("PPTX written successfully"))
.catch(e => { console.error("Error:", e); process.exit(1); });