A detailed presentation on anti platelet drugs in management of cardiovascular disease including dosage and treatment duration regimen

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Searching the Web

antiplatelet drugs cardiovascular disease management guidelines 2024 2025 dosage regimen

Loading Image
Loading Image
Running Command

mkdir -p /tmp/workspace/antiplatelet-pptx && ls /tmp/workspace/antiplatelet-pptx/

Writing File

~/antiplatelet-pptx/build_pptx.py

#!/usr/bin/env python3
"""
Antiplatelet Drugs in Cardiovascular Disease - Comprehensive Presentation Builder
"""

import subprocess, json, base64, io, os
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 pptx.oxml import parse_xml
from lxml import etree
from io import BytesIO
import requests

# ─── Color Palette ────────────────────────────────────────────────────────────
DARK_BLUE    = RGBColor(0x0D, 0x2B, 0x5E)   # deep navy
MED_BLUE     = RGBColor(0x1A, 0x5E, 0xAB)   # medium blue
LIGHT_BLUE   = RGBColor(0xD6, 0xE8, 0xF7)   # pale blue
ACCENT_RED   = RGBColor(0xC0, 0x39, 0x2B)   # accent red
ACCENT_TEAL  = RGBColor(0x00, 0x7A, 0x87)   # teal
ACCENT_GREEN = RGBColor(0x1E, 0x8A, 0x44)   # green
WHITE        = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GRAY   = RGBColor(0xF4, 0xF6, 0xF8)
MID_GRAY     = RGBColor(0x7F, 0x8C, 0x8D)
DARK_GRAY    = RGBColor(0x2C, 0x3E, 0x50)
AMBER        = RGBColor(0xF3, 0x9C, 0x12)
ORANGE       = RGBColor(0xE6, 0x7E, 0x22)

prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]

# ─── Helper utilities ──────────────────────────────────────────────────────────

def add_rect(slide, x, y, w, h, fill_color, line_color=None, line_width=0):
    shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
    shape.fill.solid()
    shape.fill.fore_color.rgb = fill_color
    if line_color:
        shape.line.color.rgb = line_color
        shape.line.width = Pt(line_width)
    else:
        shape.line.fill.background()
    return shape

def add_text(slide, text, x, y, w, h, font_size=14, bold=False, color=DARK_GRAY,
             align=PP_ALIGN.LEFT, italic=False, wrap=True, anchor=MSO_ANCHOR.TOP):
    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  = 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(font_size)
    run.font.bold = bold
    run.font.italic = italic
    run.font.color.rgb = color
    run.font.name = "Calibri"
    return tb

def add_multiline(slide, lines, x, y, w, h, font_size=12, color=DARK_GRAY,
                  bold_first=False, line_space=1.15, align=PP_ALIGN.LEFT):
    """lines: list of (text, bold, color_override_or_None)"""
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left  = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top   = Pt(2)
    tf.margin_bottom= Pt(2)
    for i, item in enumerate(lines):
        if isinstance(item, str):
            text, bold, col = item, False, color
        elif len(item) == 2:
            text, bold = item; col = color
        else:
            text, bold, col = item
        if i == 0:
            p = tf.paragraphs[0]
        else:
            p = tf.add_paragraph()
        p.alignment = align
        p.space_after = Pt(2)
        run = p.add_run()
        run.text = text
        run.font.size = Pt(font_size)
        run.font.bold = bold
        run.font.color.rgb = col
        run.font.name = "Calibri"
    return tb

def add_bullet_box(slide, title, bullets, x, y, w, h,
                   title_size=13, bullet_size=11,
                   box_color=LIGHT_BLUE, title_color=DARK_BLUE,
                   bullet_color=DARK_GRAY):
    add_rect(slide, x, y, w, h, box_color)
    add_text(slide, title, x+0.08, y+0.06, w-0.16, 0.32,
             font_size=title_size, bold=True, color=title_color)
    y_cur = y + 0.38
    for b in bullets:
        add_text(slide, f"• {b}", x+0.1, y_cur, w-0.2, 0.25,
                 font_size=bullet_size, color=bullet_color, wrap=True)
        y_cur += 0.24
    return y_cur

def download_image(url, path):
    try:
        r = requests.get(url, timeout=10)
        with open(path, 'wb') as f:
            f.write(r.content)
        return True
    except Exception as e:
        print(f"Image download failed: {e}")
        return False

# Download textbook images
img1_url = "https://cdn.orris.care/cdss_images/9fd1a3bba0bc708dcedb82ad2004cedfd25fe6e83bf6b5a0e8efe7cc4e09f32a.png"
img2_url = "https://cdn.orris.care/cdss_images/ce5409b2c31470519829093e582fc21ef28cfa8e9b2514f44a38ac96f76a4e83.png"
img1_path = "/tmp/workspace/antiplatelet-pptx/aspirin_moa.png"
img2_path = "/tmp/workspace/antiplatelet-pptx/p2y12_moa.png"
download_image(img1_url, img1_path)
download_image(img2_url, img2_path)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 1 — TITLE SLIDE
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(slide, 0, 5.3, 13.333, 2.2, MED_BLUE)
add_rect(slide, 0.5, 1.0, 12.333, 0.06, ACCENT_TEAL)  # divider line

