FHIR R4 Observation example: laboratory result
A single laboratory result is an Observation in the laboratory category. The LOINC code names the analyte and specimen; the reference range and interpretation travel with the value, so the result can be read outside the lab's PDF.
The Observation in JSON
{
"resourceType": "Observation",
"id": "glucose",
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory",
"display": "Laboratory"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "2345-7",
"display": "Glucose [Mass/volume] in Serum or Plasma"
}
],
"text": "Glucose"
},
"subject": {
"reference": "Patient/example",
"display": "Jane Doe"
},
"effectiveDateTime": "2026-10-02T07:45:00-05:00",
"issued": "2026-10-02T13:10:00-05:00",
"performer": [
{
"reference": "Organization/lab",
"display": "Springfield Clinical Laboratory"
}
],
"valueQuantity": {
"value": 126,
"unit": "mg/dL",
"system": "http://unitsofmeasure.org",
"code": "mg/dL"
},
"interpretation": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
"code": "H",
"display": "High"
}
]
}
],
"referenceRange": [
{
"low": {
"value": 70,
"unit": "mg/dL",
"system": "http://unitsofmeasure.org",
"code": "mg/dL"
},
"high": {
"value": 99,
"unit": "mg/dL",
"system": "http://unitsofmeasure.org",
"code": "mg/dL"
}
}
]
}
Validator result with the eu-lab profile: raw JSON ยท open the validator
- informationNo errors: this Observation matches the FHIR R4 structure checked here.
The elements that matter
| Element | Cardinality | Notes |
|---|---|---|
category | 0..* | laboratory. |
code | 1..1 | LOINC: 2345-7 is glucose measured in serum or plasma; capillary blood has a different code. |
valueQuantity | 0..1 | Number plus UCUM unit; value is a JSON number, not a string. |
referenceRange | 0..* | The lab's range for this result. |
interpretation | 0..* | H, L, N and other flags from the v3 ObservationInterpretation code system. |
issued | 0..1 | When the lab released the result, as an instant. |
The validator below this page runs this example with the optional eu-lab rules (category, LOINC code, UCUM unit, reference range). Choose the profile in the validator to run the same check on your own results.
The full definition is in the FHIR R4 Observation specification.
Common mistakes and the errors they cause
Status outside the value set
Observation.status has a required binding; done is not in it.
- error
Observation.statusObservation.status 'done' is not in the required value set (amended, cancelled, corrected, entered-in-error, final, preliminary, registered, unknown). - error
Observation.statusObservation.status must be final, amended, corrected or preliminary.
Value and unit in one string
valueQuantity.value is a decimal; the unit goes in unit and code.
- error
Observation.valueQuantity.valueNot a FHIR decimal (a JSON number such as 7.2).
Two value[x] elements
An Observation has one value; use components for several.
- error
ObservationOnly one of these elements may be present: valueBoolean, valueCodeableConcept, valueDateTime, valueInteger, valuePeriod, valueQuantity, valueRange, valueRatio, valueSampledData, valueString, valueTime.
POST /fhir/R4/Observation and $validate.More examples
- Patient resource example
- Observation example: blood pressure
- DiagnosticReport example: lab panel
- Condition resource example
- MedicationStatement example
- AllergyIntolerance example
- Immunization resource example
- Encounter resource example
Related guides
- How to import laboratory results into a FHIR recordTutorial: import a lab report as CSV and as HL7 v2 ORU^R01 into FHIR R4 Observations with LOINC codes and reference ranges, handle unmapped markers and resent reports, and trace each result to its laboratory.
- How to normalize medical dataTutorial: turn medical data from many sources into one comparable form โ LOINC and ATC lookup, UCUM units, ISO dates, reference ranges, no duplicates on retry, and validation against the European lab profile.