private void searchWaitingForClinicianReview() { clearScreen(); HcpRefVo hcp = null; if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue())) { hcp = form.getLocalContext().getLoggedHcp(); } TrackingListForClinicianWorklistVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC, hcp); if(patients == null) return; populatePatientsWaitingForTriage(patients.sort(new TrackingComparator())); }
private void populatePatientsWaitingForTriage(TrackingListForClinicianWorklistVoCollection patients) { form.dyngrdPatients().getRows().clear(); deletePatientImages(); if(patients == null) return; Integer totalLOS = 0; for(int i=0; i<patients.size(); i++) { Integer los = addPatientRow(patients.get(i), i); 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().getSelectedWaitingPatient()); }