Quick Start for FHIR R4 APIs
Complete these tasks to set up your environment and use the FHIR R4 APIs for Oracle Health Clinical Data Exchange.
Prerequisites
| Prerequisite | More Information |
|---|---|
| Install cURL | Use cURL |
| Set up authentication | Authenticate with a bearer access token |
| Sign in to Oracle Health Clinical Data Exchange | This documentation assumes that you have an Oracle Health Clinical Data Exchange account. |
Create a new Task resource
For more information, see Create a new Task resource.
Issue the following cURL command:
curl -v -X POST -sS https://cell1.query.cdexhub.<cloud_region>.oci.oraclecloud.com/fhir/r4/<query_endpoint_alias>/Task -H "Authorization: Bearer <app_access_token>" -d '<input_json>' Where:
<cloud_region>is the Oracle Cloud Infrastructure region for your tenancy (for example,us-chicago-1).<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource (for example,e48ebcb3-4027-5c58-ac57-e866afc7be0c).-
<app_access_token>is the OAuth2 access token, in alphanumeric format. -
<input_json>is the JSON object to pass. For example:{ "resourceType": "Task", "meta": {"profile": ["http://hl7.org/fhir/us/davinci-cdex/StructureDefinition/cdex-task-data-request"]}, "identifier": [{"system": "http://example.org/cdex/payer/task-ids", "value": "<masked-client-task-id>"}], "status": "requested", "intent": "order", "code": {"coding": [{"system": "http://hl7.org/fhir/us/davinci-cdex/CodeSystem/cdex-temp", "code": "data-request-query", "display": "Data Request Query"}]}, "for": {"identifier": {"system": "http://example.org/cdex/payer/member-ids", "value": "<masked-member-id>"}, "display": "[MASKED_MEMBER]"}, "authoredOn": "2026-07-07T18:30:00Z", "requester": {"identifier": {"system": "http://hl7.org/fhir/us/davinci-hrex/StructureDefinition/hrex-organization", "value": "PayerName"}, "display": "PayerName"}, "owner": {"identifier": {"system": "https://cell1.query.cdexhub.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/owner-name", "value": "Oracle Health Clinical Data Exchange"}, "display": "Oracle Health Clinical Data Exchange"}, "reasonCode": {"text": "Claims processing"}, "input": [{"type": {"text": "DocumentReference search request"}, "valueString": "DocumentReference?patient=<masked-patient-id>&date=ge2024-07-15&date=le2025-08-08"}] }
An HTTP 201 message is displayed, indicating your request was successful.
Get a binary document by ID
For more information, see Get a binary document by ID.
Issue the following cURL command:
curl -v -X GET -sS https://cell1.query.cdexhub.<cloud_region>.oci.oraclecloud.com/fhir/r4/<query_endpoint_alias>/Binary/<binary_ID> -H "Authorization: Bearer <app_access_token>"
Where:
<cloud_region>is the Oracle Cloud Infrastructure region for your tenancy (for example,us-chicago-1).<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource (for example,e48ebcb3-4027-5c58-ac57-e866afc7be0c).<binary_ID>is the unique ID for the binary document, in alphanumeric format.-
<app_access_token>is the OAuth2 access token, in alphanumeric format.
An example of the HTTP 200 output is as follows:
{
"resourceType": "Binary",
"id": "urn:uuid:49b9eaa9-a53e-4229-80e7-0a9f976eef9d",
"contentType": "text/xml",
"data": "<base64Binary>"
}
Get a document reference by ID
For more information, see Get a document reference by ID.
Issue the following cURL command:
curl -v -X GET -sS https://cell1.query.cdexhub.<cloud_region>.oci.oraclecloud.com/fhir/r4/<query_endpoint_alias>/DocumentReference/<document_reference_ID> -H "Authorization: Bearer <app_access_token>"
Where:
<cloud_region>is the Oracle Cloud Infrastructure region for your tenancy (for example,us-chicago-1).<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource (for example,e48ebcb3-4027-5c58-ac57-e866afc7be0c).<document_reference_ID>is the unique ID for the document reference, in alphanumeric format.-
<app_access_token>is the OAuth2 access token, in alphanumeric format.
An example of the HTTP 200 output is as follows:
{
"fullUrl": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/e48ebcb3-4027-5c58-ac57-e866afc7be0c/DocumentReference/urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968",
"resource": {
"resourceType": "DocumentReference",
"id": "urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968",
"masterIdentifier": {
"system": "urn:ietf:rfc:3986",
"value": "1.3.6.1.4.1.21367.2010.4381289"
},
"identifier": [
{
"use": "official",
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968"
}
],
"status": "current",
"docStatus": "final",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "34133-9",
"display": "Summary of Episode Note"
}
]
},
"category": [
{
"coding": [
{
"system": "http://loinc.org",
"code": "34133-9",
"display": "Summary of Episode Note"
}
]
}
],
"subject": {
"reference": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/e48ebcb3-4027-5c58-ac57-e866afc7be0c/Patient/2586450001",
"display": "PEREZ JUAN"
},
"date": "2024-09-26",
"author": [
{
"type": "Practitioner",
"identifier": {
"use": "official",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NPI",
"display": "National provider identifier"
}
]
},
"system": "urn:ietf:rfc:3986",
"value": "Cerner HIE"
},
"display": "Cerner HIE"
}
],
"authenticator": {
"type": "Practitioner",
"identifier": {
"use": "official",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NPI",
"display": "National provider identifier"
}
]
},
"value": "Cerner HIE"
},
"display": "Cerner HIE"
},
"custodian": {
"type": "Organization",
"identifier": {
"use": "official",
"type": {
"coding": [
{
"system": "urn:ietf:rfc:3986",
"code": "urn:oid",
"display": "OID"
}
]
},
"value": ""
},
"display": "Model Clinic 2"
},
"description": "CCD for Encounter: 18103-2.16.840.1.113883.3.995.10.2.1",
"securityLabel": [
{
"coding": [
{
"system": "2.16.840.1.113883.5.25",
"code": "N",
"display": "Normal"
}
]
}
],
"content": [
{
"attachment": {
"contentType": "text/xml",
"language": "en-us",
"url": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/e48ebcb3-4027-5c58-ac57-e866afc7be0c/Binary/urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968",
"size": 108842,
"hash": "f49999cd60913a68f8b89d7f431ee1ef24853b73",
"creation": "2024-09-26"
},
"format": {
"system": "1.3.6.1.4.1.19376.1.2.3",
"code": "urn:ihe:pcc:xphr:2007",
"display": "HL7 CCD Document"
}
}
],
"context": {
"encounter": [
{
"identifier": {
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.2.1",
"value": "18103"
}
}
],
"period": {
"end": "2024-05-13"
},
"practiceSetting": {
"coding": [
{
"system": "2.16.840.1.113883.6.96",
"code": "394802001",
"display": "General Medicine"
}
]
},
"sourcePatientInfo": {
"identifier": {
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.1.1",
"value": "8133"
},
"display": "PEREZ JUAN"
}
}
}
}
Get a list of document references
For more information, see Get a list of document references.
Issue the following cURL command:
curl -v -X GET -sS https://cell1.query.cdexhub.<cloud_region>.oci.oraclecloud.com/fhir/r4/<query_endpoint_alias>/DocumentReference?<query_parameters> -H "Authorization: Bearer <app_access_token>"
Where:
<cloud_region>is the Oracle Cloud Infrastructure region for your tenancy (for example,us-chicago-1).<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource.<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource (for example,e48ebcb3-4027-5c58-ac57-e866afc7be0c).-
<app_access_token>is the OAuth2 access token, in alphanumeric format.
An example of the HTTP 200 output is as follows:
{
"fullUrl": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/e48ebcb3-4027-5c58-ac57-e866afc7be0c/DocumentReference/urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968",
"resource": {
"resourceType": "DocumentReference",
"id": "urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968",
"masterIdentifier": {
"system": "urn:ietf:rfc:3986",
"value": "1.3.6.1.4.1.21367.2010.4381289"
},
"identifier": [
{
"use": "official",
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968"
}
],
"status": "current",
"docStatus": "final",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "34133-9",
"display": "Summary of Episode Note"
}
]
},
"category": [
{
"coding": [
{
"system": "http://loinc.org",
"code": "34133-9",
"display": "Summary of Episode Note"
}
]
}
],
"subject": {
"reference": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/e48ebcb3-4027-5c58-ac57-e866afc7be0c/Patient/2586450001",
"display": "PEREZ JUAN"
},
"date": "2024-09-26",
"author": [
{
"type": "Practitioner",
"identifier": {
"use": "official",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NPI",
"display": "National provider identifier"
}
]
},
"system": "urn:ietf:rfc:3986",
"value": "Cerner HIE"
},
"display": "Cerner HIE"
}
],
"authenticator": {
"type": "Practitioner",
"identifier": {
"use": "official",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NPI",
"display": "National provider identifier"
}
]
},
"value": "Cerner HIE"
},
"display": "Cerner HIE"
},
"custodian": {
"type": "Organization",
"identifier": {
"use": "official",
"type": {
"coding": [
{
"system": "urn:ietf:rfc:3986",
"code": "urn:oid",
"display": "OID"
}
]
},
"value": ""
},
"display": "Model Clinic 2"
},
"description": "CCD for Encounter: 18103-2.16.840.1.113883.3.995.10.2.1",
"securityLabel": [
{
"coding": [
{
"system": "2.16.840.1.113883.5.25",
"code": "N",
"display": "Normal"
}
]
}
],
"content": [
{
"attachment": {
"contentType": "text/xml",
"language": "en-us",
"url": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/e48ebcb3-4027-5c58-ac57-e866afc7be0c/Binary/urn:uuid:cca32c1d-8301-4ed7-ac8e-671cb11ff968",
"size": 108842,
"hash": "f49999cd60913a68f8b89d7f431ee1ef24853b73",
"creation": "2024-09-26"
},
"format": {
"system": "1.3.6.1.4.1.19376.1.2.3",
"code": "urn:ihe:pcc:xphr:2007",
"display": "HL7 CCD Document"
}
}
],
"context": {
"encounter": [
{
"identifier": {
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.2.1",
"value": "18103"
}
}
],
"period": {
"end": "2024-05-13"
},
"practiceSetting": {
"coding": [
{
"system": "2.16.840.1.113883.6.96",
"code": "394802001",
"display": "General Medicine"
}
]
},
"sourcePatientInfo": {
"identifier": {
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.1.1",
"value": "8133"
},
"display": "PEREZ JUAN"
}
}
}
}
Get a patient list
For more information, see Get a patient list.
Issue the following cURL command:
curl -v -X GET -sS https://cell1.query.cdexhub.<cloud_region>.oci.oraclecloud.com/fhir/r4/<query_endpoint_alias>/Patient?<query_parameters> -H "Authorization: Bearer <app_access_token>"
Where:
<cloud_region>is the Oracle Cloud Infrastructure region for your tenancy (for example,us-chicago-1).<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource (for example,e48ebcb3-4027-5c58-ac57-e866afc7be0c).<query_parameters>are the query parameters for the request.-
<app_access_token>is the OAuth2 access token, in alphanumeric format.
An example of the HTTP 200 output is as follows:
[
{
"resourceType": "Patient",
"id": "2586450001",
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR",
"display": "Medical record number"
}
]
},
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.1.1",
"value": "8133"
},
{
"use": "SSN",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "SS"
}
],
"text": "SSN"
},
"system": "http://hl7.org/fhir/sid/us-ssn",
"value": "991123333"
}
],
"name": [
{
"use": "official",
"family": "PEREZ",
"given": [
"JUAN"
]
}
],
"telecom": [
{
"system": "phone",
"value": "123-123-1234",
"use": "home"
}
],
"gender": "male",
"birthdate": "1985-07-09",
"deceasedBoolean": true,
"deceasedDateTime": "2015-02-14T13:42:00Z",
"maritalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"code": "M"
}
]
},
"address": [
{
"use": "home",
"text": "1234, SAMPLE ROAD CITYTOWN, ST 56789",
"line": [
"1234, SAMPLE ROAD"
],
"city": "CITYTOWN",
"state": "ST",
"postalCode": "56789"
}
],
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "nl-NL",
"display": "Dutch"
}
]
},
"preferred": true
}
]
}
]
Get a patient record by ID
For more information, see Get a patient record by ID.
Issue the following cURL command:
curl -v -X GET -sS https://cell1.query.cdexhub.<cloud_region>.oci.oraclecloud.com/fhir/r4/<query_endpoint_alias>/Patient/<patient_ID> -H "Authorization: Bearer <app_access_token>"
Where:
<cloud_region>is the Oracle Cloud Infrastructure region for your tenancy (for example,us-chicago-1).<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource.<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource (for example,e48ebcb3-4027-5c58-ac57-e866afc7be0c).-
<app_access_token>is the OAuth2 access token, in alphanumeric format.
An example of the HTTP 200 output is as follows:
{
"resourceType": "Patient",
"id": "2586450001",
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR",
"display": "Medical record number"
}
]
},
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.1.1",
"value": "8133"
},
{
"use": "SSN",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "SS"
}
],
"text": "SSN"
},
"system": "http://hl7.org/fhir/sid/us-ssn",
"value": "991123333"
}
],
"name": [
{
"use": "official",
"family": "PEREZ",
"given": [
"JUAN"
]
}
],
"telecom": [
{
"system": "phone",
"value": "123-123-1234",
"use": "home"
}
],
"gender": "male",
"birthdate": "1985-07-09",
"deceasedBoolean": true,
"deceasedDateTime": "2015-02-14T13:42:00Z",
"maritalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"code": "M"
}
]
},
"address": [
{
"use": "home",
"text": "1234, SAMPLE ROAD CITYTOWN, ST 56789",
"line": [
"1234, SAMPLE ROAD"
],
"city": "CITYTOWN",
"state": "ST",
"postalCode": "56789"
}
],
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "nl-NL",
"display": "Dutch"
}
]
},
"preferred": true
}
]
}
Get a Task resource by ID
For more information, see Get a Task resource by ID.
Use this operation to check processing status and read the completed output.
Issue the following cURL command:
curl -v -X GET -sS https://cell1.query.cdexhub.<cloud_region>.oci.oraclecloud.com/fhir/r4/<query_endpoint_alias>/Task/<task_ID> -H "Authorization: Bearer <app_access_token>" Where:
<cloud_region>is the Oracle Cloud Infrastructure region for your tenancy (for example,us-chicago-1).<query_endpoint_alias>is the string in the URL that the system generates to make requests against a specific query endpoint resource (for example,e48ebcb3-4027-5c58-ac57-e866afc7be0c).<task_ID>is the unique ID for the Task resource, in alphanumeric format.-
<app_access_token>is the OAuth2 access token, in alphanumeric format.
An example of the HTTP 200 output is as follows:
{
"resourceType": "Task",
"id": "task-123",
"status": "completed",
"intent": "order",
"lastModified": "2026-07-07T18:35:00Z",
"businessStatus": {"text": "Completed"},
"output": [
{"type": {"text": "DocumentReference search result"}, "valueReference": {"reference": "#docref-1"}},
{"type": {"text": "OperationOutcome"}, "valueReference": {"reference": "#outcome-1"}}
],
"contained": [
{"resourceType": "DocumentReference", "id": "docref-1", "status": "current"},
{"resourceType": "OperationOutcome", "id": "outcome-1", "issue": []}
]
}
Browse the APIs
The main left-side navigation of the API documentation is organized around tasks. If you prefer to browse the API endpoints in a different order:
- Select All REST Endpoints under Introduction.
- Choose one of the Sort by options at the top of the page.