Skip to content

The INFO-B691 Capstone project to convert mimic data to OpenMRS and build a clinician customizable CDSS

Notifications You must be signed in to change notification settings

iupui-soic/mimic-openmrs-cdss

Repository files navigation

mimic-openmrs-cdss

Our clinical decision support system (CDSS) is an implementation of a Learning Health System in OpenMRS. It uses data from MIMIC-IV v1.4 hosp and icu modules imported into OpenMRS to validate the CDSS implementation.

Novelty

Traditionally, CDSS systems in EHR systems are hard-coded as a rule-based system based on prior knowledge published as Clinical Practice Guidelines. More recent implementations with dynamic machine learning (ML) models use a pre-selected cohort or randomized train-test sets. Instead, we generate a cohort of similar patients in the EHR database based on characteristics like age-group, sex, primary diagnosis etc. and use clinical observations of this cohort to train a model and make a risk-factor classification based on the clinician's query. The CDSS provides a probability score for the likelihood of the patient having the disease.

Features

Legacy UI patient dashboard tab that can do the following:

  • Automatically create cohort on patient demographics and primary diagnosis.
  • Clinician can select concepts that should be used as features to train a model. Default feature selection is done.
  • Clinician can select a diagnosis and likelihood of the patient with the diagnosis is reported.

Folder structure

You will have to manually download the MIMIC-IV v1.4 csv.gz files prior to running the notebooks in the /data folder

  • /data (notebooks to import data from MIMIC-IV csv to OpenMRS MySQL database)
  • /cdss (notebooks implementing an iPython dashboard)
  • /model_evaluation (notebooks and files containing the SQL queries to extract 10k patient's data from MySQL and ML model evaluation codes)
  • /openmrs-module-cdss (OpenMRS module that integrates iPython dashboard into Legacy UI patient dashboard)

How to run

Warning : Ensure that you have at least 128 GB of RAM, Quad-core CPU, 200+ GB of disk space to be able to import the data and run the cdss dashboard appropriately.

Install Jupyter Notebook Params extension: https://github.com/manics/jupyter-notebookparams
Install Jupyter Dashboard extension: https://github.com/jupyter-attic/dashboards (TODO: upgrade to Voila)

This assumes that you are doing a clean installation of OpenMRS without any test data. Additional deployment considerations are ignored. The /data notebooks will overwrite any existing data. So, use carefully. Steps:

  1. Setup OpenMRS on MySQL using the usual OpenMRS Installer, without demo data.
  2. Ensure that OpenMRS can start without issues after the installation is complete. Install the legacy-ui module.
  3. Copy the two CSVs along with the notebooks from /data folder into your OPENMRS_HOME folder.
  4. Install jupyter using pip install notebook and start it using jupyter notebook.
  5. Open and run the notebook in order of the file names, e.g., 1_patient_details, 2_encounter_table, etc.
  6. Once all the notebooks are run, get into OpenMRS in the browser and perform indexing.
    • Login → Administration → Maintenance → Search Index → Press the Rebuild Search Index button.
  7. Find/Create Patient and look for mimic and you should get some search, if everything worked correctly.
  8. Build the omrs-cdss module:
    • cd openmrs-module-cdss
    • mvn clean install
    • Install the module omrs-cdss-1.0.0.omod from /openmrs-module-cdss/omod/target using Administration → Manage Modules
  9. Go to Patient dashboard after searching for patient and play along!!

How to run the CDSS Dashboard:

Go to the link: https://b691.us/openmrs/

  1. Log in Credentials in the screen that looks like below:
  • Username: demo_user
  • Password: User@123 image image
  1. After logging in you will see a page like this. Go the tab that says “Find/Create Patient”. image

  2. Search for a mimic patient/any patient in the “Patient Identifier or Patient Name”. image

  3. After searching for the patient, you will see a window which appears like the picture below, and you can select the specific patient for whom you want to run the ML analysis by clicking on it. image

  4. Once you click on it you will see a page that looks like this, then you have click on the “Clinical Decision support System” tab. image

  5. Upon selection the results will look similar to the below picture. image

Acknowledgements

The project started as @ReginaMerine's INFO-B691 Capstone project

About

The INFO-B691 Capstone project to convert mimic data to OpenMRS and build a clinician customizable CDSS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published