private void populateDynGrid(TrackingForClinicianWorklistAndTriageVoCollection trackingPatiens) { deletePatientImages(); form.dyngrdWhiteBoard().getRows().clear(); if( trackingPatiens == null || trackingPatiens.size() < 1) return; //trackingPatiens.sort(new TrackingComparator()); for(int i = 0; i < trackingPatiens.size();i++) { TrackingForClinicianWorklistAndTriageVo tempVo = trackingPatiens.get(i); if( tempVo != null) { addRowToDyngrd(tempVo); } } }
private void populateDynGrid(TrackingForClinicianWorklistAndTriageVoCollection trackingPatiens) { deletePatientImages(); form.dyngrdWhiteBoard().getRows().clear(); if( trackingPatiens == null || trackingPatiens.size() < 1) return; //trackingPatiens.sort(new TrackingComparator()); for(int i = 0; i < trackingPatiens.size();i++) { ILocation currentLocation = engine.getCurrentLocation(); TrackingForClinicianWorklistAndTriageVo tempVo = trackingPatiens.get(i); if( tempVo != null) { addRowToDyngrd(tempVo, currentLocation); } } }
private void doSearch() { TrackingForClinicianWorklistAndTriageVoCollection trackingPatiens = domain.listTrackingPatients(form.cmbArea().getValue(),form.cmbStatus().getValue() , null); populateDynGrid(trackingPatiens); }
public TrackingForClinicianWorklistAndTriageVoCollection listTrackingPatients(TrackingAreaShortVo trackingArea, TrackingStatus trackingStatus, ILocation edLoc) { DomainFactory factory = getDomainFactory(); StringBuilder hqlJoins = new StringBuilder("select tr from Tracking as tr left join tr.patient as p left join tr.attendance as att left join tr.currentArea as ta"); StringBuilder hqlConditions = new StringBuilder(" where "); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); String and = " and "; if( trackingArea != null ) { if (trackingArea.getIsOverallViewIsNotNull() && trackingArea.getIsOverallView().equals(true)) { hqlConditions.append(" ta.id is not null "); } else { hqlConditions.append(" ta.id = :TrackingAreaId "); paramNames.add("TrackingAreaId"); paramValues.add(trackingArea.getID_TrackingArea()); } } if( edLoc != null) { hqlJoins.append(" left join tr.eDLocation as loc "); hqlConditions.append(and); hqlConditions.append(" loc.id = :locId "); paramNames.add("locId"); paramValues.add(edLoc.getID()); and = " and "; } else { if( trackingArea != null ) { hqlJoins.append(" left join tr.eDLocation as loc "); hqlConditions.append(and); hqlConditions.append(" loc.id = :locId "); paramNames.add("locId"); paramValues.add(trackingArea.getEDLocation().getID_Location()); and = " and "; } } if( trackingStatus != null) { hqlJoins.append(" left join tr.currentStatus as cs left join cs.status as s "); hqlConditions.append(and); hqlConditions.append(" s.id = :statusId "); paramNames.add("statusId"); paramValues.add(trackingStatus.getID()); and = " and "; } List<?> patients = factory.find(hqlJoins.append(hqlConditions.toString()).toString(), paramNames, paramValues); if( patients != null && patients.size() > 0 ) { return TrackingForClinicianWorklistAndTriageVoAssembler.createTrackingForClinicianWorklistAndTriageVoCollectionFromTracking(patients); } return null; }
public TrackingForClinicianWorklistAndTriageVoCollection listTrackingPatients(TrackingAreaShortVo trackingArea, TrackingStatus trackingStatus, ILocation edLoc) { DomainFactory factory = getDomainFactory(); StringBuilder hqlJoins = new StringBuilder("select tr from Tracking as tr left join tr.patient as p left join tr.attendance as att left join tr.currentArea as ta"); StringBuilder hqlConditions = new StringBuilder(); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); String and = ""; if( trackingArea != null ) { if (trackingArea.getIsOverallViewIsNotNull() && trackingArea.getIsOverallView().equals(true)) { hqlConditions.append(and); hqlConditions.append(" ta.id is not null "); and = " and "; } else { hqlConditions.append(and); hqlConditions.append(" ta.id = :TrackingAreaId "); paramNames.add("TrackingAreaId"); paramValues.add(trackingArea.getID_TrackingArea()); and = " and "; } } if( edLoc != null) { hqlJoins.append(" left join tr.eDLocation as loc "); hqlConditions.append(and); hqlConditions.append(" loc.id = :locId "); paramNames.add("locId"); paramValues.add(edLoc.getID()); and = " and "; } else { if( trackingArea != null ) { hqlJoins.append(" left join tr.eDLocation as loc "); hqlConditions.append(and); hqlConditions.append(" loc.id = :locId "); paramNames.add("locId"); paramValues.add(trackingArea.getEDLocation().getID_Location()); and = " and "; } } if( trackingStatus != null) { hqlJoins.append(" left join tr.currentStatus as cs left join cs.status as s "); hqlConditions.append(and); hqlConditions.append(" s.id = :statusId "); paramNames.add("statusId"); paramValues.add(trackingStatus.getID()); and = " and "; } if (hqlConditions.length()>0) { hqlConditions.insert(0, " where "); } List<?> patients = factory.find((hqlJoins.append( hqlConditions)).toString(), paramNames, paramValues); if( patients != null && patients.size() > 0 ) { return TrackingForClinicianWorklistAndTriageVoAssembler.createTrackingForClinicianWorklistAndTriageVoCollectionFromTracking(patients); } return null; }