private void searchTriagePatients() { clearScreen(); HcpRefVo hcp = null; if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue())) { hcp = form.getLocalContext().getLoggedHcp(); } TrackingListForTriageVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_TRIAGED, hcp); if(patients == null) return; populatePatientsWaitingForTriage(patients.sort(new TriageLOSComparator(SortOrder.DESCENDING))); }
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) { form.dyngrdPatients().getRows().clear(); deletePatientImages(); if(patients == null) return; Integer totalLOS = 0; for(TrackingListForTriageVo patient : patients) { Integer los = addPatientRow(patient); if(los != null) { totalLOS += los; } } Integer averageTime = totalLOS/patients.size(); form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818 form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient()); }