Skip to main content

Querying jobs

Use job to fetch a single job and jobConnection to list and search jobs.

A single job​

query GetJob($id: String!) {
job(id: $id) {
id
status
startTime
endTime
jobTypes { name description requirements }
address { street1 street2 city state zipCode }
patient { uid name { first last } phone email preferredLanguage }
assignee { id externalUID name { first last } }
availability { startTime endTime }
attachments { id mimeType uploadStatus url }
schedulingModifiers { minDate maxDate }
}
}

Some fields are only available on job, not on the ConnectionJob type that jobConnection returns:

  • attachments
  • schedulingModifiers
  • patient, which is deprecated on ConnectionJob

Listing jobs​

jobConnection returns your vendor's jobs plus any AVAILABLE jobs in your network that you haven't declined.

query ListJobs($after: String) {
jobConnection(
first: 50
after: $after
statuses: [ASSIGNED, SCHEDULED]
sortBy: STARTTIME
sortDir: ASC
) {
totalCount
pageInfo { hasNextPage endCursor }
edges {
cursor
node { id status startTime assignee { id } }
}
}
}

Filters​

ArgumentDescription
statusesOnly return jobs in these JobStatuses.
idsOnly return these job IDs.
from / untilFilter on the job's startTime. Jobs without a start time are excluded when either argument is set.
assigneeIDTechnician id or externalUID.
assigneeNameTechnician name.
patientMatch on patient fields.
searchFree-text search. See below.
sortBy / sortDirSort order. See JobSortBy and SortDir. Defaults to DEFAULT / DESC.

search matches job and order identifiers, patient uid, patient name, assignee name or email, and the service address. It uses prefix matching, so "Jan" matches "Jane".

Pagination​

jobConnection uses cursor pagination:

  1. Request a page with first (1–50, default 25). Values outside that range return VALIDATION_ERROR.
  2. If pageInfo.hasNextPage is true, request the next page with after: pageInfo.endCursor.
  3. Repeat until hasNextPage is false.

totalCount is the total number of matching jobs across all pages.

technicianConnection paginates the same way.