Get an asynchronous Task by ID
/fhir/r4/{query_endpoint_alias}/Task/{id}
This path retrieves a Task by ID so the client can check processing status and read completed output.
Task statuses are requested, accepted, in-progress, on-hold, completed, failed, and rejected. When processing is paused or requires additional internal work, the Task may include businessStatus. When processing is complete, the Task includes output references to contained resources. When the Task status is failed or rejected, the Task includes statusReason.
For completed DocumentReference search Tasks, output may include DocumentReference and OperationOutcome resources.
When a Task is still processing, use the Retry-After response header, when present, as the minimum wait before polling again. Completed Task output is available during the service retention period. The Expires response header indicates the availability expiry when provided. After retention expires, this path may return a 404 (Not Found) status code.
Request
-
id(required): string
The logical Task resource ID.
-
authorization(required): string
This string contains the credentials to authenticate a consumer to the service. This value should be the OAuth 2.0 bearer token.
Response
- application/fhir+json
200 Response
-
Expires: string
Date and time after which the Task resource or completed Task output may no longer be available (when known).
-
Retry-After: integer
Minimum number of seconds the client should wait before polling again. This header is returned when the Task is still processing.
-
X-Request-Id: string
Oracle troubleshooting identifier.
-
opc-request-id: string
Oracle troubleshooting identifier.
object-
authoredOn(required):
string(date-time)
The date and time the Task was created.
-
basedOn:
array basedOn
The authorization, order, or request that this Task is fulfilling.
-
businessStatus:
TaskBusinessStatus
The business progress for the current Task status.
-
code(required):
CodeableConcept
-
contained:
array contained
The resources included only when Task processing is completed. For the currently supported DocumentReference search, this may include DocumentReference and OperationOutcome resources.
-
executionPeriod:
Period
-
for(required):
Reference
-
id:
string
The logical ID of this Task.
-
identifier:
array identifier
The business identifiers assigned to this Task.
-
input(required):
array input
The Task input for the requested operation. The
valueStringcontains the FHIR search criteria and identifies the resource being queried. Currently, only DocumentReference search strings are supported. -
intent(required):
string
Allowed Values:
[ "order" ]The Task intent. The supported value isorder. -
lastModified:
string(date-time)
The date and time the Task was last updated.
-
meta:
object Meta
The metadata about a FHIR resource.
-
output:
array output
The references to contained resources. This is included only when Task processing is completed.
-
owner(required):
Reference
-
reasonCode:
TaskReasonCode
The reason the requested information is needed. When
reasonCodeis present, Clinical Data Exchange requires text. -
reasonReference:
Reference
-
requester(required):
Reference
-
resourceType(required):
string
The resource type is Task.
-
status(required):
string
Allowed Values:
[ "requested", "accepted", "in-progress", "on-hold", "completed", "failed", "rejected" ]requestedacceptedin-progresson-holdcompletedfailedrejected
requested. Accepted Tasks include the Task ID and basic details. On-hold Tasks may includebusinessStatus. Completed Tasks include output when available. Failed and rejected Tasks includestatusReason. -
statusReason:
TaskStatusReason
The reason the Task was not completed. Required when
Task.statusisfailedorrejected.
{
"resourceType": "Task",
"meta": {
"profile": [
"http://hl7.org/fhir/us/davinci-cdex/StructureDefinition/cdex-task-data-request"
]
},
"id": "task-123",
"identifier": [
{
"system": "http://example.org/cdex/payer/task-ids",
"value": "<masked-client-task-id>"
}
],
"basedOn": [
{
"type": "ServiceRequest",
"identifier": {
"system": "http://example.org/cdex/payer/authorization-ids",
"value": "<masked-authorization-id>"
},
"display": "[MASKED_AUTHORIZATION]"
}
],
"status": "completed",
"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": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MB",
"display": "Member Number"
}
],
"text": "Member Number"
},
"system": "http://example.org/cdex/payer/member-ids",
"value": "<masked-member-id>"
},
"display": "[MASKED_MEMBER]"
},
"authoredOn": "2026-07-07T18:30:00Z",
"lastModified": "2026-07-07T18:35:00Z",
"businessStatus": {
"text": "Completed"
},
"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"
},
"reasonReference": {
"type": "Claim",
"identifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "FILL",
"display": "Filler Identifier"
}
],
"text": "Payer claim identifier"
},
"system": "http://example.org/cdex/payer/claim-ids",
"value": "<masked-claim-id>"
},
"display": "[MASKED_CLAIM]"
},
"input": [
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp",
"code": "data-query",
"display": "data query input"
}
],
"text": "DocumentReference search request"
},
"valueString": "DocumentReference?patient=<masked-patient-id>&date=ge2024-07-15&date=le2025-08-08"
}
],
"contained": [
{
"resourceType": "DocumentReference",
"id": "docref-1",
"meta": {
"versionId": "1",
"lastUpdated": "2026-01-01T09:00:00.000Z"
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Document Reference</b></p><p><b>Patient Name</b>: [MASKED]</p><p><b>Document Type</b>: [MASKED_DOCUMENT_TYPE]</p><p><b>Document Category</b>: [MASKED]</p><p><b>Document Title</b>: [MASKED_DOCUMENT_TITLE]</p><p><b>Service Start Date</b>: [MASKED_DATE]</p><p><b>Service End Date</b>: [MASKED_DATE]</p><p><b>Document Status</b>: Final</p><p><b>Verifying Provider</b>: [MASKED]</p></div>"
},
"masterIdentifier": {
"system": "urn:ietf:rfc:3986",
"value": "2.25.<masked-document-identifier>"
},
"identifier": [
{
"use": "official",
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:00000000-0000-4000-8000-000000000001"
},
{
"system": "https://fhir.cerner.com/ceuuid",
"value": "<masked-document-identifier>"
}
],
"status": "current",
"docStatus": "final",
"type": {
"coding": [
{
"system": "https://fhir.cerner.com/{tenant-id}/codeSet/72",
"code": "<masked-document-type-code>",
"display": "[MASKED_DOCUMENT_TYPE]",
"userSelected": true
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor",
"code": "UNK",
"display": "unknown"
}
],
"text": "[MASKED_DOCUMENT_TYPE]"
},
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Unknown"
}
],
"text": "Unknown"
}
],
"subject": {
"reference": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/fhir/r4/{query_endpoint_alias}/Patient/<masked-patient-id>",
"display": "[MASKED_PATIENT_NAME]"
},
"date": "2026-01-01T14:00:00.000Z",
"author": [
{
"type": "Practitioner",
"identifier": {
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NPI",
"display": "National provider identifier"
}
],
"text": "National Provider Identifier"
},
"system": "http://hl7.org/fhir/sid/us-npi",
"value": "<masked-provider-npi>",
"period": {
"start": "2020-01-01T00:00:00Z"
}
},
"display": "[MASKED_PROVIDER_NAME]"
}
],
"authenticator": {
"type": "Practitioner",
"identifier": {
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "NPI",
"display": "National provider identifier"
}
],
"text": "National Provider Identifier"
},
"system": "http://hl7.org/fhir/sid/us-npi",
"value": "<masked-provider-npi>",
"period": {
"start": "2020-01-01T00:00:00Z"
}
},
"display": "[MASKED_PROVIDER_NAME]"
},
"custodian": {
"type": "Organization",
"identifier": {
"extension": [
{
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/facility-npi",
"valueString": "<masked-facility-npi>"
},
{
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/facility-tin",
"valueString": "<masked-facility-tin>"
}
],
"use": "official",
"type": {
"coding": [
{
"system": "https://fhir.cerner.com/{tenant-id}/codeSet/334",
"code": "OID",
"display": "OID",
"userSelected": true
},
{
"system": "urn:ietf:rfc:3986",
"code": "urn:oid",
"display": "OID"
}
],
"text": "OID"
},
"system": "urn:ietf:rfc:3986",
"value": "urn:oid:<masked-organization-oid>"
},
"display": "[MASKED_ORGANIZATION_NAME]"
},
"description": "[MASKED_DOCUMENT_TITLE]",
"securityLabel": [
{
"coding": [
{
"system": "2.16.840.1.113883.5.25",
"code": "N",
"display": "Normal"
}
]
}
],
"content": [
{
"attachment": {
"contentType": "application/xml",
"language": "en",
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/fhir/r4/{query_endpoint_alias}/Binary/urn:uuid:00000000-0000-4000-8000-000000000001",
"creation": "2026-01-01T14:00:00Z"
},
"format": {
"system": "http://ihe.net/fhir/ValueSet/IHE.FormatCode.codesystem",
"code": "urn:hl7-org:sdwg:ccda-nonXMLBody:2.1",
"display": "Non Structured C-CDA 2.1"
}
}
],
"context": {
"encounter": [
{
"extension": [
{
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/encounter-last-updated-datetime",
"valueDateTime": "2026-01-01T21:00:00Z"
},
{
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/encounter-start-datetime",
"valueDateTime": "2026-01-01T13:00:00Z"
},
{
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/encounter-end-datetime",
"valueDateTime": "2026-01-01T15:00:00Z"
},
{
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/encounter-class",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "<masked-encounter-class-code>",
"display": "[MASKED_ENCOUNTER_CLASS]"
}
]
}
},
{
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/r4/StructureDefinition/custom-attribute/encounter-type",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0004",
"code": "<masked-encounter-type-code>",
"display": "[MASKED_ENCOUNTER_TYPE]"
}
]
}
}
],
"identifier": {
"system": "<masked-encounter-system>",
"value": "<masked-encounter-id>"
}
}
],
"period": {
"start": "2026-01-01T14:00:00Z",
"end": "2026-01-01T14:00:00Z"
},
"sourcePatientInfo": {
"identifier": {
"system": "<masked-source-patient-system>",
"value": "<masked-source-patient-id>"
},
"display": "[MASKED_SOURCE_PATIENT_INFO]"
}
}
},
{
"resourceType": "DocumentReference",
"id": "docref-2",
"meta": {
"versionId": "1",
"lastUpdated": "2026-01-01T10:00:00.000Z"
},
"status": "current",
"docStatus": "final",
"type": {
"coding": [
{
"system": "https://fhir.cerner.com/{tenant-id}/codeSet/72",
"code": "<masked-document-type-code>",
"display": "[MASKED_DOCUMENT_TYPE]",
"userSelected": true
}
],
"text": "[MASKED_DOCUMENT_TYPE]"
},
"subject": {
"reference": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/fhir/r4/{query_endpoint_alias}/Patient/<masked-patient-id>",
"display": "[MASKED_PATIENT_NAME]"
},
"date": "2026-01-01T15:00:00.000Z",
"description": "[MASKED_DOCUMENT_TITLE]",
"content": [
{
"attachment": {
"contentType": "application/xml",
"language": "en",
"url": "https://cell1.query.cdexhub.us-chicago-1.oci.oraclecloud.com/fhir/r4/{query_endpoint_alias}/Binary/urn:uuid:00000000-0000-4000-8000-000000000002",
"creation": "2026-01-01T15:00:00Z"
},
"format": {
"system": "http://ihe.net/fhir/ValueSet/IHE.FormatCode.codesystem",
"code": "urn:hl7-org:sdwg:ccda-nonXMLBody:2.1",
"display": "Non Structured C-CDA 2.1"
}
}
],
"context": {
"period": {
"start": "2026-01-01T15:00:00Z",
"end": "2026-01-01T15:00:00Z"
}
}
},
{
"resourceType": "OperationOutcome",
"id": "outcome-1",
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"text": "No Payer were resolved for given patient <masked-patient-identifier>"
}
},
{
"severity": "information",
"code": "informational",
"details": {
"text": "No encounters were qualified for given date range and patient <masked-patient-identifier>"
}
}
]
}
],
"output": [
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp",
"code": "data-value",
"display": "data values output"
}
],
"text": "DocumentReference result"
},
"valueReference": {
"reference": "#docref-1"
}
},
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp",
"code": "data-value",
"display": "data values output"
}
],
"text": "DocumentReference result"
},
"valueReference": {
"reference": "#docref-2"
}
},
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/davinci-hrex/CodeSystem/hrex-temp",
"code": "data-value",
"display": "data values output"
}
],
"text": "OperationOutcome result"
},
"valueReference": {
"reference": "#outcome-1"
}
}
]
}
arrayarray-
Array of:
object TaskContainedResource
A resource contained in a completed Task output. For the currently supported DocumentReference search, contained resources are DocumentReference or OperationOutcome resources.
arrayvalueString contains the FHIR search criteria and identifies the resource being queried. Currently, only DocumentReference search strings are supported.-
Array of:
TaskInput
The input parameter for a Task. This endpoint supports the CDEX Task Data Request query pattern. The required query input uses the Da Vinci Health Record Exchange (HRex)
data-querycode. The resource being queried is identified by the FHIR search string invalueString, for example,DocumentReference?patient=...
object-
lastUpdated:
string(date-time)
When the resource version last changed.
-
profile:
array profile
The profiles this resource claims to conform to.
-
versionId:
string
The version-specific identifier.
array-
Array of:
TaskOutput
The output parameter for a completed Task. Completed search output uses the HRex
data-valuecode.
reasonCode is present, Clinical Data Exchange requires text.reasonCode is present, Clinical Data Exchange requires text.reasonCode is present, Clinical Data Exchange requires text.Task.status is failed or rejected.Task.status is failed or rejected.Task.status is failed or rejected.object-
extension:
array extension
-
id:
string
The unique ID for inter-element referencing.
object-
coding:
array coding
A reference to a code defined by a terminology system.
-
text:
string
The plain text representation of the concept.
object-
text(required):
string
The human-readable business progress, for example,
waiting on internal review.
object-
url:
string
Minimum Length:
1Identifies the meaning of the extension. -
value:
string
Minimum Length:
1The value of the extension.
arrayobject-
code:
string
Minimum Length:
1The symbol in syntax defined by the system. -
display:
string
Minimum Length:
1The representation defined by the system. -
system:
string
Minimum Length:
1The identity of the terminology system. -
userSelected:
boolean
If this coding was chosen directly by the user.
-
version:
string
Minimum Length:
1The version of the system, if relevant.
object-
id:
string
The local contained resource ID referenced by
Task.output.valueReference. -
resourceType:
string
Allowed Values:
[ "DocumentReference", "OperationOutcome" ]The contained resource type.
object-
end:
string(date-time)
The end time with an inclusive boundary.
-
start:
string(date-time)
The starting time with an inclusive boundary.
object-
display:
string
The text alternative for the resource.
-
identifier:
Identifier
-
reference:
string
The literal reference, relative, internal or absolute URL.
-
type:
string
The type the reference refers to (for example, Patient).
object-
period:
Period
-
system:
string
The namespace for the identifier value (URI).
-
type:
CodeableConcept
-
use:
string
usualofficialtempsecondaryold(if known)
-
value:
string
The value that is unique.
data-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...data-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...data-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...object-
type(required):
CodeableConcept
-
valueString(required):
string
The DocumentReference search request to run asynchronously, for example,
DocumentReference?patient=2971696001&date=ge2024-07-15&date=le2025-08-08.
data-value code.data-value code.data-value code.object-
text(required):
string
The human-readable reason the information is being requested.
object-
text(required):
string
The human-readable reason the Task failed or was rejected.