public ims.emergency.vo.TrackingForSeenByHCPVo getTracking(ims.emergency.vo.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 TrackingForSeenByHCPVoAssembler.create((Tracking) list.get(0)); } return null; }
public void markSeenByHCPAsRIE(SeenByHCPVo seenByHCP, TrackingForSeenByHCPVo tracking, FormName formName, Integer patientId, Integer careContextId, String rieMessage) throws StaleObjectException { if(seenByHCP == null) return; if(seenByHCP.getSeenByHCPNotes() != null) { for(AttendanceClinicalNotesVo note : seenByHCP.getSeenByHCPNotes()) { if(note == null) continue; markAsRie(note, formName, patientId, null, careContextId, rieMessage); } } markAsRie(seenByHCP, formName, patientId, null, careContextId, rieMessage); if(tracking != null) { DomainFactory factory = getDomainFactory(); factory.save(TrackingForSeenByHCPVoAssembler.extractTracking(factory, tracking)); } }
private boolean markAsRIE() { if (form.getLocalContext().getselectedSeenByHCP() == null) return false; if (domain.isStale(form.getLocalContext().getselectedSeenByHCP())) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getLocalContext().setselectedSeenByHCP(null); open(); return false; } TrackingForSeenByHCPVo tracking = null; if(form.getLocalContext().getcurrentTracking() != null && form.recbrSeenByHCP().getValue().equals(form.getLocalContext().getcurrentTracking().getSeenByNurse())) { tracking = form.getLocalContext().getcurrentTracking(); tracking.setSeenByNurse(null); } try { domain.markSeenByHCPAsRIE(form.getLocalContext().getselectedSeenByHCP(), tracking, engine.getFormName(), form.getGlobalContext().Core.getPatientShort() != null ? form.getGlobalContext().Core.getPatientShort().getID_Patient() : null, form.getGlobalContext().Core.getCurrentCareContext() != null ? form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext() : null, form.getGlobalContext().Core.getRieMessage()); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getLocalContext().setselectedSeenByHCP(null); open(); return false; } return true; }
private boolean markAsRIE() { if (form.getLocalContext().getselectedSeenByHCP() == null) return false; if (domain.isStale(form.getLocalContext().getselectedSeenByHCP())) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getLocalContext().setselectedSeenByHCP(null); open(); return false; } TrackingForSeenByHCPVo tracking = null; if(form.getLocalContext().getcurrentTracking() != null && form.recbrSeenByHCP().getValue().equals(form.getLocalContext().getcurrentTracking().getSeenBy())) { tracking = form.getLocalContext().getcurrentTracking(); tracking.setSeenBy(null); } try { domain.markSeenByHCPAsRIE(form.getLocalContext().getselectedSeenByHCP(), tracking, engine.getFormName(), form.getGlobalContext().Core.getPatientShort() != null ? form.getGlobalContext().Core.getPatientShort().getID_Patient() : null, form.getGlobalContext().Core.getCurrentCareContext() != null ? form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext() : null, form.getGlobalContext().Core.getRieMessage()); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getLocalContext().setselectedSeenByHCP(null); open(); return false; } return true; }