stroke-lifetime
Toolkit for calculating lifetime survival probabilities and resource use for patients after stroke.
- Source code: https://github.com/stroke-optimist/stroke-lifetime
- Full background and methods: (link to paper to be added when available)
- Detailed workthrough of methods: https://lifetime-stroke-outcome.streamlit.app/
- PyPI package: https://pypi.org/project/stroke-lifetime/
- Parent project:
stroke-optimist Stroke OPTIMIST Project: OPTimising IMplementation of Ischaemic Stroke Thrombectomy
➡️ Get started
This toolkit works with Python versions 3.8 and up.
Install the package with:
pip install stroke-lifetime
And follow the link to the code demonstration in the "External resources" section below.
🏥 Motivation in brief:
Given values for a patient's age, sex, and Modified Rankin Scale (mRS) score on discharge from hospital following a stroke, we can calculate the following quantities across the remainder of that patient's lifespan:
- The probability of survival of the patient in each year.
- The number of Quality-Adjusted Life Years (QALYs).
- The expected use of resources (e.g. number of admissions to A&E and number of years spent in residential care) and the cost of those resources.
- The discounted total net benefit by change in mRS score.
The model is described in a paper that's not yet published. Link will be added when available.
📦 Package details:
There are three main modules in the package:
models.py- Basic models.fixed_params.py- Constants.main_calculations.py- Gathers the basic models and calculates all of the useful outputs.
👑 Example usage: Streamlit app
View a Streamlit app that uses this package and presents the methods in detail:
- Streamlit app: https://lifetime-stroke-outcome.streamlit.app/
- DOI: https://doi.org/10.5281/zenodo.8269389
📚 External resources
The following resources are not included within the package files and are accessible on the GitHub repository.
A conda environment file, environment.yml, is provided in the GitHub repository for use with the demonstration Jupyter notebook.
- Code demonstration of running the main function and using the results. It also contains reference tables to describe the results categories.
Metadata
Release files for stroke-lifetime 3.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| stroke-lifetime-3.0.2.tar.gz | 19.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stroke_lifetime-3.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.5 kB
Release files / stroke-lifetime-3.0.2.tar.gz
| Download URL | stroke-lifetime-3.0.2.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78e3463a4e5e60362d4afc2715e482e3cdc68b9338f0c89697016feb2f52647f
|
|
BLAKE2b-256 checksum How to use checksums |
9c10ce8974278e368dd0537c6095ca1a1745e32cf8c6aecf36a2b340dad4982d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / stroke_lifetime-3.0.2-py3-none-any.whl
| Download URL | stroke_lifetime-3.0.2-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17a021f23564c708ae54cb554a3a529362dcd132c9acb30c9cfc83d0c96a7d28
|
|
BLAKE2b-256 checksum How to use checksums |
7951e22f258f217458c4d75146b10671e7e709615844759f3a9f55e37366d7ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for stroke-lifetime 3.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.