-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lab results mappings for MIMIC-IV v2.0 - SSSOM format #1418
base: main
Are you sure you want to change the base?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
object
is the broader term, see also https://mapping-commons.github.io/sssom/mapping-predicates/ - I get the sense that you are overusing
skos:exactMatch
a 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orcids should be pipe separated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid record according to sssom, do you intend to say "there is no exact mapping?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
This pull request adds two mapping csv files for lab concepts from the
d_labitems
definitions table in MIMIC-IV v2.0. The first filed_labitems_to_loinc.csv
containsitemid
toLOINC
mappings. 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.csv
containsitemid
toOMOP
mappings.Both files use the simple standard for sharing ontology mappings
SSSOM
format @sssom