Submit an asynchronous Task

post

/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

Supported Media Types
Header Parameters
Body ()
The Task request.
Root Schema : TaskCreateRequest
Type: object
The Task request used to submit an asynchronous operation.
Show Source
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>"
    }
  ],
  "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"
    }
  ]
}
Nested Schema : basedOn
Type: array
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.
Show Source
Nested Schema : CodeableConcept
Match All
Show Source
Nested Schema : Reference
Match All
Show Source
Nested Schema : identifier
Type: array
The business identifiers assigned by the requester for this Task.
Show Source
Nested Schema : input
Type: array
The Task input for the requested operation. The valueString contains the FHIR search criteria and identifies the resource being queried. Currently, only DocumentReference search strings are supported.
Show Source
  • 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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
Nested Schema : Meta
Type: object
The metadata about a FHIR resource.
Show Source
Nested Schema : TaskReasonCode
The reason the requested information is needed. When reasonCode is present, Clinical Data Exchange requires text.
Match All
The reason the requested information is needed. When reasonCode is present, Clinical Data Exchange requires text.
The reason the requested information is needed. When reasonCode is present, Clinical Data Exchange requires text.
Show Source
Nested Schema : Element
Type: object
Show Source
Nested Schema : CodeableConcept-allOf[1]
Type: object
Show Source
Nested Schema : extension
Type: array
Show Source
Nested Schema : Extension
Type: object
Show Source
  • Minimum Length: 1
    Identifies the meaning of the extension.
  • Minimum Length: 1
    The value of the extension.
Nested Schema : coding
Type: array
A reference to a code defined by a terminology system.
Show Source
Nested Schema : Coding
Match All
Show Source
Nested Schema : Coding-allOf[1]
Type: object
Show Source
Nested Schema : Reference-allOf[1]
Type: object
Show Source
Nested Schema : Identifier
Match All
Show Source
Nested Schema : Identifier-allOf[1]
Type: object
Show Source
Nested Schema : Period
Match All
Show Source
Nested Schema : Period-allOf[1]
Type: object
Show Source
Nested Schema : 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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
Match All
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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
Show Source
Nested Schema : BackBoneElement
Match All
Show Source
Nested Schema : BackBoneElement-allOf[1]
Type: object
Show Source
Nested Schema : TaskInput-allOf[1]
Type: object
Show Source
Nested Schema : profile
Type: array
The profiles this resource claims to conform to.
Show Source
Nested Schema : TaskReasonCode-allOf[1]
Type: object
Show Source
Back to Top

Response

Supported Media Types

202 Response

Task accepted.
Headers
Body ()
Root Schema : TaskAccepted
Type: object
The Task response returned after an asynchronous operation is accepted.
Show Source
Example:
{
  "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"
    }
  ]
}
Nested Schema : basedOn
Type: array
The authorization, order, or request that this Task is fulfilling.
Show Source
Nested Schema : TaskBusinessStatus
The business progress for the current Task status.
Match All
The business progress for the current Task status.
The business progress for the current Task status.
Show Source
Nested Schema : CodeableConcept
Match All
Show Source
Nested Schema : Reference
Match All
Show Source
Nested Schema : identifier
Type: array
The business identifiers assigned by the requester for this Task.
Show Source
Nested Schema : input
Type: array
The Task input submitted with the request.
Show Source
  • 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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
Nested Schema : Meta
Type: object
The metadata about a FHIR resource.
Show Source
Nested Schema : TaskReasonCode
The reason the requested information is needed. When reasonCode is present, Clinical Data Exchange requires text.
Match All
The reason the requested information is needed. When reasonCode is present, Clinical Data Exchange requires text.
The reason the requested information is needed. When reasonCode is present, Clinical Data Exchange requires text.
Show Source
Nested Schema : Element
Type: object
Show Source
Nested Schema : CodeableConcept-allOf[1]
Type: object
Show Source
Nested Schema : TaskBusinessStatus-allOf[1]
Type: object
Show Source
Nested Schema : extension
Type: array
Show Source
Nested Schema : Extension
Type: object
Show Source
  • Minimum Length: 1
    Identifies the meaning of the extension.
  • Minimum Length: 1
    The value of the extension.
Nested Schema : coding
Type: array
A reference to a code defined by a terminology system.
Show Source
Nested Schema : Coding
Match All
Show Source
Nested Schema : Coding-allOf[1]
Type: object
Show Source
Nested Schema : Reference-allOf[1]
Type: object
Show Source
Nested Schema : Identifier
Match All
Show Source
Nested Schema : Identifier-allOf[1]
Type: object
Show Source
Nested Schema : Period
Match All
Show Source
Nested Schema : Period-allOf[1]
Type: object
Show Source
Nested Schema : 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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
Match All
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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
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-query code. The resource being queried is identified by the FHIR search string in valueString, for example, DocumentReference?patient=...
Show Source
Nested Schema : BackBoneElement
Match All
Show Source
Nested Schema : BackBoneElement-allOf[1]
Type: object
Show Source
Nested Schema : TaskInput-allOf[1]
Type: object
Show Source
Nested Schema : profile
Type: array
The profiles this resource claims to conform to.
Show Source
Nested Schema : TaskReasonCode-allOf[1]
Type: object
Show Source

400 Response

Bad Request.

401 Response

Authorization information is missing or invalid.

403 Response

The user does not have sufficient access to perform this action.

422 Response

Unsupported Task type.

500 Response

Internal Server error.
Back to Top