added
June 26, 2023
over 1 year ago by Amna Hashmi
We are excited to announce our new /patient-history/jobs API, which comes with improved functionality to schedule a Patient History job and other enhanced features.
On August 8th, the following endpoints will be deprecated:
- Start a job - /patient-history/patient/{patient-id}/refresh
- Check the status of a job - /patient-history/message-status/{message-id}
- Get job messages - /patient-history/messages
To ensure a smooth transition and minimize any disruptions to your projects, we have prepared this guide to help you convert your existing requests to the new API.
Create a patient history job
Whereas the /refresh endpoint does not have a request body, the new /jobs endpoint does.
{
"data": {
"type": "patient-history/jobs",
"attributes": {
"requestConsent": true,
"practitioner": {
"npi": "1013085661",
"name": "Testfirstname Testlastname",
"role": "309343006"
}
},
"targetDate": "2023-09-01",
"relationships": {
"patient": {
"data": {
"type": "fhir/Patient",
"id": "{patient-id}"
}
}
}
}
}
Check the status of a patient history job
Please see below for the differences in the response bodies.
{
"data": {
"id": "{job-id}",
"type": "create_patient_history_job",
"attributes": {
"message_status": "done",
"messages": [
{
"services": "commonwell",
"status": "done"
},
{
"services": "surescripts",
"status": "done"
}
]
}
}
}
{
"data": [
{
"type": "patient-history/jobs",
"id": "{job-id}",
"attributes": {
"createdAt": 1681406975,
"jobStatus": "in_progress",
"lastUpdatedAt": 1687809292,
"practitioner": {
"npi": "1013085661",
"name": "Testfirstname Testlastname",
"role": "309343006"
},
"providers": [
{
"service": "commonwell",
"status": "done"
},
{
"service": "surescripts",
"status": "done"
}
]
},
"relationships": {
"patient": {
"data": {
"type": "fhir/Patient",
"id": "{patient-id}"
}
}
}
}
],
"links": {
"self": "<https://api.zusapi.com/patient-history/jobs?page[count]=50&page[offset]=0>"
},
"meta": {
"totalResultCount": 1
}
}