Health data standards

UCUM units in lab results: why mg/dL, mmol/L and 10*3/uL are written the way they are

UCUM is the code system for units of measure in electronic health data. Why it is case-sensitive, how units such as mg/dL, mmol/L, 10*3/uL, m[IU]/L and {INR} are written, how FHIR Quantity uses it, and why free-text units break comparisons.

by Published 2 min read

Short answer: UCUM (the Unified Code for Units of Measure) is a code system for units, designed so that a computer can read, validate and convert them. In health data it is how lab and vital-sign units are written: mg/dL, mmol/L, 10*3/uL for cell counts, m[IU]/L for TSH, /min for heart rate. In HL7 FHIR, a Quantity carries the value, a display unit, the UCUM system and the UCUM code.

Rules that surprise people

  • Case matters: mL is millilitre, ML is not valid; Pa is pascal, PA is not.
  • Powers of ten are written 10*3 and 10*6, so white cells are 10*3/uL (shown on paper as ×10³/µL); u stands for micro.
  • Arbitrary units go in square brackets: [IU] for international units, m[IU]/L.
  • Annotations in curly braces carry no unit meaning: {INR} or {ratio} for dimensionless values.
"valueQuantity": {"value": 6.5, "unit": "x10^3/µL", "system": "http://unitsofmeasure.org", "code": "10*3/uL"}

The unit field can show the friendly form; the code must be valid UCUM.

Why it matters for patients

When units are codes, software can convert 5.0 mmol/L and 90 mg/dL of glucose to the same scale and chart them together. When they are free text ("mg/dl ", "MG/DL"), results from two labs stay apart, or worse, get compared wrongly. Our lab unit converter applies the conversion factors for the common tests.

In Anpheros

In Anpheros every value is stored with a UCUM code, and conversions between labs use it. Developers: normalizing medical data and the lab results API.

Sources

Frequently asked questions

What does UCUM stand for?

The Unified Code for Units of Measure.

How do I write ×10³/µL in UCUM?

10*3/uL.

Is UCUM case-sensitive?

Yes. mL and ML are different strings, and only the first is valid.

How is INR written in UCUM?

INR has no unit; it is written as an annotation, {INR}, or as 1.

Anpheros Platform

Try it free in the sandbox

Your first FHIR call in 5 minutes. An HL7 FHIR R4 API with the patient's consent built in: try it in the sandbox, then connect your own app or clinic system.

Free · 30 synthetic patients · no card

This guide is for information and does not replace medical advice. For decisions about your health, talk to your doctor. In an emergency, call your local emergency number (112 in Europe).
Written by
The Anpheros team

Anpheros builds a medical record that the patient controls and can share with any clinic, on an HL7 FHIR R4 platform, based in the EU. These guides help you understand and organise your health; they do not replace your doctor.

About Anpheros →
Anpheros

The more you log, the clearer your record

Your health history in one place, under your control.

Symptom diaryPatterns show over time
Emergency cardQR in your phone's Wallet
All your resultsLabs and reports together
You decideWho sees what, and for how long
Create your free account

Free · Works in your browser · No card