Get an asynchronous Task by ID

get

/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

Path Parameters
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

Success.
Headers
Body ()
Root Schema : Task
Type: object
The Task FHIR resource used to submit and retrieve asynchronous operation status and output.
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": "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"
      }
    }
  ]
}
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 : contained
Type: array
The resources included only when Task processing is completed. For the currently supported DocumentReference search, this may include DocumentReference and OperationOutcome resources.
Show Source
  • TaskContainedResource
    A resource contained in a completed Task output. For the currently supported DocumentReference search, contained resources are DocumentReference or OperationOutcome resources.
Nested Schema : Period
Match All
Show Source
Nested Schema : Reference
Match All
Show Source
Nested Schema : identifier
Type: array
The business identifiers assigned to 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 : output
Type: array
The references to contained resources. This is included only when Task processing is completed.
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 : TaskStatusReason
The reason the Task was not completed. Required when Task.status is failed or rejected.
Match All
The reason the Task was not completed. Required when Task.status is failed or rejected.
The reason the Task was not completed. Required when Task.status is failed or rejected.
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 : TaskContainedResource
Type: object
A resource contained in a completed Task output. For the currently supported DocumentReference search, contained resources are DocumentReference or OperationOutcome resources.
Show Source
  • The local contained resource ID referenced by Task.output.valueReference.
  • Allowed Values: [ "DocumentReference", "OperationOutcome" ]
    The contained resource type.
Nested Schema : Period-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 : 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 : TaskOutput
The output parameter for a completed Task. Completed search output uses the HRex data-value code.
Match All
The output parameter for a completed Task. Completed search output uses the HRex data-value code.
The output parameter for a completed Task. Completed search output uses the HRex data-value code.
Show Source
Nested Schema : TaskOutput-allOf[1]
Type: object
Show Source
Nested Schema : TaskReasonCode-allOf[1]
Type: object
Show Source
Nested Schema : TaskStatusReason-allOf[1]
Type: object
Show Source

401 Response

Authorization information is missing or invalid.

403 Response

The caller cannot access this Task.

404 Response

The requested Task was not found. This can occur when the Task ID is invalid or the Task is requested after the retention period expires.

500 Response

Internal Server error.
Back to Top