Java 类ims.ocrr.vo.lookups.OrderMessageStatus 实例源码

项目:AvoinApotti    文件:PatientMergeImpl.java   
public void saveMessageQueueForProvider(MergeRequest request, PatientMergeHistory history, Patient destPatient, Patient sourcePatient) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    String hql = " select prov from ProviderSystem prov join prov.configItems cfg where " +
                     " cfg.propertyName = 'SendDeomgraphicFeed' and cfg.propertyValue='TRUE'";

    List lst = factory.find(hql);

    for (int i=0; i<lst.size(); i++)
    {

        ProviderSystem prov = (ProviderSystem) lst.get(i);

        DemographicsMessageQueue queue = new DemographicsMessageQueue();
        queue.setMergeHistory(history);
        queue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
        queue.setMsgType(getDomLookup(MsgEventType.A40));
        queue.setQueueType(getDomLookup(QueueType.DEMOGRAPHICFEED));
        queue.setPatient(destPatient);
        queue.setPriorPatient(sourcePatient);
        queue.setProviderSystem(prov);
        factory.save(queue);
    }
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
private void triggerAttendanceEvent(EmergencyAttendanceRefVo emergencyAttendance,LookupInstVo type) throws StaleObjectException
{
    if(emergencyAttendance!=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.EDATTENDANCE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            EdAttendanceMessageQueue event = new EdAttendanceMessageQueue();
            event.setAttendance((EmergencyAttendance)factory.getDomainObject(emergencyAttendance));
            event.setProviderSystem(providerSystem);
            event.setWasProcessed(Boolean.FALSE);
            event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            event.setMsgType(getDomLookup(type));
            event.setQueueType(getDomLookup(QueueType.EDATTENDANCE));
            factory.save(event);
        }
    }
}
项目:AvoinApotti    文件:EDPartialAdmissionDialogImpl.java   
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);
        }
    }
}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
private void triggerDemographicEvent(ims.core.patient.domain.objects.Patient domPat, LookupInstVo messageEventType) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    String hql = "select ot.providerSystem from OutboundTriggers as ot left join ot.queueType as qt left join qt.instance as i"
            + " where(i.id = "+QueueType.DEMOGRAPHICFEED.getId()+")";

    java.util.List<ProviderSystem> list = factory.find(hql);

    for (int i=0; i<list.size(); i++)
    {

        ProviderSystem provider = (ProviderSystem) list.get(i);

        DemographicsMessageQueue queue = new DemographicsMessageQueue();

        queue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
        queue.setMsgType(getDomLookup(messageEventType));
        queue.setQueueType(getDomLookup(QueueType.DEMOGRAPHICFEED));
        queue.setPatient(domPat);
        queue.setProviderSystem(provider);

        factory.save(queue);
    }
}
项目:openMAXIMS    文件:ADTImpl.java   
private void triggerADTEvent(PASEventRefVo pasEvent, MsgEventType a08,MsgUpdateType type)  throws StaleObjectException
{
    if(pasEvent!=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.INPATIENTEPISODE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            InpatientEpisodeQueue event = new InpatientEpisodeQueue();
            event.setPasEvent((PASEvent)factory.getDomainObject(pasEvent));
            event.setProviderSystem(providerSystem);
            event.setWasProcessed(Boolean.FALSE);
            event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            event.setMsgType(getDomLookup(a08));
            event.setQueueType(getDomLookup(QueueType.INPATIENTEPISODE));
            event.setUpdateType(getDomLookup(type));
            factory.save(event);
        }
    }
}
项目:openMAXIMS    文件:ADTImpl.java   
private void triggerADTEvent(PASEventRefVo pasEvent, LookupInstVo type)  throws StaleObjectException
{
    if(pasEvent!=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.INPATIENTEPISODE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            InpatientEpisodeQueue event = new InpatientEpisodeQueue();
            event.setPasEvent((PASEvent)factory.getDomainObject(pasEvent));
            event.setProviderSystem(providerSystem);
            event.setWasProcessed(Boolean.FALSE);
            event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            event.setMsgType(getDomLookup(type));
            event.setQueueType(getDomLookup(QueueType.INPATIENTEPISODE));
            factory.save(event);
        }
    }
}
项目:openMAXIMS    文件:ADTImpl.java   
private void triggerADTEvent(PASEvent pasEvent, LookupInstVo type)  throws StaleObjectException
{
    if(pasEvent!=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.INPATIENTEPISODE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            InpatientEpisodeQueue event = new InpatientEpisodeQueue();
            event.setPasEvent(pasEvent);
            event.setProviderSystem(providerSystem);
            event.setWasProcessed(Boolean.FALSE);
            event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            event.setMsgType(getDomLookup(type));
            event.setQueueType(getDomLookup(QueueType.INPATIENTEPISODE));
            factory.save(event);
        }
    }
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
private void triggerAttendanceEvent(EmergencyAttendanceRefVo emergencyAttendance,LookupInstVo type) throws StaleObjectException
{
    if(emergencyAttendance!=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.EDATTENDANCE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            EdAttendanceMessageQueue event = new EdAttendanceMessageQueue();
            event.setAttendance((EmergencyAttendance)factory.getDomainObject(emergencyAttendance));
            event.setProviderSystem(providerSystem);
            event.setWasProcessed(Boolean.FALSE);
            event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            event.setMsgType(getDomLookup(type));
            event.setQueueType(getDomLookup(QueueType.EDATTENDANCE));
            factory.save(event);
        }
    }
}
项目:openMAXIMS    文件:EDPartialAdmissionDialogImpl.java   
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);
        }
    }
}
项目:openMAXIMS    文件:TheatreSessionManagementImpl.java   
public void triggerElectiveListEvent(PatientElectiveListVo patientElectiveList) throws StaleObjectException
{   
    if(patientElectiveList != 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.ELECTIVELIST.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList((PatientElectiveList)factory.getDomainObject(patientElectiveList));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.A38));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));
            factory.save(messageQueue);
        }
    }
}
项目:openMAXIMS    文件:GPAdminImpl.java   
public void triggerGPMasterFileEvent(GpRefVo gP) throws StaleObjectException
{
    if(gP!=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.GPMASTERFILE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            GPMessageQueue messageQueue = new GPMessageQueue();
            messageQueue.setGP((Gp)factory.getDomainObject(gP));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.M02));
            messageQueue.setQueueType(getDomLookup(QueueType.GPMASTERFILE));
            factory.save(messageQueue);
        }

    }
}
项目:openMAXIMS    文件:GPPracticeAdminImpl.java   
public void triggerGPPracticeMasterFileEvent(OrganisationRefVo gPPractice) throws StaleObjectException
{
    if(gPPractice!=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.GPPRACTICEMASTERFILE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            GPPracticeMessageQueue messageQueue = new GPPracticeMessageQueue();
            messageQueue.setPractice((Organisation)factory.getDomainObject(gPPractice));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.M05));
            messageQueue.setQueueType(getDomLookup(QueueType.GPPRACTICEMASTERFILE));
            factory.save(messageQueue);
        }

    }
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public void triggerWardMasterFileEvent(LocationRefVo locRefVo) throws StaleObjectException
{
    if(locRefVo!=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.WARDMASTERFILE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            WardMessageQueue messageQueue = new WardMessageQueue();
            messageQueue.setWard((Location)factory.getDomainObject(locRefVo));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.M05));
            messageQueue.setQueueType(getDomLookup(QueueType.WARDMASTERFILE));
            factory.save(messageQueue);
        }

    }
}
项目:openMAXIMS    文件:MosAdminImpl.java   
public void triggerMOSMasterFileEvent(MemberOfStaffRefVo mos) throws StaleObjectException
{
    if(mos!=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.MOSMASTERFILE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            MOSMessageQueue messageQueue = new MOSMessageQueue();
            messageQueue.setMOS((MemberOfStaff)factory.getDomainObject(mos));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.M02));
            messageQueue.setQueueType(getDomLookup(QueueType.MOSMASTERFILE));
            factory.save(messageQueue);
        }

    }
}
项目:openMAXIMS    文件:SuspensionDetailsImpl.java   
public void triggerElectiveListEvent(PatientElectiveListVo patientElectList)  throws StaleObjectException
{
    if(patientElectList != 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.ELECTIVELIST.getId()+")";
            java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList((PatientElectiveList)factory.getDomainObject(patientElectList));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.A08));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));
            factory.save(messageQueue);
        }
    }
}
项目:openMAXIMS    文件:BookTheatreSlotDetailDialogImpl.java   
public void triggerElectiveListEvent(PatientElectiveList domPatElectiveList) throws StaleObjectException
{
    if (domPatElectiveList != null
    // WDEV-20746 Tighten up checks
    && domPatElectiveList.getTCIDetails() != null && domPatElectiveList.getTCIDetails().getTCIDate() != null && domPatElectiveList.getElectiveListStatus() != null && domPatElectiveList.getElectiveListStatus().getElectiveListStatus() != null && WaitingListStatus.TCI_GIVEN.getID() == (domPatElectiveList.getElectiveListStatus().getElectiveListStatus().getId())) // WDEV-20746
    {
        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.ELECTIVELIST.getId() + ")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList(domPatElectiveList);
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.A05));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));

            factory.save(messageQueue);
        }
    }
}
项目:openMAXIMS    文件:ReferralDetailsComponentImpl.java   
public void triggerElectiveListEvent(PatientElectiveListVo patientElectList)  throws StaleObjectException
{
    if(patientElectList != 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.ELECTIVELIST.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList((PatientElectiveList)factory.getDomainObject(patientElectList));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.A08));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));
            factory.save(messageQueue);
        }
    }
}
项目:openMAXIMS    文件:ReferralAppointmentDetailsComponentImpl.java   
public void triggerElectiveListEvent(PatientElectiveListVo patientElectiveList) throws StaleObjectException
{   
    if(patientElectiveList != 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.ELECTIVELIST.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList((PatientElectiveList)factory.getDomainObject(patientElectiveList));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.A38));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));
            factory.save(messageQueue);
        }
    }
}
项目:openMAXIMS    文件:PatientMergeImpl.java   
public void saveMessageQueueForProvider(MergeRequest request, PatientMergeHistory history, Patient destPatient, Patient sourcePatient) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    String hql = " select prov from ProviderSystem prov join prov.configItems cfg where " +
                     " cfg.propertyName = 'SendDeomgraphicFeed' and cfg.propertyValue='TRUE'";

    List lst = factory.find(hql);

    for (int i=0; i<lst.size(); i++)
    {

        ProviderSystem prov = (ProviderSystem) lst.get(i);

        DemographicsMessageQueue queue = new DemographicsMessageQueue();
        queue.setMergeHistory(history);
        queue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
        queue.setMsgType(getDomLookup(MsgEventType.A40));
        queue.setQueueType(getDomLookup(QueueType.DEMOGRAPHICFEED));
        queue.setPatient(destPatient);
        queue.setPriorPatient(sourcePatient);
        queue.setProviderSystem(prov);
        factory.save(queue);
    }
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
private void triggerAttendanceEvent(EmergencyAttendanceRefVo emergencyAttendance,LookupInstVo type) throws StaleObjectException
{
    if(emergencyAttendance!=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.EDATTENDANCE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            EdAttendanceMessageQueue event = new EdAttendanceMessageQueue();
            event.setAttendance((EmergencyAttendance)factory.getDomainObject(emergencyAttendance));
            event.setProviderSystem(providerSystem);
            event.setWasProcessed(Boolean.FALSE);
            event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            event.setMsgType(getDomLookup(type));
            event.setQueueType(getDomLookup(QueueType.EDATTENDANCE));
            factory.save(event);
        }
    }
}
项目:openMAXIMS    文件:EDPartialAdmissionDialogImpl.java   
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);
        }
    }
}
项目:openmaxims-linux    文件:PatientMergeImpl.java   
public void saveMessageQueueForProvider(MergeRequest request, PatientMergeHistory history, Patient destPatient, Patient sourcePatient) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    String hql = " select prov from ProviderSystem prov join prov.configItems cfg where " +
                     " cfg.propertyName = 'SendDeomgraphicFeed' and cfg.propertyValue='TRUE'";

    List lst = factory.find(hql);

    for (int i=0; i<lst.size(); i++)
    {

        ProviderSystem prov = (ProviderSystem) lst.get(i);

        DemographicsMessageQueue queue = new DemographicsMessageQueue();
        queue.setMergeHistory(history);
        queue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
        queue.setMsgType(getDomLookup(MsgEventType.A40));
        queue.setQueueType(getDomLookup(QueueType.DEMOGRAPHICFEED));
        queue.setPatient(destPatient);
        queue.setPriorPatient(sourcePatient);
        queue.setProviderSystem(prov);
        factory.save(queue);
    }
}
项目:openmaxims-linux    文件:EmergencyAttendanceDetailsCcImpl.java   
private void triggerAttendanceEvent(EmergencyAttendanceRefVo emergencyAttendance,LookupInstVo type) throws StaleObjectException
{
    if(emergencyAttendance!=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.EDATTENDANCE.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            EdAttendanceMessageQueue event = new EdAttendanceMessageQueue();
            event.setAttendance((EmergencyAttendance)factory.getDomainObject(emergencyAttendance));
            event.setProviderSystem(providerSystem);
            event.setWasProcessed(Boolean.FALSE);
            event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            event.setMsgType(getDomLookup(type));
            event.setQueueType(getDomLookup(QueueType.EDATTENDANCE));
            factory.save(event);
        }
    }
}
项目:openmaxims-linux    文件:EDPartialAdmissionDialogImpl.java   
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);
        }
    }
}
项目:AvoinApotti    文件:DnaBatchUpdateImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:AvoinApotti    文件:OCSExternalEventsImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);

    if(type !=null //http://jira/browse/WDEV-12816 If it is not radiology then we doon't need a message
            &&ExternalSystemEventTypes.PATIENTARRIVING.getID()==type.getID()
            &&domBookAppt!=null&&domBookAppt.getSession()!=null
            &&domBookAppt.getSession().getService()!=null
            &&domBookAppt.getSession().getService().getServiceCategory()!=null
            &&ServiceCategory.RADIOLOGY_MODALITY.getID()!=domBookAppt.getSession().getService().getServiceCategory().getId())
    {
        return;
    }

    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:openMAXIMS    文件:PatientMergeImpl.java   
