public TrackingAreaForTrackingVo getTrackingAreaForTracking(TrackingRefVo trackingRef) { if( trackingRef == null ) return null; DomainFactory factory = getDomainFactory(); String query = "select t2_1 from Tracking as t1_1 left join t1_1.currentArea as t2_1 where( t1_1.id = :trackingId )"; List<?> list = factory.find(query, new String[] {"trackingId"}, new Object[] {trackingRef.getID_Tracking()}); if(list == null || list.size() == 0) return null; TrackingAreaForTrackingVoCollection temp =TrackingAreaForTrackingVoAssembler.createTrackingAreaForTrackingVoCollectionFromTrackingArea(list); if( temp != null && temp.size() > 0) return temp.get(0); return null; }
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) { if( trackingRef == null) throw new CodingRuntimeException("Tracking cannot be null"); DomainFactory factory = getDomainFactory(); String hsql = "from Tracking as t1_1 where (t1_1.id = :idTracking) "; List trackings = factory.find(hsql, new String[] {"idTracking"}, new Object[] { trackingRef.getID_Tracking()}); if( trackings != null && trackings.size() > 0) { TrackingLiteVoCollection tempColl = TrackingLiteVoAssembler.createTrackingLiteVoCollectionFromTracking(trackings); if( tempColl != null && tempColl.size() > 0) { return tempColl.get(0); } } return null; }
public TrackingForTrackingStatusVo getTracking(TrackingRefVo tracking) { DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (tracking == null || !tracking.getID_TrackingIsNotNull()) { throw new CodingRuntimeException("Cannot get Tracking on null TrackingId "); } StringBuffer hql = new StringBuffer(); hql.append(" select Tracking from Tracking as Tracking where Tracking.id = :trackingID"); markers.add("trackingID"); values.add(tracking.getID_Tracking()); return TrackingForTrackingStatusVoAssembler.createTrackingForTrackingStatusVoCollectionFromTracking(factory.find(hql.toString(), markers, values)).get(0); }
public TrackingForReferalToSpecialtyVo getTrackingForReferral(TrackingRefVo trackingRef) { if (trackingRef == null || trackingRef.getID_Tracking() == null) { throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID "); List<?> list = factory.find(hql.toString(), new String[] { "trackingID" }, new Object[] { trackingRef.getID_Tracking() }); if (list!=null && list.size()>0) { return TrackingForReferalToSpecialtyVoAssembler.create((Tracking) list.get(0)); } return null; }
public TrackingRefVo getTrackingForPendingEmergency(PendingEmergencyAdmissionRefVo pendingEmergency) { if (pendingEmergency == null || pendingEmergency.getID_PendingEmergencyAdmission() == null) return null; StringBuilder query = new StringBuilder("SELECT track FROM Tracking AS track LEFT JOIN track.associatedPendingEmergencyAdmission AS pendEmer "); query.append(" WHERE "); query.append(" pendEmer.id = :EMER_ID "); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); paramNames.add("EMER_ID"); paramValues.add(pendingEmergency.getID_PendingEmergencyAdmission()); Tracking tracking = (Tracking) getDomainFactory().findFirst(query.toString(), paramNames, paramValues); return new TrackingRefVo(tracking.getId(), tracking.getVersion()); }
public TrackingForTransferVo getCurrentTrackingRecord(TrackingRefVo trackingRef) { if (trackingRef == null || trackingRef.getID_Tracking() == null) { throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID "); List<?> list = factory.find(hql.toString(), new String[] { "trackingID" }, new Object[] { trackingRef.getID_Tracking() }); if (list!=null && list.size()>0) { return TrackingForTransferVoAssembler.create((Tracking) list.get(0)); } return null; }
public void saveTrackingAndRIECurrentStatus(TrackingRefVo tracking, TrackingAttendanceStatusForEventHistoryVo status, FormName formName, PatientRefVo patient, CareContextRefVo careContext, String rieComment) throws StaleObjectException { if(tracking == null || tracking.getID_Tracking() == null) return; DomainFactory factory = getDomainFactory(); String query = "select attendanceStatus from TrackingAttendanceStatus as attendanceStatus left join attendanceStatus.attendance as contextID where contextID.id = :ContextID and attendanceStatus.id <> :CurrentStatus and (attendanceStatus.isRIE is null or attendanceStatus.isRIE = 0) order by attendanceStatus.systemInformation.creationDateTime desc"; TrackingAttendanceStatus prevStatus = (TrackingAttendanceStatus) factory.findFirst(query, new String[] {"ContextID", "CurrentStatus"}, new Object[] {careContext.getID_CareContext(), status.getID_TrackingAttendanceStatus()}); if(prevStatus != null) { Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, tracking.getID_Tracking()); doTracking.setCurrentStatus(prevStatus); factory.save(doTracking); markAsRie(status, formName, (patient != null ? patient.getID_Patient() : null), null , (careContext != null ? careContext.getID_CareContext() : null), rieComment); } }
@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { initializeControls(); if (args != null && args.length == 1 && args[0] != null && args[0] instanceof TrackingRefVo) { form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission((TrackingRefVo) args[0])); open(); if(form.getLocalContext().getCurrentTrackingForEdPartialAdmissionIsNotNull() && form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentPartialAdmission()==null) { newInstance(); } } }
public TrackingSaveVo getTracking(TrackingRefVo trackingId) { if(trackingId == null || trackingId.getID_Tracking() == null) throw new CodingRuntimeException("Cannot get Tracking record on null Tracking Id."); DomainFactory factory = getDomainFactory(); Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, trackingId.getID_Tracking()); return TrackingSaveVoAssembler.create(doTracking); }
public TrackingForClinicianWorklistAndTriageVo getTrackingForClinicianWorklistAndTriageVo(TrackingRefVo trackingRef) { if(trackingRef == null ) throw new CodingRuntimeException("TrackingRefVo cannot be null"); return TrackingForClinicianWorklistAndTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingRef.getID_Tracking())); }
public TrackingVo getTrackingVo(TrackingRefVo trackingRef) { if(trackingRef == null ) throw new CodingRuntimeException("TrackingRefVo cannot be null"); return TrackingVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingRef.getID_Tracking())); }
public TrackingWithPartialAdmissionVo getTrackingWithEDPartialAdmission(TrackingRefVo trackRef) { if(trackRef == null || trackRef.getID_Tracking() == null) throw new CodingRuntimeException("Cannot get Tracking record on null Tracking Id."); DomainFactory factory = getDomainFactory(); Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, trackRef.getID_Tracking()); return TrackingWithPartialAdmissionVoAssembler.create(doTracking); }
public TrackingForBedAvailabilityVo getTracking(TrackingRefVo trackingRef) { if (trackingRef == null || trackingRef.getID_Tracking() == null) { throw new CodingRuntimeException("Cannot get TrackingForBedAvailabilityVo on null Id for Tracking "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID "); List<?> list = factory.find(hql.toString(), new String[] { "trackingID" }, new Object[] { trackingRef.getID_Tracking() }); return TrackingForBedAvailabilityVoAssembler.createTrackingForBedAvailabilityVoCollectionFromTracking(list).get(0); }
public ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo getTrackingForTriage(ims.emergency.vo.TrackingRefVo trackingId) { if(trackingId == null || trackingId.getID_Tracking() == null) throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id."); return TrackingForClinicianWorklistAndTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking())); }
public TrackingForTriageVo getTrackingForTriage(TrackingRefVo trackingId) { if(trackingId == null || trackingId.getID_Tracking() == null) throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id."); return TrackingForTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking())); }
public TrackingForClinicianWorklistAndTriageVo getTrckinGForClonicianWorklosAndTriage(TrackingRefVo trackingRef) { if(trackingRef == null || trackingRef.getID_Tracking() == null) throw new CodingRuntimeException("Cannnot get Tracking for a null Id."); return TrackingForClinicianWorklistAndTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingRef.getID_Tracking())); }
public TrackingForSendToXRayVo getTracking(TrackingRefVo trackingRef) { if (trackingRef == null || trackingRef.getID_Tracking() == null) { throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID "); List<?> list = factory.find(hql.toString(), new String[] {"trackingID"}, new Object[] {trackingRef.getID_Tracking()}); return TrackingForSendToXRayVoAssembler.createTrackingForSendToXRayVoCollectionFromTracking(list).get(0); }
public TrackingForAllocateCubicleVo getTracking(TrackingRefVo trackingRef) { if( trackingRef == null) throw new CodingRuntimeException("Tracking not provided"); DomainFactory factory = getDomainFactory(); ims.emergency.domain.objects.Tracking doTracking = (ims.emergency.domain.objects.Tracking) factory.getDomainObject(ims.emergency.domain.objects.Tracking.class, trackingRef.getID_Tracking()); return TrackingForAllocateCubicleVoAssembler.create(doTracking); }
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) { if( trackingRef == null) throw new CodingRuntimeException("Tracking not provided"); DomainFactory factory = getDomainFactory(); ims.emergency.domain.objects.Tracking doTracking = (ims.emergency.domain.objects.Tracking) factory.getDomainObject(ims.emergency.domain.objects.Tracking.class, trackingRef.getID_Tracking()); return TrackingLiteVoAssembler.create(doTracking); }
public TrackingForClinicianWorklistVo getTrackingForTriage(ims.emergency.vo.TrackingRefVo trackingId) { if(trackingId == null || trackingId.getID_Tracking() == null) throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id."); return TrackingForClinicianWorklistVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking())); }
public TrackingForClinicianWorklistAndTriageVo getTrackingForClinicianWorklistAndTriageVo(TrackingRefVo trackingRef) { if(trackingRef == null || trackingRef.getID_Tracking() == null) throw new CodingRuntimeException("Cannnot get Tracking for a null Id."); return TrackingForClinicianWorklistAndTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingRef.getID_Tracking())); }
public TrackingForClinicianWorklistAndTriageVo getTrackingForClinicianWorklistAndTriageVo(TrackingRefVo trackRef) { if(trackRef == null ) throw new CodingRuntimeException("TrackingRefVo cannot be null"); return TrackingForClinicianWorklistAndTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackRef.getID_Tracking())); }
public TrackingForClinicianWorklistAndTriageVo getTracking(TrackingRefVo trackingRef) { if (trackingRef == null || trackingRef.getID_Tracking() == null) { throw new CodingRuntimeException("Cannot get Tracking by null Id "); } DomainFactory factory = getDomainFactory(); Tracking domainTracking = (Tracking) factory.getDomainObject(Tracking.class, trackingRef.getID_Tracking()); return TrackingForClinicianWorklistAndTriageVoAssembler.create(domainTracking); }
public TrackingForClinicianWorklistAndTriageVo getTrackingForClinicianWorklistAndTriage(TrackingRefVo trackingRef) { if(trackingRef == null || trackingRef.getID_Tracking() == null) throw new CodingRuntimeException("Cannnot get Tracking for a null Id."); return TrackingForClinicianWorklistAndTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingRef.getID_Tracking())); }
@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { if (args != null && args.length == 1 && args[0] != null && args[0] instanceof TrackingRefVo) { form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission((TrackingRefVo) args[0])); initializeControls(); open(); if(form.getLocalContext().getCurrentTrackingForEdPartialAdmissionIsNotNull() && form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentPartialAdmission()==null) { newInstance(); } } else if(args != null && args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof TrackingRefVo && args[1] instanceof ReferralToSpecialtyTeamVo) //wdev-19307 { form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission((TrackingRefVo) args[0])); form.getLocalContext().setCurrentReferral((ReferralToSpecialtyTeamVo) args[1]); initializeControls(); open(); if(form.getLocalContext().getCurrentTrackingForEdPartialAdmissionIsNotNull() && form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentPartialAdmission()==null) { newInstance(); } } }