v1

latestOpenAPI 3.0.32026-07-247462851.8 MB
Patient History Retrieval

Get patient history job list

This endpoint retrieves patient history jobs info filtered by provided parameters and ordered descending by created date.

get/patient-history/jobs

Query parameters

filter[patient-id]string uuid

The FHIR ID of a Patient resource

Example:ae6c5bfc-c082-47f0-a605-792d7c5958ad

ID of the patient (if omitted, returns all patients)

filter[builder-id]string uuid
Example:b74c5bfc-c082-47f0-a605-792d7c5958ad

Builder ID (if omitted, defaults to the builder ID of the calling user)

filter[status]'in_progress' | 'done' | 'error' | 'scheduled' | 'queued'

Status of the top-level job.

Example:done

Job status (if omitted, returns all statuses)

filter[targetDate][since]string date-time

Possible formats: "2023-01-20", "2023-01-20T12:18:46.970516-08:00", "2023-01-20T12:18:46.970516Z".

Example:2023-01-20T12:18:46Z

Filters jobs based on when the job was created. The result will not include any jobs prior to specified date / datetime (this filter is not applied if this field is omitted). Both YYYY-MM-DD and RFC3339 formats are accepted.

filter[targetDate][until]string date-time

Possible formats: "2023-01-20", "2023-01-20T12:18:46.970516-08:00", "2023-01-20T12:18:46.970516Z".

Example:2023-01-20T12:18:46Z

Filters jobs based on when the job was created. The result will not include any jobs after the specified date / datetime (this filter is not applied if this field is omitted). Both YYYY-MM-DD and RFC3339 formats are accepted.

Response

Patient history jobs are returned.

Example response

{
  "data": [
    {
      "type": "patient-history/jobs",
      "id": "ae6c5bfc-c082-47f0-a605-792d7c5958ad",
      "attributes": {
        "targetDate": "2023-01-20T12:18:46Z",
        "createdAt": "1683886930",
        "jobStatus": "done",
        "lastUpdatedAt": "1683886930",
        "providers": [
          {
            "service": "commonwell",
            "status": "done"
          }
        ],
        "provider": {
          "npi": "1234567893",
          "role": "158965000",
          "name": "Dr Smith"
        },
        "practitioner": {
          "npi": "1234567893",
          "role": "158965000",
          "name": "Dr Smith"
        }
      },
      "relationships": {
        "patient": {
          "data": {
            "type": "fhir/Patient",
            "id": "ae6c5bfc-c082-47f0-a605-792d7c5958ad"
          }
        }
      }
    }
  ],
  "links": {
    "self": "https://api.sandbox.zusapi.com/patient-history/jobs?page[count]=50&page[offset]=50\"",
    "next": "https://api.sandbox.zusapi.com/patient-history/jobs?page[count]=50&page[offset]=100\"",
    "prev": "https://api.sandbox.zusapi.com/patient-history/jobs?page[count]=50&page[offset]=0\""
  }
}