PMAP Medication Info Feature Engineering

Created: January 17, 2023
Last modified: Feburary 15, 2023

This notebook generates two features from medication data:

  1. Binary flags for the administration of certain drug classes, as defined by each file in the medication_class_names folder.
  2. Average dosing for medications, based on csv inputs with conversion factors for each possible dose unit, desired target doses, and names/brand names of drugs.

Author: Vina Ro

Data Cleaning

Investigate relationship between medication names and routes to fill in missing route values

We can see from the above that the top 3 medications with most missing values are mannitol, etomidate, and phenylephrine. \ Hence we'll start with filling the missing values for these three meds in the function by making a dictionary that maps missing values.

By printing out all the medication names whose route values are missing, we can see that they all map to a certain routes for other entries with an identical medication name.

Functions

Main

Statistical Analysis

Data Quality Checks

1. Check if there are irregular dosage values - verified w/ Dr. F on 02/09/23

Data Visualization

Medication Class Prevalence in CHF Hospital Stays

Medication Class Prevalence in CHF Hospital Stays (Zoomed in on prevalence > 80 %)

Medication Class Prevalence in CHF Hospital Stays for both labels

Save off all medication dose units in our dataset

Statistical Analysis

1. Summary statistics for each medication