MIT-LCP / mimic-omop

Mapping the MIMIC-III database to the OMOP schema
MIT License
128 stars 48 forks source link

Discrepancy in counts between ICUSTAYS and VISIT_DETAIL #67

Open spfohl opened 4 years ago

spfohl commented 4 years ago

There seems to be a discrepancy between the number of visit_details records that map to visit_detail_concept_id = 32037 versus that number of unique icustay_ids in the native MIMIC database. In MIMIC-OMOP, the relevant query pulls 71570 rows (https://github.com/MIT-LCP/mimic-omop/tree/master/etl/StandardizedClinicalDataTables/VISIT_DETAIL), but there are only 61,532 unique rows in ICUSTAYS.

This may be consistent with the way that the ETL is constructed, but it seems misleading.

vojtechhuser commented 4 years ago

I am looking into the check ETL code. It uses pgTAP.

Do you want to add this check to pgTAP? Also, unmapped data scripts are here

https://framagit.org/aphp/mimic-omop-article/-/tree/master/extras

and btw a nice diagram

https://framagit.org/aphp/mimic-omop-article/-/blob/master/extras/schema/sankey_diagram/MIMIC-OMOP_equivalence.png