The PatientSummary service
PatientSummary service in
opal.services provides us with core
functionality related to interacting with patient search results in the client.
The PatientSummary service is instantiated with the patient search result data that comes back from the patient search JSON API.
var patientSummary = new PatientSummary(json_data);
The result object has the following properties by default:
linkA link to the patients patient detail page
dateOfBirthThe patient's date of birth cast to a moment
startDateThe patient's earliest episode.start cast to a moment
endDateThe patient's last episdoe.end cast to a moment
yearsThe span of years between startDate and EndDate e.g. "2020-2023"
categoriesA comma joined string of the patient's episode categories, e.g. "Inpatient, ICU"
datathe raw JSON data from the API