Scenario: Access Device and Patient Data
Use advertised FHIR R4 searches and reads to retrieve Device, Patient, and Observation data for a device integration.
Choose the API surface
Retrieve the CapabilityStatement from the API version that the application will use. Confirm the required resources, interactions, and search parameters before sending data requests. This workflow uses the advertised FHIR R4 Patient, Device, Observation, and Provenance surfaces.
Authorization
Use an OAuth 2.0 access token issued by OCI Identity Domains with the DDFS resource scopes required for each Patient, Device, Observation, or Provenance request. Configure the client and obtain tokens by following Create an Integrated Application and DDFS Authentication Reference.
Retrieve patients
Search Patient with an advertised parameter, such as identifier or name, or read a known resource by its logical ID.
GET {base}/api/fhir/r4/Patient?identifier={system}|{value}
GET {base}/api/fhir/r4/Patient/{patient_id}
Find devices
R4 Device search advertises patient, status, type, manufacturer, and model, in addition to the advertised common parameters. Search by a direct patient reference or with the :identifier modifier. The manufacturer and model string parameters accept the :exact modifier.
GET {base}/api/fhir/r4/Device?patient=Patient/{patient_id}
GET {base}/api/fhir/r4/Device?patient:identifier={system}|{value}
GET {base}/api/fhir/r4/Device?manufacturer:exact={manufacturer}
GET {base}/api/fhir/r4/Device?model:exact={model}
To retrieve Provenance resources whose target is a matching Device, use the advertised reverse include:
GET {base}/api/fhir/r4/Device?_id={device_id}&_revinclude=Provenance:target
Retrieve device observations
Search R4 Observation with advertised parameters including device, patient, category, code, date, encounter, specimen, and status. The following requests use one filter at a time so that each dependency is explicit:
GET {base}/api/fhir/r4/Observation?device=Device/{device_id}
GET {base}/api/fhir/r4/Observation?patient=Patient/{patient_id}
GET {base}/api/fhir/r4/Observation?code={system}|{code}
GET {base}/api/fhir/r4/Observation?date=ge2026-01-01&date=le2026-01-31
A date range uses no more than two repeated date parameters with advertised comparators. Do not combine date values with a comma.
Request a page size
Use the advertised _count parameter when requesting a page size.
GET {base}/api/fhir/r4/Device?status=active&_count={page_size}
Optional R6 subscription workflow
If the application selects the R6 API and requires Subscription or SubscriptionTopic interactions advertised by its CapabilityStatement, follow FHIR R6 subscriptions. That dedicated workflow defines the applicable resources, inputs, and operational considerations.