public void saveMessageQueueForProvider(MergeRequest request, PatientMergeHistory history, Patient destPatient, Patient sourcePatient) throws StaleObjectException
    {
        DomainFactory factory = getDomainFactory();
//      String hql = " select prov from ProviderSystem prov join prov.configItems cfg where " +
//                       " cfg.propertyName = 'SendDeomgraphicFeed' and cfg.propertyValue='TRUE'";

        String hql = "select ot.providerSystem from OutboundTriggers as ot left join ot.queueType as qt left join qt.instance as i"
                + " where(i.id = "+QueueType.DEMOGRAPHICFEED.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hql);


//      List lst = factory.find(hql);

        for (int i=0; i<list.size(); i++)
        {

            ProviderSystem prov = (ProviderSystem) list.get(i);

            DemographicsMessageQueue queue = new DemographicsMessageQueue();
            queue.setMergeHistory(history);
            queue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            queue.setMsgType(getDomLookup(MsgEventType.A40));
            queue.setQueueType(getDomLookup(QueueType.DEMOGRAPHICFEED));
            queue.setPatient(destPatient);
            queue.setPriorPatient(sourcePatient);
            queue.setProviderSystem(prov);
            factory.save(queue);
        }
    }
项目:openMAXIMS    文件:DnaBatchUpdateImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:openMAXIMS    文件:OCSExternalEventsImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);

    if(type !=null //http://jira/browse/WDEV-12816 If it is not radiology then we doon't need a message
            &&ExternalSystemEventTypes.PATIENTARRIVING.getID()==type.getID()
            &&domBookAppt!=null&&domBookAppt.getSession()!=null
            &&domBookAppt.getSession().getService()!=null
            &&domBookAppt.getSession().getService().getServiceCategory()!=null
            &&ServiceCategory.RADIOLOGY_MODALITY.getID()!=domBookAppt.getSession().getService().getServiceCategory().getId())
    {
        return;
    }

    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:openMAXIMS    文件:RemoveFromElectiveListImpl.java   
