FHIR Quantity Data Type (R5)
Quantity is a measured amount: a value with units. Element table, example JSON and FHIRPath for FHIR R5.
- FHIR Quantity Data Type (R5) — 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
| Element | Type | Cardinality | Description |
|---|---|---|---|
| Quantity.value | decimal | 0..1 | Numerical value (with implicit precision) |
| Quantity.comparator | code | 0..1 | < | <= | >= | > | ad - how to understand the value |
| Quantity.unit | string | 0..1 | Unit representation |
| Quantity.system | uri | 0..1 | System that defines coded unit form |
| Quantity.code | code | 0..1 | Coded form of the unit |
Example JSON (R5)
{
"value": 72.5,
"unit": "kg",
"system": "http://unitsofmeasure.org",
"code": "kg"
}
FHIRPath
Observation.value.ofType(Quantity).value— Numeric valueObservation.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.