GithubHelp home page GithubHelp logo

banderlog / mimiciii-to-fhir Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leopold-franz/mimic-iii_fhir_transformation

8.0 2.0 1.0 159 KB

Repository to transform the MIMIC-III dataset into a flat hierarchy FHIR format

Jupyter Notebook 100.00%
mimic-iii mimic fhir

mimiciii-to-fhir's Introduction

MIMIC-III to FHIR conversion pipeline

This repo is based on this code, which should have been accompanying this journal article.

The original code and realization are awful, incomplete, and nonworkable ( 1, 2, 3 ).

Code from this repo actually runs without crashes, even on a 16GB RAM laptop.

But all mappings are from the original repo, and I am perfectly sure, that they have errors:

  • authors used some keys that are absent in MIMIC-III tables in transform_inputevents_mv() (002-kba-... notebook)
  • some resources absent in FHIR documentation
  • CareVue and Metavision data should be kept in a single resource
  • In the transform_procedures_icd() (004-kba-... notebook) authors messed up with the "followUp" feature
  • etc

I've fixed some, but I did not check every mapping due to lack of time.

Usage

  • Download MIMIC-III dataset ad put it into the data folder
  • Run jupyter notebooks in ascending order
  • collect CSV files from data/out/ folder

TODO

  • add dtypes for all pd.read_csv() to avoid dtype guessing
  • make it run on the laptop with 16GB RAM
  • make mimic_fhir_transformation.py runnable and actually working code or screw it and use jupyter notebooks instead
  • check mappings
  • convert TRANSFERS table (should be part of encounter)?
  • JSON output?
  • refactoring and documentation

Conversion scheme (original)

More details in the mappings folder

MIMIC-III tables FHIR resource
patients + admissions patient
admissions + diagnoses_icd encounter
icustays encounter_icustays
cptevents + cptevents claim
noteevents diagnosticReport
inputevents_cv + d_items medicationDispense
inputevents_mv + d_items medicationDispense_mv
prescriptions medicationRequest
chartevents + d_items observation_ce
datetimeevents + d_items observation_dte
labevents + d_labitems observation_le
caregivers practitioner
procedures_icd procedure_icd9
procedureevents_mv + d_items procedure_mv
outputevents + d_items specimen_oe
microbiologyevents + d_items specimen_mbe
services services

Following tables were not transformed or even mentioned in the code:

mimiciii-to-fhir's People

Contributors

banderlog avatar leopold-franz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.