public void triggerElectiveListEvent(PatientElectiveListVo patientElectiveList) throws StaleObjectException
{   
    if (patientElectiveList != 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.ELECTIVELIST.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList((PatientElectiveList)factory.getDomainObject(patientElectiveList));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setMsgType(getDomLookup(MsgEventType.A38));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));

            //WDEV-20680
            Boolean unProcessedCancelledTCI = checkForUnprocessedCancelledTCIForPatElectList(patientElectiveList);
            if(unProcessedCancelledTCI)
            {
                factory.save(messageQueue);
            } //WDEV-20680
        }
    }
}
项目:openMAXIMS    文件:DnaBatchUpdateImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:openMAXIMS    文件:OCSExternalEventsImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);

    if(type !=null //http://jira/browse/WDEV-12816 If it is not radiology then we doon't need a message
            &&ExternalSystemEventTypes.PATIENTARRIVING.getID()==type.getID()
            &&domBookAppt!=null&&domBookAppt.getSession()!=null
            &&domBookAppt.getSession().getService()!=null
            &&domBookAppt.getSession().getService().getServiceCategory()!=null
            &&ServiceCategory.RADIOLOGY_MODALITY.getID()!=domBookAppt.getSession().getService().getServiceCategory().getId())
    {
        return;
    }

    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:openmaxims-linux    文件:DnaBatchUpdateImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:openmaxims-linux    文件:OCSExternalEventsImpl.java   
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");

    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        event.setInvestigation(domInv);
        event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem());
    }

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);

    if(type !=null //http://jira/browse/WDEV-12816 If it is not radiology then we doon't need a message
            &&ExternalSystemEventTypes.PATIENTARRIVING.getID()==type.getID()
            &&domBookAppt!=null&&domBookAppt.getSession()!=null
            &&domBookAppt.getSession().getService()!=null
            &&domBookAppt.getSession().getService().getServiceCategory()!=null
            &&ServiceCategory.RADIOLOGY_MODALITY.getID()!=domBookAppt.getSession().getService().getServiceCategory().getId())
    {
        return;
    }

    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(type));
    factory.save(event);
}
项目:AvoinApotti    文件:OCSExternalEventsImpl.java   
public void generateAppointmentCancelEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");
    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        if (domInv.getInvestigation()!=null&&domInv.getInvestigation().getProviderService()!=null&&domInv.getInvestigation().getProviderService().getLocationService()!=null
                &&domInv.getInvestigation().getProviderService().getLocationService().getService()!=null
                &&!(ServiceCategory.RADIOLOGY_MODALITY.getID()==( domInv.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory().getId())))

            return;

        event.setInvestigation(domInv);
        ProviderSystem providerSystem=domInv.getInvestigation().getProviderService().getProviderSystem();
        if(!isRebookApptWithCancelandFullXOSetForProviderSystem(providerSystem))
            return;

        event.setProviderSystem(providerSystem);
    }

    if (ReferralManagementContractType.DIAGNOSTIC.getId() == getContractTypeIdFromReferralContractForBookingId(appointment.getBoId()))
        return;

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(ExternalSystemEventTypes.CANCELAPPOINTMENT));
    if(domBookAppt!=null &&domBookAppt.getSession()!=null)
    {
        event.setCancelledAppointmentLocation(domBookAppt.getSession().getSchLocation());
    }
    factory.save(event);

}
项目:openMAXIMS    文件:OCSExternalEventsImpl.java   
public void generateAppointmentCancelEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");
    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        if (domInv.getInvestigation()!=null&&domInv.getInvestigation().getProviderService()!=null&&domInv.getInvestigation().getProviderService().getLocationService()!=null
                &&domInv.getInvestigation().getProviderService().getLocationService().getService()!=null
                &&!(ServiceCategory.RADIOLOGY_MODALITY.getID()==( domInv.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory().getId())))

            return;

        event.setInvestigation(domInv);
        ProviderSystem providerSystem=domInv.getInvestigation().getProviderService().getProviderSystem();
        if(!isRebookApptWithCancelandFullXOSetForProviderSystem(providerSystem))
            return;

        event.setProviderSystem(providerSystem);
    }

    if (ReferralManagementContractType.DIAGNOSTIC.getId() == getContractTypeIdFromReferralContractForBookingId(appointment.getBoId()))
        return;

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(ExternalSystemEventTypes.CANCELAPPOINTMENT));
    if(domBookAppt!=null &&domBookAppt.getSession()!=null)
    {
        event.setCancelledAppointmentLocation(domBookAppt.getSession().getSchLocation());
    }
    factory.save(event);

}
项目:openMAXIMS    文件:ElectiveListDetailsImpl.java   
public void triggerElectiveListEvent(PatientElectiveListRefVo patientElectiveList) throws StaleObjectException
{
    if (patientElectiveList == null)
        return;

    PatientElectiveListVo patientElectList = PatientElectiveListVoAssembler.create((PatientElectiveList) getDomainFactory().getDomainObject(PatientElectiveList.class, patientElectiveList.getID_PatientElectiveList()));

    if(patientElectList != 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.ELECTIVELIST.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList((PatientElectiveList)factory.getDomainObject(patientElectList));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));

            if (patientElectList.getElectiveListStatusIsNotNull()
                    && patientElectList.getElectiveListStatus().getElectiveListStatusIsNotNull())
            {
                if ((WaitingListStatus.TCI_GIVEN.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID()
                        //WDEV-20795 Ensure that A05 is created when elective list is SUSPENDED and TCI is created!
                        || WaitingListStatus.SUSPENDED.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID())
                    && patientElectList.getTCIDetailsIsNotNull()
                    && patientElectList.getTCIDetails().getTCIDateIsNotNull())
                {
                    messageQueue.setMsgType(getDomLookup(MsgEventType.A05));
                }
                if ((WaitingListStatus.REQUIRES_TCI.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID())
                        //WDEV-20795 Create A38 when elective list status is SUSPENDED and TCI is being cancelled
                        || WaitingListStatus.SUSPENDED.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID())
                {
                    Boolean unProcessedCancelledTCI = checkForUnprocessedCancelledTCIForPatElectList(patientElectList);
                    if(unProcessedCancelledTCI)
                    {
                        messageQueue.setMsgType(getDomLookup(MsgEventType.A38));
                    }
                }
            }

            if (messageQueue.getMsgType() != null)
            {
                factory.save(messageQueue);
            }
        }
    } //WDEV-20680
}
项目:openMAXIMS    文件:NewElectiveListTCIErodDialogImpl.java   
public void triggerElectiveListEvent(PatientElectiveListRefVo patientElectiveList) throws StaleObjectException
{

    if (patientElectiveList == null)
        return;

    PatientElectiveListVo patientElectList = PatientElectiveListVoAssembler.create((PatientElectiveList) getDomainFactory().getDomainObject(PatientElectiveList.class, patientElectiveList.getID_PatientElectiveList()));

    if(patientElectList != 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.ELECTIVELIST.getId()+")";

        java.util.List<ProviderSystem> list = factory.find(hqlString);
        for (ProviderSystem providerSystem : list)
        {
            ElectiveListMessageQueue messageQueue = new ElectiveListMessageQueue();
            messageQueue.setPatientElectiveList((PatientElectiveList)factory.getDomainObject(patientElectList));
            messageQueue.setProviderSystem(providerSystem);
            messageQueue.setWasProcessed(Boolean.FALSE);
            messageQueue.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
            messageQueue.setQueueType(getDomLookup(QueueType.ELECTIVELIST));

            if (patientElectList.getElectiveListStatusIsNotNull()
                    && patientElectList.getElectiveListStatus().getElectiveListStatusIsNotNull())
            {
                if ((WaitingListStatus.TCI_GIVEN.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID()
                        //WDEV-20795 Ensure that A05 is created when elective list is SUSPENDED and TCI is created!
                        || WaitingListStatus.SUSPENDED.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID())
                    && patientElectList.getTCIDetailsIsNotNull()
                    && patientElectList.getTCIDetails().getTCIDateIsNotNull())
                {
                    messageQueue.setMsgType(getDomLookup(MsgEventType.A05));
                }
                if ((WaitingListStatus.REQUIRES_TCI.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID())
                        //WDEV-20795 Create A38 when elective list status is SUSPENDED and TCI is being cancelled
                        || WaitingListStatus.SUSPENDED.getId() == patientElectList.getElectiveListStatus().getElectiveListStatus().getID())
                {
                    Boolean unProcessedCancelledTCI = checkForUnprocessedCancelledTCIForPatElectList(patientElectList);
                    if(unProcessedCancelledTCI)
                    {
                        messageQueue.setMsgType(getDomLookup(MsgEventType.A38));
                    }
                }
            }

            if (messageQueue.getMsgType() != null)
            {
                factory.save(messageQueue);
            }
        }
    } //WDEV-20680

}
项目:openMAXIMS    文件:OCSExternalEventsImpl.java   
public void generateAppointmentCancelEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");
    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        if (domInv.getInvestigation()!=null&&domInv.getInvestigation().getProviderService()!=null&&domInv.getInvestigation().getProviderService().getLocationService()!=null
                &&domInv.getInvestigation().getProviderService().getLocationService().getService()!=null
                &&!(ServiceCategory.RADIOLOGY_MODALITY.getID()==( domInv.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory().getId())))

            return;

        event.setInvestigation(domInv);
        ProviderSystem providerSystem=domInv.getInvestigation().getProviderService().getProviderSystem();
        if(!isRebookApptWithCancelandFullXOSetForProviderSystem(providerSystem))
            return;

        event.setProviderSystem(providerSystem);
    }

    if (ReferralManagementContractType.DIAGNOSTIC.getId() == getContractTypeIdFromReferralContractForBookingId(appointment.getBoId()))
        return;

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(ExternalSystemEventTypes.CANCELAPPOINTMENT));
    if(domBookAppt!=null &&domBookAppt.getSession()!=null)
    {
        event.setCancelledAppointmentLocation(domBookAppt.getSession().getSchLocation());
    }
    factory.save(event);

}
项目:openmaxims-linux    文件:OCSExternalEventsImpl.java   
public void generateAppointmentCancelEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation) throws StaleObjectException
{
    if (null == appointment)
        throw new DomainRuntimeException("Appointment Cannot be NULL");
    DomainFactory factory = getDomainFactory();
    ExternalSystemEvent event = new ExternalSystemEvent();

    // We need to deal with null investigations
    // when (not )sending the messages
    if (null != investigation) 
    {
        OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation);

        //WDEV-5912 For Investigations marked as NoInterface there are no interface calls
        if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null &&  domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface())
            return;

        if (domInv.getInvestigation()!=null&&domInv.getInvestigation().getProviderService()!=null&&domInv.getInvestigation().getProviderService().getLocationService()!=null
                &&domInv.getInvestigation().getProviderService().getLocationService().getService()!=null
                &&!(ServiceCategory.RADIOLOGY_MODALITY.getID()==( domInv.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory().getId())))

            return;

        event.setInvestigation(domInv);
        ProviderSystem providerSystem=domInv.getInvestigation().getProviderService().getProviderSystem();
        if(!isRebookApptWithCancelandFullXOSetForProviderSystem(providerSystem))
            return;

        event.setProviderSystem(providerSystem);
    }

    if (ReferralManagementContractType.DIAGNOSTIC.getId() == getContractTypeIdFromReferralContractForBookingId(appointment.getBoId()))
        return;

    Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment);
    event.setAppointment(domBookAppt);
    event.setWasProcessed(Boolean.FALSE);
    event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED));
    event.setEventType(getDomLookup(ExternalSystemEventTypes.CANCELAPPOINTMENT));
    if(domBookAppt!=null &&domBookAppt.getSession()!=null)
    {
        event.setCancelledAppointmentLocation(domBookAppt.getSession().getSchLocation());
    }
    factory.save(event);

}