The PatientSummary service
The PatientSummary service in opal.services provides us with core
functionality related to interacting with patient search results in the client.
Constructor
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:
hospitalNumberpatientIdlinkA link to the patients patient detail pagedateOfBirthThe patient's date of birth cast to a momentstartDateThe patient's earliest episode.start cast to a momentendDateThe patient's last episdoe.end cast to a momentyearsThe 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