Java 类ims.core.vo.lookups.QueueType 实例源码

项目: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    文件:OcsIfInboundImpl.java   
public IfOrderInvestigationVo saveOrderInvestigation(IfOrderInvestigationVo ordInv, Boolean isChangeInv,ProviderSystemRefVo providerSystem) throws StaleObjectException {
    if (ordInv == null)
        throw new DomainRuntimeException("Cannot save a null order investigation record!");
    if (!ordInv.isValidated())
        throw new CodingRuntimeException("Order Investigation ValueObject has not been validated");

    DomainFactory factory = getDomainFactory();
    OrderInvestigation domOrdInv = IfOrderInvestigationVoAssembler.extractOrderInvestigation(factory, ordInv);

    OrderedInvestigationStatus currStatus = domOrdInv.getOrdInvCurrentStatus();
    domOrdInv.getOrdInvStatusHistory().add(currStatus);
    if(isChangeInv!=null&&isChangeInv&&providerSystem!=null)
    {
        domOrdInv.getOrdInvXOStatusHistory().add(currStatus);
        OrderChangeResponseQueue response = new OrderChangeResponseQueue();
        response.setStatusReason(currStatus.getStatusReason());
        response.setCausingStatus(currStatus.getOrdInvStatus());
        response.setInvestigation(domOrdInv);
        response.setQueueType(getDomLookup(QueueType.ORDERCHANGERESPONSE));
        response.setProviderSystem((ProviderSystem)factory.getDomainObject(ProviderSystem.class, providerSystem.getID_ProviderSystem()));
        response.setMsgType(getDomLookup(MsgEventType.O20));
        factory.save(response);
    }


    factory.save(domOrdInv);        
    return IfOrderInvestigationVoAssembler.create(domOrdInv);
}
项目:AvoinApotti    文件:OcsIfImpl.java   
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;
}
项目:openMAXIMS    文件:OcsIfInboundImpl.java   
public IfOrderInvestigationVo saveOrderInvestigation(IfOrderInvestigationVo ordInv, Boolean isChangeInv,ProviderSystemRefVo providerSystem) throws StaleObjectException {
    if (ordInv == null)
        throw new DomainRuntimeException("Cannot save a null order investigation record!");
    if (!ordInv.isValidated())
        throw new CodingRuntimeException("Order Investigation ValueObject has not been validated");

    DomainFactory factory = getDomainFactory();
    OrderInvestigation domOrdInv = IfOrderInvestigationVoAssembler.extractOrderInvestigation(factory, ordInv);

    OrderedInvestigationStatus currStatus = domOrdInv.getOrdInvCurrentStatus();
    domOrdInv.getOrdInvStatusHistory().add(currStatus);
    if(isChangeInv!=null&&isChangeInv&&providerSystem!=null)
    {
        domOrdInv.getOrdInvXOStatusHistory().add(currStatus);
        OrderChangeResponseQueue response = new OrderChangeResponseQueue();
        response.setStatusReason(currStatus.getStatusReason());
        response.setCausingStatus(currStatus.getOrdInvStatus());
        response.setInvestigation(domOrdInv);
        response.setQueueType(getDomLookup(QueueType.ORDERCHANGERESPONSE));
        response.setProviderSystem((ProviderSystem)factory.getDomainObject(ProviderSystem.class, providerSystem.getID_ProviderSystem()));
        response.setMsgType(getDomLookup(MsgEventType.O20));
        factory.save(response);
    }


    factory.save(domOrdInv);        
    return IfOrderInvestigationVoAssembler.create(domOrdInv);
}
项目: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    文件: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    文件:OcsIfInboundImpl.java   
public IfOrderInvestigationVo saveOrderInvestigation(IfOrderInvestigationVo ordInv, Boolean isChangeInv,ProviderSystemRefVo providerSystem) throws StaleObjectException {
    if (ordInv == null)
        throw new DomainRuntimeException("Cannot save a null order investigation record!");
    if (!ordInv.isValidated())
        throw new CodingRuntimeException("Order Investigation ValueObject has not been validated");

    DomainFactory factory = getDomainFactory();
    OrderInvestigation domOrdInv = IfOrderInvestigationVoAssembler.extractOrderInvestigation(factory, ordInv);

    OrderedInvestigationStatus currStatus = domOrdInv.getOrdInvCurrentStatus();
    domOrdInv.getOrdInvStatusHistory().add(currStatus);
    if(isChangeInv!=null&&isChangeInv&&providerSystem!=null)
    {
        domOrdInv.getOrdInvXOStatusHistory().add(currStatus);
        OrderChangeResponseQueue response = new OrderChangeResponseQueue();
        response.setStatusReason(currStatus.getStatusReason());
        response.setCausingStatus(currStatus.getOrdInvStatus());
        response.setInvestigation(domOrdInv);
        response.setQueueType(getDomLookup(QueueType.ORDERCHANGERESPONSE));
        response.setProviderSystem((ProviderSystem)factory.getDomainObject(ProviderSystem.class, providerSystem.getID_ProviderSystem()));
        response.setMsgType(getDomLookup(MsgEventType.O20));
        factory.save(response);
    }


    factory.save(domOrdInv);        
    return IfOrderInvestigationVoAssembler.create(domOrdInv);
}
项目:openMAXIMS    文件:OcsIfImpl.java   
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;
}
项目:openmaxims-linux    文件:OcsIfInboundImpl.java   
public IfOrderInvestigationVo saveOrderInvestigation(IfOrderInvestigationVo ordInv, Boolean isChangeInv,ProviderSystemRefVo providerSystem) throws StaleObjectException {
    if (ordInv == null)
        throw new DomainRuntimeException("Cannot save a null order investigation record!");
    if (!ordInv.isValidated())
        throw new CodingRuntimeException("Order Investigation ValueObject has not been validated");

    DomainFactory factory = getDomainFactory();
    OrderInvestigation domOrdInv = IfOrderInvestigationVoAssembler.extractOrderInvestigation(factory, ordInv);

    OrderedInvestigationStatus currStatus = domOrdInv.getOrdInvCurrentStatus();
    domOrdInv.getOrdInvStatusHistory().add(currStatus);
    if(isChangeInv!=null&&isChangeInv&&providerSystem!=null)
    {
        domOrdInv.getOrdInvXOStatusHistory().add(currStatus);
        OrderChangeResponseQueue response = new OrderChangeResponseQueue();
        response.setStatusReason(currStatus.getStatusReason());
        response.setCausingStatus(currStatus.getOrdInvStatus());
        response.setInvestigation(domOrdInv);
        response.setQueueType(getDomLookup(QueueType.ORDERCHANGERESPONSE));
        response.setProviderSystem((ProviderSystem)factory.getDomainObject(ProviderSystem.class, providerSystem.getID_ProviderSystem()));
        response.setMsgType(getDomLookup(MsgEventType.O20));
        factory.save(response);
    }


    factory.save(domOrdInv);        
    return IfOrderInvestigationVoAssembler.create(domOrdInv);
}
项目:openmaxims-linux    文件:OcsIfImpl.java   
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;
}
项目: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

}