I am a new Apn on the Advanced heart failure, and Transplant team. Can you please create a study guide to help me with EKGs and anti-rejection test and treatments as as well as as GDMT for heart failure, patients, etc. please make this easy to understand and comprehend, as I am just starting out in my career

Reading File
Now let me run all the medical library searches in parallel:
Finding Sources
Finding Sources
Finding Sources
Searching PubMed

"heart failure" AND "guideline directed medical therapy"

The heading searches returned no results. Let me try broader searches:
Finding Sources
Finding Sources
Finding Sources
Finding Sources
I have Braunwald's Heart Disease and Fuster's Heart. Let me pull content from those key cardiology textbooks:
Reading File
Finding Sources
Finding Sources
Excellent! Now let me read the key GDMT and transplant sections:
Reading File
Reading File
Reading File
I now have rich content from Braunwald's, Goldman-Cecil, Katzung's pharmacology, and Rosen's EM. Let me read more GDMT and transplant content:
Reading File
Reading File
Reading File
I now have enough content from authoritative sources. Let me compile the comprehensive study guide:

๐Ÿซ€ Advanced Heart Failure & Transplant APN Study Guide

For the New Advanced Practice Nurse โ€” Advanced HF & Transplant Team

HOW TO USE THIS GUIDE

Think of this guide in three big sections:
  1. EKGs โ€” Reading heart tracings
  2. GDMT โ€” The "four pillars" drug therapy for heart failure
  3. Transplant โ€” Rejection, anti-rejection meds, and monitoring

PART 1: EKG BASICS FOR THE HF/TRANSPLANT APN

The 5-Step Systematic Approach (Never Skip Steps!)

Every EKG you read, go in this order every time โ€” consistency prevents missed findings.
StepWhat You're Looking AtNormal
1. RateCount the big boxes (each = 0.2 sec) between R waves: divide 300 by number of boxes60โ€“100 bpm
2. RhythmAre R-R intervals regular? Is every P wave followed by a QRS?Regular sinus
3. AxisLead I and aVF both upright = normal axis-30ยฐ to +90ยฐ
4. IntervalsPR, QRS width, QTcSee below
5. MorphologyP wave shape, ST segments, T waves, Q wavesSee below

Normal Intervals โ€” Memorize These

IntervalNormal RangeWhy It Matters in HF
PR interval0.12โ€“0.20 sec (3โ€“5 small boxes)Prolonged = heart block (common post-transplant)
QRS duration< 0.12 sec (< 3 small boxes)Wide QRS (>0.12) = bundle branch block โ†’ may need CRT
QTc< 0.44 sec men; < 0.46 sec womenMany HF drugs prolong QT โ€” watch closely

EKG Patterns You WILL See on This Team

๐Ÿ”ต Left Bundle Branch Block (LBBB)

  • QRS > 0.12 sec, wide notched "M" shape in V5โ€“V6, deep S wave in V1
  • Why it matters: Sign of LV dysfunction; indicates CRT (cardiac resynchronization therapy) candidacy if EF โ‰ค35% + LBBB + NYHA class IIโ€“IV
  • Key rule: A NEW LBBB in a patient with chest pain = treat like STEMI

๐Ÿ”ต Right Bundle Branch Block (RBBB)

  • Wide QRS, "RSR' " (rabbit ears) in V1โ€“V2, wide S wave in V5โ€“V6
  • After heart transplant: Incomplete RBBB is NORMAL and expected โ€” it's not clinically meaningful
  • Complete RBBB can appear but is usually benign post-transplant

๐Ÿ”ต ST Elevation / Q Waves โ€” Critical in Transplant Patients

  • Transplanted hearts are denervated โ€” patients feel NO chest pain (silent MI)
  • Consistent Q waves and ST elevation on an EKG in a transplant patient = significant finding, needs urgent workup
  • Cardiac allograft vasculopathy (CAV) causes diffuse coronary narrowing โ†’ silent ischemia, SCD

๐Ÿ”ต Atrial Fibrillation

  • Irregularly irregular rhythm, no clear P waves, fibrillatory baseline
  • Very common in advanced HF; assess for hemodynamic stability
  • Rate control vs. rhythm control decision depends on HF severity and LV function

๐Ÿ”ต Ventricular Tachycardia (VT)

  • Wide complex tachycardia (QRS > 0.12), rate > 100, NO preceding P waves
  • Fusion beats (normal + wide QRS hybrid) confirm VT
  • High-mortality risk in HF; ICD placement may be indicated (EF โ‰ค35%)

๐Ÿ”ต Heart Block in Transplant Recipients

  • Sinus node dysfunction is common early post-transplant
  • Resting HR typically 95โ€“110 bpm early (no vagal tone) โ†’ decreases to ~92 bpm by year 1
  • Atropine does NOT work in the transplanted heart โ€” the vagus nerve is cut
  • Glycopyrrolate also does NOT work
  • Adenosine CAN be used but at half the normal dose (risk of prolonged AV block)
  • For SVT: Beta-blockers, diltiazem, or amiodarone are appropriate

EKG Tips Specific to HF Patients

FindingThink About
Wide QRS + LBBBCRT candidate?
Prolonged QTcDrug toxicity (amiodarone, antifungals)? Electrolyte issues?
Low voltage throughoutCardiac amyloidosis (ATTR-CM)
Q waves in transplant patientSilent MI โ†’ CAV
Pseudo-VT (regular R-R, but looks wide)Artifact โ€” check pulse/BP tracing before shocking
Abnormal heart rate variabilityPoor prognosis marker post-MI / in dilated CMP

PART 2: GDMT โ€” THE "FOUR PILLARS" OF HEART FAILURE

What is GDMT?

Guideline-Directed Medical Therapy = the drugs proven to reduce deaths and hospitalizations in HFrEF (EF โ‰ค 40%). Every eligible patient should be on all four classes unless contraindicated.
Think of it as the "BANS" regimen:
Beta-blocker + ARNI (or ACEi/ARB) + New MRA + SGLT2 inhibitor

The Four Pillars โ€” At a Glance

PillarDrug ClassExamplesMortality Benefit
1Beta-blockerCarvedilol, Metoprolol succinate, Bisoprololโœ… Yes
2ARNI (or ACEi/ARB)Sacubitril/valsartan (Entresto); Lisinopril, Ramipril; Losartanโœ… Yes
3MRA (mineralocorticoid receptor antagonist)Spironolactone, Eplerenoneโœ… Yes
4SGLT2 inhibitorDapagliflozin (Farxiga), Empagliflozin (Jardiance)โœ… Yes
"Beta-blocker plus neprilysin inhibitor (ARNi), and SGLT2 inhibitor therapies are the only agents in current use that actually prolong life and reduce hospitalizations in patients with chronic heart failure." โ€” Katzung's Basic and Clinical Pharmacology, 16e

Pillar 1: Beta-Blockers

How they work: Block excessive sympathetic activation (norepinephrine, epinephrine) that damages the failing heart over time. Reduce cardiac remodeling, decrease heart rate, lower O2 demand.
The approved three (memorize these):
  • Carvedilol (alpha + beta blocker) โ€” also vasodilates
  • Metoprolol succinate (Toprol XL โ€” extended release ONLY, not tartrate)
  • Bisoprolol
