Making health data interoperable across different IT systems requires a few kinds of standards. Exchange standards like HL7’s Version 2, CDA, and FHIR are key to organizing information into a commonly understood structure as it moves between systems. Vocabulary standards like LOINC provide a common language for identifying the clinical variables inside those exchanges.

For numeric results, interoperability also means that IT systems need to understand the units of measure associated with the result value. The Unified Code for Units of Measure (UCUM) standard provides a clear and computable syntax for representing units.

You might be thinking, aren’t units already standardized?

Sure there are lbs and kgs (well…grams and ounces for babies), inches and centimeters, but is it a big problem?

standards for units of measure

photo via Alex Benn

Turns out, it’s huge problem.

For example, Raebel et al described the process to create a common data repository in the FDA’s Mini Sentinel project for post-market medical product safety surveillance. When they combined data from contributing partners, they found the 34 different HbA1c and 68 different platelet count result units in the source data.

We too had to deal with all the string variations in unit representations when integrating many lab data sources into the Indiana Network for Patient Care.

Standardizing units with the Unified Code for Units of Measure

The UCUM standard solves this problem by providing a single coding system for units. UCUM was originally developed by Gunther Schadow and Clem McDonald, and is distributed and made available by the Regenstrief Institute, Inc. It is comprehensive and provides a clear, computable meaning. It covers both metric and US customary units such as acres and inches. UCUM has been adopted by several large standards organizations, including IEEE, DICOM, HL7 (including its FHIR specification – see Using UCUM with FHIR), and ISO’s 11240:2012 specification about medicinal product characteristics. In addition to OMOP and the Mini Sentinel project mentioned above, large scale research networks like ODHSI also use UCUM.

UCUM assigns a concise semantics to each defined unit, because it is important for computer systems not only to use the same set of symbols, but that they assign the same meaning to the symbols they exchange. UCUM uses a formal syntax that can be validated, and a matrix of coefficients that define all legal conversions between values expressed in one unit to values expressed in another commensurate unit.

A recent paper by Hauser et al illustrated the power being able to aggregate data coded with LOINC by converting between laboratory results with different reporting units. As we mentioned in our response letter, UCUM’s computability provides a powerful platform for conversions and equivalences between commensurate units.

At first glance, UCUM may seem pretty complex. But for most common units, the UCUM representation is pretty familiar. The LOINC website has a list of UCUM expressions for common units used in electronic lab reporting.

Resources for converting and validating units with UCUM

Here I’ve compiled a list of publicly available resources for software developers and others looking to do conversion and validation of quantities with UCUM units.

LHC UCUM Library

The LHC UCUM library is a javascript library developed by the Lister Hill Center (LHC) of the National Library of Medicine that provides validation and conversion services for UCUM. There is a nice demonstration site that illustrates the conversion and validation functions. The GitHub repository includes the browser package as well as test code, data import/export code, and the code for the demo site. The code is made available under an open license based on the BSD open-source license.

UCUM Transformation Webservices

This project, developed by xml4pharma, contains a RESTful web service for transformations between commensurate UCUM  units, that is, for conversion of values using one UCUM unit to another UCUM unit. The benefits of these kinds of webservices in medical informatics and clinical research is described in nice paper by Jozef Aerts, PhD.

FHIR Metrics

FHIR Metrics is a UCUM implementation for FHIR developed by Furore Health Informatics. It provides capabilities for some conversions of quantities into different UCUM units. It is distributed under the BSD 3-clause “New” or “Revised” License.

Units of Measurement API

These JAVA packages enable computational handling of physical quantities expressed with units. It provides three main functions: checks of of unit compatibility, expressions of a quantity in various units, and arithmetic operations on units. It is developed by JScience and others, and distributed under the 3-Clause BSD License.

UOMo

The UOMo project enables units support for IT systems and services both to common programming languages like Java and Data Exchange standards like UCUM and formats including UnitsML, SensorML, MathML, general XML or JSON. It is developed by the Eclipse UOMo team and made available under the Eclipse Public License 1.0.

PixelMed™ Java UCUM Toolkit

This is an open source toolkit for the parsing of UCUM unit strings, their conversion into a canonical form and for the extraction of a the value to convert one unit to another, where possible. It is developed by PixelMed™ (David A. Clunie) and made available under an open source license.

Author notes

2017 09 10 – Updated post with reference to the PixelMed™ Java UCUM Toolkit based on feedback from David Clunie.