Skip to main content

No project description provided

Project description

PyPREVENT

2024 updates from AHA on ASCVD (Atherosclerotic and Cardiovascular Disease), CVD (cardiovascular disease) and Heart Failure (HF)

Introduction

The PyPREVENT Equations package offers 2024 updates from the American Heart Association (AHA) on Atherosclerotic and Cardiovascular Disease (ASCVD), Cardiovascular Disease (CVD), and Heart Failure (HF)[^1][^2]. It's a mixed Rust and Python module, leveraging the speed of Rust for equation implementation and the flexibility of Python for ease of use.

Installation

Requirements:

  • Python 3.10 on a Mac / Linux system (more compatibility coming soon)

To install the package, pip install using:

pip install pyprevent

TL;DR

import pyprevent

pyprevent.calculate_30_yr_ascvd_risk(
    sex="MALE",
    age=40,
    total_cholesterol=200,
    hdl_cholesterol=50,
    systolic_bp=120,
    has_diabetes=False,
    current_smoker=False,
    bmi=25,
    egfr=70,
    on_htn_meds=False,
    on_cholesterol_meds=False,
)

A longer, and more thorough example is located here.

Implementation Status

Formula Status
10 yr ASCVD (individual) :white_check_mark:
10 yr ASCVD (batch) :white_check_mark:
30 yr ASCVD (individual) :white_check_mark:
30 yr ASCVD (batch) :white_check_mark:
10 yr Heart Failure (individual) :white_check_mark:
10 yr Heart Failure (batch) :white_check_mark:
30 yr Heart Failure (individual) :white_check_mark:
30 yr Heart Failure (batch) :white_check_mark:
10 yr CVD (individual) :x:
10 yr CVD (batch) :x:
30 yr CVD (individual) :x:
30 yr CVD (batch) :x:

Program Structure

This is a mixed Rust and Python module.

The rust source code is used to implement the equations. This is a lower level language that requires compilation prior to being run -- and thus is many times faster than pure python.

The rust source code is located in the /src directory. The individual functions are written in their respective files, and registered to the rust_aha_formulas python module within the lib.rs file.

The python source is located in the /pyprevent directory.

Unit tests are implemented in the /tests directory using slash.

[^1]: Khan SS, Matsushita K, Sang Y, et al. Development and Validation of the American Heart Association Predicting Risk of Cardiovascular Disease EVENTs (PREVENTTM) Equations. Circulation 2023. DOI: 10.1161/CIRCULATIONAHA.123.067626 [^2]: Khan SS, Coresh J, Pencina MJ, et al. Novel Prediction Equations for Absolute Risk Assessment of Total Cardiovascular Disease Incorporating Cardiovascular-Kidney-Metabolic Health: A Scientific Statement From the American Heart Association. Circulation 2023;148(24):1982-2004. DOI: 10.1161/CIR.0000000000001191

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyprevent-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyprevent-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (234.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pyprevent-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyprevent-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0996b888c2e71a200f3c1da2f2e8cac893e0c3c46f31ed537b217bf2e0cdab35
MD5 25cfe5fb09360932a5eb34bf2b659a97
BLAKE2b-256 237010c023f9cdb86ae35216c5e02a90c6bf16365d615598cca043cde7cc67f1

See more details on using hashes here.

File details

Details for the file pyprevent-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyprevent-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de785a4e9eb088a8cb56b63e8127794cc47402f031fdff8e9c83484a160c916d
MD5 1726fffd1f2a7f153890034f58317e97
BLAKE2b-256 aa647af4ba33e1eef3b5ead002c9bd499981f589062498003cecc1bdc96d0483

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page