Python package for analysis of MIMIC III database
As access to the MIMIC III database is restricted, this python package uses fake data. In order to perform analyses on the real database, start with this documentation.
- Create a Docker container via
bash container/run.sh
- Then, once you are within the docker container:
source shared/start_session.sh
- Adds analysis/shared/ to PYTHONPATH
- Starts postgres
- Finally,
source shared/first_time_only.sh
- Loads the mimic db into postgres from csv files
- Adds a column to the patients table (has_matched_waveform) to indicate whether a given patient has an associated waveform.
- Start the docker container:
docker start mimicry_db
- Attach to the container:
docker attach mimicry_db
- Source the bash script to start the session
source shared/start_session.sh
Currently, I have written two scripts for initial data exploration and visualization, both within shared/scripts/
- the output for both of these automatically goes to shared/scripts/output/
.
-
s01_get_icd9_categories_for_waveform_records.py
- This script creates a pandas df with diagnostic and admission information for all patient admissions that have an associated waveform record.
- This is output to a
.pkl
file that is then read bys02_visualization_of_demographics.py
(when using the real data, running this script can take several minutes).
-
s02_visualization_of_demographics.py
- This script loads the df that was generated in
s01
and generates a few helpful visualizations of the data (here shown with aggregated data from real MIMIC db):
- This script loads the df that was generated in
Copyright 2018, Rebecca L. Clarkson. All rights reserved.