Skip to content

RebeccaClarkson/mimicry-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Instructions for Initialization:

  1. Create a Docker container via bash container/run.sh
  2. Then, once you are within the docker container: source shared/start_session.sh
    • Adds analysis/shared/ to PYTHONPATH
    • Starts postgres
  3. 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.

Instructions once Docker image has been created:

  1. Start the docker container: docker start mimicry_db
  2. Attach to the container: docker attach mimicry_db
  3. Source the bash script to start the session source shared/start_session.sh

Example Usage:

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 by s02_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):

Copyright 2018, Rebecca L. Clarkson. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published