Scenario: Search the Device Registry and Associations
Search R4 Device resources with advertised filters and, when R6 is selected, query DeviceAssociation separately.
Authorization
Use an OAuth 2.0 access token issued by OCI Identity Domains with the DDFS resource scopes required for Device, Provenance, or DeviceAssociation requests. Configure the client and obtain tokens by following Create an Integrated Application and DDFS Authentication Reference.
Search R4 Device
The R4 Device search surface advertises patient, status, type, manufacturer, and model, in addition to the advertised common and result-control parameters.
Search by patient reference or patient identifier:
GET {base}/api/fhir/r4/Device?patient=Patient/{patient_id}
GET {base}/api/fhir/r4/Device?patient:identifier={system}|{value}
Search by a token parameter:
GET {base}/api/fhir/r4/Device?status=active
GET {base}/api/fhir/r4/Device?type={system}|{code}
Search for an exact manufacturer or model string:
GET {base}/api/fhir/r4/Device?manufacturer:exact={manufacturer}
GET {base}/api/fhir/r4/Device?model:exact={model}
Use a maximum of two repeated _lastUpdated parameters for a range, with advertised comparators such as ge and le. Do not combine date values with a comma.
GET {base}/api/fhir/r4/Device?_lastUpdated=ge2026-01-01T00:00:00Z&_lastUpdated=le2026-01-31T23:59:59Z
See GET /api/fhir/r4/Device for the parameter definitions and allowed modifiers.
Retrieve related Provenance
R4 Device advertises Provenance:target as a reverse-include value. Use it to request Provenance resources whose target includes a matching Device:
GET {base}/api/fhir/r4/Device?_id={device_id}&_revinclude=Provenance:target
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}
Query R6 DeviceAssociation separately
If the application selects R6 and needs association records, query the separately advertised DeviceAssociation resource. Confirm the resource interaction and its search parameters in the R6 CapabilityStatement before constructing the request.
GET {base}/api/fhir/r6-ballot4/DeviceAssociation?subject=Patient/{patient_id}
Interpret Device and DeviceAssociation according to the API version and data model selected by the customer application. The application decides whether and how records created through different API versions relate to one another.