Skip to main content

Stroke lifetime: health economics calculations for lifetime after stroke.

Project description

stroke-lifetime

GitHub Badge PyPI Open in Streamlit DOI

Toolkit for calculating lifetime survival probabilities and resource use for patients after stroke.

➡️ 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.

Animated preview of the Streamlit app.

👑 Example usage: Streamlit app

View a Streamlit app that uses this package and presents the methods in detail:

Open in Streamlit DOI

📚 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.

  • Jupyter Notebook - Code demonstration of running the main function and using the results. It also contains reference tables to describe the results categories.

Project details


Download files

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

Source Distribution

stroke-lifetime-3.0.2.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

stroke_lifetime-3.0.2-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file stroke-lifetime-3.0.2.tar.gz.

File metadata

  • Download URL: stroke-lifetime-3.0.2.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for stroke-lifetime-3.0.2.tar.gz
Algorithm Hash digest
SHA256 78e3463a4e5e60362d4afc2715e482e3cdc68b9338f0c89697016feb2f52647f
MD5 5093a0b0f0879d4727d7053fb3f3ea9d
BLAKE2b-256 9c10ce8974278e368dd0537c6095ca1a1745e32cf8c6aecf36a2b340dad4982d

See more details on using hashes here.

File details

Details for the file stroke_lifetime-3.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for stroke_lifetime-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 17a021f23564c708ae54cb554a3a529362dcd132c9acb30c9cfc83d0c96a7d28
MD5 83c3f8950f136ca730a6e82b419f22ed
BLAKE2b-256 7951e22f258f217458c4d75146b10671e7e709615844759f3a9f55e37366d7ea

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