Java 类ims.emergency.vo.lookups.AllocationStatus 实例源码

项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnTransferClick() throws PresentationLogicException
{
    //wdev-16867
    TrackingWithPartialAdmissionVo trackingWithDNW = domain.getTrackingWithEDPartialAdmission((TrackingVo) form.dyngrdTrack().getValue());
    if( trackingWithDNW != null )
        form.getGlobalContext().Emergency.setEDTransferVo(trackingWithDNW.getCurrentTransferRecord());

    if( trackingWithDNW.getCurrentPartialAdmissionIsNotNull() && !AllocationStatus.CANCELLED_ADMISSION.equals(trackingWithDNW.getCurrentPartialAdmission().getAllocatedStatus()))
    {
        form.getLocalContext().setPartialAdmissionForTrackingVo(trackingWithDNW.getCurrentPartialAdmission());
        form.getLocalContext().setDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
    }
    else
        engine.open(form.getForms().Emergency.TransferDialog);
    //------------

}
项目:AvoinApotti    文件:TransferDialogImpl.java   
public ims.emergency.vo.EDTransferVo saveEDTransfer(EDTransferVo record, EDPartialAdmissionVo partialadmis) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null EDTransfer record.");


    DomainFactory factory = getDomainFactory();
    EDTransfer doEDTransfer = EDTransferVoAssembler.extractEDTransfer(factory, record);

    factory.save(doEDTransfer);

    if( partialadmis != null )
    {
        partialadmis.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialadmis);
        factory.save(doEDPartialAdmission);
    }

    return EDTransferVoAssembler.create(doEDTransfer);
}
项目:openMAXIMS    文件:Logic.java   
private void newInstance()
{
    clearControls();

    form.cmbAdmissionStatus().setValue(AllocationStatus.ACTIVE);
    form.getLocalContext().setCurrentEDPartialAdmission(null);
    form.dtimDecisionToAdmit().setValue(new DateTime());

    TrackingForEDPartialAdmissionVo currentTracking = form.getLocalContext().getCurrentTrackingForEdPartialAdmission();
    form.cmbSpecialty().setValue(currentTracking!=null && currentTracking.getCurrentReferralIsNotNull() ? currentTracking.getCurrentReferral().getSpecialty() : null);  
    form.cmbPatientStatus().setValue(currentTracking!=null && currentTracking.getAttendanceIsNotNull() ? currentTracking.getAttendance().getPatientAttendanceStatus() : null);
    form.cmbAccomodationTypeRequested().setValue(currentTracking!=null && currentTracking.getAttendanceIsNotNull() ? currentTracking.getAttendance().getAccomodationRequestedType() : null);
    form.ccAuthoringInfo().initializeComponent();

    Object hcp = domain.getHcpUser();

    if (hcp instanceof HcpLiteVo)
    {
        form.ccConsultant().setValue((HcpLiteVo) hcp);
    }

    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnTransferClick() throws PresentationLogicException
{
    //wdev-16867
    TrackingWithPartialAdmissionVo trackingWithDNW = domain.getTrackingWithEDPartialAdmission((TrackingVo) form.dyngrdTrack().getValue());
    if( trackingWithDNW != null )
        form.getGlobalContext().Emergency.setEDTransferVo(trackingWithDNW.getCurrentTransferRecord());

    if( trackingWithDNW.getCurrentPartialAdmissionIsNotNull() && !AllocationStatus.CANCELLED_ADMISSION.equals(trackingWithDNW.getCurrentPartialAdmission().getAllocatedStatus()))
    {
        form.getLocalContext().setPartialAdmissionForTrackingVo(trackingWithDNW.getCurrentPartialAdmission());
        form.getLocalContext().setDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
    }
    else
        engine.open(form.getForms().Emergency.TransferDialog);
    //------------

}
项目:openMAXIMS    文件:TransferDialogImpl.java   
public ims.emergency.vo.EDTransferVo saveEDTransfer(EDTransferVo record, EDPartialAdmissionVo partialadmis) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null EDTransfer record.");


    DomainFactory factory = getDomainFactory();
    EDTransfer doEDTransfer = EDTransferVoAssembler.extractEDTransfer(factory, record);

    factory.save(doEDTransfer);

    if( partialadmis != null )
    {
        partialadmis.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialadmis);
        factory.save(doEDPartialAdmission);
    }

    return EDTransferVoAssembler.create(doEDTransfer);
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnTransferClick() throws PresentationLogicException
{
    //wdev-16867
    TrackingWithPartialAdmissionVo trackingWithDNW = domain.getTrackingWithEDPartialAdmission((TrackingVo) form.dyngrdTrack().getValue());
    if( trackingWithDNW != null )
        form.getGlobalContext().Emergency.setEDTransferVo(trackingWithDNW.getCurrentTransferRecord());

    if( trackingWithDNW.getCurrentPartialAdmissionIsNotNull() && !AllocationStatus.CANCELLED_ADMISSION.equals(trackingWithDNW.getCurrentPartialAdmission().getAllocatedStatus()))
    {
        form.getLocalContext().setPartialAdmissionForTrackingVo(trackingWithDNW.getCurrentPartialAdmission());
        form.getLocalContext().setDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
    }
    else
        engine.open(form.getForms().Emergency.TransferDialog);
    //------------

}
项目:openmaxims-linux    文件:TransferDialogImpl.java   
public ims.emergency.vo.EDTransferVo saveEDTransfer(EDTransferVo record, EDPartialAdmissionVo partialadmis) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null EDTransfer record.");


    DomainFactory factory = getDomainFactory();
    EDTransfer doEDTransfer = EDTransferVoAssembler.extractEDTransfer(factory, record);

    factory.save(doEDTransfer);

    if( partialadmis != null )
    {
        partialadmis.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialadmis);
        factory.save(doEDPartialAdmission);
    }

    return EDTransferVoAssembler.create(doEDTransfer);
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    form.ccConsultant().isRequired(FormMode.EDIT.equals(form.getMode()));
    form.btnEdit().setVisible(FormMode.VIEW.equals(form.getMode()) && form.getLocalContext().getCurrentEDPartialAdmission()!=null);
    form.btnClose().setVisible(FormMode.VIEW.equals(form.getMode()));
    form.btnCreatedInError().setVisible(FormMode.VIEW.equals(form.getMode()) && form.getLocalContext().getCurrentEDPartialAdmission()!=null);

    AllocationStatus allocatedStatus = form.getLocalContext().getCurrentEDPartialAdmissionIsNotNull() && form.getLocalContext().getCurrentEDPartialAdmission().getAllocatedStatusIsNotNull() ? form.getLocalContext().getCurrentEDPartialAdmission().getAllocatedStatus() : null;

    form.btnCancelledNoBed().setVisible(FormMode.VIEW.equals(form.getMode()) && form.getLocalContext().getCurrentEDPartialAdmission()!=null && AllocationStatus.ACTIVE.equals(allocatedStatus)); //WDEV-19272 
    boolean isDTAPartial = FormMode.EDIT.equals(form.getMode()) && "PARTIAL".equals(ConfigFlag.GEN.ED_DTA_ADMISSION_FUNCTIONALITY.getValue());
    form.dtimBedAllocated().setEnabled(isDTAPartial);//WDEV-23267
    form.cmbBedAllocatedWard().setEnabled(isDTAPartial);//WDEV-23267
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnCreatedInErrorClick() throws PresentationLogicException
{
    if (createdInError(AllocationStatus.CREATED_IN_ERROR))
    {
        engine.close(DialogResult.CANCEL);
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnCancelledNoBedClick() throws PresentationLogicException
{
    if (createdInError(AllocationStatus.CANCELLED_NO_BED))
    {
        engine.close(DialogResult.CANCEL);
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnTransferClick() throws PresentationLogicException
{
    if(!(form.dyngrdTrack().getValue() instanceof TrackingVo))
        return;

    //wdev-16867
    TrackingWithPartialAdmissionVo trackingWithPatialAdmission = domain.getTrackingWithEDPartialAdmission((TrackingVo) form.dyngrdTrack().getValue());
    if (trackingWithPatialAdmission == null)
        return;

    form.getGlobalContext().Emergency.setEDTransferVo(trackingWithPatialAdmission.getCurrentTransferRecord());

    if( trackingWithPatialAdmission.getCurrentPartialAdmissionIsNotNull() && AllocationStatus.ACTIVE.equals(trackingWithPatialAdmission.getCurrentPartialAdmission().getAllocatedStatus()) 
        && (!trackingWithPatialAdmission.getCurrentTransferRecordIsNotNull() || (trackingWithPatialAdmission.getCurrentTransferRecordIsNotNull() && (trackingWithPatialAdmission.getCurrentTransferRecord().getAcceptedDateTimeIsNotNull() || Boolean.TRUE.equals(trackingWithPatialAdmission.getCurrentTransferRecord().getNotAccepted())) )))
    {
        form.getLocalContext().setPartialAdmissionForTrackingVo(trackingWithPatialAdmission);
        form.getLocalContext().setDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
    }
    else
    {
        form.getLocalContext().setPartialAdmissionForTrackingVo(null);
        engine.open(form.getForms().Emergency.TransferDialog);
    }
    //------------

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnNewTransferClick() throws PresentationLogicException 
{
    EDPartialAdmissionVo currentPartialAdm = domain.getTrackingWithEDPartialAdmission(form.getGlobalContext().Emergency.getTracking());

    if( currentPartialAdm != null && AllocationStatus.ACTIVE.equals(currentPartialAdm.getAllocatedStatus()))
    {
        form.getLocalContext().setlcCurrentPartialAdmission(currentPartialAdm);
        form.getLocalContext().setlcDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
        return;
    }

    newInstance();  
}
项目:openMAXIMS    文件:TransferDialogImpl.java   
public EDPartialAdmissionVo cancelCurrentPartialAdmission(EDPartialAdmissionVo edPartialAdmissionVo,TrackingForTransferVo trackingRecord) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    if( edPartialAdmissionVo != null )
    {
        edPartialAdmissionVo.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, edPartialAdmissionVo);
        factory.save(doEDPartialAdmission);

        if (trackingRecord != null)
        {
            Tracking dotrackingRecord = TrackingForTransferVoAssembler.extractTracking(factory, trackingRecord);
            dotrackingRecord.setCurrentPartialAdmission(null);
            dotrackingRecord.setBedAvailability(null);          
            factory.save(dotrackingRecord);

            EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class);
            try
            {
                dom.triggerCancelPartialAdmission(trackingRecord.getAttendance(), edPartialAdmissionVo);
            }
            catch (DomainInterfaceException e)
            {
                e.printStackTrace();
            }
        }

        return EDPartialAdmissionVoAssembler.create(doEDPartialAdmission);
    }
    return null;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public EDPartialAdmissionVo cancelCurrentPartialAdmission(EDPartialAdmissionVo edPartialAdmissionVo, TrackingForReferalToSpecialtyVo trackingRecord) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    if( edPartialAdmissionVo != null )
    {
        edPartialAdmissionVo.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, edPartialAdmissionVo);
        factory.save(doEDPartialAdmission);

        if (trackingRecord != null)
        {
            Tracking dotrackingRecord = TrackingForReferalToSpecialtyVoAssembler.extractTracking(factory, trackingRecord);
            dotrackingRecord.setBedAvailability(null);
            dotrackingRecord.setCurrentPartialAdmission(null);
            factory.save(dotrackingRecord);

            EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class);
            try
            {
                dom.triggerCancelPartialAdmission(trackingRecord.getAttendance(), edPartialAdmissionVo);
            }
            catch (DomainInterfaceException e)
            {
                e.printStackTrace();
            }
        }

        return EDPartialAdmissionVoAssembler.create(doEDPartialAdmission);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private TrackingLiteVo applyAssociatedTrackingWorkflow(TrackingAreaVo trackingArea)
{
    TrackingLiteVo trackingRecord = (TrackingLiteVo) form.getLocalContext().getTracking().clone();

    if (trackingRecord == null)
        return null;

    TrackingStatusWorkflowVo trackingWorkflowStatusConfiguration = domain.getTrackingWorkflowConfig(trackingArea.getWorkflowConfig());

    trackingRecord.setCurrentStatus(createTrackingStatus(trackingWorkflowStatusConfiguration.getTrackingStatus(), trackingRecord!=null && trackingRecord.getCurrentStatus()!=null ? trackingRecord.getCurrentStatus().getStatus() : null));

    if (trackingWorkflowStatusConfiguration != null && Boolean.TRUE.equals(trackingWorkflowStatusConfiguration.getRecordsConclusionDateTime()) && trackingRecord != null && trackingRecord.getAttendance() != null && trackingRecord.getAttendance().getConclusionDateTime() == null)
    {
        trackingRecord.getAttendance().setConclusionDateTime(new DateTime());
    }

    if (trackingWorkflowStatusConfiguration != null && Boolean.TRUE.equals(trackingWorkflowStatusConfiguration.getTriggersPreAdmissionPas()))
    {
        form.getLocalContext().setlcTriggePreAdmissionToPAS(true);
        CurrentPartialAdmissionForSendToAreaVo partialAdmission = null;

        // cancel the previous partial admission and set Tracking.CurrentPartialAdmission to null
        if (trackingRecord != null && trackingRecord.getCurrentPartialAdmissionIsNotNull() && AllocationStatus.ACTIVE.equals(trackingRecord.getCurrentPartialAdmission().getAllocatedStatus()))
        {
            partialAdmission = (CurrentPartialAdmissionForSendToAreaVo) trackingRecord.getCurrentPartialAdmission().clone();
            partialAdmission.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
            form.getLocalContext().setlcCurrentPartialAdmission(partialAdmission);

            trackingRecord.setCurrentPartialAdmission(null);
        }
    }

    if (trackingWorkflowStatusConfiguration != null && Boolean.TRUE.equals(trackingWorkflowStatusConfiguration.getRecordsEdAttendanceDeparture()) && trackingRecord != null && trackingRecord.getAttendance() != null)
    {
        Boolean continueDisplay = trackingWorkflowStatusConfiguration.getContinueDisplayInTracking();

        trackingRecord = dischargePatient(trackingRecord, trackingWorkflowStatusConfiguration, continueDisplay);

        if(Boolean.TRUE.equals(trackingWorkflowStatusConfiguration.getCreateNewCareContext()))
        {
            createNewCareContext(trackingRecord);
        }
    }

    return trackingRecord;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnTransferClick() throws PresentationLogicException
{
    //WDEV-19006 - start
    form.getLocalContext().setSelectedEvent(EDReferralToSpecialtyEvent.TRANSFER);

    form.dtimCompletion().setValue(new DateTime());

    ReferralToSpecialtyTeamVo referralToSave = populateDataFromScreen(form.getLocalContext().getSelectedReferralToSpecialty());
    form.getGlobalContext().Emergency.setReferralToSpecialtyTeam(referralToSave);

    String[] errors = referralToSave.validate(getUIErrors());
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return ;
    }

    // Check SOE
    if (referralToSave.getID_ReferralToSpecTeamIsNotNull() && domain.isStale(referralToSave))
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        if (form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
        {
            form.getLocalContext().setSelectedReferralToSpecialty(domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty()));
        }
        if (form.getLocalContext().getTrackingForReferralIsNotNull())
        {
            form.getLocalContext().setTrackingForReferral(domain.getTrackingForReferral(form.getLocalContext().getTrackingForReferral()));
        }
        open();
        return ;
    }

    TrackingWithPartialAdmissionVo trackingwithPartialAdmission = domain.getTrackingWithEDPartialAdmission(form.getGlobalContext().Emergency.getTracking());
    Boolean newTransfer = isNewTransfer(trackingwithPartialAdmission.getCurrentTransferRecord());
    if( trackingwithPartialAdmission != null && newTransfer && 
        trackingwithPartialAdmission.getCurrentPartialAdmissionIsNotNull() && AllocationStatus.ACTIVE.equals(trackingwithPartialAdmission.getCurrentPartialAdmission().getAllocatedStatus()))
    {
        form.getLocalContext().setlcCurrentPartialAdmission(trackingwithPartialAdmission.getCurrentPartialAdmission());
        form.getLocalContext().setlcDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
    }   
    else
        engine.open(form.getForms().Emergency.TransferDialog);
}