GetAbsences
Returns a list of absence records filtered by any of the optional parameters specified. Does not show deleted absences.
JavaScript library method
patientportal.absences.getAbsences({
patient: <patient>,
from: <date-from>,
to: <date-to>,
status: <status>,
text: <text>,
department: <department>,
division: <division>,
questionnaireStatus: <questionnaire-status>,
pageSortColumn: <page-sort-column>,
pageSortDescending: <page-sort-descending>,
pageNumber: <page-number>,
pageSize: <page-size>
});
HTTP Method
Verb | URL |
---|---|
GET | /patientportalapi/absences/absences |
URL Parameters
patient | string (optional) | The absentee’s key id. |
---|---|---|
date-from | DateTime (optional) | The earliest date to look for absences. |
date-to | DateTime (optional) | The latest date to look for absences. |
status | int (optional) | Open = 0, Closed = 2 (Deleted absences are not shown in the API, so cannot be filtered for). |
text | string (optional) | Checks if any of the following attributes of the absentee starts with the specified text: Surname, Name, WorkEmail, Email, LegacyNr. |
department | string (optional) | Key of the department provided by the API upon GetDepartments. |
division | string (optional) | Key of the division provided by the API upon GetDepartments. |
questionnaireStatus | Int (optional) | 0 = Not Sent, 1 = Sent, 2 = Completed. |
page-sort-column | int (optional) | The column index to sort the result:
Default: 0 |
page-sort-descending | int (optional) | True to sort result descending. |
page-number | int (optional) | Page number. Default 1. |
page-size | int (optional) | Page size. Default 5. Minimum 5. Maximum 50. |
Returns
Returned JSON
{
"status": "ok",
"result": {
"Items": [
{
"Patient": {
"Title": "Mr",
"Name": "John",
"Surname": "Lemon",
"SexType": 1,
"Initials": "JL",
"DateOfBirth": "1958-08-02T00:00:00",
"Mobile": "+444 895 523 411",
"Telephone": "+444 525 111 555",
"EmailAddress": "<john.lemon@test.com>",
"WorkEmailAddress": "<john.lemon@mywork.com>",
"Address": {
"Address1": "Studio 99",
"Address2": "Backlok Street",
"Address3": "Camden",
"City": "London",
"County": "",
"PostCode": "N1 7NK",
"Country": "United Kingdom"
}
},
"Key": "efdc81efac0fd1a7f7b1833697a3ec3b",
"StartDate": "2018-06-11T00:00:00",
"EstimatedEndDate": "2018-06-15T00:00:00",
"EndDate": "2018-06-15T00:00:00",
"AbsenceStatusCode": 2,
"AbsenceStatusName": "Closed",
"QuestionnaireStatusCode": 0,
"QuestionnaireStatusName": "Not sent",
"LostWork": {
"Hours": 32,
"Days": 4
},
"Reason": "Brain Tumour",
"AccidentAtWork": false,
"ReasonSharedWithEmployer": true
}
],
"TotalCount": 15,
"CurrentPage": 1,
"PageSize": 10,
"SortColumn": 0,
"SortDescending": false
}
}