MIT-LCP / mimic-omop

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

Mapping MIMIC ITEMIDs to respective concept IDs #30

Open bcollar opened 6 years ago

bcollar commented 6 years ago

Hello,

I have been looking through the work that has been done to map MIMIC to the OMOP model and I was wondering if a resource exists that pairs each current MIMIC d_label with its existing itemid along with the new measurement_concept_id. In other words, taking SPO2 as an example (mapped as measurement_concept_id = 3016502 in the OMOP model), is there a reference that also lists the respective itemids that these concepts are currently listed under in MIMIC?

I may be wrongly assuming that in order to create this OMOP mapping, each concept was acquired from the clinical dataset and then assigned a measurement_concept_id based on its similarity to other concepts in the dataset. But if this is the case, wasn't the itemid for each concept also obtained during this process and (possibly) stored somewhere?

Appreciate the help with this.

Brett

parisni commented 6 years ago

Hey

there is two way of linking back to itemid

1) is to use the measurement_source_concept_id and look up the concept_table and get the concept_code field that stores the itemid 2) is to look in the measurement_source_value that stores the local code ie: itemid

bcollar commented 6 years ago

I appreciate the timely reply!

I'm not sure that I follow what you mean in these cases. For the first case, is the measurement_source_concept_id the same as the measurement_concept_id I talked about in my original post, or is it something different? How would I go about looking up the concept_table in order to get to the concept_code field? If feasible, perhaps using the original SPO2 example would be useful?

Thanks for the help.

Brett

alistairewj commented 6 years ago

@parisni is saying you can cross reference the itemid with the mapped concept because measurement_source_concept_id maps to the itemid and measurement_concept_id maps to the standardized identifier.

As you guessed a lot of these mappings were manually made and you can find them (and improve upon them!) here: https://github.com/MIT-LCP/mimic-omop/tree/master/extras/concept

bcollar commented 6 years ago

Great! I'm still just a bit confused by your references to measurement_source_concept_id - are those values included somewhere under a page within the mimic-omop page that you linked? Perhaps I'm not looking in the right places, but I can't for the life of me find that metric listed.

alistairewj commented 6 years ago

There is no specific "measurement" concept_id - all columns which end in concept_id reference the same CONCEPT table. That being said, the data present in the measurement_source_concept_id column have a 1:1 map with itemid from MIMIC-III - and this map is defined by generating a unique concept_id for every itemid in MIMIC using a sequence. This is done in the concept ETL: https://github.com/MIT-LCP/mimic-omop/blob/master/etl/StandardizedVocabularies/CONCEPT/etl.sql and the define sequence ETL: https://github.com/MIT-LCP/mimic-omop/blob/23bda0cce9f06dbdfa438aa8e03a65cef6e145e3/mimic/build-mimic/postgres_create_mimic_id.sql

alistairewj commented 6 years ago

I should add that most standard ontologies (SNOMED, LOINC, etc) already have concept_id assigned, and that etl only creates new concept_id for the local codes present in MIMIC-III.