I am an emergency medicine resident. Make a presentation for me on cardiogenic and obstructive shock.
please make a ppt for me
CHAPTER 50 IN THIS BOOK IS ON CARDIOGENIC SHOCK, PLEASE MAKE A PPT FOR ME USING THIS, PPT SHOULD HAVE LESS TEST, MORE INFORMATIVE DIAGRAMS AND CHARTS AND SHOULD BE COLOURFUL.
cd /tmp/workspace/attachments/079cb61a-5e57-46f5-9e16-a7d25c61c427/ && python3 -c " import pdfplumber with pdfplumber.open('CARD.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') # Search for Chapter 50 for i, page in enumerate(pdf.pages): text = page.extract_text() or '' if 'chapter 50' in text.lower() or 'cardiogenic shock' in text.lower(): print(f'Page {i+1}: {text[:200]}') print('---') if i > 10: # Just scan first 10 pages for TOC break "
python3 -c " import pdfplumber with pdfplumber.open('/tmp/workspace/attachments/079cb61a-5e57-46f5-9e16-a7d25c61c427/CARD.pdf') as pdf: for i, page in enumerate(pdf.pages): text = page.extract_text() or '' print(f'=== PAGE {i+1} ===') print(text) print() "
mkdir -p /tmp/workspace/cardiogenic-shock-ppt && python3 << 'PYEOF' 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 import copy from lxml import etree prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) blank = prs.slide_layouts[6] # ─── Colour palette ─────────────────────────────────────────────────────────── DARK_NAVY = RGBColor(0x0D, 0x1B, 0x3E) BRIGHT_BLUE = RGBColor(0x1B, 0x6C, 0xC8) TEAL = RGBColor(0x00, 0xA8, 0xB5) ORANGE = RGBColor(0xFF, 0x6B, 0x35) RED = RGBColor(0xE0, 0x2B, 0x2B) GREEN = RGBColor(0x27, 0xAE, 0x60) YELLOW = RGBColor(0xF3, 0xC6, 0x23) WHITE = RGBColor(0xFF, 0xFF, 0xFF) LIGHT_BLUE = RGBColor(0xD6, 0xEA, 0xF8) LIGHT_GREY = RGBColor(0xF2, 0xF3, 0xF4) LIGHT_TEAL = RGBColor(0xD0, 0xF0, 0xF4) PURPLE = RGBColor(0x8E, 0x44, 0xAD) DARK_RED = RGBColor(0x92, 0x25, 0x1F) # ─── Helpers ────────────────────────────────────────────────────────────────── def add_rect(slide, x, y, w, h, fill_color, alpha=None): shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h)) shape.line.fill.background() shape.fill.solid() shape.fill.fore_color.rgb = fill_color return shape def add_text(slide, text, x, y, w, h, size, color=WHITE, bold=False, italic=False, align=PP_ALIGN.LEFT, wrap=True, anchor=MSO_ANCHOR.MIDDLE): tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)) tf = tb.text_frame tf.word_wrap = wrap tf.vertical_anchor = anchor tf.margin_left = tf.margin_right = tf.margin_top = 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.color.rgb = color run.font.bold = bold run.font.italic = italic run.font.name = "Calibri" return tb def add_para(tf, text, size, color, bold=False, align=PP_ALIGN.LEFT, space_before=0): p = tf.add_paragraph() p.alignment = align if space_before: p.space_before = Pt(space_before) run = p.add_run() run.text = text run.font.size = Pt(size) run.font.color.rgb = color run.font.bold = bold run.font.name = "Calibri" return p def circle(slide, cx, cy, r, fill, text="", text_size=11, text_color=WHITE): """Draw a circle centred at (cx,cy) with radius r (all Inches).""" shape = slide.shapes.add_shape(9, # MSO_SHAPE_TYPE.OVAL Inches(cx - r), Inches(cy - r), Inches(r * 2), Inches(r * 2)) shape.fill.solid() shape.fill.fore_color.rgb = fill shape.line.fill.background() if text: tf = shape.text_frame tf.word_wrap = True tf.vertical_anchor = MSO_ANCHOR.MIDDLE p = tf.paragraphs[0] p.alignment = PP_ALIGN.CENTER run = p.add_run() run.text = text run.font.size = Pt(text_size) run.font.color.rgb = text_color run.font.bold = True run.font.name = "Calibri" return shape def arrow_line(slide, x1, y1, x2, y2, color=WHITE, width_pt=2): from pptx.util import Pt as _Pt connector = slide.shapes.add_connector(1, Inches(x1), Inches(y1), Inches(x2), Inches(y2)) connector.line.color.rgb = color connector.line.width = _Pt(width_pt) return connector # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 1 – Title # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) # Background add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY) # Decorative diagonal accent bar shape = s.shapes.add_shape(1, Inches(0), Inches(5.2), Inches(13.333), Inches(0.45)) shape.fill.solid(); shape.fill.fore_color.rgb = BRIGHT_BLUE; shape.line.fill.background() shape2 = s.shapes.add_shape(1, Inches(0), Inches(5.65), Inches(13.333), Inches(0.22)) shape2.fill.solid(); shape2.fill.fore_color.rgb = TEAL; shape2.line.fill.background() # Red heart icon (circle stand-in) circle(s, 1.3, 2.8, 0.55, RED, "♥", 22, WHITE) # Title text add_text(s, "CARDIOGENIC SHOCK", 2.2, 1.4, 10.8, 1.5, 52, WHITE, bold=True, align=PP_ALIGN.LEFT) add_text(s, "Emergency Medicine — Chapter 50 | Tintinalli's Emergency Medicine", 2.2, 2.8, 10.5, 0.8, 18, TEAL, bold=False, align=PP_ALIGN.LEFT) add_text(s, "Pathophysiology · Diagnosis · Management · Devices", 2.2, 3.5, 10.5, 0.65, 15, LIGHT_BLUE, align=PP_ALIGN.LEFT) # Bottom attribution add_text(s, "David E. Manthey | Bret A. Nicks", 0.4, 6.1, 9, 0.55, 13, RGBColor(0xA0,0xB8,0xD8), align=PP_ALIGN.LEFT) # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 2 – Epidemiology snapshot # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, LIGHT_GREY) add_rect(s, 0, 0, 13.333, 1.1, DARK_NAVY) add_text(s, "EPIDEMIOLOGY AT A GLANCE", 0.4, 0.1, 12, 0.9, 28, WHITE, bold=True) # 5 stat boxes stats = [ ("27–51%", "In-hospital\nMortality", RED), ("4–8%", "of STEMI\npatients", BRIGHT_BLUE), ("2.5%", "of NSTEMI\npatients", TEAL), ("~10%", "have CS at\nED arrival", ORANGE), ("6 hrs", "Median onset\nafter arrival", PURPLE), ] for i, (val, lbl, col) in enumerate(stats): bx = 0.3 + i * 2.6 add_rect(s, bx, 1.4, 2.3, 2.8, col) add_text(s, val, bx, 1.55, 2.3, 1.2, 36, WHITE, bold=True, align=PP_ALIGN.CENTER) add_text(s, lbl, bx, 2.75, 2.3, 0.95, 14, WHITE, align=PP_ALIGN.CENTER) # Key message add_rect(s, 0.3, 4.55, 12.7, 0.9, DARK_NAVY) add_text(s, "⚡ Leading cause of in-hospital death in AMI patients — early revascularization saves lives", 0.5, 4.6, 12.3, 0.8, 15, WHITE, bold=True, align=PP_ALIGN.CENTER) # footnote add_text(s, "Source: Tintinalli's Emergency Medicine, 8e, Ch. 50", 0.3, 6.8, 12, 0.4, 10, RGBColor(0x80,0x80,0x80), align=PP_ALIGN.RIGHT) # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 3 – Pathophysiology cycle (visual loop) # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, RGBColor(0xF8,0xF9,0xFA)) add_rect(s, 0, 0, 13.333, 1.05, DARK_NAVY) add_text(s, "PATHOPHYSIOLOGY — The Vicious Cycle", 0.4, 0.1, 12.5, 0.85, 26, WHITE, bold=True) # Central circle circle(s, 6.67, 4.1, 0.75, RED, "PUMP\nFAILURE", 11, WHITE) # Surrounding nodes and arrows (6 nodes in a hexagonal arrangement) import math nodes = [ ("↓ Cardiac\nOutput", BRIGHT_BLUE, 0), ("↓ SBP &\nCoronary\nPerfusion", ORANGE, 60), ("Myocardial\nIschemia\nWorsens", RED, 120), ("↑ LVEDP\nPulm. Edema", PURPLE, 180), ("Hypoxia &\nAcidosis", DARK_RED, 240), ("Systemic\nInflamm. +\nVasodilation", TEAL, 300), ] cx, cy, ring_r, node_r = 6.67, 4.1, 2.35, 0.58 for label, col, angle_deg in nodes: angle = math.radians(angle_deg - 90) nx = cx + ring_r * math.cos(angle) ny = cy + ring_r * math.sin(angle) circle(s, nx, ny, node_r, col, label, 9, WHITE) # Arrow from central circle to node (just a line) frac = 0.72 ax1 = cx + 0.75 * math.cos(angle) ay1 = cy + 0.75 * math.sin(angle) ax2 = nx - node_r * math.cos(angle) * 1.0 ay2 = ny - node_r * math.sin(angle) * 1.0 arrow_line(s, ax1, ay1, ax2, ay2, RGBColor(0xBB,0xBB,0xBB), 1.5) add_text(s, "Each step reinforces the next — early intervention is critical to break the cycle", 1.0, 6.75, 11.3, 0.5, 12, RGBColor(0x44,0x44,0x44), italic=True, align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 4 – Risk Factors & Causes (two-column) # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, RGBColor(0xEA,0xF2,0xFB)) add_rect(s, 0, 0, 13.333, 1.05, BRIGHT_BLUE) add_text(s, "RISK FACTORS & CAUSES", 0.4, 0.1, 12, 0.85, 26, WHITE, bold=True) # Left panel – Risk Factors add_rect(s, 0.3, 1.25, 5.9, 5.8, DARK_NAVY) add_text(s, "⚠ RISK FACTORS", 0.5, 1.35, 5.5, 0.55, 15, YELLOW, bold=True) risks = [ "• Elderly / Female sex", "• Anterior MI / Proximal LAD occlusion", "• Large infarct (high troponin leak)", "• Impaired EF / Prior MI / CHF", "• Multivessel coronary artery disease", "• Diabetes mellitus", ] for i, r in enumerate(risks): add_text(s, r, 0.5, 2.0 + i*0.72, 5.5, 0.65, 13, LIGHT_BLUE) # Right panel – Causes add_rect(s, 6.9, 1.25, 6.1, 5.8, RGBColor(0x1A,0x3A,0x5C)) add_text(s, "🔍 CAUSES OF CARDIOGENIC SHOCK", 7.1, 1.35, 5.7, 0.55, 14, YELLOW, bold=True) cause_groups = [ (ORANGE, "MECHANICAL COMPLICATIONS", ["Acute mitral regurgitation (papillary rupture)", "Ventricular septal defect", "Free wall rupture", "RV infarction", "Acute aortic insufficiency (dissection)"]), (TEAL, "CONTRACTILITY FAILURE", ["Acute MI | Sepsis | Myocarditis", "Cardiomyopathy | Drug toxicity", "Unstable dysrhythmia"]), (PURPLE, "MECHANICAL OBSTRUCTION", ["Aortic / Mitral stenosis", "Hypertrophic cardiomyopathy", "Cardiac tamponade | LA myxoma"]), ] y = 2.05 for col, heading, items in cause_groups: add_rect(s, 7.05, y, 5.75, 0.35, col) add_text(s, heading, 7.15, y + 0.02, 5.5, 0.32, 11, WHITE, bold=True) y += 0.38 for item in items: add_text(s, " – " + item, 7.1, y, 5.75, 0.38, 11, LIGHT_BLUE) y += 0.38 y += 0.1 # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 5 – Clinical Features (two-pane: LV vs RV) # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, RGBColor(0xFD,0xF2,0xF8)) add_rect(s, 0, 0, 13.333, 1.05, PURPLE) add_text(s, "CLINICAL FEATURES", 0.4, 0.1, 12, 0.85, 26, WHITE, bold=True) # LV shock panel add_rect(s, 0.3, 1.2, 5.9, 5.9, RGBColor(0x1A,0x1A,0x5E)) add_text(s, "LEFT VENTRICULAR SHOCK", 0.5, 1.3, 5.5, 0.55, 14, YELLOW, bold=True) lv_items = [ ("Vital Signs", "SBP <90 mmHg | Pulse pressure <20 mmHg\nSinus tachycardia | Tachypnoea"), ("Respiratory", "Bilateral rales (pulmonary oedema)\nIncreased work of breathing"), ("Skin", "Pale / cyanotic, cool & mottled\nDiaphoresis (sympathetic activation)"), ("Neuro / Renal", "Altered mental status (cerebral hypoperfusion)\nOliguria / anuria"), ("Haemodynamic", "Low cardiac index (<2.2 L/min/m²)\nElevated LVEDP (PCWP >15 mmHg)"), ] y = 2.05 for title, detail in lv_items: add_rect(s, 0.4, y, 5.65, 0.28, BRIGHT_BLUE) add_text(s, title, 0.5, y + 0.01, 5.5, 0.26, 11, WHITE, bold=True) y += 0.3 add_text(s, detail, 0.5, y, 5.65, 0.52, 11, LIGHT_BLUE) y += 0.56 # RV shock panel add_rect(s, 7.1, 1.2, 5.9, 5.9, RGBColor(0x1F,0x3B,0x2A)) add_text(s, "RIGHT VENTRICULAR SHOCK", 7.3, 1.3, 5.5, 0.55, 14, YELLOW, bold=True) rv_items = [ ("Venous Congestion", "Elevated JVP | Kussmaul's sign\nHepatojugular reflux | Oedema"), ("Cardiac", "S₃ from RV | New murmurs\n(MR: holosystolic at apex → axilla)"), ("Respiratory", "Lungs CLEAR (RV shock)\nContrast with LV shock"), ("Mechanical", "New loud holosystolic LSB murmur → VSD\nSoft diastolic murmur → Aortic insufficiency"), ("Key Distinction", "RV: no pulmonary oedema\nFill with fluids (not diuretics!)"), ] y = 2.05 for title, detail in rv_items: add_rect(s, 7.2, y, 5.65, 0.28, TEAL) add_text(s, title, 7.3, y + 0.01, 5.5, 0.26, 11, WHITE, bold=True) y += 0.3 add_text(s, detail, 7.2, y, 5.65, 0.52, 11, RGBColor(0xC8,0xF7,0xEC)) y += 0.56 # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 6 – Diagnostic Workup (visual checklist) # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, RGBColor(0xF0,0xF8,0xFF)) add_rect(s, 0, 0, 13.333, 1.05, TEAL) add_text(s, "DIAGNOSTIC WORKUP", 0.4, 0.1, 12, 0.85, 26, WHITE, bold=True) cols = [ (BRIGHT_BLUE, "ECG", [ "Rule out STEMI", "Ischaemic changes", "Right-sided leads (V₁R–V₆R)", "ST elevation in V₃R–V₆R → RV infarct", "Dysrhythmias / drug toxicity", ]), (PURPLE, "LABS", [ "Troponin (may be normal early)", "BNP (<100 = cardiogenic shock unlikely)", "Lactate (tissue hypoperfusion)", "ABG (acidosis / respiratory failure)", "CBC, metabolic panel, LFTs", ]), (ORANGE, "CXR", [ "Pulmonary oedema / congestion", "Pleural effusion", "Cardiomegaly", "Findings lag by hours", "Exclude pneumothorax / pneumonia", ]), (GREEN, "POCUS / ECHO", [ "EF + wall motion abnormality", "Dilated RV vs LV", "IVC collapsibility (volume status)", "Pericardial effusion / tamponade", "Aortic root >3 cm → dissection", ]), ] for i, (col, title, items) in enumerate(cols): bx = 0.3 + i * 3.25 add_rect(s, bx, 1.25, 3.0, 0.5, col) add_text(s, title, bx, 1.3, 3.0, 0.42, 15, WHITE, bold=True, align=PP_ALIGN.CENTER) for j, item in enumerate(items): bg = RGBColor(0xE8,0xF4,0xFD) if i%2==0 else RGBColor(0xF5,0xEC,0xFF) add_rect(s, bx, 1.85 + j*0.98, 3.0, 0.88, bg) add_text(s, "✓ " + item, bx + 0.1, 1.9 + j*0.98, 2.8, 0.78, 12, DARK_NAVY, align=PP_ALIGN.LEFT) add_text(s, "Shock = tissue hypoperfusion: SBP <90 mmHg OR MAP <65 mmHg + end-organ signs", 0.4, 6.8, 12.5, 0.45, 12, RGBColor(0x33,0x33,0x33), bold=True, align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 7 – POCUS findings visual # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY) add_rect(s, 0, 0, 13.333, 1.05, TEAL) add_text(s, "POCUS IN CARDIOGENIC SHOCK", 0.4, 0.1, 12, 0.85, 26, DARK_NAVY, bold=True) findings = [ (BRIGHT_BLUE, "Subcostal\n4-Chamber", "• Pericardial effusion\n• Cardiac tamponade\n• Diastolic RV collapse\n• Systolic RA collapse"), (ORANGE, "Parasternal\nLong Axis", "• Aortic root (>3cm → dissection)\n• Mitral valve motion\n• EF estimation\n• LVEDP surrogates"), (PURPLE, "Apical\n4-Chamber", "• Chamber size comparison\n• RV dilation (RV > LV)\n• Regional wall motion\n• Tricuspid regurgitation"), (GREEN, "Lung Zones\n(Bilateral)", "• B-lines ≥3 in 2 zones\n• = Kerley B equivalent\n• = Interstitial oedema\n• Absent in RV shock"), (RED, "IVC View\n(Subcostal)", "• IVC >2.1cm + <50% collapse\n→ High RA pressure\n• IVC <1.5cm + >50% collapse\n→ Low RA pressure"), ] for i, (col, title, detail) in enumerate(findings): bx = 0.35 + i * 2.6 add_rect(s, bx, 1.25, 2.4, 0.65, col) add_text(s, title, bx, 1.3, 2.4, 0.62, 13, WHITE, bold=True, align=PP_ALIGN.CENTER) add_rect(s, bx, 1.95, 2.4, 4.8, RGBColor(0x0D,0x2A,0x4A)) add_text(s, detail, bx + 0.08, 2.0, 2.25, 4.65, 12, LIGHT_BLUE, wrap=True) add_text(s, "POCUS is adjunct — formal TTE with colour Doppler is the gold standard", 0.4, 7.0, 12.5, 0.4, 11, RGBColor(0xAA,0xCC,0xFF), italic=True, align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 8 – Management Algorithm (flowchart) # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, RGBColor(0xF4,0xF6,0xF7)) add_rect(s, 0, 0, 13.333, 1.0, ORANGE) add_text(s, "MANAGEMENT ALGORITHM", 0.4, 0.08, 12, 0.84, 26, WHITE, bold=True) # Flowchart: 4 columns (Airway → Stabilize → Hypotension → Definitive) steps = [ (BRIGHT_BLUE, "① AIRWAY", [ "O₂ to keep SpO₂ >91%", "CPAP / BiPAP / HFNC", "Intubate if needed", "⚠ Risk: ↓ preload with\npositive pressure", "Push-dose vasopressors\npre/post intubation", ]), (TEAL, "② STABILISE", [ "Continuous cardiac monitor", "IV access (2 large-bore)", "Correct electrolytes", "Correct dysrhythmias", "Aspirin early (if no CI)", "Urinary catheter (UO tracking)", ]), (ORANGE, "③ HYPOTENSION", [ "SBP >90: Dobutamine ±\nDopamine / Norepinephrine", "SBP <90 & congestion:\nDobu + Norepi/Dopamine", "SBP <70: Norepinephrine", "On β-blocker: use Milrinone", "No fluid if pulm congestion", "Fluid bolus if RV shock", ]), (RED, "④ DEFINITIVE Tx", [ "STEMI → Emergent PCI", "Thrombolytics if no cath lab", "Valvular/rupture → Surgery", "PE → Thrombolytics", "IABP bridge to PCI", "VAD / ECMO if refractory", ]), ] for i, (col, title, items) in enumerate(steps): bx = 0.25 + i * 3.25 add_rect(s, bx, 1.1, 3.0, 0.52, col) add_text(s, title, bx, 1.13, 3.0, 0.47, 14, WHITE, bold=True, align=PP_ALIGN.CENTER) for j, item in enumerate(items): bg = LIGHT_GREY if j % 2 == 0 else RGBColor(0xE0,0xE8,0xF0) add_rect(s, bx, 1.68 + j * 0.88, 3.0, 0.83, bg) add_text(s, item, bx + 0.1, 1.7 + j*0.88, 2.8, 0.78, 11, DARK_NAVY, wrap=True) # Arrow between columns for i in range(3): ax = 3.22 + i * 3.25 add_rect(s, ax, 2.1, 0.07, 0.35, ORANGE) # simple block arrow # Triangle arrowhead from pptx.util import Inches as I arr = s.shapes.add_shape(5, I(ax - 0.05), I(2.45), I(0.17), I(0.2)) arr.fill.solid(); arr.fill.fore_color.rgb = ORANGE; arr.line.fill.background() # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 9 – Vasopressor / Inotrope Comparison Chart # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY) add_rect(s, 0, 0, 13.333, 1.0, PURPLE) add_text(s, "VASOACTIVE DRUG GUIDE", 0.4, 0.08, 12, 0.84, 26, WHITE, bold=True) headers = ["Drug", "Dose", "Mechanism", "First-Line Use", "Key Caution"] col_widths = [1.9, 2.8, 2.5, 3.4, 2.4] col_colors = [PURPLE, BRIGHT_BLUE, TEAL, GREEN, ORANGE] xs = [0.2] for w in col_widths[:-1]: xs.append(xs[-1] + w + 0.05) # Header row for j, (hdr, cx, cw, cc) in enumerate(zip(headers, xs, col_widths, col_colors)): add_rect(s, cx, 1.1, cw, 0.5, cc) add_text(s, hdr, cx, 1.12, cw, 0.46, 13, WHITE, bold=True, align=PP_ALIGN.CENTER) drugs = [ ("Dobutamine", "2–20 µg/kg/min", "β₁ inotrope\n(vasodilator)", "SBP ≥90 mmHg\nNo β-blocker use", "↓ BP if vasodilation; avoid β-blocker pts"), ("Dopamine", "3–20 µg/kg/min", "β₁ inotrope +\nvasoconstrictor", "With dobutamine\nif SBP marginal", "↑ HR, ↑ LVEDP, dysrhythmias"), ("Norepinephrine","2 µg/min → titrate", "α₁ vasoconstrictor\n+ β₁ inotrope", "SBP <70 mmHg\nFirst-line vasopressor","Can worsen RV afterload"), ("Epinephrine", "0.1–0.5 µg/kg/min", "β₁ + α₁ + β₂", "Second-tier only", "Metabolic acidosis, tachyarrhythmias"), ("Milrinone", "0.5 µg/kg/min", "PDE-3 inhibitor\n(inodilator)", "β-blocker-treated\npatients", "↓ BP; long half-life; renal clearance"), ] row_bg = [RGBColor(0x10,0x22,0x40), RGBColor(0x14,0x2D,0x50)] for i, row in enumerate(drugs): bg = row_bg[i % 2] for j, (cell, cx, cw) in enumerate(zip(row, xs, col_widths)): add_rect(s, cx, 1.65 + i * 1.02, cw, 0.97, bg) add_text(s, cell, cx + 0.05, 1.66 + i * 1.02, cw - 0.1, 0.92, 11, LIGHT_BLUE if j > 0 else YELLOW, bold=(j==0), wrap=True) # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 10 – Mechanical Circulatory Support # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, RGBColor(0xF0,0xF4,0xFF)) add_rect(s, 0, 0, 13.333, 1.0, DARK_NAVY) add_text(s, "MECHANICAL CIRCULATORY SUPPORT", 0.4, 0.08, 12, 0.84, 26, WHITE, bold=True) devices = [ (BRIGHT_BLUE, "IABP\n(Intra-Aortic\nBalloon Pump)", "Inflates during\ndiastole → ↑ coronary\nperfusion pressure", "↓ afterload → ↓ O₂\nconsumption", "Bridge to PCI or\nto surgery"), (ORANGE, "Impella®\n(Percutaneous\nVAD)", "Microaxial pump\nfrom LV into\naorta", "↑ CO by 2.5–5 L/min\nLV unloading", "Bridge to recovery\nor transplant"), (PURPLE, "TandemHeart®\n(Percutaneous\nVAD)", "Trans-septal LA\ndrainage → femoral\nartery return", "Bypasses LV\ncompletely", "Refractory shock;\nbridge to decision"), (GREEN, "VA-ECMO\n(Extracorporeal\nMembrane Ox.)", "Full cardiopulmonary\nbypass via\nfemoral vessels", "Near-total\ncirculatory support\n+ oxygenation", "Last resort; bridge\nto VAD / transplant"), ] for i, (col, title, mech, effect, use) in enumerate(devices): bx = 0.4 + i * 3.2 # Header add_rect(s, bx, 1.1, 2.9, 0.95, col) add_text(s, title, bx, 1.12, 2.9, 0.9, 12, WHITE, bold=True, align=PP_ALIGN.CENTER) # Three info rows for k, (label, content) in enumerate( [("Mechanism", mech), ("Effect", effect), ("Use Case", use)]): yy = 2.1 + k * 1.55 add_rect(s, bx, yy, 2.9, 0.42, DARK_NAVY) add_text(s, label, bx + 0.08, yy + 0.02, 2.74, 0.38, 10, YELLOW, bold=True) add_rect(s, bx, yy + 0.42, 2.9, 1.08, RGBColor(0xEB,0xF0,0xFF) if i%2==0 else RGBColor(0xF5,0xEA,0xFF)) add_text(s, content, bx + 0.1, yy + 0.44, 2.7, 1.0, 11, DARK_NAVY, wrap=True) # Escalation ladder at bottom add_rect(s, 0.4, 7.05, 12.5, 0.32, RGBColor(0x1B,0x3A,0x5C)) add_text(s, "Escalation: Medical Therapy → IABP → Percutaneous VAD → VA-ECMO → Surgical VAD / Transplant", 0.6, 7.07, 12.1, 0.28, 11, YELLOW, bold=True, align=PP_ALIGN.CENTER) # ═══════════════════════════════════════════════════════════════════════════════ # SLIDE 11 – Summary / Key Takeaways # ═══════════════════════════════════════════════════════════════════════════════ s = prs.slides.add_slide(blank) add_rect(s, 0, 0, 13.333, 7.5, DARK_NAVY) add_rect(s, 0, 0, 13.333, 1.1, RED) add_text(s, "KEY TAKEAWAYS — CARDIOGENIC SHOCK", 0.4, 0.1, 12.5, 0.9, 24, WHITE, bold=True) takeaways = [ (BRIGHT_BLUE, "1", "Mortality 27–51%", "Leading cause of in-hospital death in AMI — time is muscle and time is life."), (ORANGE, "2", "Early PCI is the #1 intervention", "Emergent revascularisation improves survival more than any drug. Activate the cath lab."), (TEAL, "3", "POCUS is your bedside guide", "Echo distinguishes LV vs RV shock, tamponade, PE, and mechanical catastrophe instantly."), (PURPLE, "4", "Tailor vasopressors to BP", "SBP ≥90 → Dobutamine; SBP <90 → add Norepi; SBP <70 → Norepi first; β-blocked → Milrinone."), (GREEN, "5", "Escalate mechanically when drugs fail", "IABP → Impella/TandemHeart → VA-ECMO → Surgical VAD/transplant."), (YELLOW, "6", "RV shock ≠ LV shock", "RV infarct: clear lungs, fluid-responsive, right-sided leads. Avoid diuretics."), ] for i, (col, num, headline, detail) in enumerate(takeaways): row = i // 2 col_idx = i % 2 bx = 0.3 + col_idx * 6.5 by = 1.25 + row * 2.0 add_rect(s, bx, by, 0.55, 1.65, col) add_text(s, num, bx, by + 0.5, 0.55, 0.65, 22, WHITE, bold=True, align=PP_ALIGN.CENTER) add_rect(s, bx + 0.55, by, 5.7, 0.52, RGBColor(0x1E,0x3A,0x5F)) add_text(s, headline, bx + 0.65, by + 0.03, 5.5, 0.46, 13, YELLOW, bold=True) add_rect(s, bx + 0.55, by + 0.52, 5.7, 1.13, RGBColor(0x12,0x25,0x40)) add_text(s, detail, bx + 0.65, by + 0.55, 5.5, 1.05, 12, LIGHT_BLUE, wrap=True) out = "/tmp/workspace/cardiogenic-shock-ppt/Cardiogenic_Shock.pptx" prs.save(out) print("Saved:", out) PYEOF
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/cardiogenic-shock-ppt/Cardiogenic_Shock.pptx') print(f'Slides: {len(prs.slides)}') import os print(f'File size: {os.path.getsize(\"/tmp/workspace/cardiogenic-shock-ppt/Cardiogenic_Shock.pptx\")} bytes') "
Cardiogenic Shock
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title slide - dark navy with accent bars |
| 2 | Epidemiology - 5 stat boxes (27-51% mortality, 4-8% STEMI, etc.) |
| 3 | Pathophysiology - circular vicious cycle diagram (6 nodes) |
| 4 | Risk Factors & Causes - two-column colour-coded panels |
| 5 | Clinical Features - LV shock vs RV shock side-by-side comparison |
| 6 | Diagnostic Workup - 4-column checklist (ECG / Labs / CXR / POCUS) |
| 7 | POCUS Findings - 5 view-by-view breakdown |
| 8 | Management Algorithm - 4-step flowchart (Airway → Stabilise → Hypotension → Definitive) |
| 9 | Vasopressor/Inotrope Guide - comparison table (Dobutamine, Norepi, Dopamine, Milrinone, Epi) |
| 10 | Mechanical Circulatory Support - IABP / Impella / TandemHeart / VA-ECMO cards with escalation ladder |
| 11 | Key Takeaways - 6 colour-coded summary boxes |