Key pearls:
  • Start LOW, go SLOW โ€” titrate dose every 2 weeks as tolerated
  • Do NOT start during acute decompensated HF (wet/cold patient)
  • Can start once patient is euvolemic (dry) and hemodynamically stable
  • Carvedilol is substantially more effective than low-dose short-acting metoprolol tartrate
Side effects to monitor:
  • Bradycardia (if HR <50 bpm with worsening symptoms โ†’ halve dose)
  • Hypotension
  • Fatigue (often improves over weeks)
  • Bronchospasm (relative contraindication in COPD/asthma โ€” use bisoprolol preferentially)

Pillar 2: ARNI / ACE Inhibitor / ARB

ARNI โ€” Sacubitril/Valsartan (Entresto) โ€” PREFERRED over ACEi

How it works: Blocks both angiotensin II (via valsartan) AND neprilysin (sacubitril blocks this enzyme that breaks down beneficial natriuretic peptides). Double benefit: reduces harmful hormones + boosts cardioprotective hormones.
Key rules:
  • Must wait 36 hours after stopping an ACEi before starting Entresto (risk of angioedema)
  • Cannot use simultaneously with ACEi
  • Do not use with ARB alone once on Entresto

ACE Inhibitors (if Entresto not tolerated/available)

Examples: Lisinopril, Ramipril, Enalapril
Mechanism: Block conversion of Angiotensin I โ†’ Angiotensin II; reduce vasoconstriction, aldosterone, sodium retention, and harmful cardiac remodeling.
Common side effects:
  • Dry cough (bradykinin accumulation) โ†’ switch to ARB
  • Hyperkalemia โ€” monitor potassium
  • Worsening renal function โ€” acceptable if Cr rises <50% above baseline (up to 3.0 mg/dL)
  • Angioedema (rare but dangerous โ€” contraindicated in history of angioedema)
Potassium monitoring:
  • Kโบ up to 5.5 mEq/L โ†’ acceptable, recheck closely
  • Kโบ > 5.5 mEq/L โ†’ stop ACEi/ARB; consider potassium binder (patiromer) to allow continuation

Pillar 3: Mineralocorticoid Receptor Antagonists (MRA)

Examples: Spironolactone, Eplerenone
How they work: Block aldosterone โ†’ reduce sodium/water retention, reduce cardiac fibrosis and remodeling. Eplerenone has fewer hormonal side effects than spironolactone.
Use when: NYHA Class IIโ€“IV with EF โ‰ค 35%, already on ACEi/ARNI + beta-blocker
Monitoring:
  • Potassium (hyperkalemia risk โ€” especially with ACEi/ARNI)
  • Renal function (creatinine, GFR)
  • Avoid if Kโบ > 5.0 at baseline or GFR < 30
Side effects:
  • Hyperkalemia โš ๏ธ
  • Gynecomastia (spironolactone) โ†’ switch to eplerenone

Pillar 4: SGLT2 Inhibitors

Examples: Dapagliflozin (Farxiga), Empagliflozin (Jardiance)
How they work (HF mechanism, NOT just glucose lowering): Reduce sodium/volume overload, improve mitochondrial function, decrease cardiac preload and afterload, reduce inflammation and fibrosis. Work in both diabetic AND non-diabetic HF patients.
Indications: HFrEF EF โ‰ค 40% (regardless of diabetes status); HFpEF also showing benefit
Monitoring:
  • Urinary tract infections (glucosuria promotes infection)
  • Euglycemic DKA โ€” can occur even in non-diabetics; hold perioperatively
  • Fournier's gangrene (rare but serious genital necrotizing fasciitis)
  • Hold if GFR < 25 (reduced efficacy; check product labeling)

Additional HF Medications

Diuretics (Symptom Management โ€” NOT mortality benefit alone)

DiureticUseNotes
Furosemide (loop)Volume overload, pulmonary edemaMost common; dose in AM to avoid nighttime diuresis
TorsemideBetter oral bioavailability than furosemideUseful if inconsistent response to furosemide
BumetanideLoop diuretic1 mg bumetanide โ‰ˆ 40 mg furosemide
MetolazoneThiazide-like; add-on to loopPotent synergy with loop diuretics; used for diuretic resistance
Spironolactone/EplerenoneKโบ-sparing + MRA pillarDual role: pillar + diuretic
Diuretic resistance: When IV loop diuretics inadequate โ†’ combine loop + thiazide (metolazone). Monitor electrolytes closely. Severe refractory cases may need ultrafiltration.

Hydralazine + Isosorbide Dinitrate (H-ISDN)

  • Use in patients who cannot tolerate ACEi/ARNI/ARB (e.g., renal failure, angioedema)
  • Evidence-based especially in Black/African American patients (A-HeFT trial)
  • Reduces afterload (hydralazine) + preload (nitrate)

Ivabradine

  • Slows heart rate by blocking funny (If) channels in sinus node WITHOUT reducing BP or contractility
  • Indicated: NYHA IIโ€“III, EF โ‰ค 35%, sinus rhythm, HR โ‰ฅ 70 bpm despite maximally tolerated beta-blocker
  • Does NOT work in atrial fibrillation (only works in sinus rhythm)

Digoxin

  • Weakly positive inotrope; reduces hospitalizations (no mortality benefit)
  • Used in persistent HF symptoms or rate control in AF
  • Narrow therapeutic window: target serum level 0.5โ€“0.9 ng/mL (toxicity risk with levels > 2.0 ng/mL)
  • Toxicity signs: nausea, vomiting, visual changes (yellow-green halos), bradycardia, heart block

HF Staging Quick Reference

ACC/AHA StageDescriptionNYHA Class Equivalent
AAt risk (HTN, DM, FH) โ€” no structural diseaseNone
BStructural disease, no symptomsI
CStructural disease + current or prior symptomsIโ€“IV
DAdvanced HF โ€” refractory symptoms at restIV
Stage D options: Inotropes, LVAD (left ventricular assist device), heart transplantation, palliative care

PART 3: HEART TRANSPLANT โ€” REJECTION, MONITORING & ANTI-REJECTION THERAPY

Transplant Basics You Must Know

The Denervated Heart

The transplanted heart has NO connection to the nervous system โ€” both parasympathetic (vagus) and sympathetic fibers are cut during surgery.
What this means clinically:
Normal HeartTransplanted Heart
HR 60โ€“80 bpm at restHR 95โ€“110 bpm early post-transplant; ~92 bpm by year 1
Angina with ischemiaNO chest pain (denervated โ†’ silent MI!)
Atropine works for bradycardiaAtropine does NOTHING
Glycopyrrolate worksGlycopyrrolate does NOTHING
Normal adenosine doseUse HALF the dose (risk of prolonged AV block)
Normal sympathetic response to exerciseBlunted stress response
"Atropine and glycopyrrolate have no effect on the denervated heart and should not be used in the transplant recipient." โ€” Rosen's Emergency Medicine

Types of Rejection โ€” The Big Three

