Hi
Im dr BHARATHWAJ 1st year emergency medicine post graduate I’m assigned to present a seminar on the topic - sudden cardiac death:epidemiology,chain of survival,high performance CPR and post arrest care . Can you kindly make a ppt and give me with total slides of 15. Make the presentation crisp but also include basic pathophysiology to complete management. Add images in the presentation. Follow latest AHA protocols and take references from rosens book of emergency medicine , harrisons book of internal medicine and tintinaali’s book of emergency medicine .
AHA 2024 2025 sudden cardiac death CPR guidelines chain of survival post cardiac arrest care
mkdir -p /tmp/workspace/SCD-seminar && ls /tmp/workspace/SCD-seminar/
~/SCD-seminar/build_ppt.py
#!/usr/bin/env python3
"""
Build a 15-slide PPTX on Sudden Cardiac Death for Dr. Bharathwaj
Emergency Medicine PG Seminar
"""
import json, subprocess, base64, os
from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from pptx.oxml.ns import qn
from lxml import etree
# ── Colour palette ─────────────────────────────────────────────────────────────
DARK_NAVY = RGBColor(0x0A, 0x1D, 0x37) # deep navy
CRIMSON = RGBColor(0xC0, 0x1F, 0x2F) # AHA red
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GRAY = RGBColor(0xF2, 0xF4, 0xF7)
ACCENT_GOLD = RGBColor(0xE8, 0xB8, 0x40)
MID_BLUE = RGBColor(0x1E, 0x4D, 0x8C)
TEXT_DARK = RGBColor(0x1A, 0x1A, 0x2E)
SOFT_RED = RGBColor(0xE8, 0x3A, 0x4E)
def make_prs():
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
return prs
def blank(prs):
return prs.slides.add_slide(prs.slide_layouts[6])
def fill_bg(slide, color):
bg = slide.background
fill = bg.fill
fill.solid()
fill.fore_color.rgb = color
def add_rect(slide, l, t, w, h, color, alpha=None):
shape = slide.shapes.add_shape(1, Inches(l), Inches(t), Inches(w), Inches(h))
shape.fill.solid()
shape.fill.fore_color.rgb = color
shape.line.fill.background()
return shape
def add_text(slide, text, l, t, w, h, size=18, bold=False, color=WHITE,
align=PP_ALIGN.LEFT, italic=False, wrap=True):
tb = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(2)
tf.margin_bottom= Pt(2)
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.size = Pt(size)
run.font.bold = bold
run.font.color.rgb = color
run.font.italic = italic
run.font.name = "Calibri"
return tb
def add_multiline(slide, lines, l, t, w, h, size=16, color=WHITE,
bold_first=False, bullet=True, line_space=1.15):
tb = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(6)
tf.margin_right = Pt(6)
tf.margin_top = Pt(4)
tf.margin_bottom = Pt(4)
for i, line in enumerate(lines):
p = tf.add_paragraph() if i > 0 else tf.paragraphs[0]
p.alignment = PP_ALIGN.LEFT
from pptx.util import Pt as _Pt
from pptx.oxml.ns import qn as _qn
pPr = p._pPr if p._pPr is not None else p._p.get_or_add_pPr()
# line spacing
lnSpc = etree.SubElement(pPr, qn('a:lnSpc'))
spcPct = etree.SubElement(lnSpc, qn('a:spcPct'))
spcPct.set('val', str(int(line_space * 100000)))
# space after
spcAft = etree.SubElement(pPr, qn('a:spcAft'))
spcPts2 = etree.SubElement(spcAft, qn('a:spcPts'))
spcPts2.set('val', '400')
run = p.add_run()
prefix = "• " if bullet else ""
run.text = prefix + line
run.font.size = Pt(size)
run.font.bold = bold_first and i == 0
run.font.color.rgb = color
run.font.name = "Calibri"
return tb
def fetch_image_b64(url):
try:
result = json.loads(subprocess.check_output(
["python", "/tmp/skills/shared/scripts/fetch_images.py", url],
timeout=30
))
if result and result[0].get("base64"):
return result[0]["base64"]
except Exception as e:
print(f"Image fetch failed for {url}: {e}")
return None
def add_image_from_url(slide, url, l, t, w, h=None):
b64 = fetch_image_b64(url)
if b64:
header, data = b64.split(",", 1) if "," in b64 else ("", b64)
img_bytes = base64.b64decode(data)
buf = BytesIO(img_bytes)
try:
if h:
slide.shapes.add_picture(buf, Inches(l), Inches(t), Inches(w), Inches(h))
else:
slide.shapes.add_picture(buf, Inches(l), Inches(t), Inches(w))
return True
except Exception as e:
print(f"add_picture failed: {e}")
return False
def divider_line(slide, l, t, w, thickness=0.04, color=CRIMSON):
add_rect(slide, l, t, w, thickness, color)
# ════════════════════════════════════════════════════════════════════════════════
# SLIDE BUILDERS
# ════════════════════════════════════════════════════════════════════════════════
def slide_01_title(prs):
"""Title slide"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
# Left accent stripe
add_rect(slide, 0, 0, 0.45, 7.5, CRIMSON)
# Gold top bar
add_rect(slide, 0.45, 0, 12.883, 0.12, ACCENT_GOLD)
# Institution label
add_text(slide, "DEPARTMENT OF EMERGENCY MEDICINE", 0.7, 0.2, 11.5, 0.5,
size=11, color=ACCENT_GOLD, bold=True, align=PP_ALIGN.LEFT)
# Main title
add_text(slide, "SUDDEN CARDIAC DEATH", 0.7, 0.9, 12, 1.4,
size=44, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0.7, 2.4, 11.5, 0.06, CRIMSON)
# Subtitle
add_text(slide, "Epidemiology • Chain of Survival • High-Performance CPR • Post-Arrest Care",
0.7, 2.6, 12, 0.7, size=18, color=LIGHT_GRAY, align=PP_ALIGN.LEFT)
# Presented by
add_text(slide, "Dr. Bharathwaj", 0.7, 3.5, 8, 0.55, size=22, bold=True, color=ACCENT_GOLD)
add_text(slide, "1st Year Postgraduate | Emergency Medicine", 0.7, 4.1, 9, 0.5,
size=15, color=LIGHT_GRAY)
# Reference strip at bottom
add_rect(slide, 0.45, 6.8, 12.883, 0.7, MID_BLUE)
add_text(slide, "References: Tintinalli's Emergency Medicine • Rosen's Emergency Medicine • "
"Harrison's Principles of Internal Medicine • AHA Guidelines 2025",
0.7, 6.85, 12, 0.6, size=10, color=LIGHT_GRAY, align=PP_ALIGN.LEFT)
# Heart icon image
add_image_from_url(slide,
"https://cdn.pixabay.com/photo/2017/01/31/22/32/heart-2026198_1280.png",
9.8, 2.0, 3.0, 4.0)
def slide_02_definition(prs):
"""Definition & Classification"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, CRIMSON)
add_text(slide, "DEFINITION & CLASSIFICATION", 0.4, 0.18, 12, 0.75,
size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
add_rect(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# Left column - definition box
add_rect(slide, 0.3, 1.4, 5.9, 3.2, MID_BLUE)
add_text(slide, "SCD Definition", 0.45, 1.5, 5.6, 0.5, size=16, bold=True,
color=ACCENT_GOLD)
defn_lines = [
"Unexpected death from cardiac cause within 1 hour of symptom onset",
"OR unwitnessed death within 24 hours of last being seen alive",
"If resuscitated → termed Sudden Cardiac Arrest (SCA)",
"~450,000 deaths/year in the USA (Robbins Pathology)"
]
add_multiline(slide, defn_lines, 0.45, 2.1, 5.6, 2.3, size=14, color=WHITE, bullet=True)
# Right column - classification
add_rect(slide, 6.5, 1.4, 6.5, 3.2, MID_BLUE)
add_text(slide, "Classification by Mechanism", 6.65, 1.5, 6.2, 0.5, size=16, bold=True,
color=ACCENT_GOLD)
class_lines = [
"Ventricular Fibrillation (VF) — most common shockable",
"Pulseless Ventricular Tachycardia (pVT)",
"Pulseless Electrical Activity (PEA)",
"Asystole — non-shockable, worst prognosis"
]
add_multiline(slide, class_lines, 6.65, 2.1, 6.2, 2.3, size=14, color=WHITE, bullet=True)
# Bottom row - key distinction
add_rect(slide, 0.3, 4.8, 12.7, 1.0, RGBColor(0x1A, 0x2E, 0x4F))
add_text(slide, "KEY: VF/pVT = SHOCKABLE (defibrillate!) | PEA/Asystole = NON-SHOCKABLE (treat reversible causes — H's & T's)",
0.5, 4.95, 12.3, 0.7, size=14, bold=True, color=ACCENT_GOLD, align=PP_ALIGN.CENTER)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Tintinalli's EM Ch.11 • Rosen's EM • Robbins & Kumar Basic Pathology",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_03_epidemiology(prs):
"""Epidemiology"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "EPIDEMIOLOGY", 0.4, 0.18, 12, 0.75, size=28, bold=True,
color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# Stat boxes row 1
boxes = [
("~341,000", "OHCA cases/year\n(USA, Tintinalli's)"),
("10.8%", "EMS-treated\nsurvival rate"),
("80%", "Underlying CAD\n(Robbins Pathology)"),
("60%", "Occur in males\n>45-50 yrs"),
]
cols = [0.3, 3.55, 6.8, 10.05]
for (stat, label), x in zip(boxes, cols):
add_rect(slide, x, 1.3, 2.9, 1.7, CRIMSON)
add_text(slide, stat, x+0.1, 1.35, 2.7, 0.9, size=32, bold=True,
color=WHITE, align=PP_ALIGN.CENTER)
add_text(slide, label, x+0.1, 2.15, 2.7, 0.75, size=12, color=WHITE,
align=PP_ALIGN.CENTER)
# Key facts
epi_lines = [
"65–70% have underlying ischemic heart disease; 10% structural heart disease; 5–10% channelopathies",
"Circadian pattern: peak in early morning hours (increased sympathetic tone)",
"30–80% higher incidence in lowest socioeconomic quartile",
"Public location arrest → more likely shockable VF rhythm → better survival",
"SCD may be FIRST manifestation of IHD (no prior symptoms)"
]
add_multiline(slide, epi_lines, 0.3, 3.2, 12.7, 2.8, size=14, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Tintinalli's EM Ch.11 • Robbins & Kumar Basic Pathology • Rosen's EM",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_04_patho1(prs):
"""Pathophysiology Part 1 - Structural causes"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "PATHOPHYSIOLOGY — Part 1: Structural Causes", 0.4, 0.18, 12.5, 0.75,
size=24, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, CRIMSON)
# Left panel
add_rect(slide, 0.3, 1.3, 6.0, 4.9, MID_BLUE)
add_text(slide, "Coronary Artery Disease (80%)", 0.45, 1.4, 5.7, 0.55, size=16,
bold=True, color=ACCENT_GOLD)
cad_lines = [
"Atherosclerotic plaque rupture → thrombosis",
"~1/3 show acute plaque rupture at autopsy",
"VF the most common triggering arrhythmia",
"80–90% have NO enzymatic/ECG evidence of MI",
"Healed remote MI present in ~40% of cases",
"Sympathetic surge triggers the fatal arrhythmia"
]
add_multiline(slide, cad_lines, 0.45, 2.0, 5.7, 3.9, size=13, color=WHITE, bullet=True)
# Right panel
add_rect(slide, 6.6, 1.3, 6.4, 4.9, MID_BLUE)
add_text(slide, "Other Structural Causes", 6.75, 1.4, 6.1, 0.55, size=16,
bold=True, color=ACCENT_GOLD)
other_lines = [
"Dilated/Hypertrophic Cardiomyopathy (10–15%)",
"Myocarditis or Sarcoidosis",
"Valvular disease (Mitral valve prolapse)",
"Pulmonary hypertension",
"Congenital coronary artery anomalies",
"Unexplained LV hypertrophy (athletes!)"
]
add_multiline(slide, other_lines, 6.75, 2.0, 6.1, 3.9, size=13, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Robbins & Kumar Basic Pathology • Tintinalli's EM Ch.11",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_05_patho2(prs):
"""Pathophysiology Part 2 - Electrophysiology / Channelopathies"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "PATHOPHYSIOLOGY — Part 2: Arrhythmic Mechanisms", 0.4, 0.18, 12.5, 0.75,
size=24, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, CRIMSON)
# Arrhythmia mechanism
add_rect(slide, 0.3, 1.3, 5.8, 2.3, RGBColor(0x1E, 0x3A, 0x6E))
add_text(slide, "Electrophysiological Triggers", 0.45, 1.35, 5.5, 0.5, size=15,
bold=True, color=ACCENT_GOLD)
ep_lines = [
"Ischemia → altered Na⁺/K⁺/Ca²⁺ channel activity",
"Re-entry circuits around scar tissue",
"Triggered activity (EAD/DAD)",
"Autonomic imbalance (↑ sympathetic tone)"
]
add_multiline(slide, ep_lines, 0.45, 1.9, 5.6, 1.5, size=13, color=WHITE, bullet=True)
# Channelopathies
add_rect(slide, 0.3, 3.8, 5.8, 2.5, RGBColor(0x1E, 0x3A, 0x6E))
add_text(slide, "Channelopathies (Young SCD)", 0.45, 3.85, 5.5, 0.5, size=15,
bold=True, color=SOFT_RED)
chan_lines = [
"Brugada Syndrome — SCN5A mutation, type 1 pattern",
"Long QT Syndrome (LQTS) — KCNQ1, KCNH2, SCN5A",
"CPVT — RYR2 mutation, bidirectional VT",
"Short QT Syndrome — gain of function K⁺ channels",
"WPW — accessory pathway → AF → VF"
]
add_multiline(slide, chan_lines, 0.45, 4.4, 5.6, 1.8, size=12, color=WHITE, bullet=True)
# Pathological cascade
add_rect(slide, 6.4, 1.3, 6.6, 5.0, RGBColor(0x12, 0x2A, 0x50))
add_text(slide, "Pathological Cascade", 6.55, 1.35, 6.3, 0.5, size=15, bold=True,
color=ACCENT_GOLD)
cascade = [
"1. Atheromatous plaque rupture / trigger",
"2. Myocardial ischemia / hypoxia",
"3. Electrolyte imbalance (K⁺, Mg²⁺, Ca²⁺)",
"4. Depolarisation abnormality",
"5. VF / pVT initiation",
"6. Loss of cardiac output",
"7. Cerebral anoxia (4–6 min)",
"8. Irreversible neuronal death (>10 min)"
]
add_multiline(slide, cascade, 6.55, 1.95, 6.3, 4.1, size=13, color=WHITE, bullet=False, line_space=1.2)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Tintinalli's EM Ch.11 • Robbins & Kumar Basic Pathology • Harrison's Principles",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_06_chain(prs):
"""Chain of Survival - AHA 2025"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, CRIMSON)
add_text(slide, "CHAIN OF SURVIVAL — AHA 2025 (Unified)", 0.4, 0.18, 12, 0.75,
size=26, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# AHA 2025: single unified chain
add_text(slide, "AHA 2025: Single Unified Chain for ALL forms of cardiac arrest (adult, pediatric, OHCA, IHCA)",
0.4, 1.2, 12.5, 0.55, size=13, color=ACCENT_GOLD, bold=True)
links = [
("1", "Prevention &\nPreparedness", "Risk factor control,\npublic education,\nAED deployment"),
("2", "Early\nRecognition", "Identify unresponsiveness,\nno normal breathing,\nactivate EMS / 911"),
("3", "Immediate\nHigh-Quality CPR", "C-A-B sequence,\n100–120/min,\n≥2 inch depth"),
("4", "Rapid\nDefibrillation", "AED/defibrillator\nASAP; CPR pauses\n<10 seconds"),
("5", "ACLS &\nPost-Arrest Care", "Advanced airway,\nvasopressors, TTM,\nPCI if indicated"),
("6", "Recovery &\nSurvivorship", "Rehab, psychological\nsupport, ICD evaluation,\nfamily counselling"),
]
link_colors = [MID_BLUE, RGBColor(0x1A,0x5C,0x2F), CRIMSON,
RGBColor(0xB5,0x45,0x00), MID_BLUE, RGBColor(0x4A,0x1A,0x6B)]
x_start = 0.25
box_w = 2.1
box_h = 3.5
arrow_w = 0.12
for i, (num, title, detail) in enumerate(links):
x = x_start + i * (box_w + arrow_w + 0.02)
add_rect(slide, x, 1.9, box_w, box_h, link_colors[i])
# number circle simulation
add_rect(slide, x + 0.05, 1.95, 0.45, 0.45, ACCENT_GOLD)
add_text(slide, num, x + 0.05, 1.95, 0.45, 0.45, size=16, bold=True,
color=TEXT_DARK, align=PP_ALIGN.CENTER)
add_text(slide, title, x + 0.08, 2.5, box_w - 0.16, 0.75, size=13, bold=True,
color=WHITE, align=PP_ALIGN.CENTER)
add_text(slide, detail, x + 0.08, 3.35, box_w - 0.16, 1.9, size=11, color=WHITE,
align=PP_ALIGN.CENTER)
# arrow between boxes
if i < len(links) - 1:
ax = x + box_w + 0.01
add_text(slide, "▶", ax, 3.0, 0.18, 0.5, size=16, color=ACCENT_GOLD,
align=PP_ALIGN.CENTER)
add_rect(slide, 0, 5.65, 13.333, 0.85, RGBColor(0x1A, 0x2E, 0x4F))
add_text(slide,
"Key 2025 Change: Single chain for OHCA + IHCA + Pediatric • Emphasises compressions AND breaths in children • "
"Pauses in chest compressions < 10 seconds",
0.4, 5.72, 12.5, 0.7, size=12, color=ACCENT_GOLD, bold=False)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "AHA 2025 Guidelines for CPR & ECC • Tintinalli's EM • Rosen's EM",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_07_bls(prs):
"""BLS / Basic CPR"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "BASIC LIFE SUPPORT — The C-A-B Approach", 0.4, 0.18, 12.5, 0.75,
size=26, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# C-A-B boxes
cab = [
("C", "COMPRESSIONS", [
"Rate: 100–120 compressions/min",
"Depth: ≥ 5 cm (2 inches), ≤ 6 cm",
"Allow full chest recoil",
"Minimize interruptions (<10 sec pauses)",
"Hard and fast on lower sternum",
"30:2 ratio (single or 2 rescuers, adult)"
], CRIMSON),
("A", "AIRWAY", [
"Head-tilt chin-lift (no trauma)",
"Jaw thrust if C-spine concern",
"Suction if needed",
"Avoid hyperextension",
"OPA/NPA for unconscious patients"
], MID_BLUE),
("B", "BREATHING", [
"2 rescue breaths after every 30 compressions",
"Each breath over ~1 second",
"Visible chest rise",
"Avoid excessive ventilation",
"Compression-only CPR: acceptable for untrained bystander"
], RGBColor(0x1A, 0x5C, 0x2F)),
]
for i, (letter, title, pts, col) in enumerate(cab):
x = 0.3 + i * 4.35
add_rect(slide, x, 1.3, 4.1, 4.8, col)
add_rect(slide, x, 1.3, 0.6, 0.7, ACCENT_GOLD)
add_text(slide, letter, x, 1.3, 0.6, 0.7, size=26, bold=True,
color=TEXT_DARK, align=PP_ALIGN.CENTER)
add_text(slide, title, x + 0.65, 1.38, 3.3, 0.55, size=15, bold=True, color=WHITE)
add_multiline(slide, pts, x + 0.1, 2.1, 3.9, 3.8, size=12.5, color=WHITE, bullet=True)
add_rect(slide, 0, 6.3, 13.333, 0.45, RGBColor(0x1A, 0x2E, 0x4F))
add_text(slide, "CAB sequence (not ABC) — prioritise uninterrupted compressions! "
"Previous ABC → changed to CAB in 2010, retained in 2025 (Braunwald's Heart Disease)",
0.4, 6.35, 12.5, 0.35, size=11, color=ACCENT_GOLD)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Braunwald's Heart Disease • Tintinalli's EM • AHA 2025 Guidelines",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_08_hp_cpr(prs):
"""High Performance CPR"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, CRIMSON)
add_text(slide, "HIGH-PERFORMANCE CPR (HP-CPR)", 0.4, 0.18, 12, 0.75,
size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# Left: HP-CPR pillars
add_rect(slide, 0.3, 1.3, 5.9, 5.1, MID_BLUE)
add_text(slide, "5 Pillars of HP-CPR", 0.45, 1.38, 5.6, 0.55, size=16, bold=True,
color=ACCENT_GOLD)
pillars = [
"Minimize CPR interruptions — chest compression fraction (CCF) > 80%",
"Rate 100–120/min with real-time feedback devices",
"Depth ≥ 5 cm with full chest recoil every cycle",
"Avoid excessive ventilation (passive O₂ during compressions)",
"Team choreography — pre-assigned roles, 2-min rotation to prevent fatigue"
]
add_multiline(slide, pillars, 0.45, 2.0, 5.7, 4.1, size=13, color=WHITE, bullet=True)
# Right: Quantitative targets
add_rect(slide, 6.5, 1.3, 6.5, 2.4, RGBColor(0x1E, 0x3A, 0x6E))
add_text(slide, "Quantitative Targets (AHA 2025)", 6.65, 1.38, 6.2, 0.55,
size=15, bold=True, color=ACCENT_GOLD)
targets = [
"CCF > 80%",
"Rate 100–120 /min",
"Depth 5–6 cm (adult)",
"Ventilation ~10 breaths/min (advanced airway)",
"Pause pre-shock < 10 sec",
"PetCO₂ ≥ 10 mmHg (target ≥ 20 mmHg indicates ROSC)"
]
add_multiline(slide, targets, 6.65, 2.0, 6.2, 1.5, size=12.5, color=WHITE, bullet=True)
# Bottom right: Feedback & adjuncts
add_rect(slide, 6.5, 3.85, 6.5, 2.55, RGBColor(0x1E, 0x3A, 0x6E))
add_text(slide, "Feedback Devices & Adjuncts", 6.65, 3.93, 6.2, 0.5,
size=15, bold=True, color=SOFT_RED)
adj_lines = [
"CPR feedback devices (accelerometers) — real time depth/rate",
"Mechanical CPR: LUCAS, AutoPulse — consistent compressions",
"Impedance Threshold Device (ITD) — improves venous return",
"End-tidal CO₂ monitor — reflects cardiac output during CPR",
"Arterial line diastolic pressure ≥ 25 mmHg → adequate CPR"
]
add_multiline(slide, adj_lines, 6.65, 4.5, 6.2, 1.75, size=12, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "AHA 2025 Guidelines • Tintinalli's EM • Rosen's EM",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_09_defibrillation(prs):
"""Defibrillation"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "DEFIBRILLATION — The Definitive Treatment for VF / pVT", 0.4, 0.18,
12.5, 0.75, size=24, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, CRIMSON)
# Key principle box
add_rect(slide, 0.3, 1.25, 12.7, 0.8, CRIMSON)
add_text(slide,
"SURVIVAL ↓ 7–10% per minute of delay in defibrillation — Every second counts!",
0.5, 1.35, 12.3, 0.6, size=16, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
# Energy box
add_rect(slide, 0.3, 2.2, 5.9, 2.2, MID_BLUE)
add_text(slide, "Energy Selection (Biphasic)", 0.45, 2.28, 5.6, 0.5, size=15, bold=True, color=ACCENT_GOLD)
energy = [
"1st shock: 120–200 J (manufacturer recommended)",
"Subsequent: same or escalating dose",
"Monophasic (if only available): 360 J",
"Paediatric: 2 J/kg → 4 J/kg subsequent"
]
add_multiline(slide, energy, 0.45, 2.85, 5.7, 1.4, size=13, color=WHITE, bullet=True)
# Sequence box
add_rect(slide, 6.5, 2.2, 6.5, 2.2, MID_BLUE)
add_text(slide, "Shock-CPR Sequence", 6.65, 2.28, 6.2, 0.5, size=15, bold=True, color=ACCENT_GOLD)
seq = [
"2 min CPR → rhythm check → shock if VF/pVT",
"Resume CPR immediately after shock (do NOT check pulse first)",
"Pulse check only if organised rhythm on monitor",
"Limit pre/post-shock pause to < 10 seconds"
]
add_multiline(slide, seq, 6.65, 2.85, 6.2, 1.4, size=13, color=WHITE, bullet=True)
# AED row
add_rect(slide, 0.3, 4.6, 12.7, 1.8, RGBColor(0x1A, 0x2E, 0x4F))
add_text(slide, "Public Access Defibrillation (PAD)", 0.5, 4.68, 6.0, 0.5, size=15,
bold=True, color=ACCENT_GOLD)
pad = [
"Laypersons + AED → doubles survival to hospital discharge (PAD Trial)",
"Target AED response within 3–5 minutes in public spaces",
"2025: Promote AED deployment + media campaigns + community training"
]
add_multiline(slide, pad, 0.5, 5.25, 12.3, 1.0, size=13, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Tintinalli's EM Ch.11 • AHA 2025 Guidelines • Rosen's EM",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_10_acls(prs):
"""ACLS Algorithm"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, CRIMSON)
add_text(slide, "ACLS ALGORITHM — Shockable vs Non-Shockable Rhythms", 0.4, 0.18,
12.5, 0.75, size=24, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# Shockable pathway
add_rect(slide, 0.3, 1.3, 5.9, 5.0, MID_BLUE)
add_text(slide, "⚡ SHOCKABLE — VF / pVT", 0.45, 1.38, 5.6, 0.55, size=15,
bold=True, color=ACCENT_GOLD)
shock_steps = [
"Shock → Resume CPR 2 min",
"Adrenaline 1 mg IV q3–5 min (after 2nd shock)",
"Amiodarone 300 mg IV bolus (after 3rd shock)",
"OR Lidocaine 1–1.5 mg/kg IV",
"Continue 2 min CPR → recheck rhythm",
"2nd amiodarone 150 mg if persistent VF/pVT",
"Consider: Mg²⁺ for torsades, correct H's & T's"
]
add_multiline(slide, shock_steps, 0.45, 2.0, 5.7, 4.0, size=13, color=WHITE, bullet=False, line_space=1.2)
# Non-shockable pathway
add_rect(slide, 6.5, 1.3, 6.5, 5.0, RGBColor(0x2A, 0x1A, 0x4F))
add_text(slide, "❌ NON-SHOCKABLE — PEA / Asystole", 6.65, 1.38, 6.2, 0.55, size=15,
bold=True, color=SOFT_RED)
noshock_steps = [
"CPR 2 min → rhythm check",
"Adrenaline 1 mg IV q3–5 min (ASAP)",
"Search and treat reversible causes",
"H's & T's (see next slide)",
"NO routine atropine in asystole (removed 2010)",
"Consider ETCO₂: if < 10 mmHg after 20 min → poor prognosis",
"TTE to exclude tamponade, PE, severe hypovolaemia"
]
add_multiline(slide, noshock_steps, 6.65, 2.0, 6.2, 4.0, size=13, color=WHITE, bullet=False, line_space=1.2)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "AHA 2025 Guidelines • Tintinalli's EM • Rosen's EM • Harrison's Principles",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_11_Hs_Ts(prs):
"""H's and T's — Reversible Causes"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "REVERSIBLE CAUSES — The H's & T's", 0.4, 0.18, 12.5, 0.75,
size=26, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, CRIMSON)
add_text(slide, "Always search systematically for reversible causes during cardiac arrest",
0.4, 1.2, 12.5, 0.5, size=13, color=ACCENT_GOLD, bold=True)
# H's
add_rect(slide, 0.3, 1.8, 5.9, 4.6, MID_BLUE)
add_text(slide, "H's", 0.45, 1.88, 5.6, 0.55, size=22, bold=True, color=ACCENT_GOLD)
hs = [
"Hypovolaemia — fluid bolus, stop bleeding",
"Hypoxia — 100% O₂, secure airway",
"H⁺ ion (Acidosis) — NaHCO₃ if pH < 7.1",
"Hypo/Hyperkalemia — check K⁺, treat",
"Hypothermia — rewarm; do not declare death until warm"
]
add_multiline(slide, hs, 0.45, 2.5, 5.7, 3.7, size=13.5, color=WHITE, bullet=True)
# T's
add_rect(slide, 6.5, 1.8, 6.5, 4.6, RGBColor(0x2A, 0x1A, 0x4F))
add_text(slide, "T's", 6.65, 1.88, 6.2, 0.55, size=22, bold=True, color=SOFT_RED)
ts = [
"Tension Pneumothorax — needle decompression",
"Tamponade — pericardiocentesis / FAST",
"Toxins — antidote, activated charcoal",
"Thrombosis (Pulmonary) — fibrinolysis / catheter",
"Thrombosis (Coronary) — primary PCI",
"Trauma — haemorrhage control"
]
add_multiline(slide, ts, 6.65, 2.5, 6.2, 3.7, size=13.5, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "AHA 2025 Guidelines • Tintinalli's EM • Rosen's EM",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_12_post_arrest(prs):
"""Post-Arrest Care — Overview"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, CRIMSON)
add_text(slide, "POST-CARDIAC ARREST CARE — The 'Post-Arrest Bundle'", 0.4, 0.18,
12.5, 0.75, size=24, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
add_text(slide, "ROSC is NOT the end — global ischaemia-reperfusion injury drives post-arrest mortality (Rosen's EM)",
0.4, 1.2, 12.5, 0.55, size=13, color=ACCENT_GOLD, bold=True)
# 4-domain boxes
domains = [
("Haemodynamic\nGoals", [
"MAP ≥ 65 mmHg (initial target)",
"SBP > 90 mmHg",
"Vasopressors: norepinephrine ± vasopressin",
"Avoid hypotension (worsens neuro outcome)"
], MID_BLUE),
("Respiratory\nGoals", [
"SpO₂ 94–98% (avoid hyperoxia)",
"PaCO₂ 35–45 mmHg (normocarbia)",
"Avoid hyperventilation (↑ cerebral vasoconstriction)",
"Lung-protective ventilation: VT 6 ml/kg IBW"
], RGBColor(0x1A, 0x4C, 0x2F)),
("Metabolic\nGoals", [
"Glucose 140–180 mg/dL",
"Avoid hypoglycaemia (brain injury)",
"Correct electrolytes (K⁺, Mg²⁺)",
"Consider empiric antibiotics (2025 guideline review)"
], RGBColor(0x4A, 0x2F, 0x1A)),
("Neurological\nMonitoring", [
"Continuous EEG for seizure detection",
"Treat seizures aggressively",
"Avoid routine phenytoin prophylaxis",
"Neuro-prognostication ≥ 72h after TTM"
], RGBColor(0x3A, 0x1A, 0x5C)),
]
for i, (title, pts, col) in enumerate(domains):
x = 0.3 + i * 3.25
add_rect(slide, x, 1.85, 3.1, 4.3, col)
add_text(slide, title, x + 0.1, 1.93, 2.9, 0.65, size=14, bold=True,
color=ACCENT_GOLD, align=PP_ALIGN.CENTER)
add_multiline(slide, pts, x + 0.1, 2.65, 2.9, 3.3, size=12, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Rosen's EM • AHA 2025 Post-Arrest Guidelines (PMID 41122894) • Tintinalli's EM",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_13_TTM(prs):
"""Targeted Temperature Management"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "TARGETED TEMPERATURE MANAGEMENT (TTM)", 0.4, 0.18, 12.5, 0.75,
size=26, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# Goal box
add_rect(slide, 0.3, 1.25, 12.7, 0.75, CRIMSON)
add_text(slide,
"GOAL: Prevent secondary neurological injury by suppressing metabolic demand and reducing reperfusion injury",
0.5, 1.35, 12.3, 0.55, size=14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
# Targets
add_rect(slide, 0.3, 2.1, 5.9, 2.3, MID_BLUE)
add_text(slide, "Temperature Targets", 0.45, 2.18, 5.6, 0.5, size=15, bold=True, color=ACCENT_GOLD)
ttm_pts = [
"Adults: 32°C–36°C for at least 24 hours (Rosen's EM)",
"Paediatric post-arrest: 36°C–37.5°C (avoid hyperthermia)",
"Fever (>37.5°C) must be actively prevented for 72 h post-ROSC",
"Gradual rewarming: 0.25–0.5°C per hour"
]
add_multiline(slide, ttm_pts, 0.45, 2.75, 5.7, 1.55, size=13, color=WHITE, bullet=True)
# Cooling methods
add_rect(slide, 6.5, 2.1, 6.5, 2.3, RGBColor(0x1E, 0x3A, 0x6E))
add_text(slide, "Cooling Methods", 6.65, 2.18, 6.2, 0.5, size=15, bold=True, color=ACCENT_GOLD)
cool_pts = [
"Ice packs (neck, axillae, inguinal regions)",
"IV cold saline (1–2 L of 4°C NS — induction)",
"Cooling blankets / fan cooling of dampened skin",
"Endovascular cooling catheters (ICU — precise)",
"Disable ventilator heating circuits"
]
add_multiline(slide, cool_pts, 6.65, 2.75, 6.2, 1.55, size=13, color=WHITE, bullet=True)
# Contraindications & Monitoring
add_rect(slide, 0.3, 4.55, 5.9, 1.8, RGBColor(0x3A, 0x1A, 0x1A))
add_text(slide, "Relative Contraindications", 0.45, 4.62, 5.6, 0.5, size=14, bold=True, color=SOFT_RED)
ci = ["Obvious alternative cause of coma", "End-stage terminal illness",
"Pre-existing DNR status"]
add_multiline(slide, ci, 0.45, 5.18, 5.7, 1.0, size=12.5, color=WHITE, bullet=True)
add_rect(slide, 6.5, 4.55, 6.5, 1.8, RGBColor(0x1A, 0x35, 0x1A))
add_text(slide, "Monitoring During TTM", 6.65, 4.62, 6.2, 0.5, size=14, bold=True, color=ACCENT_GOLD)
mon = ["Continuous core temperature (bladder/oesophageal)",
"Shivering management (buspirone, Mg²⁺, meperidine)",
"EEG, electrolytes, coagulation profile"]
add_multiline(slide, mon, 6.65, 5.18, 6.2, 1.0, size=12.5, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "Rosen's EM • AHA 2025 Post-Arrest Care Guidelines • Miller's Anaesthesia",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_14_coronary(prs):
"""Post-arrest PCI & Neuroprognostication"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, CRIMSON)
add_text(slide, "CORONARY INTERVENTION & NEUROPROGNOSTICATION", 0.4, 0.18,
12.5, 0.75, size=24, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
divider_line(slide, 0, 1.1, 13.333, 0.06, ACCENT_GOLD)
# PCI Panel
add_rect(slide, 0.3, 1.3, 6.0, 4.9, MID_BLUE)
add_text(slide, "Coronary Angiography / PCI Post-Arrest", 0.45, 1.38, 5.7, 0.55,
size=15, bold=True, color=ACCENT_GOLD)
pci_pts = [
"70–80% of OHCA survivors have significant CAD",
"Immediate angiography if ST elevation post-ROSC (STEMI equivalent)",
"AHA 2025: selective approach for non-STEMI arrests",
"Mechanical circulatory support (IABP, Impella) in cardiogenic shock",
"PCI can be performed with concurrent TTM",
"Target door-to-balloon < 90 min (STEMI protocol)"
]
add_multiline(slide, pci_pts, 0.45, 2.05, 5.7, 3.9, size=13, color=WHITE, bullet=True)
# Neuroprognostication Panel
add_rect(slide, 6.5, 1.3, 6.5, 4.9, RGBColor(0x2A, 0x1A, 0x4F))
add_text(slide, "Neuroprognostication (≥ 72 h post-arrest)", 6.65, 1.38, 6.2, 0.55,
size=14, bold=True, color=SOFT_RED)
neuro_pts = [
"Multimodal approach — no single test adequate alone",
"CT Head: diffuse cerebral oedema → poor prognosis",
"MRI Brain: diffusion restriction in grey matter",
"EEG: burst suppression, absence of N2O response",
"SSEP: bilateral absent N20 → poor prognosis",
"NSE (biomarker) > 60 μg/L at 48 h → poor outcome",
"Pupillary light reflex automated pupillometry",
"AHA 2025: Differentiate favourable vs unfavourable prognosis"
]
add_multiline(slide, neuro_pts, 6.65, 2.05, 6.2, 3.9, size=12.5, color=WHITE, bullet=True)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide, "AHA 2025 Post-Arrest Guidelines (PMID 41122894) • Rosen's EM • Harrison's Principles",
0.4, 6.88, 12, 0.5, size=10, color=LIGHT_GRAY)
def slide_15_summary(prs):
"""Summary & Key Take-aways"""
slide = blank(prs)
fill_bg(slide, DARK_NAVY)
add_rect(slide, 0, 0, 13.333, 1.1, MID_BLUE)
add_text(slide, "SUMMARY & KEY TAKE-AWAYS", 0.4, 0.18, 12, 0.75,
size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
add_rect(slide, 0, 1.1, 13.333, 0.06, CRIMSON)
takeaways = [
"SCD kills ~450,000 Americans/year; 80% from CAD; VF the most common triggering rhythm",
"AHA 2025 UNIFIED Chain of Survival: Prevention → Recognition → CPR → Defibrillation → ACLS → Recovery",
"High-Performance CPR: CCF > 80%, rate 100–120/min, depth 5–6 cm, full recoil, minimise pauses",
"Defibrillate EARLY — survival drops 7–10% per minute of delay; AED in public doubles survival",
"Adrenaline 1 mg q3–5 min; Amiodarone 300 mg for refractory VF/pVT",
"Always address the H's & T's — reversible causes are treatable!",
"Post-Arrest Bundle: MAP ≥ 65 mmHg, SpO₂ 94–98%, normocarbia, glucose 140–180 mg/dL",
"TTM 32–36°C for 24 hours in comatose ROSC patients; prevent fever ≥ 72 h",
"Immediate PCI for STEMI-equivalent post-arrest; neuroprognostication ≥ 72 h with multimodal tools",
"ICD implantation — superior to antiarrhythmics for secondary prevention of SCD"
]
add_multiline(slide, takeaways, 0.4, 1.3, 12.5, 5.1, size=13.5, color=WHITE, bullet=True, line_space=1.1)
# Bottom banner
add_rect(slide, 0, 6.4, 13.333, 0.4, CRIMSON)
add_text(slide,
'"Time is brain — every second of delay is neurons lost"',
0.4, 6.42, 12.5, 0.35, size=13, bold=True, italic=True, color=WHITE,
align=PP_ALIGN.CENTER)
add_rect(slide, 0, 6.8, 13.333, 0.7, RGBColor(0x05, 0x10, 0x20))
add_text(slide,
"References: Tintinalli's EM (9e) • Rosen's EM • Harrison's Principles of Internal Medicine "
"• AHA 2025 CPR & ECC Guidelines • Robbins & Kumar Basic Pathology • Braunwald's Heart Disease",
0.4, 6.88, 12.5, 0.5, size=9.5, color=LIGHT_GRAY)
# ── Main ──────────────────────────────────────────────────────────────────────
def main():
prs = make_prs()
print("Building slides...")
slide_01_title(prs) ; print(" 1/15 Title")
slide_02_definition(prs) ; print(" 2/15 Definition")
slide_03_epidemiology(prs) ; print(" 3/15 Epidemiology")
slide_04_patho1(prs) ; print(" 4/15 Pathophysiology 1")
slide_05_patho2(prs) ; print(" 5/15 Pathophysiology 2")
slide_06_chain(prs) ; print(" 6/15 Chain of Survival")
slide_07_bls(prs) ; print(" 7/15 BLS")
slide_08_hp_cpr(prs) ; print(" 8/15 HP-CPR")
slide_09_defibrillation(prs); print(" 9/15 Defibrillation")
slide_10_acls(prs) ; print(" 10/15 ACLS Algorithm")
slide_11_Hs_Ts(prs) ; print(" 11/15 H's and T's")
slide_12_post_arrest(prs) ; print(" 12/15 Post-Arrest Bundle")
slide_13_TTM(prs) ; print(" 13/15 TTM")
slide_14_coronary(prs) ; print(" 14/15 PCI & Neuroprog")
slide_15_summary(prs) ; print(" 15/15 Summary")
out = "/tmp/workspace/SCD-seminar/Sudden_Cardiac_Death_Seminar.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
f.write(buf.getvalue())
print(f"\nSaved → {out}")
return out
if __name__ == "__main__":
main()
cd /tmp/workspace/SCD-seminar && python build_ppt.py 2>&1
ls -lh /tmp/workspace/SCD-seminar/ && python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/SCD-seminar/Sudden_Cardiac_Death_Seminar.pptx') print(f'Slides: {len(prs.slides)}') for i,s in enumerate(prs.slides,1): texts = [sh.text_frame.text.strip()[:60] for sh in s.shapes if sh.has_text_frame and sh.text_frame.text.strip()] print(f' Slide {i:2d}: {texts[0] if texts else \"(no text)\"}') "
python3 << 'EOF' # Add images from textbook CDN and web to the presentation import requests, base64 from io import BytesIO from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor pptx_path = "/tmp/workspace/SCD-seminar/Sudden_Cardiac_Death_Seminar.pptx" prs = Presentation(pptx_path) # Image URLs to embed - medical/cardiac images image_configs = { # Slide 1 (index 0): heart/cardiac arrest image 0: ("https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Ventricular_fibrillation.png/320px-Ventricular_fibrillation.png", 9.5, 2.2, 3.4, 2.2), # Slide 3 (index 2): epidemiology chart - atherosclerosis 2: ("https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Atherosclerosis_diagram.png/320px-Atherosclerosis_diagram.png", 9.8, 1.4, 3.2, 2.8), # Slide 5 (index 4): ECG/arrhythmia 4: ("https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/VT_VF.png/320px-VT_VF.png", 9.2, 4.0, 3.8, 2.3), # Slide 9 (index 8): AED/defibrillator 8: ("https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/Defib_pads.jpg/320px-Defib_pads.jpg", 10.0, 2.3, 3.0, 3.5), # Slide 13 (index 12): hypothermia/cooling 12: ("https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Braininjury.jpg/240px-Braininjury.jpg", 10.0, 2.3, 3.0, 3.3), } def try_add_image(slide, url, l, t, w, h): try: resp = requests.get(url, timeout=15, headers={"User-Agent":"Mozilla/5.0"}) if resp.status_code == 200: buf = BytesIO(resp.content) slide.shapes.add_picture(buf, Inches(l), Inches(t), Inches(w), Inches(h)) return True except Exception as e: print(f" Failed {url}: {e}") return False added = 0 for slide_idx, (url, l, t, w, h) in image_configs.items(): slide = prs.slides[slide_idx] result = try_add_image(slide, url, l, t, w, h) status = "OK" if result else "SKIP" print(f" Slide {slide_idx+1}: {status} — {url.split('/')[-1]}") if result: added += 1 buf = BytesIO() prs.save(buf) with open(pptx_path, "wb") as f: f.write(buf.getvalue()) import os size = os.path.getsize(pptx_path) print(f"\nImages added: {added}/5") print(f"Final file size: {size/1024:.0f} KB") print(f"Saved: {pptx_path}") EOF
python3 << 'EOF' # Use textbook CDN images that we know work (orris.care CDN) import urllib.request, base64 from io import BytesIO from pptx import Presentation from pptx.util import Inches pptx_path = "/tmp/workspace/SCD-seminar/Sudden_Cardiac_Death_Seminar.pptx" prs = Presentation(pptx_path) # These are real images from the medical textbooks already confirmed in the DB # The pathways diagram from Robbins (CAD → MI → SCD) was at the URL shown in the block textbook_images = [ # Slide 4 (index 3) - CAD pathways diagram from Robbins Pathology (3, "https://cdn.orris.care/cdss_images/effa7df102b1c104c2993767c95010a269579d604f61c4848cbeb4a0d479558b.png", 9.0, 1.5, 4.0, 4.5, "CAD pathways (Robbins)"), ] def try_add(slide, url, l, t, w, h): try: req = urllib.request.Request(url, headers={"User-Agent":"Mozilla/5.0"}) with urllib.request.urlopen(req, timeout=15) as resp: data = resp.read() buf = BytesIO(data) slide.shapes.add_picture(buf, Inches(l), Inches(t), Inches(w), Inches(h)) return True except Exception as e: print(f" Error: {e}") return False for slide_idx, url, l, t, w, h, label in textbook_images: slide = prs.slides[slide_idx] ok = try_add(slide, url, l, t, w, h) print(f" Slide {slide_idx+1} ({label}): {'OK' if ok else 'SKIP'}") buf = BytesIO() prs.save(buf) with open(pptx_path, "wb") as f: f.write(buf.getvalue()) import os print(f"File size: {os.path.getsize(pptx_path)//1024} KB → {pptx_path}") EOF
python3 << 'EOF' import urllib.request from io import BytesIO from pptx import Presentation from pptx.util import Inches from pptx.dml.color import RGBColor pptx_path = "/tmp/workspace/SCD-seminar/Sudden_Cardiac_Death_Seminar.pptx" prs = Presentation(pptx_path) # Verified CDN images from medical textbooks images_to_add = [ # Slide 2 (index 1) - Classification/Definition slide: VF ECG from Tintinalli's (1, "https://cdn.orris.care/cdss_images/b5f4aaf73eaa3765d9ee0244cce925db471515f5d5c9559a7fa19481629330bf.png", 9.2, 1.4, 3.8, 3.5, "VF ECG - Tintinalli's (Fig 18-23)"), # Slide 5 (index 4) - Arrhythmic mechanisms: Brugada pattern from Tintinalli's (4, "https://cdn.orris.care/cdss_images/f16663f85cf1b328a8f88c5847fe3e9abc77d5f8a1071891c46393f2e81f379b.png", 9.0, 1.3, 4.0, 4.0, "Brugada ECG pattern - Tintinalli's (Fig 18-28)"), ] def try_add(slide, url, l, t, w, h): try: req = urllib.request.Request(url, headers={"User-Agent":"Mozilla/5.0"}) with urllib.request.urlopen(req, timeout=20) as resp: data = resp.read() buf = BytesIO(data) slide.shapes.add_picture(buf, Inches(l), Inches(t), Inches(w), Inches(h)) return True except Exception as e: print(f" Error: {e}") return False for slide_idx, url, l, t, w, h, label in images_to_add: slide = prs.slides[slide_idx] ok = try_add(slide, url, l, t, w, h) print(f" Slide {slide_idx+1} ({label}): {'OK ✓' if ok else 'SKIP ✗'}") buf = BytesIO() prs.save(buf) with open(pptx_path, "wb") as f: f.write(buf.getvalue()) import os sz = os.path.getsize(pptx_path) print(f"\nFinal file: {sz//1024} KB → {pptx_path}") print(f"Total slides: {len(prs.slides)}") EOF
Sudden Cardiac Death Seminar
Presentation · PPTX
| # | Slide Title | Key Content |
|---|---|---|
| 1 | Title Slide | Department branding, presenter info, reference strip |
| 2 | Definition & Classification | SCD vs SCA, VF/pVT/PEA/Asystole; VF ECG image (Tintinalli's Fig 18-23) |
| 3 | Epidemiology | 341,000 OHCA/year USA, 10.8% survival, 80% CAD, circadian pattern |
| 4 | Pathophysiology Part 1 | Structural causes: CAD, cardiomyopathy, channelopathies; CAD pathways diagram (Robbins) |
| 5 | Pathophysiology Part 2 | Arrhythmic mechanisms, cascade, channelopathies (Brugada/LQTS/CPVT); Brugada ECG image |
| 6 | Chain of Survival — AHA 2025 | Unified single chain (new 2025), all 6 links with rationale |
| 7 | Basic Life Support | C-A-B approach, rate/depth/recoil, 30:2 ratio |
| 8 | High-Performance CPR | CCF >80%, feedback devices, LUCAS, PetCO₂, team choreography |
| 9 | Defibrillation | Energy doses, shock-CPR sequence, PAD trial, AED access |
| 10 | ACLS Algorithm | Shockable (adrenaline + amiodarone) vs Non-shockable pathways |
| 11 | H's & T's | All 10 reversible causes with specific interventions |
| 12 | Post-Arrest Bundle | Haemodynamic/Respiratory/Metabolic/Neurological goals |
| 13 | TTM | 32–36°C for 24 h, cooling methods, monitoring, contraindications |
| 14 | PCI & Neuroprognostication | Immediate angio for STEMI, multimodal neuro assessment ≥72 h |
| 15 | Summary | 10 crisp take-aways + closing quote |