Measurement VALUE_AS_NUMBER negative results

Hello!

I have bumped into an issue while trying to record the numeric measurement results for Height-for-Age Z Score (HAZ), BMI-for-Age Z Score and Weight-for-Age Z Score (WAZ) (from Athena e.g. Athena). These measurement results can contain negative values, as the result is expressed as a positive value or a negative value depending on whether the value is greater than or less than the median. So when the Z Score of an individual measure is 0 (zero), it means that it is equal to the median, but when it’s negative, it means e.g. that the individuals weight is less than median.

In the description of VALUE_AS_NUMBER it says: "If there is a negative value coming from the source, set the VALUE_AS_NUMBER to NULL, with the exception of the following Measurements (listed as LOINC codes): ". This would mean that the negative Z Score results could not be recorded at all in OMOP CDM as they should be set to NULL. Could it be possible to add these kind of measurements to the approved “exceptions” so that also the numeric values could be recorded and preserved, or how should we proceed with recording these measurements in OMOP CDM?

Thank you for the help and best regards,
Maria

No, set them to negative. Usually, measurements are positive, with few exceptions. In order to keep up the quality we tell ETLers to block the negative results, e.g., for glucose in blood. They are used in many source data to indicate a lost sample, or a withdrawn prior result, or such things. We don’t want that. But in your case the negative values are legit. We should make the text clarify that better.

2 Likes

Tagged as a Themis issue.

Related to that –

We are now looking into bone mineral density test and would like to identify people with t-score less or equal -2.5. Turns out, ATLAS does not allow negative value as numbers … any way around this?

Thanks!

@cyanover if you are willing to try out a package in development, our CohortConstructor package does support negative values in measurement concepts Create cohorts measurement based cohorts — measurementCohort • CohortConstructor Have put an example below on some synthetic data without bmd (so returns an empty cohort), but happy to help if you wanted to give it a try (and would be great to get some feedback!) :slight_smile:

library(DBI, warn.conflicts = FALSE)
#> Warning: package 'DBI' was built under R version 4.4.1
library(CDMConnector, warn.conflicts = FALSE)
#> Warning: package 'CDMConnector' was built under R version 4.4.2
library(CohortConstructor, warn.conflicts = FALSE)
con <- dbConnect(duckdb::duckdb(), 
              dbdir = eunomiaDir(datasetName = "synthea-covid19-10k"))
cdm <- cdmFromCon(con = con, 
                  cdmSchema = "main", 
                  writeSchema = "main", 
                  cdmName = "Eunomia")
#> Note: method with signature 'DBIConnection#Id' chosen for function 'dbExistsTable',
#>  target signature 'duckdb_connection#Id'.
#>  "duckdb_connection#ANY" would also be valid
cdm$bmd <- measurementCohort(cdm = cdm, 
                             conceptSet = list(bmd = 3049654L), # example measurement concept
                             name = "bmd", 
                             valueAsNumber = list(c(-2.5, 2.5)))
#> ℹ Subsetting measurement table.
#> ℹ Applying measurement requirements.
#> Warning: There are no subjects with the specified value_as_concept_id or
#> value_as_number.
#> ! cohort columns will be reordered to match the expected order:
#>   cohort_definition_id, subject_id, cohort_start_date, and cohort_end_date.
#> ℹ No table could be subsetted, returning empty cohort.

Created on 2025-02-14 with reprex v2.1.0

Interesting, thanks Ed. I’m happy to use it, but not sure how/if it fits the Phenotype Phebruary workflow. @aostropolets, @Azza_Shoaibi, @Gowtham_Rao, @Patrick_Ryan – what do you think?

1 Like