opened 06:33PM - 11 Apr 24 UTC
# How to populate MEASUREMENT.VALUE_AS_NUMBER
## CDM or THEMIS convention?
THEM…IS
## Table or Field level?
Field
## Is this a general convention?
No
## Summary of issues
- VALUE_AS_NUMBER and VALUE_AS_CONCEPT_ID, do they need to be mutually exclusive? [[REF](https://forums.ohdsi.org/t/measurement-table-are-value-as-concept-id-and-value-as-number-mutually-exclusive/10975)]
## Summary of answer
If the raw data provides categorial results as well as continuous results for measurements, it is a valid ETL choice to preserve both values. Thus, VALUE_AS_NUMBER and VALUE_AS_CONCEPT_ID are not mutually exclusive. The continuous value should go in the VALUE_AS_NUMBER field and the categorical value should be mapped to a standard concept in the ‘Meas Value’ domain and put in the VALUE_AS_CONCEPT_ID field. If there is no categorial result in a source data, set VALUE_AS_CONCEPT_ID to NULL, if there is a categorial result in a source data but without mapping, set VALUE_AS_CONCEPT_ID to 0.
For example, it would be feasible to receive a measurement for a LOINC `8867-4-heart rate` from a source system that both indicates that a patient experienced a heart rate of `60 beats per minute` and this measurement was considered `normal`. The 200 can be stored in VALUE_AS_NUMBER, the beats per minute in UNIT_CONCEPT_ID (`8541-per minute`), and finally the "normal" in VALUE_AS_CONCEPT_ID (`4069590-Normal`).
## Related links
- https://ohdsi.github.io/CommonDataModel/cdm54.html#measurement
- https://forums.ohdsi.org/t/measurement-table-are-value-as-concept-id-and-value-as-number-mutually-exclusive/10975
- [Operator and Value concept Id - Measurement Table in CDM](https://forums.ohdsi.org/t/operator-and-value-concept-id-measurement-table-in-cdm/6662)
## Other comments/notes
- @MelaniePhilofsky - This wasn't ratified though. It looks like there might have been a discussion (see the forum thread below) but I don't see the entry. However, if I were to assert what to do here is we take the values the data give us. I think our DQD checks have shown us how difficult it is holistically to assert when things are "high" or "low" using the data. We may get there one day, but I don't think we are there yet.
This is in the CDM documentation though:
_If the raw data provides categorial results as well as continuous results for measurements, it is a valid ETL choice to preserve both values. The continuous value should go in the VALUE_AS_NUMBER field and the categorical value should be mapped to a standard concept in the ‘Meas Value’ domain and put in the VALUE_AS_CONCEPT_ID field. This is also the destination for the ‘Maps to value’ relationship. If there’s no categorial result in a source_data, set value_as_concept_id to NULL, if there is a categorial result in a source_data but without mapping, set value_as_concept_id to 0._