public TrackingMovementTimesForEventHistoryVoCollection getTrackingMovementTimes(CareContextRefVo careContextRef) { if (careContextRef == null || careContextRef.getID_CareContext() == null) { throw new CodingRuntimeException("Cannot get TrackingMovementTimesForEventHistoryVoCollection on null Id for CareContext "); } DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); StringBuffer hql = new StringBuffer(); hql.append(" select movementTimes from TrackingMovementTimes as movementTimes left join movementTimes.attendance as contextID where contextID.id = :contextID"); markers.add("contextID"); values.add(careContextRef.getID_CareContext()); return TrackingMovementTimesForEventHistoryVoAssembler.createTrackingMovementTimesForEventHistoryVoCollectionFromTrackingMovementTimes(factory.find(hql.toString(), markers, values)); }
public TrackingMovementTimesForEventHistoryVoCollection listTrackingMovementTimes(CareContextRefVo careContextRef) { if (careContextRef == null || careContextRef.getID_CareContext() == null) { throw new CodingRuntimeException("Cannot get TrackingMovementTimesForEventHistoryVoCollection on null Id for CareContext "); } DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); StringBuffer hql = new StringBuffer(); hql.append(" select movementTimes from TrackingMovementTimes as movementTimes left join movementTimes.attendance as contextID where contextID.id = :contextID order by movementTimes.systemInformation.creationDateTime desc"); markers.add("contextID"); values.add(careContextRef.getID_CareContext()); return TrackingMovementTimesForEventHistoryVoAssembler.createTrackingMovementTimesForEventHistoryVoCollectionFromTrackingMovementTimes(factory.find(hql.toString(), markers, values)); }
private void populateGrids() { SeenByHcpForEventHistoryVoCollection seenByHcp = domain.getSeenByHcp(form.getGlobalContext().Core.getCurrentCareContext());//WDEV-16816 ReferralToSpecialtyTeamForEventHistoryVoCollection referralsToSpecialty = domain.getReferralsToSpecialty(form.getGlobalContext().Core.getCurrentCareContext()); TrackingAttendanceStatusForEventHistoryVoCollection attendanceStatuses = domain.getTrackingAttendanceStatuses(form.getGlobalContext().Core.getCurrentCareContext()); TrackingMovementTimesForEventHistoryVoCollection trackingMovementTimes = domain.getTrackingMovementTimes(form.getGlobalContext().Core.getCurrentCareContext()); //WDEV-16816 for (int i = 0; i < seenByHcp.size(); i++) { addSeenByHCPRowToGrid(seenByHcp.get(i)); } for (int i = 0; i < referralsToSpecialty.size(); i++) { addReferralRowToGrid(referralsToSpecialty.get(i)); } for (int i = 0; i < attendanceStatuses.size(); i++) { addAttendanceStatusRowToGrid(attendanceStatuses.get(i)); } for (int i = 0; i < trackingMovementTimes.size(); i++) { addMovementTimeRowToGrid(trackingMovementTimes.get(i)); } }
private void populateMovementsGrid() { form.ctnTimes().grdMovementTimes().getRows().clear(); if(form.recbrEmergencyAttendance().getValue() == null) return; TrackingMovementTimesForEventHistoryVoCollection trackingMovementTimes = domain.listTrackingMovementTimes(form.recbrEmergencyAttendance().getValue().getCareContext()); for (int i = 0; i < trackingMovementTimes.size(); i++) { addMovementTimeRowToGrid(trackingMovementTimes.get(i)); } }