mimic-omop icon indicating copy to clipboard operation
mimic-omop copied to clipboard

Discrepancy in counts between ICUSTAYS and VISIT_DETAIL

Open spfohl opened this issue 4 years ago • 1 comments

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.

spfohl avatar May 21 '20 15:05 spfohl

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

vojtechhuser avatar Jun 09 '20 19:06 vojtechhuser