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

项目: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    文件:Logic.java   
private void OutBoundSearch()
{
    if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue() != null && form.lyrHL7().tabDemographicFeed().dtimEnd().getValue() != null) //wdev-14649
    {
        if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue().isGreaterThan(form.lyrHL7().tabDemographicFeed().dtimEnd().getValue()))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date"});
            return;
        }
    }

    DateTime start = form.lyrHL7().tabDemographicFeed().dtimStart().getValue();
    DateTime end = form.lyrHL7().tabDemographicFeed().dtimEnd().getValue();
    PatientId patId = new PatientId();
    patId.setType(form.lyrHL7().tabDemographicFeed().cmbPatId().getValue());
    patId.setValue(form.lyrHL7().tabDemographicFeed().txtOBPatId().getValue());
    MsgEventType msgType =  form.lyrHL7().tabDemographicFeed().cmbMsgType().getValue();
    ProviderSystemRefVo providerSystem = form.lyrHL7().tabDemographicFeed().cmbProviderSystem().getValue();
    populate(domain.getOBFeedEntries(start, end, patId, msgType, providerSystem));
}
项目: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    文件: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    文件:Logic.java   
private void OutBoundSearch()
{
    if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue() != null && form.lyrHL7().tabDemographicFeed().dtimEnd().getValue() != null) //wdev-14649
    {
        if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue().isGreaterThan(form.lyrHL7().tabDemographicFeed().dtimEnd().getValue()))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date"});
            return;
        }
    }

    DateTime start = form.lyrHL7().tabDemographicFeed().dtimStart().getValue();
    DateTime end = form.lyrHL7().tabDemographicFeed().dtimEnd().getValue();
    PatientId patId = new PatientId();
    patId.setType(form.lyrHL7().tabDemographicFeed().cmbPatId().getValue());
    patId.setValue(form.lyrHL7().tabDemographicFeed().txtOBPatId().getValue());
    MsgEventType msgType =  form.lyrHL7().tabDemographicFeed().cmbMsgType().getValue();
    ProviderSystemRefVo providerSystem = form.lyrHL7().tabDemographicFeed().cmbProviderSystem().getValue();
    populate(domain.getOBFeedEntries(start, end, patId, msgType, providerSystem));
}
项目: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    文件:Logic.java   
private void OutBoundSearch()
{
    if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue() != null && form.lyrHL7().tabDemographicFeed().dtimEnd().getValue() != null) //wdev-14649
    {
        if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue().isGreaterThan(form.lyrHL7().tabDemographicFeed().dtimEnd().getValue()))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date"});
            return;
        }
    }

    DateTime start = form.lyrHL7().tabDemographicFeed().dtimStart().getValue();
    DateTime end = form.lyrHL7().tabDemographicFeed().dtimEnd().getValue();
    PatientId patId = new PatientId();
    patId.setType(form.lyrHL7().tabDemographicFeed().cmbPatId().getValue());
    patId.setValue(form.lyrHL7().tabDemographicFeed().txtOBPatId().getValue());
    MsgEventType msgType =  form.lyrHL7().tabDemographicFeed().cmbMsgType().getValue();
    ProviderSystemRefVo providerSystem = form.lyrHL7().tabDemographicFeed().cmbProviderSystem().getValue();
    populate(domain.getOBFeedEntries(start, end, patId, msgType, providerSystem));
}
项目: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    文件:Logic.java   
private void OutBoundSearch()
{
    if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue() != null && form.lyrHL7().tabDemographicFeed().dtimEnd().getValue() != null) //wdev-14649
    {
        if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue().isGreaterThan(form.lyrHL7().tabDemographicFeed().dtimEnd().getValue()))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date"});
            return;
        }
    }

    DateTime start = form.lyrHL7().tabDemographicFeed().dtimStart().getValue();
    DateTime end = form.lyrHL7().tabDemographicFeed().dtimEnd().getValue();
    PatientId patId = new PatientId();
    patId.setType(form.lyrHL7().tabDemographicFeed().cmbPatId().getValue());
    patId.setValue(form.lyrHL7().tabDemographicFeed().txtOBPatId().getValue());
    MsgEventType msgType =  form.lyrHL7().tabDemographicFeed().cmbMsgType().getValue();
    ProviderSystemRefVo providerSystem = form.lyrHL7().tabDemographicFeed().cmbProviderSystem().getValue();
    populate(domain.getOBFeedEntries(start, end, patId, msgType, providerSystem));
}
项目: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);
}
项目: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    文件:PDSDemographicsImpl.java   
@Override
public Patient activateDeactivatePatient(Patient patient) throws DomainInterfaceException, StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException, UnqViolationUncheckedException
{
    if (patient == null)
        return null;

    DomainFactory factory = getDomainFactory();

    patient.setIsActive(!patient.getIsActive());

    ims.core.patient.domain.objects.Patient domPat = PatientAssembler.extractPatient(factory, patient);

    //WDEV-20593 Trigger HL7 message
    //WDEV-21056 Trigger HL7 message when patient is recativated as well
    if (patient.getIsActive() != null)
    {
        if (Boolean.TRUE.equals(patient.getIsActive()))
        {
            triggerDemographicEvent(domPat, MsgEventType.A31);
        }
        else
        {
            triggerDemographicEvent(domPat, MsgEventType.A29);
        }
    }

    factory.save(domPat);

    return PatientAssembler.create(domPat);
}
项目: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-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);
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public void triggerAttendanceRegistrationEvent(EmergencyAttendanceRefVo emergencyAttendance) throws StaleObjectException
{
    triggerAttendanceEvent(emergencyAttendance,MsgEventType.A01);   
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public void triggerAttendanceUpdateEvent(EmergencyAttendanceRefVo emergencyAttendance) throws StaleObjectException
{
    triggerAttendanceEvent(emergencyAttendance,MsgEventType.A08);   
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public void triggerAttendanceDischargeEvent(EmergencyAttendanceRefVo emergencyAttendance) throws StaleObjectException
{
    triggerAttendanceEvent(emergencyAttendance,MsgEventType.A03);   
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public void triggerAttendanceCancelDischargeEvent(EmergencyAttendanceRefVo emergencyAttendance) throws StaleObjectException
{
    triggerAttendanceEvent(emergencyAttendance,MsgEventType.A13);   
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public void triggerAttendanceCancelRegistrationEvent(EmergencyAttendanceRefVo emergencyAttendance) throws StaleObjectException
{
    triggerAttendanceEvent(emergencyAttendance,MsgEventType.A11);   
}
项目:AvoinApotti    文件:EDPartialAdmissionDialogImpl.java   
public void triggerCancelPartialAdmission(EmergencyAttendanceRefVo edAttendance,EDPartialAdmissionRefVo partialAdmission)throws DomainInterfaceException, StaleObjectException
{
    triggerPartialAdmissionEvent(edAttendance,partialAdmission,MsgEventType.A11);
}
项目:AvoinApotti    文件:EDPartialAdmissionDialogImpl.java   
public void triggerCreatePartialAdmission(EmergencyAttendanceRefVo edAttendance,EDPartialAdmissionRefVo partialAdmission)throws DomainInterfaceException, StaleObjectException 
{
    triggerPartialAdmissionEvent(edAttendance,partialAdmission,MsgEventType.A01);
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerAdmissionEvent(PASEventRefVo pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A01);    
}
项目:openMAXIMS    文件:ADTImpl.java   
private void triggerAdmissionEvent(PASEvent pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A01);        
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerTransferEvent(PASEventRefVo pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A02);    
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerDischargeEvent(PASEventRefVo pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A03);    
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerCancelAdmissionEvent(PASEventRefVo pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A11);    
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerCancelTransferEvent(PASEventRefVo pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A12);    
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerCancelDischargeEvent(PASEventRefVo pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A13);    
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerUpdateAdmissionEvent(PASEventRefVo pasEvent,MsgUpdateType type) throws StaleObjectException //http://jira/browse/WDEV-22831
{
    triggerADTEvent(pasEvent, MsgEventType.A08,type);   
}
项目:openMAXIMS    文件:ADTImpl.java   
public void triggerLeaveOfAbsenceEvent(PASEventRefVo pasEvent) throws StaleObjectException
{
    triggerADTEvent(pasEvent, MsgEventType.A21);    
}