value_as_concept: Stricter validations for better OMOP mappings
#80
AndrewThien
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem:
Users would like to have the
value_as_concept_idcolumn (which is/will be useful for the long-term vision, where value can be standardised asconcept, instead ofnumber/string) in OMOP tableobservationandmeasurementpopulated long time ago (mentioned in the issue: Health-Informatics-UoN/carrot-mapper#619 and Health-Informatics-UoN/carrot-mapper#1008, as well as in Carrot Community meeting).But we couldn't solve this due to many reasons:
Field(which is currently mappings for all children values, this needs re-thinking) andValuemappingsvalue_as_concept_idorpairmappings (one value can receive bothmeasurement_concept_idandvalue_as_concept_id, for example)Solution:
Since the infrastructure to tackle this issue is now established:
We have the opportunity to actually solve this long-standing issue.
We have been thinking about a set of validations that can support/solve the issue in Mapper, then populate the field
value_as_concept_idin the tableobservationandmeasurementin Transform, and I would like to document/propose them here for all parties to have a good understanding/discussion/agreement about what will be done/applied in the future.Rethink the purpose of the
fieldlevel mappingsFieldlevel mappings have been used as mappings for all of children values. For example, I have a fieldGenderand valuesF/Min that field. If I add a concept Gender at the field level, then valuesFandMeach will have a record with sameobservation_concept_id= 4135376 in the OMOP tableobservation. Seems to be reasonable...However, the problem will come when a user then adds more concepts at the value level for M and F. For example, I can add Male to
M, the value M will have another record in the tablepersonwithgender_concept_id= 8507.Mnow have a record inobservationand inperson. Is that needed...?So, we are proposing to rethink the purpose of
fieldmapping:attribute-value pairs, i.e.,observationandmeasurement. So, thefieldmapping's main purpose in the future will be providing theattributefor a record/its children values, i.e.,observation_concept_id,measurement_concept_id, not a convenient way to map all children values anymore.value_as_concept/value_as_number/value_as_string. This will be detailed below.Future validations set:
New validation 1:
observationandmeasurementhaveattribute-value pairsof records (there may be more, please add your comments), we only allow adding concepts at the field level if users want to make the values/concepts to be stored at the mentioned table. In other words, we will blockfieldmapping.Edit field, then choose eitherMeasurement/Observationin the dropdown.MeasurementorObservation).For MANUAL mappings:
New validation 2: If the target table is Observation:
observation_concept_id(id of the added concept) - All children's values have their value asvalue_as_number/stringbased on the datatypeobservation_concept_id(id of the added concept at the field level) - The value having its own concept added will have this concept's id in the columnvalue_as_concept_id- The value doesn't have any concept added will have their value asvalue_as_number/stringbased on the datatypeNew validation 3: If the target table is Measurement:
Measurementdomain - Disallow multiple mappings for one field (2)measurement_concept_id(id of the added concept) - All children's values have their value asvalue_as_numberMeasurementdomain - Concepts at the value level have to beMeas valuedomain - Disallow multiple mappings (2)measurement_concept_id(id of the added concept at the field level) - The value having its own concept added will have this concept's id in the columnvalue_as_concept_id- The value doesn't have any concept added will have their value asvalue_as_numberFor AUTO mappings:
New validation 4:
measurement_concept_idorobservation_concept_idcan be determined by theMaps torelationship of the coded value already. For other tables, rather than measurement and observation,<table>_concept_idcan be determined by theMaps torelationship normally (and we don't allow field mapping for these tables anyway)Maps toandMaps to valuerelationship:Maps_toto determine the target table and to have the<table>_concept_idMaps to valueasvalue_as_concept_idfor the record of the coded valueQuestions for auto-mapping:
Maps toandMaps to valuerels. and the concept_id_2 of the rel.Maps tothat have the domain notMeasurementorObservation, for example: https://athena.ohdsi.org/search-terms/terms/37615975. What should we do in this case? Cause tables, other thanMeasurementorObservation, don't have the fieldvalue_as_concept_id.Maps to(concept_id_2 of these rels are in different domains) and oneMaps to valuerels, for example: https://athena.ohdsi.org/search-terms/terms/45568009. What should we do in this case?Additional notes:
(1): Valid domains are the domains that are not Condition, Procedure, Drug, Device, Specimen, or Measurement domains
(2): To guarantee each record/pair have one attribute and one value, avoiding the mixed-and-matched scenario. For the scenario of field mapping only, I wondered if we should allow multiple mappings for one field? Opinions here would help.
(3):
observation_concept_idis required butvalue_as_*is not required. So it doesn't make sense to allow only value mappings for this tableAll of the content/notes/ideas in this discussion were written based on my OMOP CDM readings and little experience working with OMOP.
All opinions/comments are welcome!
All reactions