Skip to content
0

Reducing hospital readmissions

πŸ“– Background

You work for a consulting company helping a hospital group better understand patient readmissions. The hospital gave you access to ten years of information on patients readmitted to the hospital after being discharged. The doctors want you to assess if initial diagnoses, number of procedures, or other variables could help them better understand the probability of readmission.

They want to focus follow-up calls and attention on those patients with a higher probability of readmission.

πŸ’Ύ The data

You have access to ten years of patient information (source):

Information in the file
  • "age" - age bracket of the patient
  • "time_in_hospital" - days (from 1 to 14)
  • "n_procedures" - number of procedures performed during the hospital stay
  • "n_lab_procedures" - number of laboratory procedures performed during the hospital stay
  • "n_medications" - number of medications administered during the hospital stay
  • "n_outpatient" - number of outpatient visits in the year before a hospital stay
  • "n_inpatient" - number of inpatient visits in the year before the hospital stay
  • "n_emergency" - number of visits to the emergency room in the year before the hospital stay
  • "medical_specialty" - the specialty of the admitting physician
  • "diag_1" - primary diagnosis (Circulatory, Respiratory, Digestive, etc.)
  • "diag_2" - secondary diagnosis
  • "diag_3" - additional secondary diagnosis
  • "glucose_test" - whether the glucose serum came out as high (> 200), normal, or not performed
  • "A1Ctest" - whether the A1C level of the patient came out as high (> 7%), normal, or not performed
  • "change" - whether there was a change in the diabetes medication ('yes' or 'no')
  • "diabetes_med" - whether a diabetes medication was prescribed ('yes' or 'no')
  • "readmitted" - if the patient was readmitted at the hospital ('yes' or 'no')

Acknowledgments: Beata Strack, Jonathan P. DeShazo, Chris Gennings, Juan L. Olmo, Sebastian Ventura, Krzysztof J. Cios, and John N. Clore, "Impact of HbA1c Measurement on Hospital Readmission Rates: Analysis of 70,000 Clinical Database Patient Records," BioMed Research International, vol. 2014, Article ID 781670, 11 pages, 2014.

πŸ’ͺ Competition challenge

Create a report that covers the following:

  1. What is the most common primary diagnosis by age group?
  2. Some doctors believe diabetes might play a central role in readmission. Explore the effect of a diabetes diagnosis on readmission rates.
  3. On what groups of patients should the hospital focus their follow-up efforts to better monitor patients with a high probability of readmission?

πŸ§‘β€βš–οΈ Judging criteria

CATEGORYWEIGHTINGDETAILS
Recommendations35%
  • Clarity of recommendations - how clear and well presented the recommendation is.
  • Quality of recommendations - are appropriate analytical techniques used & are the conclusions valid?
  • Number of relevant insights found for the target audience.
Storytelling35%
  • How well the data and insights are connected to the recommendation.
  • How the narrative and whole report connects together.
  • Balancing making the report in-depth enough but also concise.
Visualizations20%
  • Appropriateness of visualization used.
  • Clarity of insight from visualization.
Votes10%
  • Up voting - most upvoted entries get the most points.

βœ… Checklist before publishing into the competition

  • Rename your workspace to make it descriptive of your work. N.B. you should leave the notebook name as notebook.ipynb.
  • Remove redundant cells like the judging criteria, so the workbook is focused on your story.
  • Make sure the workbook reads well and explains how you found your insights.
  • Try to include an executive summary of your recommendations at the beginning.
  • Check that all the cells run without error.

βŒ›οΈ Time is ticking. Good luck!

# import modules
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import pingouin as png
from statsmodels.stats.proportion import proportions_ztest

%matplotlib inline

Data cleaning

As always, before jumping to the analysis, we take a look at the data to see if they need to be cleaned. The dataset looks great! In some of the columns we have "Missing" to identify missing data, but that is good enough and we can handle these missing data down the road should they cause any problem.

Hidden code

1. What is the most common primary diagnosis by age group?

"Circulatory" is the primary diagnosis for each age group except for people in the [40-50) age group, that have "Other" as primary diagnosis. "Circulatory", however, is the second most common diagnosis for the [40-50) age group.

Hidden code

2. Some doctors believe diabetes might play a central role in readmission: explore the effect of a diabetes diagnosis on readmission rates.

In order to verify the doctors' thesis we look both at the probability for patients to be readmitted after getting diabetes as primary, secondary or tertiary diagnosis and at the probability for patients to be readmitted after getting diabetes as secondary or tertiary diagnosis for each primary diagnosis different from diabetes.

Looking at the graphs below we can conclude the following:

  • People with diabetes as primary diagnosis have a higher chance of being readmitted than people with a different primary diagnosis.
  • Diabetes as secondary or tertiary diagnosis doesn't seem to increase the chance of being readmitted whatever the primary diagnosis.
Hidden code

3. On what groups of patients should the hospital focus their follow-up efforts to better monitor patients with a high probability of readmission?

First of all we test the difference in mean between each feature in the dataset for the "readmitted" and "not readmitted" classes of patients to find the features that are the best at discriminating between the two classes. It turns out that diabetes as primary diagnosis is not among the top features. In fact, the top 3 features to discriminate between the two classes are "n_inpatient", "n_outpatient", "n_emergency".

Hidden code
β€Œ
β€Œ
β€Œ