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", "id": "1066", "status": "completed", "intent": "unknown", "focus": { "reference": "Claim/62909716" }, "output": [ { "type": { "coding": [ { "code": "patient", "display": "patient" } ], "text": "Patient" }, "valueReference": { "reference": "Patient/12621991", "identifier": { "system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.1.1", "value": "6696" } } }, { "type": { "coding": [ { "code": "encounter", "display": "encounter" } ], "text": "Encounter" }, "valueReference": { "reference": "https://fhir-ehr.sandboxcerner.com/r4/dacc6494-e336-45ad-8729-b789ff8663c6/Encounter/97841466", "type": "Encounter", "identifier": { "system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.2.1", "value": "15269" } } }, { "type": { "coding": [ { "code": "binary", "display": "binary" } ], "text": "Binary" }, "valueAttachment": { "contentType": "application/xml", "language": "en-us", "data": "<base64Binary>", "url": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/{{queryEndpointAlias}}/Binary/urn:uuid:9a30e4f6-681f-325f-a5e0-456f980da169", "size": 34162, "hash": "d37ec08d5b2c41667b07a94784f45b94c7a2b557", "creation": "2025-06-27T20:05:14Z" } } ] }
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.
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": "1066",
"status": "completed",
"intent": "unknown",
"focus": {
"reference": "Claim/62909716"
},
"output": [
{
"type": {
"coding": [
{
"code": "patient",
"display": "patient"
}
],
"text": "Patient"
},
"valueReference": {
"reference": "Patient/12621991",
"identifier": {
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.1.1",
"value": "6696"
}
}
},
{
"type": {
"coding": [
{
"code": "encounter",
"display": "encounter"
}
],
"text": "Encounter"
},
"valueReference": {
"reference": "https://fhir-ehr.sandboxcerner.com/r4/dacc6494-e336-45ad-8729-b789ff8663c6/Encounter/97841466",
"type": "Encounter",
"identifier": {
"system": "891c71549f4a4bb439b4de8a532f155c_2.16.840.1.113883.3.995.10.2.1",
"value": "15269"
}
}
},
{
"type": {
"coding": [
{
"code": "binary",
"display": "binary"
}
],
"text": "Binary"
},
"valueAttachment": {
"contentType": "application/xml",
"language": "en-us",
"data": "<base64Binary>",
"url": "https://cell1.query.stage.cdexhub.us-ashburn-1.oci.oraclecloud.com/fhir/r4/{{queryEndpointAlias}}/Binary/urn:uuid:9a30e4f6-681f-325f-a5e0-456f980da169",
"size": 34162,
"hash": "d37ec08d5b2c41667b07a94784f45b94c7a2b557",
"creation": "2025-06-27T20:05:14Z"
}
}
]
} 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.