---
title: "Get patient history job list"
method: GET
path: "/patient-history/jobs"
tags: ["Patient History Retrieval"]
---

# Get patient history job list

`GET /patient-history/jobs`

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

## Query parameters

- `filter[patient-id]` string, uuid — The FHIR ID of a Patient resource
- `filter[builder-id]` string, uuid
- `filter[status]` 'in_progress' | 'done' | 'error' | 'scheduled' | 'queued' — Status of the top-level job.
- `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".
- `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".

## Response `200`

Patient history jobs are returned.

- GetJobsResponse
  - `data` object[], required
    - `type` string, required — Type name of the request.
    - `id` string, uuid, required — The ID of a patient history job.
    - `attributes` object, required
      - `targetDate` string, date-time — Possible formats: "2023-01-20", "2023-01-20T12:18:46.970516-08:00", "2023-01-20T12:18:46.970516Z".
      - `createdAt` string, required — The epoch string indicating creation/update time.
      - `jobStatus` 'in_progress' | 'done' | 'error' | 'scheduled' | 'queued' — Status of the top-level job.
      - `lastUpdatedAt` string, required — The epoch string indicating creation/update time.
      - `providers` object[], required — Array of providers name and job statuses.
        - `service` 'commonwell' | 'surescripts' | 'carequality', required — Name of provider
        - `status` 'initialize' | 'in_progress' | 'done' | 'error' | 'unset' | 'queued' | 'skipped', required — Status of the single provider job.
      - `provider` JsonApiProvider — Required if the practitioner relation is not passed. Will appear on the response if passed in request body.
        - `npi` string, required — The NPI number of the user/organization making the request.
        - `role` string, required — The SNOMED CT value representing the role that the user/organization is playing when making the request.
        - `name` string, required — The user/organization who has a treatment relationship with the patient
      - `practitioner` JsonApiPractitioner, required — Required if the practitioner relation is not passed. Will appear on the response if passed in request body. Note: this field is deprecated, please use `provider` field.
        - `npi` string, required — The NPI number of the user/organization making the request. Note: this field is deprecated, pleasue use `provider` field.
        - `role` string, required — The SNOMED CT value representing the role that the user/organization is playing when making the request. Note: this field is deprecated, pleasue use `provider` field.
        - `name` string, required — The user/organization who has a treatment relationship with the patient. Note: this field is deprecated, pleasue use `provider` field.
    - `relationships` JsonApiBaseRelationship, required
      - `patient` PatientRelation, required
        - `data` object, required
          - `type` string, required
          - `id` string, uuid, required — The FHIR ID of a Patient resource
  - `links` Links, required — The object containing URL's that will return the current/next/previous page of results.
    - `self` string, required
    - `next` string
    - `prev` string

## Other responses

- `400` — Patient history jobs are not returned because of invalid filter parameters.
- `401` — Patient history jobs are not returned because the request is not authorized.
- `403` — Patient history jobs are not returned because caller is not permitted to retrieve this information.
- `500` — Patient history jobs are not returned because an unknown error occurred.

---

[API](https://skmtc.net/zushealth/apis/auth-service-api.md) · [All operations](https://skmtc.net/zushealth/apis/auth-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zushealth/auth-service-api/revisions/ee03e3c0910d/schema)
