Skip to main content

Stroke modelling: outcome calculations with time to treatment.

Project description

Stroke outcome

GitHub Badge Jupyter Book Badge PyPI DOI

Toolkit for calculating patient outcomes after stroke depending on time to treatment.

➡️ Get started

This toolkit works with Python versions 3.8 and up.

Install the package with:

pip install stroke-outcome

And follow the links to the code demonstrations in the "External resources" section below.

🏥 Motivation in brief:

Disability levels may be measured in various ways. In this project we are using the modified Rankin Scale (mRS). It is a commonly used scale for measuring the degree of disability or dependence in the daily activities of people who have suffered a stroke. The scale runs from 0-6, running from perfect health without symptoms to death.

In addition to mRS, we may calculate utility-weighted mRS (UW-mRS). UW-mRS incorporates both treatment effect and patient perceived quality of life as a single outcome measure for stroke trials.

Patients with ischaemic stroke can be defined by the location of the clot: those with a large vessel occlusion (LVO); and those not with a large vessel occlusion (nLVO). Patients with an nLVO can be treated with thrombolysis (IVT), a clot-busting medication. Patients with an LVO can be treated with IVT and/or thrombectomy (MT), which physically removes the clot.

This method calculates disability outcome estimates for three patient-treatment cohorts:

  1. nLVO-IVT (patients with an nLVO that are treated with IVT),
  2. LVO-IVT (patients with an LVO that are treated with IVT),
  3. LVO-MT (patients with an LVO that are treated with MT).

The result is provided as a distribution of disability (with six levels) following reperfusion treatment at any point between these two time stages:

  1. receiving reperfusion treatment as soon as their stroke began (this will be referred to as time of stroke onset, and we will use the terminology “t = 0”), and
  2. receiving reperfusion treatment at the duration after stroke onset where the treatment has no effect (this will be referred to as time of no effect, and we will use the terminology “t = No Effect”).

The method is built by synthesising data from multiple sources to define the distribution of disability for each of the three patient-treatment cohorts at the two time stages (t = 0 & t = No Effect), and we use interpolation to determine the disability distribution at any point in between.

For more details, please see the online book.

📦 Package details:

The package includes the following data:

  • mRS cumulative probability distributions as derived in the online book.
  • A selection of utility scores for each mRS level.

Optionally, other data can be used instead of these provided files. The required formats are described in the continuous outcome demo.

The package includes the following processes:

  • Continuous outcomes: Each "patient" uses the average mRS across a population mRS probability distribution. The average mRS score may be any number between 0 and 6, for example 1.2.
  • Discrete outcomes: Each patient is given a single mRS score out of the population mRS probability distribution. The score must be a whole number from 0 to 6.

The following images summarise the differences between the methods:

Summary of continuous method. There is an mRS distribution when treated and an mRS distribution when not treated. The patient's mRS is the mean across the distribution. Summary of discrete method. There is an mRS distribution when treated and an mRS distribution when not treated. The patient's mRS is selected from whichever part of the distribution contains a fixed cumulative probability score.

📚 Resources

Data

The data can be downloaded without needing to use python or to install the stroke-outcome package.

To find the data:

  1. Go to the GitHub repository
  2. Enter the folder stroke_outcome
  3. Enter the folder data
  4. Click on the name of the file you would like to download
  5. On the file preview page, click on the "Download raw file" button 📥

Docs

The following resources are not included within the package files and are accessible on the GitHub repository.

Each major aspect of the package has a demonstration and a documentation file. The demonstration is a minimal example of running the code, and the documentation uses a simple example to show the concepts behind the methods.

A conda environment file, environment.yml, is provided in the GitHub repository for use with the demonstration Jupyter notebooks.

Continuous outcomes Discrete outcomes
Demo Jupyter Notebook Jupyter Notebook
Docs Jupyter Notebook Jupyter Notebook

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-outcome-0.1.7.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

stroke_outcome-0.1.7-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file stroke-outcome-0.1.7.tar.gz.

File metadata

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

File hashes

Hashes for stroke-outcome-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e014e6fecbc64018866088fbe175d4d0a957037ec78797ac3dc1cb0b7dea259a
MD5 7898d3948cb3926d233386295cad1c05
BLAKE2b-256 41bec469bb8dad94e4c7d463faca39e29a02d8ee8871c98a8fea8bf6e5da9fb4

See more details on using hashes here.

File details

Details for the file stroke_outcome-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for stroke_outcome-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 115a087437556ef45203f79019e9c70c2390e943a66769eb83ff4f7e984fa33c
MD5 7f662bf8d6476307a714f2ee607857ff
BLAKE2b-256 6db9ff593707eb88b1718c4de3e487deef5dc35fcab421437184e4e84a5eb25f

See more details on using hashes here.

Supported by

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