add_text(slide, "ANTIPLATELET DRUGS", 0.5, 1.3, 12.333, 1.3,
         font_size=44, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_text(slide, "in the Management of Cardiovascular Disease",
         0.5, 2.55, 12.333, 0.7, font_size=24, bold=False, color=LIGHT_BLUE,
         align=PP_ALIGN.CENTER)
add_rect(slide, 4.5, 3.4, 4.333, 0.06, ACCENT_TEAL)
add_text(slide, "Dosage • Mechanisms • Treatment Duration • Guidelines",
         0.5, 3.6, 12.333, 0.5, font_size=16, bold=False, color=RGBColor(0xBB, 0xD6, 0xF0),
         align=PP_ALIGN.CENTER)
add_text(slide, "Based on: Harrison's 22e | Washington Manual | Current Surgical Therapy | Lippincott Pharmacology",
         0.5, 5.55, 12.333, 0.4, font_size=10, color=RGBColor(0xAA, 0xCC, 0xEE),
         align=PP_ALIGN.CENTER)
add_text(slide, "2025 ACC/AHA ACS Guidelines | 2026 ACC Scientific Statement",
         0.5, 5.95, 12.333, 0.35, font_size=10, color=RGBColor(0xAA, 0xCC, 0xEE),
         align=PP_ALIGN.CENTER)
add_text(slide, "July 2026", 0.5, 6.85, 12.333, 0.35,
         font_size=11, color=RGBColor(0xBB, 0xBB, 0xCC), align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 2 — OVERVIEW / OUTLINE
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.1, DARK_BLUE)
add_text(slide, "Overview", 0.4, 0.1, 12, 0.9, font_size=32, bold=True,
         color=WHITE, align=PP_ALIGN.LEFT)
add_rect(slide, 0, 1.1, 13.333, 6.4, LIGHT_GRAY)

topics = [
    ("1", "Platelet Biology & Thrombosis Cascade", DARK_BLUE),
    ("2", "Classification of Antiplatelet Drugs", MED_BLUE),
    ("3", "Aspirin (COX Inhibitor) — Mechanism, Dosage, Duration", ACCENT_TEAL),
    ("4", "P2Y12 Inhibitors — Clopidogrel, Prasugrel, Ticagrelor, Cangrelor", ACCENT_GREEN),
    ("5", "GP IIb/IIIa Inhibitors — Abciximab, Eptifibatide, Tirofiban", ACCENT_RED),
    ("6", "Dual Antiplatelet Therapy (DAPT) — Regimens & Duration", MED_BLUE),
    ("7", "Clinical Scenarios: ACS, PCI, STEMI, Stable CAD, Stroke", DARK_BLUE),
    ("8", "Adverse Effects, Contraindications & Drug Interactions", ACCENT_RED),
    ("9", "Special Populations & Perioperative Management", ORANGE),
    ("10", "Current Guidelines Summary (2025 ACC/AHA, 2026 ACC)", ACCENT_TEAL),
]

for i, (num, topic, col) in enumerate(topics):
    row = i % 5
    col_x = 0.3 if i < 5 else 6.8
    y_pos = 1.4 + row * 0.95
    add_rect(slide, col_x, y_pos, 0.55, 0.65, col)
    add_text(slide, num, col_x, y_pos, 0.55, 0.65,
             font_size=18, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             anchor=MSO_ANCHOR.MIDDLE)
    add_text(slide, topic, col_x + 0.65, y_pos + 0.08, 5.7, 0.55,
             font_size=13.5, bold=False, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 3 — PLATELET BIOLOGY & THROMBOSIS
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, DARK_BLUE)
add_text(slide, "Platelet Biology & The Thrombosis Cascade", 0.3, 0.05, 12.5, 0.9,
         font_size=26, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

# Left panel: Normal hemostasis steps
add_rect(slide, 0.25, 1.15, 6.0, 5.9, WHITE)
add_text(slide, "Normal Platelet Activation Steps", 0.35, 1.2, 5.8, 0.4,
         font_size=15, bold=True, color=DARK_BLUE)

steps = [
    ("1. Vascular Injury", "Endothelial damage exposes sub-endothelial collagen and von Willebrand factor (vWF)"),
    ("2. Platelet Adhesion", "Platelets adhere via GPIb receptor binding to vWF; collagen activates GPVI"),
    ("3. Platelet Activation", "ADP released from dense granules → P2Y12 receptor activation; TXA2 synthesis via COX-1"),
    ("4. Shape Change", "Platelets swell, extend pseudopods; intracellular Ca²⁺ rises"),
    ("5. GP IIb/IIIa Activation", "Conformational change exposes fibrinogen-binding site on GP IIb/IIIa receptor"),
    ("6. Platelet Aggregation", "Fibrinogen bridges adjacent platelets → platelet plug forms"),
    ("7. Thrombus Stabilization", "Coagulation cascade generates thrombin → fibrin cross-linking"),
]
for j, (step, desc) in enumerate(steps):
    y0 = 1.68 + j*0.74
    add_rect(slide, 0.3, y0, 0.32, 0.32, MED_BLUE)
    add_text(slide, str(j+1), 0.3, y0, 0.32, 0.32, font_size=11, bold=True,
             color=WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
    add_text(slide, step, 0.68, y0, 1.9, 0.32, font_size=10.5, bold=True, color=DARK_BLUE)
    add_text(slide, desc, 0.68, y0+0.3, 5.4, 0.38, font_size=9.5, color=DARK_GRAY, wrap=True)

# Right panel: Key targets
add_rect(slide, 6.55, 1.15, 6.5, 2.6, RGBColor(0xE8, 0xF4, 0xFF))
add_text(slide, "Key Antiplatelet Drug Targets", 6.65, 1.2, 6.2, 0.38,
         font_size=14, bold=True, color=DARK_BLUE)
targets = [
    ("COX-1 Enzyme", "→ Aspirin inhibits TXA2 synthesis", ACCENT_RED),
    ("P2Y12 ADP Receptor", "→ Thienopyridines, ticagrelor, cangrelor", ACCENT_GREEN),
    ("GP IIb/IIIa Receptor", "→ Abciximab, eptifibatide, tirofiban", MED_BLUE),
    ("PAR-1 Receptor", "→ Vorapaxar (thrombin receptor)", ORANGE),
    ("Phosphodiesterase", "→ Dipyridamole, cilostazol", ACCENT_TEAL),
]
for j, (tgt, detail, col) in enumerate(targets):
    y0 = 1.65 + j*0.42
    add_rect(slide, 6.6, y0+0.02, 0.16, 0.28, col)
    add_text(slide, tgt, 6.85, y0, 2.2, 0.28, font_size=10.5, bold=True, color=col)
    add_text(slide, detail, 9.1, y0, 3.8, 0.28, font_size=10, color=DARK_GRAY)

add_rect(slide, 6.55, 3.85, 6.5, 3.15, RGBColor(0xFD, 0xF2, 0xE4))
add_text(slide, "Clinical Significance of Antiplatelet Therapy", 6.65, 3.9, 6.2, 0.38,
         font_size=13, bold=True, color=ORANGE)
facts = [
    "Platelets cannot synthesize new proteins — COX inhibition by aspirin is permanent for platelet lifespan (~10 days)",
    "ACS events are primarily triggered by plaque rupture + platelet thrombus formation",
    "DAPT reduces major cardiovascular events by 18–30% in ACS vs aspirin alone",
    "Stent thrombosis risk is highest in first 30 days; DAPT duration is critical",
    "Antiplatelet resistance occurs in ~20–25% of patients on clopidogrel (CYP2C19 polymorphism)",
]
for j, fact in enumerate(facts):
    add_text(slide, f"• {fact}", 6.65, 4.35 + j*0.52, 6.2, 0.48,
             font_size=10, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 4 — CLASSIFICATION
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, DARK_BLUE)
add_text(slide, "Classification of Antiplatelet Drugs", 0.3, 0.05, 12.5, 0.9,
         font_size=26, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

classes = [
    {
        "class": "I. COX Inhibitors",
        "color": ACCENT_RED,
        "drugs": ["Aspirin (acetylsalicylic acid)"],
        "moa": "Irreversibly acetylates COX-1/COX-2 → ↓ TXA2 → ↓ platelet aggregation & vasoconstriction",
    },
    {
        "class": "II. P2Y12 ADP Receptor Antagonists",
        "color": ACCENT_GREEN,
        "drugs": ["Clopidogrel (Plavix)", "Prasugrel (Effient)", "Ticagrelor (Brilinta)", "Cangrelor (Kengreal)", "Ticlopidine (older)"],
        "moa": "Block ADP-mediated activation of P2Y12 receptor → prevent GP IIb/IIIa activation → ↓ aggregation",
    },
    {
        "class": "III. GP IIb/IIIa Inhibitors",
        "color": MED_BLUE,
        "drugs": ["Abciximab (ReoPro)", "Eptifibatide (Integrilin)", "Tirofiban (Aggrastat)"],
        "moa": "Block final common pathway of platelet aggregation — fibrinogen binding to GP IIb/IIIa receptor",
    },
    {
        "class": "IV. PAR-1 Antagonist",
        "color": ORANGE,
        "drugs": ["Vorapaxar (Zontivity)"],
        "moa": "Blocks protease-activated receptor-1 (PAR-1) — thrombin-mediated platelet activation",
    },
    {
        "class": "V. Phosphodiesterase Inhibitors",
        "color": ACCENT_TEAL,
        "drugs": ["Dipyridamole", "Cilostazol"],
        "moa": "Inhibit PDE → ↑ cAMP → ↓ platelet aggregation; also vasodilatory effects",
    },
]

cols_x = [0.25, 2.95, 5.65, 8.35, 11.05]
for i, cls in enumerate(classes):
    x = cols_x[i]
    w = 2.55
    add_rect(slide, x, 1.1, w, 0.55, cls["color"])
    add_text(slide, cls["class"], x+0.07, 1.12, w-0.12, 0.5,
             font_size=11, bold=True, color=WHITE, wrap=True, align=PP_ALIGN.CENTER,
             anchor=MSO_ANCHOR.MIDDLE)
    y_d = 1.72
    add_rect(slide, x, y_d, w, 0.06, cls["color"])
    add_text(slide, "Drugs:", x+0.07, 1.78, w-0.12, 0.28,
             font_size=10, bold=True, color=cls["color"])
    y_d = 2.06
    for drug in cls["drugs"]:
        add_text(slide, f"• {drug}", x+0.1, y_d, w-0.18, 0.26,
                 font_size=9.5, color=DARK_GRAY, wrap=True)
        y_d += 0.24
    add_rect(slide, x, 4.5, w, 0.06, cls["color"])
    add_text(slide, "Mechanism:", x+0.07, 4.58, w-0.12, 0.28,
             font_size=10, bold=True, color=cls["color"])
    add_text(slide, cls["moa"], x+0.08, 4.87, w-0.15, 1.75,
             font_size=9, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 5 — ASPIRIN
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, ACCENT_RED)
add_text(slide, "Aspirin (Acetylsalicylic Acid) — COX Inhibitor", 0.3, 0.05, 12.5, 0.9,
         font_size=26, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

# Left: mechanism image
if os.path.exists(img1_path):
    slide.shapes.add_picture(img1_path, Inches(0.2), Inches(1.1), Inches(3.8), Inches(4.2))
add_text(slide, "Fig: Aspirin irreversibly inhibits COX enzyme\n→ ↓ TXA2 → ↓ platelet reactivity",
         0.2, 5.35, 3.8, 0.7, font_size=9, italic=True, color=MID_GRAY, wrap=True,
         align=PP_ALIGN.CENTER)

# Right: dosing boxes
add_rect(slide, 4.3, 1.1, 8.8, 1.55, RGBColor(0xFF, 0xEB, 0xEB))
add_text(slide, "DOSAGE", 4.4, 1.12, 3, 0.38, font_size=14, bold=True, color=ACCENT_RED)
dosage_rows = [
    ("ACS / Initial (chewable):", "162–325 mg stat", ACCENT_RED),
    ("Maintenance (all indications):", "75–100 mg once daily (lifelong)", DARK_BLUE),
    ("After PCI (with DAPT):", "81 mg daily — do NOT exceed 100 mg with ticagrelor", ACCENT_GREEN),
    ("CABG post-op:", "81–325 mg within 6 hours; continue lifelong", DARK_BLUE),
]
for j, (label, val, col) in enumerate(dosage_rows):
    y0 = 1.55 + j * 0.27
    add_text(slide, label, 4.4, y0, 3.5, 0.26, font_size=10, bold=True, color=DARK_GRAY)
    add_text(slide, val, 7.95, y0, 5.0, 0.26, font_size=10, color=col, bold=True)

# Duration
add_rect(slide, 4.3, 2.75, 8.8, 1.2, RGBColor(0xE8, 0xF8, 0xE8))
add_text(slide, "TREATMENT DURATION", 4.4, 2.78, 5, 0.38, font_size=14, bold=True, color=ACCENT_GREEN)
dur_rows = [
    ("Secondary prevention (ACS, PCI, CABG, stroke):", "LIFELONG"),
    ("Primary prevention (selected high-risk patients):", "Individualized — discuss bleeding vs benefit"),
    ("Primary prevention (low-risk):", "NOT recommended routinely (2018-2022 guidelines)"),
]
for j, (label, val) in enumerate(dur_rows):
    y0 = 3.2 + j * 0.27
    add_text(slide, label, 4.4, y0, 5.5, 0.26, font_size=10, color=DARK_GRAY)
    add_text(slide, val, 9.95, y0, 3.0, 0.26, font_size=10, bold=True, color=ACCENT_GREEN)

# Key facts
add_rect(slide, 4.3, 4.05, 8.8, 2.9, RGBColor(0xEA, 0xF2, 0xFF))
add_text(slide, "KEY PHARMACOLOGICAL FACTS", 4.4, 4.1, 8, 0.35,
         font_size=13, bold=True, color=DARK_BLUE)
facts = [
    "Mechanism: Irreversible acetylation of COX-1 (and COX-2) → ↓ prostaglandins & TXA2",
    "Onset of platelet inhibition: Minutes (blocks within 1 hour of ingestion)",
    "Duration of effect: ~10 days (entire platelet lifespan — platelets cannot regenerate COX)",
    "Plasma half-life: 20 minutes, but platelet effect lasts 10 days",
    "25% reduction in cardiovascular events in secondary prevention (RCT meta-analyses)",
    "Low-dose (81 mg) is as effective as high-dose with fewer GI adverse effects",
    "Main adverse effect: GI bleeding / peptic ulceration; bronchoconstriction in ASA-sensitive asthma",
    "Contraindication: Active peptic ulcer, ASA hypersensitivity, children with viral illness (Reye syndrome)",
]
for j, fact in enumerate(facts):
    add_text(slide, f"• {fact}", 4.4, 4.48 + j * 0.295, 8.5, 0.28,
             font_size=9.8, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 6 — P2Y12 INHIBITORS (OVERVIEW + MECHANISM)
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, ACCENT_GREEN)
add_text(slide, "P2Y12 ADP Receptor Inhibitors — Mechanism & Classification", 0.3, 0.05, 12.5, 0.9,
         font_size=24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

# Image on right
if os.path.exists(img2_path):
    slide.shapes.add_picture(img2_path, Inches(8.7), Inches(1.1), Inches(4.4), Inches(4.0))
add_text(slide, "Fig: P2Y12 inhibitors block ADP-mediated\nGP IIb/IIIa activation",
         8.7, 5.15, 4.4, 0.5, font_size=9, italic=True, color=MID_GRAY,
         align=PP_ALIGN.CENTER, wrap=True)

# Left: mechanism text
add_rect(slide, 0.2, 1.1, 8.3, 1.0, RGBColor(0xE8, 0xF8, 0xE8))
add_text(slide, "Mechanism:", 0.3, 1.12, 1.5, 0.35, font_size=12, bold=True, color=ACCENT_GREEN)
add_text(slide, "Block P2Y12 ADP receptor on platelets → prevent Ca²⁺ influx → prevent GP IIb/IIIa conformational activation → inhibit fibrinogen binding → block platelet aggregation",
         1.85, 1.12, 6.5, 0.85, font_size=11, color=DARK_GRAY, wrap=True)

# Drug comparison table
headers = ["Property", "Clopidogrel", "Prasugrel", "Ticagrelor", "Cangrelor"]
rows = [
    ["Brand name", "Plavix", "Effient", "Brilinta", "Kengreal"],
    ["Drug class", "Thienopyridine", "Thienopyridine", "Cyclopentyl-triazolopyrimidine", "ATP analogue"],
    ["Route", "Oral", "Oral", "Oral", "IV only"],
    ["Prodrug?", "Yes (CYP2C19)", "Yes (CYP3A4/2B6)", "No — active drug", "No — active drug"],
    ["Binding", "Irreversible", "Irreversible", "Reversible", "Reversible"],
    ["Loading dose", "300–600 mg", "60 mg", "180 mg", "30 µg/kg IV bolus"],
    ["Maintenance dose", "75 mg once daily", "10 mg once daily", "90 mg twice daily", "4 µg/kg/min IV infusion"],
    ["Onset", "3–5 days", "2–4 hours", "1–3 hours", "2 minutes (IV)"],
    ["Half-life", "30–60 min (metab)", "~7 hr (active metab)", "7–9 hours", "3–6 minutes"],
    ["Duration of effect", "3–10 days", "7–10 days", "3–5 days", "1–2 hours after stop"],
    ["Stop before surgery", "5 days", "7 days", "5 days", "1 hour"],
]

col_widths = [2.2, 1.55, 1.55, 2.0, 1.8]
col_x = [0.2, 2.45, 4.05, 5.65, 7.7]
header_colors = [DARK_BLUE, ACCENT_GREEN, ACCENT_GREEN, ACCENT_GREEN, ACCENT_GREEN]

y_table = 2.2
row_h = 0.38
add_rect(slide, 0.2, y_table, 9.35, row_h, DARK_BLUE)
for ci, (hdr, cx, cw) in enumerate(zip(headers, col_x, col_widths)):
    add_text(slide, hdr, cx+0.04, y_table+0.02, cw-0.06, row_h-0.04,
             font_size=10, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             anchor=MSO_ANCHOR.MIDDLE)

for ri, row in enumerate(rows):
    y_row = y_table + (ri+1)*row_h
    bg = WHITE if ri % 2 == 0 else RGBColor(0xF0, 0xF8, 0xF0)
    add_rect(slide, 0.2, y_row, 9.35, row_h, bg)
    # highlight row
    for ci, (val, cx, cw) in enumerate(zip(row, col_x, col_widths)):
        is_bold = ci == 0
        col = DARK_BLUE if ci == 0 else DARK_GRAY
        add_text(slide, val, cx+0.04, y_row+0.02, cw-0.06, row_h-0.04,
                 font_size=9.2, bold=is_bold, color=col,
                 align=PP_ALIGN.LEFT if ci == 0 else PP_ALIGN.CENTER,
                 anchor=MSO_ANCHOR.MIDDLE, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 7 — CLOPIDOGREL & PRASUGREL detail
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, ACCENT_GREEN)
add_text(slide, "Clopidogrel & Prasugrel — Detailed Profile", 0.3, 0.05, 12.5, 0.9,
         font_size=26, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

# Clopidogrel
add_rect(slide, 0.2, 1.1, 6.25, 6.15, WHITE)
add_rect(slide, 0.2, 1.1, 6.25, 0.5, ACCENT_GREEN)
add_text(slide, "CLOPIDOGREL (Plavix)", 0.3, 1.12, 6.0, 0.45,
         font_size=16, bold=True, color=WHITE)

clop_sections = [
    ("Mechanism", "Prodrug requiring CYP2C19 hepatic activation. Active metabolite irreversibly blocks P2Y12 ADP receptor. Genetic polymorphism (poor metabolizers ~25–35%) reduces efficacy."),
    ("Indications", "ACS (UA/NSTEMI/STEMI), PCI (with or without stenting), peripheral artery disease, ischemic stroke/TIA prevention"),
    ("Dosage", "• Loading: 300–600 mg (600 mg preferred in PCI)\n• Maintenance: 75 mg once daily"),
    ("DAPT Duration", "• Bare metal stent (BMS): minimum 30 days\n• Drug-eluting stent (DES): 6–12 months\n• Medical ACS (no stent): 12 months\n• High-bleeding risk: may shorten to 3–6 months"),
    ("Key Evidence", "CURE trial: clopidogrel + aspirin ↓ composite CVD death/MI/stroke by 20% in NSTEMI\nCLEAR PLATE, CAPRIE: efficacy in PAD and stroke"),
    ("Adverse Effects", "Bleeding (GI, intracranial), thrombotic thrombocytopenic purpura (rare), neutropenia\nDrug interaction: PPIs (omeprazole) inhibit CYP2C19 → ↓ efficacy"),
    ("Contraindications", "Active pathological bleeding, history of intracranial hemorrhage"),
]
y0 = 1.68
for section, content in clop_sections:
    add_text(slide, section + ":", 0.3, y0, 1.5, 0.28, font_size=10, bold=True, color=ACCENT_GREEN)
    add_text(slide, content, 1.85, y0, 4.45, 0.65, font_size=9.3, color=DARK_GRAY, wrap=True)
    y0 += 0.78

# Prasugrel
add_rect(slide, 6.85, 1.1, 6.25, 6.15, WHITE)
add_rect(slide, 6.85, 1.1, 6.25, 0.5, ACCENT_TEAL)
add_text(slide, "PRASUGREL (Effient)", 6.95, 1.12, 6.0, 0.45,
         font_size=16, bold=True, color=WHITE)

pras_sections = [
    ("Mechanism", "Prodrug requiring CYP3A4/2B6 activation. Greater bioavailability of active metabolite than clopidogrel. Faster onset (2–4 hr) and greater platelet inhibition. Irreversible binding."),
    ("Indications", "ACS (UA/NSTEMI/STEMI) managed with PCI — use ONLY after coronary anatomy is known and PCI is planned"),
    ("Dosage", "• Loading: 60 mg (only at time of PCI)\n• Maintenance: 10 mg once daily\n• Reduced dose (5 mg): body weight <60 kg or age ≥75 yr"),
    ("DAPT Duration", "• 12 months after ACS/PCI with DES\n• Minimum 30 days after BMS\n• Avoid in prior stroke/TIA (contraindicated)"),
    ("Key Evidence", "TRITON-TIMI 38: prasugrel vs clopidogrel in PCI — ↓ MI 24%, stent thrombosis 52%, but ↑ TIMI major bleeding 32%\nHigh-risk patients (diabetes, prior MI) benefit most"),
    ("Adverse Effects", "Bleeding risk higher than clopidogrel (TIMI major bleed 2.4% vs 1.8%)\nFatal bleeding 0.4% vs 0.1%; CABG-related bleeding significantly higher"),
    ("Contraindications", "Prior stroke/TIA; Active pathological bleeding; Age <18; Use caution: age ≥75, weight <60 kg"),
]
y0 = 1.68
for section, content in pras_sections:
    add_text(slide, section + ":", 6.95, y0, 1.5, 0.28, font_size=10, bold=True, color=ACCENT_TEAL)
    add_text(slide, content, 8.5, y0, 4.45, 0.65, font_size=9.3, color=DARK_GRAY, wrap=True)
    y0 += 0.78

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 8 — TICAGRELOR & CANGRELOR
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, DARK_BLUE)
add_text(slide, "Ticagrelor & Cangrelor — Next-Generation P2Y12 Inhibitors", 0.3, 0.05, 12.5, 0.9,
         font_size=24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

# Ticagrelor
add_rect(slide, 0.2, 1.1, 6.25, 6.15, WHITE)
add_rect(slide, 0.2, 1.1, 6.25, 0.5, MED_BLUE)
add_text(slide, "TICAGRELOR (Brilinta)", 0.3, 1.12, 6.0, 0.45,
         font_size=16, bold=True, color=WHITE)
tica_sections = [
    ("Mechanism", "NOT a prodrug. Direct, reversible P2Y12 inhibitor. Does not require metabolic activation. Binds different site than ADP on P2Y12 (allosteric). Faster and more consistent platelet inhibition than clopidogrel."),
    ("Indications", "ACS (UA/NSTEMI/STEMI — with or without PCI), secondary prevention in patients with prior MI at high risk"),
    ("Dosage", "• Loading: 180 mg\n• Maintenance: 90 mg twice daily (12 months after ACS)\n• Extended low-dose: 60 mg twice daily (>12 months post-MI)\n• Aspirin maintenance must be ≤100 mg/day with ticagrelor"),
    ("DAPT Duration", "• Standard: 12 months post-ACS\n• Extended: 60 mg BID beyond 12 months if no excess bleeding\n• High bleeding risk: as short as 1–3 months then ticagrelor monotherapy (2025 ACC/AHA Class I)"),
    ("Key Evidence", "PLATO trial: ticagrelor vs clopidogrel in ACS — ↓ CV death/MI/stroke 16%; ↓ CV mortality 21%; ↓ all-cause mortality 22%\nPEGASUS trial: extended 60 mg BID post-MI ↓ major events"),
    ("Adverse Effects", "Dyspnea (14%) — not bronchospasm; Bradycardia/pauses (asymptomatic); Bleeding; Elevated creatinine/uric acid\nContraindicated: intracranial hemorrhage, active bleed, severe hepatic impairment"),
]
y0 = 1.68
for section, content in tica_sections:
    add_text(slide, section + ":", 0.3, y0, 1.5, 0.28, font_size=10, bold=True, color=MED_BLUE)
    add_text(slide, content, 1.85, y0, 4.45, 0.78, font_size=9.3, color=DARK_GRAY, wrap=True)
    y0 += 0.88

# Cangrelor
add_rect(slide, 6.85, 1.1, 6.25, 6.15, WHITE)
add_rect(slide, 6.85, 1.1, 6.25, 0.5, ORANGE)
add_text(slide, "CANGRELOR (Kengreal)", 6.95, 1.12, 6.0, 0.45,
         font_size=16, bold=True, color=WHITE)
cang_sections = [
    ("Mechanism", "Direct-acting IV P2Y12 inhibitor (ATP analogue). Reversible binding. Onset within 2 minutes (IV). No hepatic metabolism — no CYP dependence. Predictable antiplatelet effect."),
    ("Indications", "Adjunct during PCI in patients not pre-treated with oral P2Y12 inhibitor; Bridging therapy for patients on DAPT requiring non-cardiac surgery"),
    ("Dosage", "• Bolus: 30 µg/kg IV\n• Infusion: 4 µg/kg/min IV during PCI (at least 2 hrs or duration of procedure)\n• Transition: Start oral P2Y12 30 min after infusion stopped"),
    ("Duration", "Short-term use only — during PCI procedure\nInfusion duration: 2 hours minimum\nPlatelet function normalizes 1–2 hours after stopping"),
    ("Key Evidence", "CHAMPION trials: cangrelor vs clopidogrel/placebo — ↓ periprocedural MI, stent thrombosis; CHAMPION PHOENIX: ↓ stent thrombosis 41%"),
    ("Advantages", "Unique reversible IV formulation; ideal for patients who cannot take oral medications; safe bridge before surgery\nExpense and modest evidence limit routine use"),
]
y0 = 1.68
for section, content in cang_sections:
    add_text(slide, section + ":", 6.95, y0, 1.5, 0.28, font_size=10, bold=True, color=ORANGE)
    add_text(slide, content, 8.5, y0, 4.45, 0.78, font_size=9.3, color=DARK_GRAY, wrap=True)
    y0 += 0.88

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 9 — GP IIb/IIIa INHIBITORS
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, ACCENT_RED)
add_text(slide, "GP IIb/IIIa Receptor Inhibitors", 0.3, 0.05, 12.5, 0.9,
         font_size=28, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

add_rect(slide, 0.2, 1.1, 12.9, 0.75, RGBColor(0xFF, 0xEB, 0xEB))
add_text(slide, "Mechanism (All 3 agents):", 0.3, 1.12, 2.8, 0.35, font_size=12, bold=True, color=ACCENT_RED)
add_text(slide, "Block the GP IIb/IIIa receptor (αIIbβ3 integrin) — the final common pathway of platelet aggregation. Prevent fibrinogen (and vWF) from binding to activated platelets. Administered IV only. Used primarily as adjunct to PCI.",
         3.15, 1.12, 9.7, 0.7, font_size=10.5, color=DARK_GRAY, wrap=True)

agents = [
    {
        "name": "ABCIXIMAB (ReoPro)",
        "color": ACCENT_RED,
        "type": "Chimeric monoclonal antibody Fab fragment",
        "binding": "Noncompetitive, irreversible (tight)",
        "bolus": "0.25 mg/kg IV bolus",
        "infusion": "0.125 µg/kg/min IV (max 10 µg/min) × 12 hours",
        "onset": "Immediate",
        "half_life": "Plasma: 30 min; Platelet: 24–48 hours",
        "recovery": "48 hours (platelet transfusion can reverse)",
        "indication": "High-risk PCI (unstable angina, STEMI), adjunct to PCI",
        "notes": "Not for use if PCI not planned. Most potent GP IIb/IIIa blocker. Risk of thrombocytopenia (HIT-like).",
    },
    {
        "name": "EPTIFIBATIDE (Integrilin)",
        "color": MED_BLUE,
        "type": "Cyclic heptapeptide (KGD sequence)",
        "binding": "Competitive, reversible",
        "bolus": "180 µg/kg IV bolus (repeat in 10 min for PCI)",
        "infusion": "2 µg/kg/min IV × 18–24 hrs (reduce in renal impairment)",
        "onset": "Immediate",
        "half_life": "2.5 hours",
        "recovery": "4–8 hours",
        "indication": "ACS (NSTEMI/UA) with or without PCI; PCI adjunct",
        "notes": "Most consistent platelet inhibition; shortest on-time; dose-reduce in CrCl <50 mL/min. Contraindicated in severe renal failure.",
    },
    {
        "name": "TIROFIBAN (Aggrastat)",
        "color": ACCENT_TEAL,
        "type": "Non-peptide peptidomimetic",
        "binding": "Competitive, reversible",
        "bolus": "25 µg/kg IV bolus over 3 min",
        "infusion": "0.15 µg/kg/min IV × 18–24 hours",
        "onset": "Immediate",
        "half_life": "2 hours",
        "recovery": "4–8 hours",
        "indication": "ACS (NSTEMI/UA), PCI adjunct; peripheral vascular intervention",
        "notes": "Similar to eptifibatide; dose-reduce in renal impairment. Less expensive than abciximab.",
    },
]

col_x = [0.2, 4.5, 8.8]
for i, agent in enumerate(agents):
    x = col_x[i]
    w = 4.1
    add_rect(slide, x, 1.95, w, 0.42, agent["color"])
    add_text(slide, agent["name"], x+0.08, 1.97, w-0.14, 0.38,
             font_size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             anchor=MSO_ANCHOR.MIDDLE)

    rows_data = [
        ("Type:", agent["type"]),
        ("Binding:", agent["binding"]),
        ("Bolus:", agent["bolus"]),
        ("Infusion:", agent["infusion"]),
        ("Half-life:", agent["half_life"]),
        ("Recovery:", agent["recovery"]),
        ("Indication:", agent["indication"]),
    ]
    y0 = 2.43
    for label, val in rows_data:
        add_text(slide, label, x+0.1, y0, 1.1, 0.3, font_size=9.5, bold=True, color=agent["color"])
        add_text(slide, val, x+1.22, y0, w-1.32, 0.45, font_size=9.3, color=DARK_GRAY, wrap=True)
        y0 += 0.42

    add_rect(slide, x, y0, w, 0.06, agent["color"])
    add_text(slide, "Notes: " + agent["notes"], x+0.1, y0+0.08, w-0.15, 0.75,
             font_size=9, italic=True, color=DARK_GRAY, wrap=True)

# Comparison note
add_rect(slide, 0.2, 6.8, 12.9, 0.45, RGBColor(0xFD, 0xF2, 0xE4))
add_text(slide, "Note: All GP IIb/IIIa inhibitors ↓ death or MI in ACS undergoing PCI. Eptifibatide has most consistent inhibition. Abciximab reversed by platelet transfusion; eptifibatide/tirofiban are not reversible by transfusion. Use with aspirin + heparin.",
         0.3, 6.83, 12.7, 0.4, font_size=9.3, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 10 — DAPT REGIMENS & DURATION
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, MED_BLUE)
add_text(slide, "Dual Antiplatelet Therapy (DAPT) — Regimens & Duration", 0.3, 0.05, 12.5, 0.9,
         font_size=24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

add_rect(slide, 0.2, 1.1, 12.9, 0.5, RGBColor(0xD6, 0xE8, 0xF7))
add_text(slide, "DAPT = Aspirin (81 mg/day) + P2Y12 inhibitor (clopidogrel / ticagrelor / prasugrel)",
         0.3, 1.12, 12.6, 0.45, font_size=13, bold=True, color=DARK_BLUE,
         align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)

# Table
headers2 = ["Clinical Scenario", "P2Y12 of Choice", "Loading Dose", "Maintenance", "Duration", "Notes"]
col_widths2 = [2.4, 1.9, 1.7, 1.7, 2.0, 2.9]
col_x2 = [0.2, 2.65, 4.6, 6.35, 8.1, 10.15]

table_rows = [
    ["STEMI — Primary PCI", "Ticagrelor or Prasugrel (preferred)\nor Clopidogrel", "180 mg / 60 mg\nor 600 mg", "90 mg BID / 10 mg OD\nor 75 mg OD", "12 months minimum\n(extend if low bleed risk)", "Preferred: ticagrelor > prasugrel > clopidogrel (2025 ACC/AHA)"],
    ["NSTEMI / UA — Invasive", "Ticagrelor (preferred)\nor Prasugrel post-PCI\nor Clopidogrel", "180 mg\n60 mg (after PCI)\n300–600 mg", "90 mg BID\n10 mg OD\n75 mg OD", "12 months", "Prasugrel only after coronary anatomy known; avoid if prior stroke/TIA"],
    ["NSTEMI / UA — Conservative", "Ticagrelor or Clopidogrel", "180 mg\nor 300–600 mg", "90 mg BID\nor 75 mg OD", "12 months", "Prasugrel NOT recommended in this strategy"],
    ["PCI — Drug-Eluting Stent (DES)", "Clopidogrel, Ticagrelor, or Prasugrel", "Per drug above", "Per drug above", "Minimum 6 months\n(preferred 12 months)", "May extend to 30 months if low bleed risk (DAPT trial)"],
    ["PCI — Bare Metal Stent (BMS)", "Clopidogrel (preferred)", "300–600 mg", "75 mg OD", "Minimum 30 days\n(up to 12 months)", "BMS use now uncommon"],
    ["Stable CAD / Chronic Coronary Syndrome", "Clopidogrel (if needed)", "300 mg", "75 mg OD", "Not routinely recommended\nAspirin monotherapy preferred", "DAPT may be extended in selected high-risk post-ACS patients"],
    ["High Bleeding Risk (HBR)", "Clopidogrel preferred\n(or ticagrelor)", "300 mg\nor 180 mg", "75 mg OD\nor 90 mg BID", "1–3 months, then\nmonotherapy (P2Y12 preferred)", "2025 ACC/AHA: Ticagrelor monotherapy ≥1 mo post-PCI (Class I)"],
    ["Post-Fibrinolysis (STEMI)", "Clopidogrel", "300 mg (<75 yr)\nor 0 (≥75 yr)", "75 mg OD", "12 months (minimum 14 days)", "Do NOT use prasugrel/ticagrelor within 24 hr of fibrinolysis"],
]

y_table2 = 1.68
hdr_h = 0.36
row_h2 = 0.63
add_rect(slide, 0.2, y_table2, 12.9, hdr_h, DARK_BLUE)
for ci, (hdr, cx, cw) in enumerate(zip(headers2, col_x2, col_widths2)):
    add_text(slide, hdr, cx+0.04, y_table2+0.02, cw-0.06, hdr_h-0.04,
             font_size=10, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             anchor=MSO_ANCHOR.MIDDLE)

for ri, row in enumerate(table_rows):
    y_row = y_table2 + hdr_h + ri*row_h2
    bg = WHITE if ri % 2 == 0 else RGBColor(0xEA, 0xF2, 0xFF)
    add_rect(slide, 0.2, y_row, 12.9, row_h2, bg)
    for ci, (val, cx, cw) in enumerate(zip(row, col_x2, col_widths2)):
        is_bold = ci == 0
        col = DARK_BLUE if ci == 0 else (ACCENT_RED if ci == 4 else DARK_GRAY)
        add_text(slide, val, cx+0.04, y_row+0.02, cw-0.06, row_h2-0.04,
                 font_size=8.8, bold=is_bold, color=col,
                 align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.MIDDLE, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 11 — CLINICAL SCENARIOS (ACS, STEMI, PCI)
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, DARK_BLUE)
add_text(slide, "Clinical Scenarios: Step-by-Step Antiplatelet Management", 0.3, 0.05, 12.5, 0.9,
         font_size=24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

scenarios = [
    {
        "title": "STEMI — Primary PCI",
        "color": ACCENT_RED,
        "steps": [
            "STAT: Aspirin 325 mg chewable (at first medical contact)",
            "Loading P2Y12: Ticagrelor 180 mg OR Prasugrel 60 mg (or Clopidogrel 600 mg if above unavailable)",
            "Optional: Cangrelor IV bolus 30 µg/kg if patient cannot take oral meds",
            "Consider: GP IIb/IIIa inhibitor (abciximab/eptifibatide) if high thrombus burden",
            "Post-PCI: Aspirin 81 mg + Ticagrelor 90 mg BID (or prasugrel 10 mg OD) × 12 months",
            "After 12 months: Aspirin 81 mg indefinitely; consider ticagrelor 60 mg BID if high ischemic risk",
        ]
    },
    {
        "title": "NSTEMI / UA — Invasive Strategy",
        "color": ACCENT_GREEN,
        "steps": [
            "STAT: Aspirin 162–325 mg (chewable)",
            "Add P2Y12: Ticagrelor 180 mg LD (preferred) OR Clopidogrel 300–600 mg LD",
            "Hold prasugrel until coronary anatomy is known (avoid before angiography)",
            "If PCI performed: may switch to prasugrel 60 mg LD at time of PCI",
            "GP IIb/IIIa inhibitor (eptifibatide/tirofiban): consider if high-risk ACS, not pre-treated",
            "Duration: Aspirin 81 mg lifelong + P2Y12 × 12 months",
        ]
    },
    {
        "title": "Stable Angina / Chronic Coronary Syndrome",
        "color": MED_BLUE,
        "steps": [
            "Aspirin 81 mg daily — long-term (unless contraindicated)",
            "DAPT not routinely indicated for stable CAD alone",
            "After elective PCI: Aspirin + Clopidogrel 75 mg OD × 6 months (DES) or 1 month (BMS)",
            "High-risk post-MI (>12 months): consider adding ticagrelor 60 mg BID to aspirin",
            "Clopidogrel as monotherapy: if aspirin intolerant",
        ]
    },
    {
        "title": "Ischemic Stroke / TIA",
        "color": ORANGE,
        "steps": [
            "Aspirin 160–325 mg within 24–48 hours of ischemic stroke",
            "Short-term DAPT: Aspirin + Clopidogrel × 21 days (minor stroke/TIA — POINT/CHANCE trials)",
            "Long-term: Aspirin 81 mg OR Clopidogrel 75 mg monotherapy (equivalent for stroke prevention)",
            "Ticlopidine: alternative if ASA intolerant (monitor CBC for neutropenia/TTP)",
            "Avoid ticagrelor/prasugrel in prior hemorrhagic stroke",
        ]
    },
]

scen_x = [0.2, 6.85]
scen_y = [1.1, 1.1, 4.55, 4.55]
scen_pos = [(0.2, 1.1), (6.85, 1.1), (0.2, 4.55), (6.85, 4.55)]

for i, (scenario, (x, y)) in enumerate(zip(scenarios, scen_pos)):
    w = 6.2
    h = 3.25
    add_rect(slide, x, y, w, 0.42, scenario["color"])
    add_text(slide, scenario["title"], x+0.1, y+0.03, w-0.15, 0.37,
             font_size=13, bold=True, color=WHITE)
    add_rect(slide, x, y+0.42, w, h-0.42, WHITE)
    for j, step in enumerate(scenario["steps"]):
        add_rect(slide, x+0.12, y+0.5+j*0.44, 0.3, 0.28, scenario["color"])
        add_text(slide, str(j+1), x+0.12, y+0.5+j*0.44, 0.3, 0.28,
                 font_size=9, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
                 anchor=MSO_ANCHOR.MIDDLE)
        add_text(slide, step, x+0.5, y+0.5+j*0.44, w-0.6, 0.42,
                 font_size=9.2, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 12 — ADVERSE EFFECTS & CONTRAINDICATIONS
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, ACCENT_RED)
add_text(slide, "Adverse Effects, Contraindications & Drug Interactions", 0.3, 0.05, 12.5, 0.9,
         font_size=24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

# Main bleeding risks
add_rect(slide, 0.2, 1.1, 8.8, 3.4, WHITE)
add_rect(slide, 0.2, 1.1, 8.8, 0.4, ACCENT_RED)
add_text(slide, "BLEEDING RISKS — All Antiplatelet Agents", 0.3, 1.12, 8.5, 0.36,
         font_size=13, bold=True, color=WHITE)
bleed_data = [
    ("Drug", "Major Bleeding Rate", "Key Concern", "Reversal Agent"),
    ("Aspirin 75–100 mg/day", "~1–3%/year", "GI bleeding, hemorrhagic stroke", "Platelet transfusion; desmopressin"),
    ("Clopidogrel + ASA (DAPT)", "~2–4%/year", "GI bleed, ICH; higher post-surgery", "Platelet transfusion"),
    ("Ticagrelor + ASA", "4.5% vs 3.8% (vs clopidogrel)", "CABG bleed; dyspnea (not bleed)", "No specific antidote; platelet transfusion"),
    ("Prasugrel + ASA", "2.4% vs 1.8% (vs clopidogrel)", "CABG-related fatal bleed; age >75 high risk", "Platelet transfusion"),
    ("GP IIb/IIIa inhibitors", "~6–8% with PCI adjuncts", "Access-site bleed, ICH; thrombocytopenia", "Abciximab: platelet transfusion reverses"),
]
hdr_cols = [2.0, 2.2, 2.7, 1.75]
hdr_x = [0.22, 2.25, 4.5, 7.25]
y_tbl = 1.55
add_rect(slide, 0.2, y_tbl, 8.8, 0.3, DARK_BLUE)
for ci, (hdr, cx, cw) in enumerate(zip(bleed_data[0], hdr_x, hdr_cols)):
    add_text(slide, hdr, cx+0.03, y_tbl+0.01, cw-0.05, 0.27,
             font_size=9.5, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             anchor=MSO_ANCHOR.MIDDLE)
for ri, row in enumerate(bleed_data[1:]):
    y_row = y_tbl + 0.3 + ri * 0.52
    bg = WHITE if ri % 2 == 0 else RGBColor(0xFF, 0xF0, 0xF0)
    add_rect(slide, 0.2, y_row, 8.8, 0.52, bg)
    for ci, (val, cx, cw) in enumerate(zip(row, hdr_x, hdr_cols)):
        col = ACCENT_RED if ci == 1 else DARK_GRAY
        add_text(slide, val, cx+0.03, y_row+0.02, cw-0.05, 0.48,
                 font_size=9, color=col, bold=(ci == 0), wrap=True,
                 anchor=MSO_ANCHOR.MIDDLE)

# Right side
add_rect(slide, 9.25, 1.1, 3.85, 3.4, RGBColor(0xFF, 0xF0, 0xF0))
add_text(slide, "CONTRAINDICATIONS", 9.35, 1.12, 3.6, 0.35,
         font_size=12, bold=True, color=ACCENT_RED)
contras = [
    "Active pathological bleeding (all agents)",
    "Intracranial hemorrhage — all agents",
    "Aspirin: peptic ulcer disease, ASA hypersensitivity, Reye syndrome (pediatrics)",
    "Prasugrel: prior stroke / TIA (absolute contraindication)",
    "Ticagrelor: severe hepatic impairment, strong CYP3A4 inducers",
    "GP IIb/IIIa inhibitors: severe hypertension (>200/110), major surgery in 6 weeks",
    "Thrombocytopenia <100,000/µL (use caution)",
]
for j, c in enumerate(contras):
    add_text(slide, f"• {c}", 9.35, 1.52 + j*0.42, 3.65, 0.4,
             font_size=9, color=DARK_GRAY, wrap=True)

# Drug interactions
add_rect(slide, 0.2, 4.6, 12.9, 2.7, WHITE)
add_rect(slide, 0.2, 4.6, 12.9, 0.35, DARK_BLUE)
add_text(slide, "KEY DRUG INTERACTIONS", 0.3, 4.62, 12.6, 0.3,
         font_size=12, bold=True, color=WHITE)
interactions = [
    ("Clopidogrel + Omeprazole/Esomeprazole", "CYP2C19 inhibition → ↓ clopidogrel activation → ↓ antiplatelet effect. Use pantoprazole instead.", AMBER),
    ("Clopidogrel + Fluconazole/Voriconazole", "Strong CYP2C19 inhibitors → ↓ clopidogrel efficacy", AMBER),
    ("Ticagrelor + Strong CYP3A4 inducers (rifampin, carbamazepine)", "↓ Ticagrelor levels → ↓ effect", ACCENT_RED),
    ("Ticagrelor + Simvastatin/Lovastatin (>40 mg)", "CYP3A4 competition → ↑ statin levels → myopathy risk", ORANGE),
    ("Aspirin + NSAIDs (ibuprofen, naproxen)", "NSAIDs compete for COX-1 binding → block aspirin's antiplatelet effect if NSAID taken first", ACCENT_RED),
    ("Antiplatelet + Anticoagulant (warfarin/NOAC)", "Triple therapy → significantly ↑ bleeding risk. Minimize duration; use PPI gastroprotection.", ACCENT_RED),
    ("Aspirin + SSRIs", "SSRIs inhibit platelet serotonin uptake → additive antiplatelet effect → ↑ GI bleeding risk", AMBER),
]
col_x_int = [0.25, 4.4, 9.5]
col_w_int = [4.1, 5.05, 3.7]
for j, (drug, effect, col) in enumerate(interactions):
    ri = j % 4
    ci = j // 4
    if ci < 2:
        y0 = 5.02 + ri * 0.53
        xi = col_x_int[ci] if ci == 0 else 4.5
        wi = col_w_int[ci] if ci == 0 else 8.55
    else:
        break
    add_rect(slide, xi+0.05, y0+0.03, 0.18, 0.22, col)
    add_text(slide, drug, xi+0.28, y0, 3.0 if ci == 0 else 2.8, 0.26,
             font_size=9, bold=True, color=DARK_GRAY)
    add_text(slide, effect, xi+0.28, y0+0.26, 3.9 if ci == 0 else 8.0, 0.24,
             font_size=8.8, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 13 — SPECIAL POPULATIONS & PERIOPERATIVE
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, ORANGE)
add_text(slide, "Special Populations & Perioperative Antiplatelet Management", 0.3, 0.05, 12.5, 0.9,
         font_size=22, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

populations = [
    {
        "title": "Elderly (Age ≥75 years)",
        "color": ORANGE,
        "points": [
            "Prasugrel: avoid or use reduced dose (5 mg/day). Higher fatal bleeding risk (TRITON-TIMI 38).",
            "Ticagrelor: use with caution — dyspnea and bleeding more common.",
            "Aspirin 81 mg remains standard for secondary prevention.",
            "Consider bleeding risk tools (PRECISE-DAPT, HBR criteria) to guide duration.",
            "Shorter DAPT duration (3–6 months) may be appropriate with drug-coated balloon / newer stents.",
        ]
    },
    {
        "title": "Low Body Weight (<60 kg)",
        "color": AMBER,
        "points": [
            "Prasugrel: reduce to 5 mg/day (standard 10 mg has excess bleeding).",
            "Ticagrelor and clopidogrel: standard doses — weight does not alter dosing.",
            "GP IIb/IIIa: weight-based dosing critical — overdosing increases bleed risk.",
        ]
    },
    {
        "title": "Renal Impairment (CKD)",
        "color": MED_BLUE,
        "points": [
            "Aspirin: use with caution in severe CKD (platelet dysfunction already present).",
            "Clopidogrel/Ticagrelor: no dose adjustment needed.",
            "Eptifibatide: dose-reduce if CrCl 10–49 mL/min (1 µg/kg/min); contraindicated if CrCl <10.",
            "Tirofiban: dose-reduce in CrCl <30 mL/min.",
            "Abciximab: no renal adjustment required.",
            "NICE guidelines: antiplatelet agents recommended for secondary CVD prevention in CKD.",
        ]
    },
    {
        "title": "Perioperative Management",
        "color": DARK_BLUE,
        "points": [
            "ASPIRIN: Continue through most non-cardiac surgery (benefit > bleed risk). STOP only for neurosurgery, prostate surgery, or highly vascular procedures.",
            "Clopidogrel: Stop 5 days before elective surgery (ACC/AHA 2024).",
            "Ticagrelor: Stop 5 days before surgery.",
            "Prasugrel: Stop 7 days before surgery (greater platelet inhibition).",
            "Cangrelor: Stop 1–2 hours before surgery — ideal bridging agent.",
            "Post-stent surgery timing: defer elective surgery ≥6 months after PCI for stable CAD; ≥12 months after ACS-PCI.",
            "If urgent surgery after stent: proceed with DAPT if bleeding controllable; otherwise balance with surgeon.",
        ]
    },
    {
        "title": "Pregnancy",
        "color": ACCENT_TEAL,
        "points": [
            "Low-dose aspirin (75–150 mg): indicated for pre-eclampsia prevention in high-risk pregnancy.",
            "Clopidogrel, prasugrel, ticagrelor: insufficient safety data; avoid in pregnancy except life-threatening ACS.",
            "GP IIb/IIIa inhibitors: used in life-threatening ACS only (category C).",
        ]
    },
    {
        "title": "Hepatic Impairment",
        "color": ACCENT_RED,
        "points": [
            "Clopidogrel/Prasugrel: reduced efficacy in severe liver disease (↓ prodrug activation via CYP).",
            "Ticagrelor: contraindicated in severe hepatic impairment.",
            "Aspirin: use with caution in liver disease (risk of GI bleeding and coagulopathy).",
        ]
    },
]

positions = [(0.2, 1.1), (0.2, 3.05), (4.5, 1.1), (4.5, 3.7), (9.0, 1.1), (9.0, 4.2)]
sizes = [(4.1, 1.85), (4.1, 1.75), (4.3, 2.45), (4.3, 3.55), (4.1, 2.9), (4.1, 2.95)]

for (x, y), (w, h), pop in zip(positions, sizes, populations):
    add_rect(slide, x, y, w, 0.38, pop["color"])
    add_text(slide, pop["title"], x+0.08, y+0.02, w-0.12, 0.34,
             font_size=11.5, bold=True, color=WHITE)
    add_rect(slide, x, y+0.38, w, h-0.38, WHITE)
    for j, pt in enumerate(pop["points"]):
        add_text(slide, f"• {pt}", x+0.1, y+0.42+j*((h-0.42)/len(pop["points"])),
                 w-0.18, (h-0.42)/len(pop["points"])+0.02,
                 font_size=9, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 14 — CURRENT GUIDELINES SUMMARY
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, ACCENT_TEAL)
add_text(slide, "Current Guidelines Summary — 2025 ACC/AHA & 2026 ACC Scientific Statement", 0.3, 0.05, 12.5, 0.9,
         font_size=20, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

guideline_sections = [
    {
        "title": "2025 ACC/AHA/ACEP/NAEMSP/SCAI ACS Guidelines",
        "color": MED_BLUE,
        "points": [
            "Class I: Loading dose aspirin + P2Y12 inhibitor for ALL ACS patients (no contraindication)",
            "Class I: Ticagrelor or Prasugrel preferred over clopidogrel for NSTE-ACS",
            "Class I: DAPT for at least 12 months post-ACS; transition to ticagrelor 60 mg BID if extended",
            "Class I: Ticagrelor monotherapy ≥1 month post-PCI in ACS who tolerated DAPT well",
            "If triple therapy needed (OAC + DAPT): stop aspirin after 1–4 weeks, continue OAC + P2Y12",
            "DAPT de-escalation from prasugrel/ticagrelor to clopidogrel: may be guided by platelet function/genotyping",
        ]
    },
    {
        "title": "2023 AHA/ACC Chronic Coronary Disease (CCD) Guidelines",
        "color": ACCENT_GREEN,
        "points": [
            "Aspirin 81 mg daily — standard for stable CAD / post-MI secondary prevention",
            "DAPT for elective PCI with DES: 6 months minimum; may extend in low-bleed, high-ischemic risk",
            "Ticagrelor 60 mg BID added to aspirin: for high-risk post-MI patients >12 months out (Class IIb)",
            "Clopidogrel monotherapy: consider in patients intolerant or contraindicated to aspirin",
            "Primary prevention: DAPT NOT recommended; individualize aspirin use",
        ]
    },
    {
        "title": "2023/2024 ESC Guidelines (ACS & Chronic Coronary Syndromes)",
        "color": ORANGE,
        "points": [
            "ESC ACS: Prasugrel preferred over ticagrelor post-PCI (ISAR-REACT 5 evidence)",
            "P2Y12 monotherapy (without aspirin) after 3–6 months of DAPT: Class IIa, Level A",
            "High bleeding risk (HBR): DAPT for 1 month, then P2Y12 monotherapy",
            "Deescalation strategies (guided or unguided): acceptable alternatives to standard DAPT",
            "ESC CCS 2024: Aspirin monotherapy for stable CAD; P2Y12 inhibitor if aspirin intolerant",
        ]
    },
    {
        "title": "2026 ACC Scientific Statement — Antiplatelet Therapy in ASCVD",
        "color": ACCENT_RED,
        "points": [
            "Comprehensive framework across entire ASCVD spectrum",
            "Three DAPT strategies post-ACS: default (12 months), bleeding-reduction, high-bleed-risk options",
            "Perioperative: defer elective surgery ≥6 months post-PCI (CCS); ≥12 months post-PCI (ACS)",
            "Bioprosthetic valves: single antiplatelet therapy (low-dose aspirin) long-term",
            "All guidelines converge on: DAPT for 12 months post-ACS; then aspirin monotherapy",
        ]
    },
]

col_x3 = [0.2, 6.85]
row_y3 = [1.1, 4.35]
for i, section in enumerate(guideline_sections):
    x = col_x3[i % 2]
    y = row_y3[i // 2]
    w = 6.2
    h = 3.0
    add_rect(slide, x, y, w, 0.4, section["color"])
    add_text(slide, section["title"], x+0.08, y+0.02, w-0.12, 0.36,
             font_size=11.5, bold=True, color=WHITE, wrap=True)
    add_rect(slide, x, y+0.4, w, h-0.4, WHITE)
    for j, pt in enumerate(section["points"]):
        add_text(slide, f"• {pt}", x+0.1, y+0.44+j*0.42, w-0.18, 0.4,
                 font_size=9.3, color=DARK_GRAY, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 15 — QUICK REFERENCE DOSAGE TABLE
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, DARK_BLUE)
add_text(slide, "Quick Reference — Antiplatelet Drug Dosage & Duration", 0.3, 0.05, 12.5, 0.9,
         font_size=24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

headers3 = ["Drug", "Class", "Route", "Loading Dose", "Maintenance Dose", "Duration", "Key Indication"]
col_x4 = [0.15, 1.85, 2.85, 3.65, 5.25, 7.05, 9.05]
col_w4 = [1.65, 0.95, 0.75, 1.55, 1.75, 1.95, 4.15]

all_drugs = [
    ["Aspirin", "COX-I", "Oral", "162–325 mg stat", "75–100 mg OD", "Lifelong", "ACS, PCI, CABG, stroke (secondary prevention)"],
    ["Clopidogrel", "P2Y12", "Oral", "300–600 mg", "75 mg OD", "1–12 months", "ACS, PCI (BMS/DES), TIA/stroke, PAD"],
    ["Prasugrel", "P2Y12", "Oral", "60 mg", "10 mg OD (5 mg if <60kg / ≥75yr)", "12 months", "ACS + PCI only (post-angiography); avoid prior stroke/TIA"],
    ["Ticagrelor", "P2Y12", "Oral", "180 mg", "90 mg BID (×12 mo)\n60 mg BID (>12 mo)", "12 months (std)\nExtended possible", "ACS (all strategies); highest-risk post-MI extended prevention"],
    ["Cangrelor", "P2Y12", "IV only", "30 µg/kg IV bolus", "4 µg/kg/min IV infusion", "Procedure duration (≥2 hr)", "PCI adjunct; bridging; pre-op patients on DAPT"],
    ["Abciximab", "GP IIb/IIIa", "IV only", "0.25 mg/kg IV bolus", "0.125 µg/kg/min (max 10 µg/min) × 12 hr", "12 hours infusion", "High-risk PCI; STEMI with high thrombus burden"],
    ["Eptifibatide", "GP IIb/IIIa", "IV only", "180 µg/kg IV (repeat ×1)", "2 µg/kg/min × 18–24 hr", "18–24 hours", "ACS (NSTEMI/UA), PCI adjunct; dose-reduce CrCl <50"],
    ["Tirofiban", "GP IIb/IIIa", "IV only", "25 µg/kg over 3 min", "0.15 µg/kg/min × 18–24 hr", "18–24 hours", "ACS (NSTEMI/UA), PCI adjunct; dose-reduce in renal impairment"],
    ["Vorapaxar", "PAR-1 Antag.", "Oral", "None", "2.08 mg OD", "Chronic (secondary prevention)", "Secondary prevention post-MI (no prior stroke/TIA)"],
    ["Dipyridamole", "PDE Inhibitor", "Oral", "None", "200 mg ER twice daily (+ ASA)", "Chronic", "Stroke prevention (combined with aspirin — Aggrenox)"],
    ["Cilostazol", "PDE Inhibitor", "Oral", "None", "100 mg twice daily", "Chronic", "Peripheral artery disease (intermittent claudication)"],
    ["Ticlopidine", "P2Y12 (older)", "Oral", "None", "250 mg twice daily", "Variable", "TIA/stroke (ASA-intolerant); rarely used due to toxicity"],
]

y_tbl3 = 1.1
hdr_h3 = 0.38
row_h3 = 0.5
add_rect(slide, 0.15, y_tbl3, 13.0, hdr_h3, DARK_BLUE)
for ci, (hdr, cx, cw) in enumerate(zip(headers3, col_x4, col_w4)):
    add_text(slide, hdr, cx+0.03, y_tbl3+0.02, cw-0.05, hdr_h3-0.04,
             font_size=10, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             anchor=MSO_ANCHOR.MIDDLE)

row_colors = [
    RGBColor(0xFF, 0xEB, 0xEB),  # aspirin - red tint
    RGBColor(0xE8, 0xF8, 0xE8),  # clopidogrel
    RGBColor(0xE8, 0xF8, 0xE8),  # prasugrel
    RGBColor(0xE8, 0xF8, 0xE8),  # ticagrelor
    RGBColor(0xE8, 0xF8, 0xE8),  # cangrelor
    RGBColor(0xFF, 0xEB, 0xEB),  # abciximab
    RGBColor(0xEA, 0xF2, 0xFF),  # eptifibatide
    RGBColor(0xEA, 0xF2, 0xFF),  # tirofiban
    RGBColor(0xFD, 0xF2, 0xE4),  # vorapaxar
    RGBColor(0xE8, 0xF8, 0xF4),  # dipyridamole
    RGBColor(0xE8, 0xF8, 0xF4),  # cilostazol
    WHITE,                        # ticlopidine
]

for ri, (row, bg) in enumerate(zip(all_drugs, row_colors)):
    y_row = y_tbl3 + hdr_h3 + ri * row_h3
    add_rect(slide, 0.15, y_row, 13.0, row_h3, bg)
    for ci, (val, cx, cw) in enumerate(zip(row, col_x4, col_w4)):
        is_bold = ci == 0
        col = DARK_BLUE if ci == 0 else (ACCENT_RED if ci == 5 else DARK_GRAY)
        add_text(slide, val, cx+0.03, y_row+0.01, cw-0.05, row_h3-0.02,
                 font_size=8.5, bold=is_bold, color=col,
                 align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.MIDDLE, wrap=True)

# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 16 — SUMMARY & KEY TAKEAWAYS
# ══════════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 1.0, DARK_BLUE)
add_text(slide, "Summary & Key Takeaways", 0.3, 0.05, 12.5, 0.9,
         font_size=28, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 13.333, 6.5, LIGHT_GRAY)

takeaways = [
    (ACCENT_RED, "COX Inhibitor (Aspirin):",
     "Backbone of antiplatelet therapy. 81 mg/day lifelong for all secondary prevention. Irreversible COX-1 inhibition — effect lasts platelet lifespan (10 days). Chewable 162–325 mg for ACS loading."),
    (ACCENT_GREEN, "P2Y12 Inhibitors (DAPT pillar):",
     "Ticagrelor/prasugrel > clopidogrel in ACS/PCI (faster, more predictable inhibition). Clopidogrel first-line for stable angina PCI, TIA/stroke. Cangrelor is IV bridge option. DAPT = aspirin + P2Y12 for 12 months post-ACS."),
    (MED_BLUE, "GP IIb/IIIa Inhibitors:",
     "Reserved for high-risk PCI or refractory ACS patients not pre-treated. IV only; short-term use. Abciximab reversible by platelet transfusion; eptifibatide/tirofiban are not. Falling out of routine use with potent oral P2Y12 agents."),
    (ORANGE, "DAPT Duration Principles:",
     "Standard: 12 months post-ACS. May extend (60 mg ticagrelor BID) if high ischemic risk. May shorten to 1–3 months in high bleeding risk (HBR) then P2Y12 monotherapy. Balance ischemic vs bleeding risk using PRECISE-DAPT and DAPT score tools."),
    (ACCENT_TEAL, "Special Situations:",
     "Avoid prasugrel in prior stroke/TIA or age ≥75 (or use 5 mg). Stop P2Y12 before surgery: clopidogrel 5d, ticagrelor 5d, prasugrel 7d, cangrelor 1h. ASA + NOAC: triple therapy — minimize by stopping ASA after 4 weeks post-PCI."),
    (DARK_BLUE, "Latest Guidelines (2025/2026):",
     "2025 ACC/AHA: Ticagrelor preferred for NSTE-ACS; ticagrelor monotherapy ≥1 month post-PCI is Class I. 2026 ACC Statement: comprehensive ASCVD spectrum framework. De-escalation strategies are guideline-endorsed alternatives."),
]

for i, (col, title, text) in enumerate(takeaways):
    row = i % 3
    col_n = i // 3
    x = 0.2 + col_n * 6.6
    y = 1.15 + row * 1.75
    w = 6.2
    add_rect(slide, x, y, 0.45, 1.45, col)
    add_text(slide, str(i+1), x, y, 0.45, 1.45, font_size=18, bold=True,
             color=WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
    add_rect(slide, x+0.45, y, w-0.45, 1.45, WHITE)
    add_text(slide, title, x+0.55, y+0.06, w-0.62, 0.35,
             font_size=12, bold=True, color=col)
    add_text(slide, text, x+0.55, y+0.42, w-0.62, 0.98,
             font_size=9.5, color=DARK_GRAY, wrap=True)

# Footer on all slides (slide count)
# Note: already done inline

# ══════════════════════════════════════════════════════════════════════════════
# SAVE
# ══════════════════════════════════════════════════════════════════════════════
output_path = "/tmp/workspace/antiplatelet-pptx/Antiplatelet_Drugs_CVD_Management.pptx"
buf = BytesIO()
prs.save(buf)
with open(output_path, "wb") as f:
    f.write(buf.getvalue())

print(f"Presentation saved: {output_path}")
print(f"Total slides: {len(prs.slides)}")
print(f"File size: {len(buf.getvalue()) // 1024} KB")
Running Command

cd /tmp/workspace/antiplatelet-pptx && python build_pptx.py 2>&1

Your presentation is ready for download:

Antiplatelet Drugs CVD Management

Presentation · PPTX


What's Inside (16 Slides)

#SlideContent
1Title SlideProfessional cover with guideline sources
2Overview / OutlineNumbered topic map
3Platelet Biology & Thrombosis7-step activation cascade; drug targets; clinical significance
4Classification of Antiplatelet Drugs5 classes in visual columns: COX inhibitors, P2Y12, GP IIb/IIIa, PAR-1, PDE inhibitors
5AspirinMechanism diagram (COX pathway), dosage table by indication, pharmacology facts, contraindications
6P2Y12 Inhibitors — OverviewMechanism with diagram; comparison table (clopidogrel / prasugrel / ticagrelor / cangrelor) for 11 properties
7Clopidogrel & PrasugrelSide-by-side profiles: mechanism, dosage, DAPT duration, key trials, adverse effects, contraindications
8Ticagrelor & CangrelorDetailed profiles including PLATO trial, extended dosing, bridging use
9GP IIb/IIIa InhibitorsAbciximab, Eptifibatide, Tirofiban — bolus/infusion doses, half-lives, reversibility, indications
10DAPT Regimens & Duration Table8 clinical scenarios (STEMI, NSTEMI, DES, BMS, stable CAD, HBR, fibrinolysis, stroke) with P2Y12 choice, loading, maintenance, duration
11Clinical Scenarios Step-by-StepSTEMI PCI, NSTEMI invasive, Stable CAD, Ischemic Stroke — numbered management steps
12Adverse Effects & InteractionsBleeding rate table, contraindications by drug, 7 key drug interactions (PPIs, NSAIDs, CYP, triple therapy)
13Special Populations & PerioperativeElderly, low weight, CKD, pregnancy, liver disease, surgical timing for each P2Y12 agent
14Current Guidelines2025 ACC/AHA ACS; 2023 AHA/ACC CCD; 2023–2024 ESC; 2026 ACC Scientific Statement
15Quick Reference Dosage TableAll 12 agents — loading dose, maintenance, duration, indication in one table
16Summary & Key Takeaways6 color-coded principle boxes

Sources: Current Surgical Therapy 14e, Washington Manual of Medical Therapeutics, Harrison's 22e (2025), Lippincott Pharmacology, 2025 ACC/AHA/ACEP/SCAI ACS Guidelines, 2026 ACC Antiplatelet Scientific Statement, Tintinalli's Emergency Medicine.
This is a shared conversation. Sign in to Orris to start your own chat.