/readmissions

Code and terminology datasets for generating the CMS readmission measures.

Apache License dbt logo and version

Readmissions

This is Tuva Health's Readmissions Mart, which is a dbt project to do hospital readmission analytics. It is based on the CMS Readmission Measures Methodology and includes other features, such as data quality checks specific to readmissions.

Links of interest

Consuming output from this dbt project

The main output tables from this dbt project are:

  1. encounter_augmented: lists all acute inpatient encounters with fields that give extra information about the encounter (e.g. length_of_stay, index_admission_flag, planned_flag, specialty_cohort, etc.), as well as data quality flags.
  2. readmission_summary: lists all encounters that are not discarded due to data quality problems, together with fields giving extra information about the encounter and it's associated readmission (if the encounter had a readmission).

Pre-requisites

  1. You have healthcare data (e.g. EHR, claims, lab, HIE, etc.) in a data warehouse
  2. You have dbt installed and configured (i.e. connected to your data warehouse)

Here are instructions for installing dbt.

Configuration

Execute the following steps to load all seed files, build all data marts, and run all data quality tests in your data warehouse:

  1. Clone this repo to your local machine or environment
  2. This project will run automatically off of Tuva Core.
  3. Alternatively, if you haven't installed Tuva Core you can directly map your data to the source schema described in source.yml
  4. Configure dbt_project.yml
    • profile: write the name of the profile in the profile.yml file that connects to your data warehouse
    • vars: configure source_name, source_database name, and source_schema name
  5. Run project
    1. Navigate to the project directory in the command line
    2. Execute "dbt build" to create all tables/views in your data warehouse

Contributions

Don't see a model or specific metric you would have liked to be included? Notice any bugs when installing and running the package? If so, we highly encourage and welcome contributions to this package!

Join the conversation on Slack!

Database Support

This package has been tested on Snowflake and Redshift. We are planning to expand testing to BigQuery in the near future.