private void triggerPartialAdmissionEvent(EmergencyAttendanceRefVo emergencyAttendance,EDPartialAdmissionRefVo partialAdmission,LookupInstVo type) throws StaleObjectException { if(emergencyAttendance!=null&&partialAdmission!=null) { DomainFactory factory = getDomainFactory(); String hqlString = "select ot.providerSystem from OutboundTriggers as ot left join ot.queueType as qt left join qt.instance as i" + " where(i.id = "+QueueType.INPATIENTADT.getId()+")"; java.util.List<ProviderSystem> list = factory.find(hqlString); for (ProviderSystem providerSystem : list) { InPatientADTMessageQueue event = new InPatientADTMessageQueue(); event.setAttendance((EmergencyAttendance)factory.getDomainObject(emergencyAttendance)); event.setPartialAdmission((EDPartialAdmission)factory.getDomainObject(partialAdmission)); event.setProviderSystem(providerSystem); event.setWasProcessed(Boolean.FALSE); event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED)); event.setMsgType(getDomLookup(type)); event.setQueueType(getDomLookup(QueueType.INPATIENTADT)); factory.save(event); } } }
public void triggerCancelPartialAdmission(EmergencyAttendanceRefVo edAttendance,EDPartialAdmissionRefVo partialAdmission)throws DomainInterfaceException, StaleObjectException { triggerPartialAdmissionEvent(edAttendance,partialAdmission,MsgEventType.A11); }
public void triggerCreatePartialAdmission(EmergencyAttendanceRefVo edAttendance,EDPartialAdmissionRefVo partialAdmission)throws DomainInterfaceException, StaleObjectException { triggerPartialAdmissionEvent(edAttendance,partialAdmission,MsgEventType.A01); }