TypeTimingMechanismHow DiagnosedTreatment
HyperacuteMinutes to hours post-opPreformed antibodies (ABO/HLA mismatch)Clinical / pathologyRare with modern crossmatching; may require retransplant
Acute Cellular Rejection (ACR)Days to 1 year (peak: first 3โ€“6 months)T-cell mediated attack on donor tissueEndomyocardial biopsy (EMB)IV methylprednisolone; adjust maintenance immunosuppression
Antibody-Mediated Rejection (AMR)Variable; can be lateDonor-specific antibodies (DSA) damage endotheliumBiopsy + DSA testingIVIG, plasmapheresis, rituximab, eculizumab
Chronic Rejection / CAVMonths to yearsImmune + non-immune; diffuse coronary diseaseCoronary angiographyStatin, sirolimus; retransplant in severe cases
Key stat: Acute cellular rejection occurs in ~27% of recipients by one year post-transplant. Many low-grade episodes are asymptomatic and left untreated.

Signs & Symptoms of Rejection

Many patients have subtle or NO symptoms โ€” this is why surveillance biopsies are done!
When symptomatic, look for:
  • Fever
  • Dyspnea, new or worsening shortness of breath
  • Palpitations or new arrhythmias
  • Elevated cardiac biomarkers (troponin, BNP/NT-proBNP)
  • Reduced EF on echo
  • Fatigue, malaise, edema
Atypical presentations of HF in transplant patient:
  • Echo may show NORMAL EF even with significant rejection (microscopic scarring โ†’ restrictive pattern)
  • No angina with ischemia
  • CAV presents as sudden cardiac death or silent MI

Endomyocardial Biopsy (EMB) โ€” The Gold Standard

How it works: A bioptome catheter is inserted via the right internal jugular vein โ†’ into the right ventricle โ†’ small pieces of myocardial tissue are taken and examined under microscopy.
ISHLT Grading Scale for Cellular Rejection:
GradeWhat It MeansAction
0RNo rejectionContinue current regimen
1RMild โ€” focal infiltrate, no myocyte damageOften observed; may increase immunosuppression
2RModerate โ€” multifocal infiltrate WITH myocyte damageTreat with pulse steroids
3RSevere โ€” diffuse infiltrate, myocyte damage, ยฑ hemorrhageAggressive therapy; often requires hospitalization
Surveillance schedule (typical):
  • Weekly โ†’ monthly for first year
  • Less frequent thereafter based on rejection history

The Three-Drug Anti-Rejection Regimen

Most transplant patients are on a triple-drug maintenance immunosuppression regimen:

1. Calcineurin Inhibitor (CNI) โ€” The Backbone

DrugMechanismTarget Level
Tacrolimus (Prograf/FK506) โ€” PREFERREDBlocks calcineurin โ†’ inhibits T-cell IL-2 production8โ€“12 ng/mL early; 6โ€“10 ng/mL long-term
Cyclosporine (Sandimmune/Neoral)Same mechanism as tacrolimus200โ€“300 ng/mL (trough)
Tacrolimus monitoring:
  • Trough levels (drawn before morning dose)
  • Nephrotoxicity โ€” most important side effect; monitor creatinine
  • Neurotoxicity โ€” tremors, headache, posterior reversible encephalopathy (PRES)
  • Hyperkalemia and hypertension
  • Diabetogenic (post-transplant DM)
  • Narrow therapeutic window โ€” many drug interactions!

2. Antimetabolite โ€” Antiproliferative

DrugNotes
Mycophenolate mofetil (CellCept) โ€” PREFERREDBlocks purine synthesis โ†’ inhibits lymphocyte proliferation
AzathioprineOlder agent; still used if mycophenolate not tolerated
Side effects:
  • GI symptoms (nausea, diarrhea) โ€” try splitting doses or switching to enteric-coated form
  • Bone marrow suppression โ†’ leukopenia (check CBC)
  • Increased infection risk

3. Corticosteroids

DrugNotes
PrednisoneMost patients start at higher doses; taper over months to years
MethylprednisoloneIV pulse dose for acute rejection treatment
Long-term side effects (important for patient counseling):
  • Osteoporosis โ†’ prescribe vitamin D + calcium; DEXA scans
  • Hyperglycemia / post-transplant DM
  • Weight gain, Cushingoid features
  • Hypertension
  • Cataracts
  • Increased infection susceptibility

mTOR Inhibitors โ€” Special Role

DrugNotes
Sirolimus (Rapamune)mTOR inhibitor; antiproliferative; may slow CAV progression
EverolimusSimilar to sirolimus; used in some protocols
Important: Sirolimus is avoided in the early post-transplant period because it impairs wound healing and can cause sternal wound dehiscence.
Used later to:
  • Allow CNI dose reduction (nephrotoxicity sparing)
  • Manage or prevent CAV

Critical Drug-Drug Interactions (Memorize These!)

InteractionResultClinical Action
Calcium channel blockers (diltiazem, verapamil) + Tacrolimus/Cyclosporineโ†‘ CNI levelsCheck trough; may need dose reduction
Amiodarone + Tacrolimus/Cyclosporineโ†‘ CNI levelsCheck trough
Azole antifungals (fluconazole, voriconazole) + Tacrolimusโ†‘ Tacrolimus levels dramaticallyOften reduce tacrolimus dose by 50โ€“75%
Rifampin + Tacrolimusโ†“ Tacrolimus levelsMay need major dose increase
Cyclosporine + Statinsโ†‘ Statin levels โ†’ rhabdomyolysis riskUse lower statin doses; prefer pravastatin or rosuvastatin
Antibiotics (macrolides) + Warfarinโ†‘ INRMonitor anticoagulation closely

Monitoring Schedule Quick Reference

Routine Transplant Labs (Know What to Order)

LabWhat You're Monitoring
Tacrolimus troughImmunosuppression level (must be drawn before morning dose!)
CBC with differentialLeukopenia (mycophenolate toxicity), anemia
BMP / CMPCreatinine (CNI nephrotoxicity), potassium, glucose
BNP / NT-proBNPCardiac stress marker; rises with rejection or decompensation
TroponinMyocardial injury; elevated with rejection or ischemia
LFTsDrug hepatotoxicity
Lipid panelCVD risk; CAV prevention โ€” statins used in all transplant patients
HbA1cPost-transplant DM screening (steroids + tacrolimus โ†’ diabetogenic)
Donor-specific antibodies (DSA)AMR surveillance
CMV viral loadCMV prophylaxis/monitoring (universal early post-transplant)

Cardiac Allograft Vasculopathy (CAV) โ€” Critical Complication

CAV is the transplant equivalent of coronary artery disease โ€” but it affects the entire vessel length (diffuse, concentric), not just focal plaques.
Key points:
  • Major cause of death after year 1 post-transplant
  • No chest pain (denervated heart)
  • Diagnosed by coronary angiography (standard); intravascular ultrasound (IVUS) can detect early CAV
  • Prevention: Statins (all transplant patients should be on a statin), avoid CNI toxicity, good BP control
  • Treatment: Sirolimus/everolimus may slow progression; severe cases โ†’ retransplantation

Infections in Transplant Patients โ€” Timeline

TimeCommon Infections
0โ€“1 monthNosocomial (surgical site, pneumonia, line infections), mediastinitis
1โ€“6 monthsOpportunistic (CMV, PCP, Toxoplasmosis, fungal) โ€” highest risk window
> 6 monthsCommunity-acquired + opportunistic if over-immunosuppressed
Prophylaxis you'll see ordered:
  • TMP-SMX (Bactrim) โ†’ PCP pneumonia + Toxoplasmosis prophylaxis
  • Valganciclovir โ†’ CMV prophylaxis (especially donor CMV+ / recipient CMV-)
  • Nystatin or fluconazole โ†’ oral/esophageal candidiasis prophylaxis

