Submit an asynchronous Task
/fhir/r4/{query_endpoint_alias}/Task
This path submits an asynchronous FHIR Task using the CDEX Task Data Request query pattern. The Task operation is identified by code.coding.code set to data-request-query, and the resource being queried is identified by the FHIR search string in Task.input.valueString.
Currently, only DocumentReference search is supported. For this search, the request body is a FHIR Task with status set to requested, intent set to order, code.coding.system set to http://hl7.org/fhir/us/davinci-cdex/CodeSystem/cdex-temp, code.coding.code set to data-request-query, and an input valueString that starts with DocumentReference? and contains the DocumentReference search criteria.
After the Task is accepted, use the Location response header, or the returned Task id, to poll GET /Task/{id}. Use the Retry-After response header, when present, as the minimum wait before polling.
Completed Task output is available during the service retention period. The Expires response header indicates the availability expiry when provided. After retention expires, GET /Task/{id} may return a 404 (Not Found) status code.
Request
- application/fhir+json
-
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.
object-
authoredOn(required):
string(date-time)
The date and time the requester authored the Task.
-
basedOn:
array basedOn
The authorization, order, or request that this Task is fulfilling. This optional Clinical Data Exchange must-support field may reference a ServiceRequest, CommunicationRequest, or similar authorization for the data request.
-
code(required):
CodeableConcept
-
for(required):
Reference
-
identifier:
array identifier
The business identifiers assigned by the requester for 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. -
meta:
object Meta
The metadata about a FHIR resource.
-
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" ]The submitted Task status. For the currently supported DocumentReference search, submit the Task withrequested.
{
"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>"
}
],
"basedOn": [
{
"type": "ServiceRequest",
"identifier": {
"system": "http://example.org/cdex/payer/authorization-ids",
"value": "<masked-authorization-id>"
},
"display": "[MASKED_AUTHORIZATION]"
}
],
"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": {
"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",
"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"
}
]
}
arrayarrayarrayvalueString 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.
reasonCode is present, Clinical Data Exchange requires text.reasonCode is present, Clinical Data Exchange requires text.reasonCode is present, Clinical Data Exchange requires text.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-
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-
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.
object-
end:
string(date-time)
The end time with an inclusive boundary.
-
start:
string(date-time)
The starting time with an inclusive boundary.
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.
object-
text(required):
string
The human-readable reason the information is being requested.
Response
- application/fhir+json
202 Response
-
Expires: string
Date and time after which the Task resource or completed Task output may no longer be available (when known).
-
Location: string
URI of the accepted Task resource to poll with
GET. -
Retry-After: integer
Minimum number of seconds the client should wait before polling the Task status.
-
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
-
for(required):
Reference
-
id(required):
string
The logical ID of this Task.
-
identifier:
array identifier
The business identifiers assigned by the requester for this Task.
-
input(required):
array input
The Task input submitted with the request.
-
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.
-
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:
[ "accepted" ]The accepted Task status.
{
"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": "accepted",
"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:30:00Z",
"businessStatus": {
"text": "Accepted for processing"
},
"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"
}
]
}
arrayarrayarray-
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.
reasonCode is present, Clinical Data Exchange requires text.reasonCode is present, Clinical Data Exchange requires text.reasonCode is present, Clinical Data Exchange requires text.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-
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.
object-
end:
string(date-time)
The end time with an inclusive boundary.
-
start:
string(date-time)
The starting time with an inclusive boundary.
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.
object-
text(required):
string
The human-readable reason the information is being requested.