public MosLiteEDVoCollection getMedics(ILocation location) { if (location == null ) { throw new CodingRuntimeException("Cannot get Location on null Id "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); //WDEV-16816 hql.append("select m2_1 "); hql.append(" from Tracking as t1_1 left join t1_1.seenBy as seenBy left join seenBy.allocatedMedic as m1_1 left join m1_1.mos as m2_1"); hql.append(" where "); hql.append(" (t1_1.eDLocation.id = :Location_id and seenBy.allocatedMedic is not null ) "); hql.append(" order by m2_1.name.surname asc, m2_1.name.forename asc "); List<?> list = factory.find(hql.toString(), new String[] {"Location_id"}, new Object[] {location.getID()}); return MosLiteEDVoAssembler.createMosLiteEDVoCollectionFromMemberOfStaff(list); }
public MosLiteEDVoCollection getNurses(ILocation location) { if (location == null ) { throw new CodingRuntimeException("Cannot get Location on null Id "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); //WDEV-16816 hql.append("select m1_1 "); hql.append(" from Tracking as t1_1 left join t1_1.seenBy as seenBy left join seenBy.allocatedNurse as h1_1 left join h1_1.mos as m1_1"); hql.append(" where "); hql.append(" (t1_1.eDLocation.id = :Location_id and seenBy.allocatedNurse is not null ) "); hql.append(" order by m1_1.name.surname asc, m1_1.name.forename asc "); List<?> list = factory.find(hql.toString(), new String[] {"Location_id"}, new Object[] {location.getID()}); return MosLiteEDVoAssembler.createMosLiteEDVoCollectionFromMemberOfStaff(list); }
private void populateMedics(ILocation currentLocation) { MosLiteEDVoCollection medics=domain.getMedics(currentLocation); for(int i=0;i<medics.size();i++) { grdCurrentEmergDeptRow row=form.grdCurrentEmergDept().getRows().newRow(); String str=""; if(medics.get(i).getName().getTitleIsNotNull()) { str=str+medics.get(i).getName().getTitle().toString(); } if(medics.get(i).getName().getSurnameIsNotNull()) { str=str+" "+medics.get(i).getName().getSurname().toString(); } if(medics.get(i).getName().getForenameIsNotNull()) //WDEV-15947 { str=str+" "+medics.get(i).getName().getForename().toString(); } row.setMemberOfStaff(str); row.setMedicImage(form.getImages().Emergency.DoctorEnabled16); String val=domain.getCurrentlyAllocatedCountsMedics(currentLocation, medics.get(i)); row.setCurrentlyAllocatedTotal(val.equals("0")?"-":val); val=domain.getMedicsToBeSeenCounts(currentLocation, medics.get(i)); row.setTobeSeen(val.equals("0")?"-":val); val=domain.getMedicsSeenCounts(currentLocation, medics.get(i)); row.setSeen(val.equals("0")?"-":val); val=domain.getAwaitingCompletionCounts(currentLocation, medics.get(i)); row.setAwaitingCompletion(val.equals("0")?"-":val); } }
private void populateNurses(ILocation currentLocation) { // TODO Auto-generated method stub MosLiteEDVoCollection nurses=domain.getNurses(currentLocation); for(int i=0;i<nurses.size();i++) { grdCurrentEmergDeptRow row=form.grdCurrentEmergDept().getRows().newRow(); String str=""; if(nurses.get(i).getName().getTitleIsNotNull()) { str=str+nurses.get(i).getName().getTitle().toString(); } if(nurses.get(i).getName().getSurnameIsNotNull()) { str=str+" "+nurses.get(i).getName().getSurname().toString(); } if(nurses.get(i).getName().getSurnameIsNotNull()) { str=str+" "+nurses.get(i).getName().getForename().toString(); } row.setMemberOfStaff(str); row.setMedicImage(form.getImages().Emergency.NurseEnabled16); String val=domain.getCurrentlyAllocatedNursesCounts(currentLocation, nurses.get(i)); row.setCurrentlyAllocatedTotal(val.equals("0")?"-":val); val=domain.getNursesToBeSeenCounts(currentLocation, nurses.get(i)); row.setTobeSeen(val.equals("0")?"-":val); val=domain.getNursesSeenCounts(currentLocation, nurses.get(i)); row.setSeen(val.equals("0")?"-":val); val=domain.getNursesAwaitingCompletionCounts(currentLocation, nurses.get(i)); row.setAwaitingCompletion(val.equals("0")?"-":val); } }