Scenario: Search Vital Signs and Laboratory Results
Search FHIR R4 Observation resources with the clinical and date parameters advertised by DDFS.
Authorization
Use an OAuth 2.0 access token issued by OCI Identity Domains with the DDFS resource scopes required for Observation and Provenance requests. Configure the client and obtain tokens by following Create an Integrated Application and DDFS Authentication Reference.
Observation search surface
DDFS advertises the base FHIR R4 Observation resource. Its resource-specific search parameters include category, code, date, device, encounter, patient, specimen, and status. See GET /api/fhir/r4/Observation for the common parameters and the constraints on each resource-specific parameter.
The category and LOINC values below are base-FHIR workflow illustrations. Select codes and validate returned resources against the profiles and terminology requirements used by your application.
Search by category or code
Search for vital-sign or laboratory Observations by category:
GET {base}/api/fhir/r4/Observation?category=vital-signs
GET {base}/api/fhir/r4/Observation?category=laboratory
Search for one LOINC-coded result:
GET {base}/api/fhir/r4/Observation?code=http://loinc.org|8867-4
GET {base}/api/fhir/r4/Observation?code=http://loinc.org|4548-4
Search by patient or specimen
Search with a direct patient reference or the advertised :identifier modifier:
GET {base}/api/fhir/r4/Observation?patient=Patient/{patient_id}
GET {base}/api/fhir/r4/Observation?patient:identifier={system}|{value}
Search with a direct specimen reference or the advertised :identifier modifier:
GET {base}/api/fhir/r4/Observation?specimen=Specimen/{specimen_id}
GET {base}/api/fhir/r4/Observation?specimen:identifier={system}|{value}
Search a date range
The R4 Observation date parameter advertises the comparators eq, ne, gt, lt, ge, le, sa, eb, and ap. A range can use a maximum of two repeated date parameters. Do not combine date values with a comma.
GET {base}/api/fhir/r4/Observation?date=ge2026-01-01&date=le2026-01-31
Retrieve related Provenance
R4 Observation advertises Provenance:target as a reverse-include value. Use it to request Provenance resources whose target includes a matching Observation:
GET {base}/api/fhir/r4/Observation?_id={observation_id}&_revinclude=Provenance:target