PART 4: QUICK-REFERENCE SUMMARIES

EKG Cheat Sheet

Normal Intervals:
  PR: 0.12โ€“0.20 sec
  QRS: < 0.12 sec
  QTc: < 0.44 (men), < 0.46 (women)

LBBB: QRS > 0.12, M-shape V5-6, deep S in V1 โ†’ consider CRT if EF โ‰ค35%
RBBB post-transplant: Incomplete RBBB = NORMAL finding
VT clues: Wide complex, no P waves, fusion beats confirm VT
A-fib: Irregularly irregular, no P waves

Transplant heart:
  - HR 95-110 early (no vagal tone)
  - Atropine = useless
  - Adenosine = half dose
  - Silent MI (no chest pain)

GDMT "BANS" Cheat Sheet

B โ€“ Beta-blocker (carvedilol, metoprolol succinate, bisoprolol)
A โ€“ ARNI (sacubitril/valsartan) or ACEi/ARB
N โ€“ New MRA (spironolactone, eplerenone)
S โ€“ SGLT2 inhibitor (dapagliflozin, empagliflozin)

All four = mortality benefit in HFrEF (EF โ‰ค 40%)
Start when euvolemic. Titrate to max tolerated dose.
Monitor: Kโบ, Cr, BP, HR with each up-titration

Rejection Cheat Sheet

Biopsy Grade โ†’ Treatment:
  0R = Watch
  1R = May observe or bump immunosuppression
  2R = Pulse IV steroids (methylprednisolone 500โ€“1000 mg x 3 days)
  3R = Aggressive Rx ยฑ OKT3/ATG; admit

Triple maintenance therapy:
  1. Tacrolimus (CNI) โ€” check TROUGH before AM dose
  2. Mycophenolate mofetil (antimetabolite)
  3. Prednisone (steroid)

Big drug interactions:
  Azoles + Tacrolimus โ†’ โ†‘โ†‘ tacrolimus levels (cut dose)
  CCBs/Amiodarone + CNI โ†’ โ†‘ CNI levels
  Cyclosporine + Statins โ†’ โ†‘ myopathy risk

RESOURCES FOR CONTINUED LEARNING


Sources: Braunwald's Heart Disease (11e), Goldman-Cecil Medicine, Katzung's Basic and Clinical Pharmacology (16e), Rosen's Emergency Medicine โ€” all consulted via the medical textbook library. Guidelines current as of 2024โ€“2025.
---Welcome to the team! Here's your complete study guide โ€” built directly from Braunwald's Heart Disease, Goldman-Cecil Medicine, Katzung's Pharmacology, and Rosen's Emergency Medicine, plus the latest 2024 ISHLT transplant guidelines.
Here's a quick map of what's covered:

What's in Your Study Guide

Part 1 โ€” EKGs
  • The 5-step systematic approach (use it every single time)
  • Normal intervals and what abnormalities mean in HF
  • Key patterns: LBBB, RBBB, VT, A-fib, heart block
  • Special transplant EKG rules โ€” the denervated heart is completely different (atropine is useless, half-dose adenosine, silent MIs)
Part 2 โ€” GDMT (The "BANS" Four Pillars)
  • Beta-blocker โ†’ ARNI โ†’ New MRA โ†’ SGLT2 inhibitor
  • Mechanisms, examples, titration tips, side effects, and monitoring for each
  • Diuretics, hydralazine/nitrate, ivabradine, digoxin as add-on therapies
  • HF staging (A/B/C/D) at a glance
Part 3 โ€” Transplant
  • The three types of rejection (hyperacute, acute cellular, antibody-mediated) and CAV
  • ISHLT biopsy grading (0Rโ€“3R) and what to do at each grade
  • Triple-drug immunosuppression: tacrolimus + mycophenolate + prednisone
  • Critical drug-drug interactions (azoles + tacrolimus, CCBs + CNIs, cyclosporine + statins)
  • Routine monitoring labs and what each one is checking for
  • Infection timeline and standard prophylaxis
Part 4 โ€” Quick-Reference Cheat Sheets for fast bedside review
A few tips as you start out:
  1. Always check tacrolimus troughs BEFORE the morning dose โ€” timing matters more than people realize
  2. GDMT is only started/uptitrated in the euvolemic (dry) patient โ€” never start a beta-blocker in an acute decompensation
  3. Never use atropine on a transplant patient โ€” it won't work and wastes precious time

Create a quick reference PDF card (front/back) with EKG findings

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace

Running Command

mkdir -p /home/daytona/workspace/ekgcard && python3 -c "from reportlab.pdfgen import canvas; print('reportlab ok')" && python3 -c "from reportlab.lib import colors; print('colors ok')" && python3 -c "from reportlab.platypus import Table; print('platypus ok')"

Writing File

~/ekgcard/build_ekg_card.py

from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
from reportlab.lib import colors
from reportlab.lib.units import inch
from reportlab.platypus import Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import Paragraph

# โ”€โ”€ Palette โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
NAVY        = colors.HexColor("#0A2342")
TEAL        = colors.HexColor("#1A6B72")
LIGHT_TEAL  = colors.HexColor("#D6F0F2")
RED_ACCENT  = colors.HexColor("#C0392B")
AMBER       = colors.HexColor("#E67E22")
GREEN       = colors.HexColor("#1E8449")
WHITE       = colors.white
LIGHT_GRAY  = colors.HexColor("#F4F6F8")
MID_GRAY    = colors.HexColor("#BDC3C7")
DARK_GRAY   = colors.HexColor("#2C3E50")
YELLOW_HI   = colors.HexColor("#FDEBD0")

W, H = letter   # 8.5 ร— 11 inches

def header_bar(c, y, text, bg=NAVY, fg=WHITE, fontsize=11):
    c.setFillColor(bg)
    c.rect(0.35*inch, y, W - 0.7*inch, 0.28*inch, fill=1, stroke=0)
    c.setFillColor(fg)
    c.setFont("Helvetica-Bold", fontsize)
    c.drawCentredString(W/2, y + 0.06*inch, text)

def section_header(c, x, y, w, text, bg=TEAL, fg=WHITE, fontsize=9):
    c.setFillColor(bg)
    c.rect(x, y, w, 0.22*inch, fill=1, stroke=0)
    c.setFillColor(fg)
    c.setFont("Helvetica-Bold", fontsize)
    c.drawString(x + 0.08*inch, y + 0.05*inch, text)

def bullet(c, x, y, text, fontsize=7.5, color=DARK_GRAY, bold_prefix=None):
    c.setFillColor(TEAL)
    c.circle(x + 0.04*inch, y + 0.055*inch, 0.025*inch, fill=1, stroke=0)
    c.setFillColor(color)
    if bold_prefix:
        c.setFont("Helvetica-Bold", fontsize)
        bw = c.stringWidth(bold_prefix, "Helvetica-Bold", fontsize)
        c.drawString(x + 0.13*inch, y + 0.03*inch, bold_prefix)
        c.setFont("Helvetica", fontsize)
        c.drawString(x + 0.13*inch + bw, y + 0.03*inch, text)
    else:
        c.setFont("Helvetica", fontsize)
        c.drawString(x + 0.13*inch, y + 0.03*inch, text)

