public IHL7OutboundMessageHandler getEvent(QueuedEventVo event) { if (event!=null) { DomainFactory factory = getDomainFactory(); if(event.getQueueTypeIsNotNull()&&event.getQueueType().equals(QueueType.ORDERCHANGERESPONSE)) { return OrderChangeResponseVoAssembler.create((OrderChangeResponseQueue)factory.getDomainObject(OrderChangeResponseQueue.class, event.getID())); } else if(event.getQueueTypeIsNotNull()&&event.getQueueType().equals(QueueType.PATIENTDOCUMENT)) { return IfPatientDocumentMessageVoAssembler.create((PatientDocumentMessageQueue)factory.getDomainObject(PatientDocumentMessageQueue.class, event.getID())); } else if(event.getQueueTypeIsNotNull()&&event.getQueueType().equals(QueueType.DEMOGRAPHICFEED)) { return DemographicFeedVoAssembler.create((DemographicsMessageQueue)factory.getDomainObject(DemographicsMessageQueue.class, event.getID())); } else if(event.getQueueTypeIsNotNull()&&event.getQueueType().equals(QueueType.EDATTENDANCE)) { return EDAttendanceFeedVoAssembler.create((EdAttendanceMessageQueue)factory.getDomainObject(EdAttendanceMessageQueue.class, event.getID())); } else if(event.getQueueTypeIsNotNull()&&event.getQueueType().equals(QueueType.INPATIENTADT)) { return InPatientADTFeedVoAssembler.create((InPatientADTMessageQueue)factory.getDomainObject(InPatientADTMessageQueue.class, event.getID())); } } return null; }