Add lab results mappings for MIMIC-IV v2.0 - SSSOM format - #1418
Conversation
|
Thanks @a-chahin! Same comments as: #1419 (comment), copied below:
@matentzn hope you don't mind me tagging you here (again!). This file is a mapping for MIMIC-IV concepts. No pressure, but we would appreciate your thoughts on whether anything more should be done to conform to @sssom format. |
matentzn
left a comment
There was a problem hiding this comment.
Hey, some quick feedback, happy to look this over in more detail if you want (see inline comments as well)
- I think you are using skos:broadMatch the wrong way around: the
objectis the broader term, see also https://mapping-commons.github.io/sssom/mapping-predicates/ - I get the sense that you are overusing
skos:exactMatcha bit, but I lack a bit of context to be sure. I am not sure for example if the units and tissue types provided by the loinc terms are implied by the mimic terms. - I would recommend setting up a QC system that check for the validity of the sssom file, akin to https://github.com/mapping-commons/mh_mapping_initiative/blob/master/.github/workflows/qc.yml
| @@ -0,0 +1,1624 @@ | |||
| subject_id,subject_label,predicate_id,object_id,object_label,mapping_justification,author_id,reviewer_id,confidence,comment | |||
There was a problem hiding this comment.
mapping_justification uses invalid values, yours should be semapv:ManualMappingCuration, see https://github.com/mapping-commons/sssom/blob/master/src/sssom_schema/schema/sssom_schema.yaml#L211
There was a problem hiding this comment.
Thank you! I will update the tables.
| @@ -0,0 +1,1624 @@ | |||
| subject_id,subject_label,predicate_id,object_id,object_label,mapping_justification,author_id,reviewer_id,confidence,comment | |||
| mimic:51221,Hematocrit,skos:exactMatch,omop:3023314,Hematocrit [Volume Fraction] of Blood by Automated count,HumanCurated,,"orcid:0000-0001-8822-1884,0000-0002-9348-9284",1, | |||
There was a problem hiding this comment.
Thank you! This will be corrected in the updated files.
| @@ -0,0 +1,1624 @@ | |||
| subject_id,subject_label,predicate_id,object_id,object_label,mapping_justification,author_id,reviewer_id,confidence,comment | |||
| mimic:51221,Hematocrit,skos:exactMatch,omop:3023314,Hematocrit [Volume Fraction] of Blood by Automated count,HumanCurated,,"orcid:0000-0001-8822-1884,0000-0002-9348-9284",1, | |||
| mimic:50912,Creatinine,skos:exactMatch,omop:3016723,Creatinine [Mass/volume] in Serum or Plasma,HumanCurated,,"orcid:0000-0001-8822-1884,0000-0002-9348-9284",, | |||
There was a problem hiding this comment.
Is there a reason confidence is only sometimes curated? Its not wrong, just wondering from a user perspective how I would interpret the absence of a value for confidence.
There was a problem hiding this comment.
The mapping was done before we were aware of the SSSOM standard. This is just the initial release for mapping files. In the next step, I will go over the mappings to check for any deprecated codes and I will add a confidence score for the rest of concepts.
| 52034,Total Calcium,Blood,Blood Gas,,3032503,Calcium [Mass/volume] in Blood,Measurement,LOINC,Lab Test,S,49765-1,0000-0001-8822-1884,0000-0002-9348-9284,MIMIC-IV v2.0,2.71,https://loinc.org/relma/,v4.7,3/1/2022,0.1,,0 | ||
| 52035,Total Calcium,Blood,Blood Gas,,3032503,Calcium [Mass/volume] in Blood,Measurement,LOINC,Lab Test,S,49765-1,0000-0001-8822-1884,0000-0002-9348-9284,MIMIC-IV v2.0,2.71,https://loinc.org/relma/,v4.7,3/1/2022,0.1,Duplicate of itemid 52034,0 | ||
| 52036,Voided Specimen,Blood,Blood Gas,,,,Measurement,LOINC,Lab Test,S,,,,MIMIC-IV v2.0,,,,,,Not a lab test,6397 | ||
| 52037,WB tCO2,Blood,Blood Gas,,3014094,"Carbon dioxide, total [Moles/volume] in Blood",Measurement,LOINC,Lab Test,S,20565-8,0000-0001-882 |
There was a problem hiding this comment.
Invalid record according to sssom, do you intend to say "there is no exact mapping?"
There was a problem hiding this comment.
It depends. For example, itemid 52036 is for the concept "Voided Specimen" which is not a lab test.
Other concepts have ambiguous labels that don't make any sense.
Do you think I should use "there is no exact mapping" for all unmappable concepts regardless of the reason?
There was a problem hiding this comment.
This is an interesting question for the sssom issue tracker https://github.com/mapping-commons/sssom/issues because what we usually do in this case is not include the subject entity at all in the mapping file. If there is no mapping there is no mapping. However, I can see how your desire to have an entry for all subject entities in MIMIC makes sense. In this case, we usually define the predicate_id (e.g skos:exactMatch) and then add a placeholder, sssom:NoTermFound, see mapping-commons/sssom#28 for a discussion on the subject. This will allow us to also later say: there is no broad/narrow match easier. However, for your case, this solution is not perfect, because you really want to say something like "out of scope", but that's not currently possible to express, so maybe make an issue?
There was a problem hiding this comment.
I have just raised an issue at mapping-commons/sssom#245
|
@matentzn Many thanks for your quick and helpful feedback. I appreciate you spending the time to do this! We will work on addressing the points that you've raised. |
Thank you so much for the valuable information @matentzn.
|
Let's have a chat about this. In a separate pull request, it looks like we'll need to:
|
|
@matentzn I wanted to get your opinion on the most appropriate |
|
@a-chahin There are no 100% matured guidelines here. I would recommend using Its tough in your case. Depending on the mapping predicate you use for the NDC->RxNorm mapping, maybe Thanks for the great question! If you could use the sssom issue track for some of these, others would be able to chime in as well! |
|
Thank you @matentzn for your reply! I will create an issue on the SSSOM GitHub page. |
Chessing234
left a comment
There was a problem hiding this comment.
this has been open since november 2022 and the ground has moved under it.
mimic-iv/concepts/concept_map/d_labitems_to_loinc.csv doesn't exist on main any more — "refactor mimic-iv SQL queries into subfolders of concepts" reorganised that directory, which now holds chartevents_to_loinc, chartevents_to_omop, procedureevents_to_omop and procedureevents_to_snomed, with lab mappings living under a hosp/ subfolder (see the paths in #1930). so the merge conflict you predicted in the description isn't the filename collision you were expecting; it's that the layout changed.
that also means the "newer file supersedes the older one" reasoning needs rechecking against what's actually on main today, four years of mappings later — d_labitems has changed across MIMIC-IV releases since v2.0.
worth deciding explicitly whether this is still wanted rather than leaving it open: either rebase onto the current layout with a note on how it relates to the lab mappings in #1930, or close it. a four-year-old conflicting PR costs a maintainer the same triage attention as a live one every time they scan the queue.
i can't verify the mappings themselves — no MIMIC-IV access here.
This pull request adds two mapping csv files for lab concepts from the
d_labitemsdefinitions table in MIMIC-IV v2.0. The first filed_labitems_to_loinc.csvcontainsitemidtoLOINCmappings. There will be a conflict when merging this file to main, as it uses the same file name as an older labs mapping file. This new file contains the latest lab concepts. However, its format is much different. The second filed_labitems_to_omop.csvcontainsitemidtoOMOPmappings.Both files use the simple standard for sharing ontology mappings
SSSOMformat @sssom