def small_text(c, x, y, text, fontsize=7, color=DARK_GRAY, bold=False):
    c.setFillColor(color)
    c.setFont("Helvetica-Bold" if bold else "Helvetica", fontsize)
    c.drawString(x, y, text)

def tag(c, x, y, text, bg=RED_ACCENT, fg=WHITE, fontsize=6.5):
    tw = c.stringWidth(text, "Helvetica-Bold", fontsize)
    pad = 0.05*inch
    c.setFillColor(bg)
    c.roundRect(x, y, tw + 2*pad, 0.15*inch, 0.03*inch, fill=1, stroke=0)
    c.setFillColor(fg)
    c.setFont("Helvetica-Bold", fontsize)
    c.drawString(x + pad, y + 0.025*inch, text)

def divider(c, x, y, w, color=MID_GRAY):
    c.setStrokeColor(color)
    c.setLineWidth(0.4)
    c.line(x, y, x+w, y)

def box_outline(c, x, y, w, h, color=MID_GRAY):
    c.setStrokeColor(color)
    c.setLineWidth(0.5)
    c.roundRect(x, y, w, h, 0.05*inch, fill=0, stroke=1)

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# PAGE 1  โ€”  FRONT
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
def draw_front(c):
    # Background
    c.setFillColor(LIGHT_GRAY)
    c.rect(0, 0, W, H, fill=1, stroke=0)

    # Top banner
    c.setFillColor(NAVY)
    c.rect(0, H - 0.75*inch, W, 0.75*inch, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 15)
    c.drawCentredString(W/2, H - 0.38*inch, "๐Ÿซ€  EKG Quick Reference Card  โ€”  Advanced HF & Transplant")
    c.setFont("Helvetica", 8)
    c.setFillColor(LIGHT_TEAL)
    c.drawCentredString(W/2, H - 0.60*inch, "FRONT  |  Systematic Approach ยท Intervals ยท Key Patterns  |  For APN Use")

    # Accent stripe
    c.setFillColor(TEAL)
    c.rect(0, H - 0.78*inch, W, 0.04*inch, fill=1, stroke=0)

    # โ”€โ”€ COL LEFT  x=0.35  w=3.55 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    LX = 0.35*inch
    LW = 3.55*inch

    # 1. SYSTEMATIC APPROACH
    cy = H - 1.08*inch
    section_header(c, LX, cy, LW, "STEP-BY-STEP SYSTEMATIC APPROACH")
    cy -= 0.02*inch

    steps = [
        ("1  RATE",      "Count R-R big boxes โ†’ 300 รท # boxes = rate  |  Normal: 60โ€“100 bpm"),
        ("2  RHYTHM",    "Regular R-R? P before every QRS? โ†’ Sinus if yes"),
        ("3  AXIS",      "Lead I + aVF both upright = normal (โˆ’30ยฐ to +90ยฐ)"),
        ("4  INTERVALS", "Measure PR, QRS, QTc (see table below)"),
        ("5  MORPHOLOGY","P shape, Q waves, ST segments, T waves"),
    ]
    row_bg = [LIGHT_TEAL, WHITE, LIGHT_TEAL, WHITE, LIGHT_TEAL]
    for i, (label, detail) in enumerate(steps):
        cy -= 0.23*inch
        c.setFillColor(row_bg[i])
        c.rect(LX, cy, LW, 0.22*inch, fill=1, stroke=0)
        c.setFillColor(NAVY)
        c.setFont("Helvetica-Bold", 7.5)
        c.drawString(LX + 0.07*inch, cy + 0.07*inch, label)
        lw = c.stringWidth(label, "Helvetica-Bold", 7.5)
        c.setFillColor(DARK_GRAY)
        c.setFont("Helvetica", 7.2)
        c.drawString(LX + 0.12*inch + lw, cy + 0.07*inch, detail)

    # 2. NORMAL INTERVALS TABLE
    cy -= 0.3*inch
    section_header(c, LX, cy, LW, "NORMAL INTERVALS")
    cy -= 0.22*inch

    rows = [
        ["Interval", "Normal Range", "Clinical Pearl"],
        ["PR interval", "0.12 โ€“ 0.20 sec\n(3โ€“5 sm boxes)", "Prolonged = heart block\n(common post-transplant)"],
        ["QRS duration", "< 0.12 sec\n(< 3 sm boxes)", "Wide QRS โ†’ BBB or VT\nLBBB + EFโ‰ค35% โ†’ CRT?"],
        ["QTc", "โ™‚ < 0.44 s\nโ™€ < 0.46 s", "Many HF drugs prolong QT\nAmiodarone, azoles, ABX"],
    ]

    col_widths = [0.85*inch, 1.15*inch, 1.55*inch]
    table = Table(rows, colWidths=col_widths, rowHeights=[0.2*inch, 0.36*inch, 0.36*inch, 0.36*inch])
    table.setStyle(TableStyle([
        ("BACKGROUND",   (0,0), (-1,0), NAVY),
        ("TEXTCOLOR",    (0,0), (-1,0), WHITE),
        ("FONTNAME",     (0,0), (-1,0), "Helvetica-Bold"),
        ("FONTSIZE",     (0,0), (-1,0), 7.5),
        ("BACKGROUND",   (0,1), (-1,1), LIGHT_TEAL),
        ("BACKGROUND",   (0,2), (-1,2), WHITE),
        ("BACKGROUND",   (0,3), (-1,3), LIGHT_TEAL),
        ("FONTNAME",     (0,1), (-1,-1), "Helvetica"),
        ("FONTSIZE",     (0,1), (-1,-1), 7),
        ("FONTNAME",     (0,1), (0,-1), "Helvetica-Bold"),
        ("TEXTCOLOR",    (0,1), (0,-1), NAVY),
        ("VALIGN",       (0,0), (-1,-1), "MIDDLE"),
        ("ALIGN",        (0,0), (-1,-1), "LEFT"),
        ("LEFTPADDING",  (0,0), (-1,-1), 4),
        ("RIGHTPADDING", (0,0), (-1,-1), 3),
        ("GRID",         (0,0), (-1,-1), 0.4, MID_GRAY),
        ("ROWBACKGROUNDS", (0,0), (-1,-1), [None]),
    ]))
    table.wrapOn(c, LW, 2*inch)
    table.drawOn(c, LX, cy - 1.08*inch)
    cy -= 1.15*inch

    # 3. RATE QUICK CALC BOX
    cy -= 0.3*inch
    section_header(c, LX, cy, LW, "HEART RATE QUICK CALC")
    cy -= 0.02*inch
    rate_data = [
        ["# Big Boxes", "1", "2", "3", "4", "5", "6"],
        ["Heart Rate",  "300","150","100","75","60","50"],
    ]
    rt = Table(rate_data, colWidths=[1.05*inch] + [0.41*inch]*6, rowHeights=[0.18*inch, 0.18*inch])
    rt.setStyle(TableStyle([
        ("BACKGROUND",  (0,0), (-1,0), TEAL),
        ("TEXTCOLOR",   (0,0), (-1,0), WHITE),
        ("FONTNAME",    (0,0), (-1,0), "Helvetica-Bold"),
        ("FONTSIZE",    (0,0), (-1,-1), 7.5),
        ("BACKGROUND",  (0,1), (-1,1), LIGHT_TEAL),
        ("FONTNAME",    (0,1), (-1,1), "Helvetica-Bold"),
        ("TEXTCOLOR",   (0,1), (-1,1), NAVY),
        ("ALIGN",       (0,0), (-1,-1), "CENTER"),
        ("VALIGN",      (0,0), (-1,-1), "MIDDLE"),
        ("GRID",        (0,0), (-1,-1), 0.4, MID_GRAY),
    ]))
    rt.wrapOn(c, LW, 0.5*inch)
    cy -= 0.38*inch
    rt.drawOn(c, LX, cy)

    # โ”€โ”€ COL RIGHT  x=4.15  w=3.95 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    RX = 4.15*inch
    RW = 4.00*inch

    ry = H - 1.08*inch
    section_header(c, RX, ry, RW, "KEY EKG PATTERNS")

    patterns = [
        {
            "title": "LBBB  โ€”  Left Bundle Branch Block",
            "color": NAVY,
            "tag": "CRT CANDIDATE?",
            "tag_bg": AMBER,
            "bullets": [
                ("QRS > 0.12 sec", " (โ‰ฅ 3 small boxes)"),
                ("V5โ€“V6:", " broad notched 'M' shape  |  V1: deep S wave"),
                ("NEW LBBB + chest pain", " โ†’ treat as STEMI"),
                ("EF โ‰ค 35% + LBBB + NYHA IIโ€“IV", " โ†’ refer for CRT"),
            ]
        },
        {
            "title": "RBBB  โ€”  Right Bundle Branch Block",
            "color": TEAL,
            "tag": "NORMAL POST-TRANSPLANT",
            "tag_bg": GREEN,
            "bullets": [
                ("V1โ€“V2:", " 'RSR\\'' (rabbit ears) pattern"),
                ("V5โ€“V6:", " wide slurred S wave"),
                ("Incomplete RBBB post-transplant", " = expected, not pathologic"),
                ("Complete RBBB:", " usually benign; evaluate in context"),
            ]
        },
        {
            "title": "VENTRICULAR TACHYCARDIA (VT)",
            "color": RED_ACCENT,
            "tag": "HIGH RISK",
            "tag_bg": RED_ACCENT,
            "bullets": [
                ("Wide complex tach:", " QRS > 0.12, rate > 100 bpm"),
                ("NO P waves before QRS", " (or AV dissociation)"),
                ("Fusion beats", " at start confirm VT"),
                ("ICD indicated", " if EF โ‰ค 35% (primary prevention)"),
            ]
        },
        {
            "title": "ATRIAL FIBRILLATION",
            "color": colors.HexColor("#6C3483"),
            "tag": "COMMON IN HF",
            "tag_bg": colors.HexColor("#6C3483"),
            "bullets": [
                ("Irregularly irregular", " R-R intervals"),
                ("No clear P waves,", " fibrillatory baseline"),
                ("Rate control vs. rhythm control", " based on HF severity"),
                ("Ivabradine does NOT work", " in A-fib (sinus rhythm only)"),
            ]
        },
        {
            "title": "HEART BLOCK",
            "color": colors.HexColor("#784212"),
            "tag": "CHECK POST-TRANSPLANT",
            "tag_bg": AMBER,
            "bullets": [
                ("1ยฐ:", " PR > 0.20 sec, every P conducts"),
                ("2ยฐ Mobitz I:", " progressive PR lengthening โ†’ dropped beat"),
                ("2ยฐ Mobitz II:", " fixed PR, sudden dropped QRS โ†’ pacemaker likely"),
                ("3ยฐ (complete):", " no P-QRS relationship โ†’ urgent pacemaker"),
            ]
        },
    ]

    ry -= 0.02*inch
    for pat in patterns:
        ry -= 0.23*inch
        # Pattern title bar
        c.setFillColor(pat["color"])
        c.rect(RX, ry, RW, 0.22*inch, fill=1, stroke=0)
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 8)
        c.drawString(RX + 0.08*inch, ry + 0.06*inch, pat["title"])
        # Tag
        tag(c, RX + RW - c.stringWidth(pat["tag"], "Helvetica-Bold", 6.5) - 0.18*inch,
            ry + 0.035*inch, pat["tag"], bg=pat["tag_bg"])
        ry -= 0.01*inch
        for b_bold, b_rest in pat["bullets"]:
            ry -= 0.135*inch
            bullet(c, RX + 0.04*inch, ry, b_rest, fontsize=7, bold_prefix=b_bold)
        ry -= 0.03*inch

    # โ”€โ”€ BOTTOM FULL-WIDTH BAR: TRANSPLANT EKG ALERT โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    alert_y = 0.52*inch
    c.setFillColor(colors.HexColor("#FEF9E7"))
    c.roundRect(0.35*inch, alert_y, W - 0.7*inch, 0.42*inch, 0.06*inch, fill=1, stroke=0)
    c.setStrokeColor(AMBER)
    c.setLineWidth(1.2)
    c.roundRect(0.35*inch, alert_y, W - 0.7*inch, 0.42*inch, 0.06*inch, fill=0, stroke=1)
    c.setFillColor(AMBER)
    c.setFont("Helvetica-Bold", 8)
    c.drawString(0.5*inch, alert_y + 0.27*inch, "โš   TRANSPLANT HEART ALERTS:")
    c.setFont("Helvetica", 7.2)
    c.setFillColor(DARK_GRAY)
    alerts = [
        "Resting HR 95โ€“110 bpm (no vagal tone) โ†’ normal early post-Tx",
        "Incomplete RBBB โ†’ expected finding",
        "Q waves / ST elevation โ†’ SIGNIFICANT (silent MI โ€” no chest pain!)",
        "Atropine / Glycopyrrolate โ†’ USELESS (vagus nerve is cut)",
        "Adenosine โ†’ use HALF dose (โ†‘ AV block risk)",
    ]
    ax = 0.5*inch
    for i, a in enumerate(alerts):
        col = ax + (i % 3) * (2.6*inch) if i < 3 else ax + ((i-3) % 3) * (3.9*inch)
        row_y = alert_y + 0.22*inch if i < 3 else alert_y + 0.06*inch
        c.setFillColor(RED_ACCENT)
        c.circle(col + 0.04*inch, row_y + 0.055*inch, 0.022*inch, fill=1, stroke=0)
        c.setFillColor(DARK_GRAY)
        c.drawString(col + 0.12*inch, row_y + 0.03*inch, a)

    # Footer
    c.setFillColor(NAVY)
    c.rect(0, 0, W, 0.35*inch, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica", 6.5)
    c.drawCentredString(W/2, 0.13*inch,
        "Sources: Braunwald's Heart Disease 11e ยท Goldman-Cecil Medicine ยท Rosen's Emergency Medicine  |  FRONT โ€” See reverse for Transplant EKG & Arrhythmia Drug Guide")


# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# PAGE 2  โ€”  BACK
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
def draw_back(c):
    # Background
    c.setFillColor(LIGHT_GRAY)
    c.rect(0, 0, W, H, fill=1, stroke=0)

    # Top banner
    c.setFillColor(TEAL)
    c.rect(0, H - 0.75*inch, W, 0.75*inch, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 15)
    c.drawCentredString(W/2, H - 0.38*inch, "๐Ÿซ€  EKG Quick Reference Card  โ€”  Advanced HF & Transplant")
    c.setFont("Helvetica", 8)
    c.setFillColor(LIGHT_TEAL)
    c.drawCentredString(W/2, H - 0.60*inch, "BACK  |  ST / T-Wave Changes ยท HF EKG Findings ยท Arrhythmia Drug Guide ยท CAV")
    c.setFillColor(NAVY)
    c.rect(0, H - 0.78*inch, W, 0.04*inch, fill=1, stroke=0)

    # โ”€โ”€ LEFT COLUMN โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    LX = 0.35*inch
    LW = 3.55*inch
    cy = H - 1.1*inch

    # ST / T WAVE CHANGES
    section_header(c, LX, cy, LW, "ST SEGMENT & T-WAVE CHANGES")
    cy -= 0.03*inch

    st_rows = [
        ["Finding", "Think About", "Action"],
        ["ST elevation\n(โ‰ฅ1 mm, โ‰ฅ2 leads)", "STEMI / Pericarditis\nIn Tx pt: CAV, silent MI", "Urgent cardiology consult\nDo NOT delay for biopsy"],
        ["ST depression", "NSTEMI / Ischemia\nDigoxin effect (scooped)", "Troponin, cardiology"],
        ["Diffuse saddle-shaped\nST elevation", "Pericarditis", "CRP, echo, NSAIDs\n(if not on anticoag)"],
        ["Peaked T waves", "Hyperkalemia โš ", "STAT Kโบ level โ†’ treat"],
        ["Flat/inverted T waves", "Ischemia, LVH,\nelectrolyte imbalance", "Clinical correlation"],
        ["Prolonged QTc\n(men >0.44, women >0.46)", "Drug toxicity, โ†“Mg, โ†“K\nAmiodarone, azoles", "Review meds, lytes\nReduce offending drug"],
    ]
    st_col_w = [1.1*inch, 1.35*inch, 1.1*inch]
    st_row_h = [0.19*inch] + [0.39*inch]*6
    st = Table(st_rows, colWidths=st_col_w, rowHeights=st_row_h)
    st.setStyle(TableStyle([
        ("BACKGROUND",  (0,0), (-1,0), NAVY),
        ("TEXTCOLOR",   (0,0), (-1,0), WHITE),
        ("FONTNAME",    (0,0), (-1,0), "Helvetica-Bold"),
        ("FONTSIZE",    (0,0), (-1,0), 7.5),
        ("FONTNAME",    (0,1), (-1,-1), "Helvetica"),
        ("FONTNAME",    (0,1), (0,-1), "Helvetica-Bold"),
        ("TEXTCOLOR",   (0,1), (0,-1), NAVY),
        ("FONTSIZE",    (0,1), (-1,-1), 6.8),
        ("BACKGROUND",  (0,1), (-1,1), LIGHT_TEAL),
        ("BACKGROUND",  (0,2), (-1,2), WHITE),
        ("BACKGROUND",  (0,3), (-1,3), LIGHT_TEAL),
        ("BACKGROUND",  (0,4), (-1,4), colors.HexColor("#FADBD8")),
        ("BACKGROUND",  (0,5), (-1,5), WHITE),
        ("BACKGROUND",  (0,6), (-1,6), colors.HexColor("#FEF9E7")),
        ("VALIGN",      (0,0), (-1,-1), "MIDDLE"),
        ("ALIGN",       (0,0), (-1,-1), "LEFT"),
        ("LEFTPADDING", (0,0), (-1,-1), 4),
        ("GRID",        (0,0), (-1,-1), 0.4, MID_GRAY),
    ]))
    st.wrapOn(c, LW, 3*inch)
    cy -= 2.73*inch
    st.drawOn(c, LX, cy)

    # HF-SPECIFIC EKG FINDINGS
    cy -= 0.32*inch
    section_header(c, LX, cy, LW, "HF-SPECIFIC EKG FINDINGS")
    cy -= 0.03*inch

    hf_findings = [
        ("Low voltage throughout all leads", "Cardiac amyloidosis (ATTR-CM)"),
        ("LBBB  + EF โ‰ค 35%", "CRT candidate โ€” refer"),
        ("QRS > 150 ms + LBBB", "Strongest CRT benefit"),
        ("Q waves in transplant patient", "Silent MI โ†’ CAV workup (angiogram)"),
        ("Sinus tach (HR 95โ€“110)", "Normal early post-transplant (denervation)"),
        ("Abnormal HRV (HR variability)", "Poor prognosis marker in dilated CMP"),
        ("Nonsustained VT (NSVT) on monitor", "EF โ‰ค 35% โ†’ ICD evaluation"),
    ]

    for i, (finding, meaning) in enumerate(hf_findings):
        cy -= 0.19*inch
        bg = LIGHT_TEAL if i % 2 == 0 else WHITE
        c.setFillColor(bg)
        c.rect(LX, cy, LW, 0.18*inch, fill=1, stroke=0)
        c.setFillColor(NAVY)
        c.setFont("Helvetica-Bold", 7)
        c.drawString(LX + 0.07*inch, cy + 0.05*inch, finding)
        fw = c.stringWidth(finding, "Helvetica-Bold", 7)
        c.setFillColor(colors.HexColor("#555555"))
        c.setFont("Helvetica", 7)
        c.drawString(LX + 0.1*inch + fw, cy + 0.05*inch, "  โ†’  " + meaning)

    # โ”€โ”€ RIGHT COLUMN โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    RX = 4.15*inch
    RW = 4.00*inch
    ry = H - 1.1*inch

    # ARRHYTHMIA DRUG GUIDE
    section_header(c, RX, ry, RW, "ARRHYTHMIA DRUG GUIDE  โ€”  HF / TRANSPLANT")
    ry -= 0.03*inch

    drug_rows = [
        ["Arrhythmia", "First-Line Rx", "HF / Transplant Notes"],
        ["A-fib\n(rate control)", "Beta-blocker\nDiltiazem (non-HFrEF)", "Avoid diltiazem if EFโ†“\nDigoxin adjunct if symptomatic"],
        ["A-fib\n(rhythm control)", "Amiodarone\nDofetilide", "Amiodarone: โ†‘ CNI levels in Tx\nDofetilide: QTc monitoring"],
        ["VT (stable)\nVT storm", "Amiodarone IV\nBeta-blocker IV", "ICD + antiarrhythmic combo\nRule out ischemia / lytes"],
        ["VF / pulseless VT", "Defibrillation 200J\nAmiodarone 300 mg IV", "Standard ACLS\nNo special Tx rules"],
        ["SVT\n(transplant heart)", "Adenosine ยฝ dose\nBeta-blocker / Diltiazem", "Atropine = INEFFECTIVE\nGlycopyrrolate = INEFFECTIVE"],
        ["Bradycardia\n(transplant heart)", "Isoproterenol / Dopamine\nPacing if refractory", "Atropine = INEFFECTIVE\nDenervated โ€” no vagal response"],
        ["Torsades de Pointes", "Mg sulfate 2g IV\nStop QT-prolonging drugs", "Correct Kโบ & Mgยฒโบ\nTemporary pacing if refractory"],
    ]
    dr_col_w = [1.1*inch, 1.3*inch, 1.6*inch]
    dr_row_h = [0.19*inch] + [0.42*inch]*7
    dr = Table(drug_rows, colWidths=dr_col_w, rowHeights=dr_row_h)
    dr.setStyle(TableStyle([
        ("BACKGROUND",  (0,0), (-1,0), NAVY),
        ("TEXTCOLOR",   (0,0), (-1,0), WHITE),
        ("FONTNAME",    (0,0), (-1,0), "Helvetica-Bold"),
        ("FONTSIZE",    (0,0), (-1,0), 7.5),
        ("FONTNAME",    (0,1), (-1,-1), "Helvetica"),
        ("FONTNAME",    (0,1), (0,-1), "Helvetica-Bold"),
        ("TEXTCOLOR",   (0,1), (0,-1), NAVY),
        ("FONTSIZE",    (0,1), (-1,-1), 7),
        ("BACKGROUND",  (0,1), (-1,1), LIGHT_TEAL),
        ("BACKGROUND",  (0,2), (-1,2), WHITE),
        ("BACKGROUND",  (0,3), (-1,3), LIGHT_TEAL),
        ("BACKGROUND",  (0,4), (-1,4), colors.HexColor("#FADBD8")),
        ("BACKGROUND",  (0,5), (-1,5), colors.HexColor("#FEF9E7")),
        ("BACKGROUND",  (0,6), (-1,6), colors.HexColor("#FEF9E7")),
        ("BACKGROUND",  (0,7), (-1,7), WHITE),
        ("VALIGN",      (0,0), (-1,-1), "MIDDLE"),
        ("ALIGN",       (0,0), (-1,-1), "LEFT"),
        ("LEFTPADDING", (0,0), (-1,-1), 4),
        ("GRID",        (0,0), (-1,-1), 0.4, MID_GRAY),
    ]))
    dr.wrapOn(c, RW, 4*inch)
    ry -= 3.38*inch
    dr.drawOn(c, RX, ry)

    # CAV BOX
    ry -= 0.33*inch
    c.setFillColor(colors.HexColor("#FADBD8"))
    c.roundRect(RX, ry - 1.25*inch, RW, 1.28*inch, 0.06*inch, fill=1, stroke=0)
    c.setStrokeColor(RED_ACCENT)
    c.setLineWidth(1)
    c.roundRect(RX, ry - 1.25*inch, RW, 1.28*inch, 0.06*inch, fill=0, stroke=1)

    c.setFillColor(RED_ACCENT)
    c.rect(RX, ry - 0.26*inch, RW, 0.28*inch, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 8.5)
    c.drawCentredString(RX + RW/2, ry - 0.19*inch, "CARDIAC ALLOGRAFT VASCULOPATHY (CAV)")

    cav_points = [
        ("What:", "Diffuse concentric coronary narrowing โ€” the transplant's \"CAD\""),
        ("Silent:", "No angina (denervated heart) โ†’ presents as SCD or silent MI"),
        ("Diagnose:", "Coronary angiography (gold std); IVUS detects early CAV"),
        ("EKG clue:", "New Q waves or ST elevation in transplant patient"),
        ("Prevent:", "Statin therapy for ALL transplant patients; BP / lipid control"),
        ("Treat:", "Sirolimus/everolimus may slow; severe โ†’ retransplantation"),
    ]
    cav_y = ry - 0.28*inch
    for label, detail in cav_points:
        cav_y -= 0.165*inch
        c.setFillColor(RED_ACCENT)
        c.setFont("Helvetica-Bold", 7)
        c.drawString(RX + 0.1*inch, cav_y, label)
        lw = c.stringWidth(label, "Helvetica-Bold", 7)
        c.setFillColor(DARK_GRAY)
        c.setFont("Helvetica", 7)
        c.drawString(RX + 0.13*inch + lw, cav_y, "  " + detail)

    # NYHA / ICD INDICATIONS MINI BOX โ€” bottom left
    bly = 0.52*inch
    c.setFillColor(LIGHT_TEAL)
    c.roundRect(LX, bly, LW, 0.72*inch, 0.05*inch, fill=1, stroke=0)
    c.setStrokeColor(TEAL)
    c.setLineWidth(0.8)
    c.roundRect(LX, bly, LW, 0.72*inch, 0.05*inch, fill=0, stroke=1)
    c.setFillColor(TEAL)
    c.setFont("Helvetica-Bold", 8)
    c.drawString(LX + 0.1*inch, bly + 0.54*inch, "ICD PRIMARY PREVENTION CRITERIA  (ALL 3 must be met):")
    icd_items = [
        "โ‘  EF โ‰ค 35%  (despite โ‰ฅ 3 months optimal GDMT)",
        "โ‘ก NYHA functional class II or III",
        "โ‘ข Life expectancy > 1 year with good functional status",
    ]
    c.setFont("Helvetica", 7.3)
    c.setFillColor(DARK_GRAY)
    for j, item in enumerate(icd_items):
        c.drawString(LX + 0.15*inch, bly + 0.36*inch - j*0.15*inch, item)

    # Bottom right mini-box: electrolyte EKG
    brx = RX
    c.setFillColor(colors.HexColor("#EBF5FB"))
    c.roundRect(brx, bly, RW, 0.72*inch, 0.05*inch, fill=1, stroke=0)
    c.setStrokeColor(TEAL)
    c.setLineWidth(0.8)
    c.roundRect(brx, bly, RW, 0.72*inch, 0.05*inch, fill=0, stroke=1)
    c.setFillColor(TEAL)
    c.setFont("Helvetica-Bold", 8)
    c.drawString(brx + 0.1*inch, bly + 0.54*inch, "ELECTROLYTE EKG CHANGES  (common in HF/diuretic use):")
    elec = [
        "Hyperkalemia: Peaked T waves โ†’ wide QRS โ†’ sine wave โ†’ VF",
        "Hypokalemia:  Flat T waves, U waves (after T wave), QTc prolongation",
        "Hypomagnesemia: Torsades de Pointes, โ†‘ risk with โ†“Kโบ",
    ]
    c.setFont("Helvetica", 7.1)
    c.setFillColor(DARK_GRAY)
    for j, item in enumerate(elec):
        c.drawString(brx + 0.15*inch, bly + 0.36*inch - j*0.155*inch, item)

    # Footer
    c.setFillColor(NAVY)
    c.rect(0, 0, W, 0.35*inch, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica", 6.5)
    c.drawCentredString(W/2, 0.13*inch,
        "Sources: Braunwald's Heart Disease 11e ยท Goldman-Cecil Medicine ยท Rosen's Emergency Medicine  |  BACK โ€” See front for Systematic Approach & Interval Guide")


# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# BUILD
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
OUTPUT = "/home/daytona/workspace/ekgcard/EKG_Quick_Reference_Card.pdf"

c = canvas.Canvas(OUTPUT, pagesize=letter)
c.setTitle("EKG Quick Reference Card โ€” Advanced HF & Transplant APN")
c.setAuthor("Orris Medical AI")
c.setSubject("EKG Quick Reference for Advanced Heart Failure and Transplant APN")

draw_front(c)
c.showPage()
draw_back(c)
c.save()

print(f"PDF created: {OUTPUT}")
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.