Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

AHA PREVENT™ Cardiovascular Risk Calculator

A standalone desktop application implementing the American Heart Association's PREVENT (Predicting Risk of cardiovascular disease EVENTs) equations for absolute cardiovascular risk assessment.

PythonPlatformLicenseGuideline


Overview

The PREVENT equations represent a major advance over the older Pooled Cohort Equations (PCEs). They are race-free, incorporate kidney function (eGFR), BMI, and statin use, and predict both ASCVD and Heart Failure risk simultaneously. This calculator implements the full base model as published, with risk thresholds updated to reflect the latest clinical guidelines.

Predicted outcomes:

Outcome10-Year30-Year
Total CVD
ASCVD (atherosclerotic CVD)
Heart Failure

Clinical Sources

ComponentSource
PREVENT EquationsKhan SS, Matsushita K, Sang Y, et al. Circulation 2024;149(6):430–449. doi:10.1161/CIRCULATIONAHA.123.067626
ASCVD Risk Thresholds2026 ACC/AHA Multisociety Dyslipidemia Guideline
BP Treatment Threshold2025 AHA/ACC High Blood Pressure Guideline (Total CVD ≥7.5%)
Coefficient Verificationbcjaeger/PooledCohort · martingmayer/preventr (CRAN)

What's New vs. Pooled Cohort Equations

FeatureOld PCEsPREVENT
Model typeCox PHLogistic regression
Race-specific equationsYesNo (race-free)
Kidney function (eGFR)NoYes
BMINoYes
Statin useNoYes
Heart failure predictionNoYes
Cholesterol inputTotal + HDLNon-HDL + HDL
Calibration slope0.50–0.540.94–1.03

Risk Thresholds

10-Year ASCVD (2026 ACC/AHA Dyslipidemia Guideline)

CategoryThresholdClinical Action
🟢 Low< 3%Lifestyle counselling; no routine statin
🟡 Borderline3 – 5%Discuss risk-enhancers; statin reasonable after SDM
🟠 Intermediate5 – 10%Moderate-intensity statin recommended
🔴 High≥ 10%High-intensity statin; target LDL-C < 70 mg/dL

10-Year Total CVD (2025 AHA/ACC HTN Guideline)

  • ≥ 7.5% → Antihypertensive therapy indicated for Stage 1 HTN

10-Year Heart Failure

CategoryThreshold
Low< 2.5%
Borderline2.5 – 5%
Intermediate5 – 10%
High≥ 10%

Required Inputs

InputRangeNotes
Age30 – 79 yearsOutside this range: not validated
Biological sexMale / FemaleSex-specific equations
Total cholesterol100 – 400 mg/dLConverted to mmol/L internally
HDL-C20 – 100 mg/dLNon-HDL derived automatically
Systolic BP90 – 200 mmHgLinear spline centred at 110 & 130
Antihypertensive medicationYes / NoInteraction with SBP spline
BMI15 – 60 kg/m²Enters Heart Failure models (spline at 30)
Diabetes mellitusYes / No
Statin therapyYes / NoInteraction with non-HDL-C
Current smokerYes / No
eGFR (CKD-EPI)15 – 140 mL/min/1.73m²Linear spline centred at 60 & 90

Model Details

Equation form:

Risk (%) = exp(LP) / (1 + exp(LP)) × 100

Variable scaling (centred at a typical healthy person):

age_term = (age − 55) / 10
non_hdl_term = non_hdl_mmol − 3.5
hdl_term = (hdl_mmol − 1.3) / 0.3
sbp_lt110_term = (min(SBP, 110) − 110) / 20
sbp_gte110_term = (max(SBP, 110) − 130) / 20
bmi_lt30_term = (min(BMI, 30) − 25) / 5
bmi_gte30_term = (max(BMI, 30) − 30) / 5
egfr_lt60_term = (min(eGFR, 60) − 60) / −15
egfr_gte60_term = (max(eGFR, 60) − 90) / −15

The linear predictor also includes 9 interaction terms (age × risk factors, BP Rx × SBP, statin × non-HDL).


Application Features

  • Risk Scores tab — Semicircular gauge for 10-yr Total CVD; table of all 6 scores with colour-coded category badges
  • Interpretation tab — Full clinical guidance for ASCVD, blood pressure, and heart failure management, colour-coded by severity
  • Factor Analysis tab — Horizontal bar chart showing the percentage-point contribution of each modifiable risk factor to 10-yr ASCVD risk vs. ideal reference values
  • Load Example Patient button (58M, DM, BMI 27, statin user)
  • No internet connection required; no data transmitted

Installation

Option A — Portable Executable (Windows, no Python needed)

Download PREVENT_Calculator.exe from Releases and run it directly.

Option B — Run from source

# Requires Python 3.8+ with tkinter (included in standard Python for Windows)
git clone https://github.com/InterconnectedSystems/prevent-calculator.git
cd prevent-calculator
python prevent_calculator.py

Option C — Build the executable yourself

pip install pyinstaller
pyinstaller --onefile --windowed --name PREVENT_Calculator prevent_calculator.py
# Output: dist/PREVENT_Calculator.exe

Screenshots

Run the app and click Load Example Patient → Calculate PREVENT Score to see all three tabs populated.


Disclaimer

For use by qualified healthcare professionals only. This tool implements published prediction equations and is intended to support — not replace — clinical judgement. Risk estimates are probabilistic and apply to populations; individual patient decisions must account for clinical context, patient preferences, and factors not captured by this model. The PREVENT equations are validated for adults aged 30–79 without established cardiovascular disease (primary prevention only).


License

MIT License — see LICENSE for details.


Citation

If you use this tool in research or clinical quality improvement, please cite the original equations:

Khan SS, Matsushita K, Sang Y, et al. Development and Validation of the American Heart Association's PREVENT Equations. Circulation. 2024;149(6):430–449. doi:10.1161/CIRCULATIONAHA.123.067626

About

AHA PREVENT™ Cardiovascular Risk Calculator — standalone desktop app implementing the 2024 PREVENT equations (Khan SS et al., Circulation 2024) with 2026 ACC/AHA guideline thresholds

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages