HL7 FHIR R4 DiagnosticReport & Observation Guide
The definitive technical reference for hospital integration engineers, healthtech architects, and laboratory software developers constructing compliant US Core Laboratory Result FHIR JSON bundles.
1. Core Resource Hierarchy & Relationship Model
When exchanging clinical laboratory results with modern EHR systems (such as Epic, Oracle Cerner, and MEDITECH) via SMART on FHIR or RESTful APIs, laboratory data is structured as a transaction or message Bundle containing the parent DiagnosticReport, linked discrete Observation resources, Specimen metadata, and Patient demographics.
Bundle (type: "transaction" | "message" | "searchset")
│
├── DiagnosticReport (category: "LAB", status: "final", code: LOINC 24323-8 [CMP])
│ ├── subject ─────────> Patient (Identifier: MRN, SSN)
│ ├── encounter ───────> Encounter (Inpatient / Outpatient Visit)
│ ├── specimen ────────> Specimen (Serum/Plasma, Collected: ISO 8601)
│ ├── performer ───────> Organization (Laboratory CLIA #, Medical Director)
│ ├── presentedForm ───> Attachment (application/pdf Base64 signed report)
│ └── result (Array) ──┬──> Observation [Glucose: 95 mg/dL, Normal]
│ ├──> Observation [Sodium: 139 mmol/L, Normal]
│ ├──> Observation [Potassium: 6.8 mmol/L, Critical High HH]
│ └──> Observation [Creatinine: 0.9 mg/dL, Normal]
2. Production-Grade FHIR R4 JSON Payload Samples
Below is a complete, production-grade US Core 3.1.1 compliant Observation representing an abnormal serum potassium result with LOINC coding, reference ranges, and critical panic flags:
{
"resourceType": "Observation",
"id": "obs-potassium-001",
"meta": {
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
]
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory",
"display": "Laboratory"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "2823-3",
"display": "Potassium [Moles/volume] in Serum or Plasma"
}
],
"text": "Potassium, Serum"
},
"subject": {
"reference": "Patient/pat-98231",
"display": "Jane Doe"
},
"effectiveDateTime": "2026-09-05T08:30:00-05:00",
"issued": "2026-09-05T09:12:44-05:00",
"performer": [
{
"reference": "Organization/ails-lab-clia-10d2948201",
"display": "AILS Central Reference Laboratory (CLIA: 10D2948201)"
}
],
"valueQuantity": {
"value": 6.8,
"unit": "mmol/L",
"system": "http://unitsofmeasure.org",
"code": "mmol/L"
},
"interpretation": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
"code": "HH",
"display": "Critical High"
}
]
}
],
"referenceRange": [
{
"low": {
"value": 3.5,
"unit": "mmol/L",
"system": "http://unitsofmeasure.org",
"code": "mmol/L"
},
"high": {
"value": 5.1,
"unit": "mmol/L",
"system": "http://unitsofmeasure.org",
"code": "mmol/L"
},
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/referencerange-meaning",
"code": "normal",
"display": "Normal Range"
}
]
}
}
],
"note": [
{
"text": "CRITICAL PANIC VALUE: 6.8 mmol/L confirmed by repeat testing on Beckman AU480. Physician verbal readback completed at 09:15 CST."
}
]
}
{
"resourceType": "DiagnosticReport",
"id": "diagrep-cmp-99214",
"meta": {
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab"
]
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0074",
"code": "LAB",
"display": "Laboratory"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "24323-8",
"display": "Comprehensive metabolic 2000 panel - Serum or Plasma"
}
],
"text": "Comprehensive Metabolic Panel (CMP)"
},
"subject": {
"reference": "Patient/pat-98231",
"display": "Jane Doe"
},
"encounter": {
"reference": "Encounter/enc-20260905-001"
},
"effectiveDateTime": "2026-09-05T08:30:00-05:00",
"issued": "2026-09-05T09:15:00-05:00",
"performer": [
{
"reference": "Organization/ails-central-lab",
"display": "AILS Central Reference Laboratory"
}
],
"specimen": [
{
"reference": "Specimen/spec-serum-sst-01"
}
],
"result": [
{ "reference": "Observation/obs-glucose-001", "display": "Glucose: 95 mg/dL" },
{ "reference": "Observation/obs-sodium-001", "display": "Sodium: 138 mmol/L" },
{ "reference": "Observation/obs-potassium-001", "display": "Potassium: 6.8 mmol/L (HH)" },
{ "reference": "Observation/obs-chloride-001", "display": "Chloride: 102 mmol/L" },
{ "reference": "Observation/obs-bun-001", "display": "BUN: 14 mg/dL" },
{ "reference": "Observation/obs-creatinine-001", "display": "Creatinine: 0.9 mg/dL" },
{ "reference": "Observation/obs-calcium-001", "display": "Calcium: 9.4 mg/dL" }
],
"presentedForm": [
{
"contentType": "application/pdf",
"language": "en-US",
"title": "Certified Laboratory Report (Signed)",
"data": "JVBERi0xLjQKJ...[BASE64_ENCODED_CERTIFIED_PDF_PAYLOAD]..."
}
]
}
3. HL7 v2.5.1 ORU^R01 to FHIR R4 Element Mapping Matrix
Detailed translation crosswalk between traditional HL7 v2.5.1 pipe-and-hat segments and modern FHIR R4 JSON data elements:
| Clinical Data Element | HL7 v2.5.1 Segment / Field | FHIR R4 Resource Element | Standard Terminology & ValueSet |
|---|---|---|---|
| Patient Identifier | PID-3 (Patient ID List) | Observation.subject.reference | Identifier.type: MRN, SSN, NPI |
| Panel / Battery Code | OBR-4 (Universal Service ID) | DiagnosticReport.code.coding | LOINC (e.g., 24323-8 for CMP) |
| Discrete Analyte Code | OBX-3 (Observation ID) | Observation.code.coding | LOINC (e.g., 2823-3 for Potassium) |
| Quantitative Result | OBX-5 (Observation Value) | Observation.valueQuantity.value | Decimal Numerical Finding |
| Units of Measurement | OBX-6 (Units) | Observation.valueQuantity.code | Unified Code for Units of Measure (UCUM) |
| Abnormal Flag | OBX-8 (Abnormal Flags) | Observation.interpretation.coding | HL7 v3 ValueSet: H, L, HH, LL, N, A |
| Signed PDF Document | OBX-5 (ED Type) / MDM^T02 | DiagnosticReport.presentedForm | Attachment: Base64 Encoded PDF |
4. Microbiology Culture & Antibiotic Susceptibility Modeling
Microbiology culture reports require hierarchical modeling where an initial culture DiagnosticReport links to an organism identification Observation (coded in SNOMED-CT), which contains nested hasMember or component observations for each antibiotic MIC titer:
{
"resourceType": "Observation",
"id": "obs-micro-ast-001",
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "600-7",
"display": "Bacteria identified in Blood by Culture"
}
]
},
"subject": { "reference": "Patient/pat-98231" },
"valueCodeableConcept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "112283007",
"display": "Escherichia coli (organism)"
}
]
},
"component": [
{
"code": {
"coding": [{ "system": "http://loinc.org", "code": "18906-8", "display": "Ciprofloxacin [Susceptibility]" }]
},
"valueQuantity": { "value": 0.25, "unit": "ug/mL", "system": "http://unitsofmeasure.org", "code": "ug/mL" },
"interpretation": [{ "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "S", "display": "Susceptible" }] }]
},
{
"code": {
"coding": [{ "system": "http://loinc.org", "code": "18864-9", "display": "Ampicillin [Susceptibility]" }]
},
"valueQuantity": { "value": 32, "unit": "ug/mL", "system": "http://unitsofmeasure.org", "code": "ug/mL" },
"interpretation": [{ "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "R", "display": "Resistant" }] }]
}
]
}
5. RESTful Querying & SMART on FHIR Authentication
AILS Cloud LIS provides standards-compliant REST endpoints secured via OAuth 2.0 with SMART on FHIR authorization scopes:
GET Query Lab Reports by Patient & Date Range
GET /fhir/r4/DiagnosticReport?
subject=Patient/pat-98231&
category=http://terminology.hl7.org/CodeSystem/v2-0074|LAB&
date=ge2026-09-01&
_include=DiagnosticReport:result
Returns a Bundle containing matching DiagnosticReports along with all referenced discrete Observation resources in a single atomic response.
AUTH OAuth 2.0 SMART on FHIR Scopes
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...
Scope:
system/DiagnosticReport.rs
system/Observation.rs
system/Patient.r
Enforces fine-grained, role-based access control with asymmetric token verification adhering to ONC 21st Century Cures Act specifications.
Frequently Asked Questions: FHIR Laboratory Standards
Q: How are qualitative and text results structured in FHIR?
Qualitative findings (e.g., Blood Culture Positive or Covid-19 Detected) utilize valueCodeableConcept coded with SNOMED-CT, while narrative microscopic comments use valueString.
Q: What is the difference between effectiveDateTime and issued?
effectiveDateTime represents the exact timestamp of specimen collection from the patient, whereas issued is the timestamp when the pathologist certified the final report.
Q: Can AILS convert legacy HL7 v2 messages into FHIR R4 JSON?
Yes. AILS includes a high-throughput transformation engine that dynamically converts inbound HL7 v2.3/v2.5.1 MLLP streams into FHIR R4 JSON bundles in sub-10ms processing latency.
Q: Which US Core Implementation Guide profiles are supported?
AILS adheres strictly to US Core 3.1.1, 4.0.0, 5.0.1, and 6.1.0 Laboratory Result Observation and DiagnosticReport profile constraints.
Explore Related Laboratory Integration Guides
Deep-dive into hospital EHR connectivity guides and instrument driver protocol specifications: