OHDSI Home | Forums | Wiki | Github

UNIT_CONCEPT_ID NOT IN (NA) in DataQualityDashboard test

I was going through a DataQualityDashboard report and saw several failed plausibility tests in the form of
“the number and percent of records for a given CONCEPT_ID XXXXX (LABEL) with implausible units (i.e., UNIT_CONCEPT_ID NOT IN (NA)).”

Looking at the test the sql is actually returning all rows for a given concept id and marking all as failed
e.g. for Bilirrubin

SELECT
m.*
FROM omop_quiron.MEASUREMENT m
WHERE m.MEASUREMENT_CONCEPT_ID = 3045524
AND
m.unit_concept_id IS NOT NULL
AND m.value_as_number IS NOT NULL
AND (m.unit_source_value IS NOT NULL OR m.unit_source_value <> ‘’)

Am I missing something or is that a bug in the rule generation?

What version of DQD are you running? We overhauled the unit concept checks in version 2.6.0. From the SQL you shared it seems like you’re on an older version.

That said, I think the result you’re seeing here is actually correct. The measurement concept in your SQL is for this LOINC code, which is for a measurement panel: LOINC 34543-9 Bilirubin direct and total panel [Mass/volume] - Serum or Plasma. The panel itself should not have a result, nor units. So the DQD check is telling you, none of these should have units because it’s not an individual measurement with units.

Unit source value is a single space, which is an interesting thing

t