FHIR Quantity Data Type (R4)

Quantity is a measured amount: a value with units. Element table, example JSON and FHIRPath for FHIR R4.

  • FHIR Quantity Data Type (R4) — part of the free FHIR Toolbox library.
  • Runs entirely in your browser: your FHIR data is never uploaded to a server.

Overview

Quantity is a measured amount: a value with units. Use system http://unitsofmeasure.org and a UCUM code so that machines can interpret the unit, in addition to the human-readable unit.

Elements

ElementTypeCardinalityDescription
Quantity.valuedecimal0..1Numerical value (with implicit precision)
Quantity.comparatorcode0..1< | <= | >= | > - how to understand the value
Quantity.unitstring0..1Unit representation
Quantity.systemuri0..1System that defines coded unit form
Quantity.codecode0..1Coded form of the unit

Example JSON (R4)

{
  "value": 72.5,
  "unit": "kg",
  "system": "http://unitsofmeasure.org",
  "code": "kg"
}

FHIRPath

  • Observation.value.ofType(Quantity).value — Numeric value
  • Observation.value.ofType(Quantity).unit — Unit

FHIR Toolbox is a free, privacy-first collection of HL7 FHIR utilities by Omindra Labs. Every tool performs zero-server processing — your health data never leaves your device.