Java 类ims.core.vo.enums.BedInfoAction 实例源码

项目:openMAXIMS    文件:Logic.java   
private void setGCOnMenuAction(int menuAction)
{
    InpatientEpisodeForPendingDischargesVo selectedGridVal = form.grdDischarges().getValue();
    if (selectedGridVal == null)
        return;

    if (selectedGridVal.getBedIsNotNull())
    {   
        form.getGlobalContext().Core.setSelectedBedSpaceState(domain.getBedSpaceStateForInpatient(selectedGridVal.getBed()));
        if (GenForm.ContextMenus.CoreNamespace.PendingDischarges.DISCHARGE == menuAction)
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEPENDINGPATIENT);
    }
    else
    {   
        form.getGlobalContext().Core.setSelectedWaitingAreaPatient(domain.getWaitingAreaPatient(selectedGridVal));
        if (GenForm.ContextMenus.CoreNamespace.PendingDischarges.DISCHARGE == menuAction)
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEPENDINGPATIENT);

    }
    if (form.getGlobalContext().Core.getBedInfoAction() == null)
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.EDIT_READY_FOR_DISCHARGE);
    engine.open(form.getForms().Core.BedInfoDialog);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onlyrTransferTabChanged(LayerBridge tab)
{       
    if (tab.equals(form.lyrDetail().tabTransfer().lyrTransfer().tabIn()))
    {
        if (!form.lyrDetail().tabTransfer().lyrTransfer().tabIn().isInitialized())
        {
            populateTransferInListFromData();               
            form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().initialize(MosType.MEDIC);
        }
        form.getLocalContext().setTabFocused(BedDialogPatientDataTabs.TAB_TRANSFER_IN); //WDEV-17662
    }
    if (tab.equals(form.lyrDetail().tabTransfer().lyrTransfer().tabOut()))
    {
        if (!form.lyrDetail().tabTransfer().lyrTransfer().tabOut().isInitialized())
        {               
            populateTransferOutTabFromData();
        }
        form.getLocalContext().setTabFocused(BedDialogPatientDataTabs.TAB_TRANSFER_OUT); //WDEV-17662
        form.lyrDetail().tabTransfer().btnCancelTransfer().setVisible(form.getLocalContext().getPendingTransferOutIsNotNull() && (form.getGlobalContext().Core.getBedInfoAction() == null || BedInfoAction.TRANSFERWAITINGAREAPATIENT.equals(form.getGlobalContext().Core.getBedInfoAction())));
    }
    else if (tab.equals(form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant()))
    {
        if (!form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant().isInitialized())
        {               
            populateConsultantTransferTabFromData();
        }
        form.getLocalContext().setTabFocused(BedDialogPatientDataTabs.TAB_TRANSFER_CONSULTANT); //WDEV-17662
        form.lyrDetail().tabTransfer().btnCancelTransfer().setVisible(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void editHomeLeave()
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpis = isWardViewPatient &&  ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisodeIsNotNull();

    if (hasInpatientEpis)
    {
        WardViewPatientListVo selectedRecord = (WardViewPatientListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedSpaceStateIsNotNull())
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBedSpaceState());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);                   
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                 
            }
            else
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode());

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.EDITHOMELEAVE);
        }
        engine.open(form.getForms().Core.BedInfoDialog, new Object[] {BedDialogPatientDataTabs.TAB_RETURNFROMHOMELEAVE}); //WDEV-22522
    }

}
项目:openMAXIMS    文件:Logic.java   
private void vacatePatientBed()
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpis = isWardViewPatient &&  ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisodeIsNotNull();

    if (hasInpatientEpis)
    {
        WardViewPatientListVo selectedRecord = (WardViewPatientListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedSpaceStateIsNotNull())
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBedSpaceState());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);                   
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                 
            }
            else
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode());

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.VACATEBED);
        }
        engine.open(form.getForms().Core.BedInfoDialog, new Object[] {BedDialogPatientDataTabs.TAB_RETURNFROMHOMELEAVE}); //WDEV-22522
    }

}
项目:openMAXIMS    文件:Logic.java   
private void cancelReturnFromHomeLeave()
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpis = isWardViewPatient &&  ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisodeIsNotNull();

    if (hasInpatientEpis)
    {
        WardViewPatientListVo selectedRecord = (WardViewPatientListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedSpaceStateIsNotNull())
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBedSpaceState());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);                   
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                 
            }
            else
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode());

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.CANCELRETURNFROMHOMELEAVE);
        }
        engine.open(form.getForms().Core.BedInfoDialog);
    }

}
项目:openMAXIMS    文件:Logic.java   
private void cancelHomeLeave()
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpis = isWardViewPatient &&  ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisodeIsNotNull();

    if (hasInpatientEpis)
    {
        WardViewPatientListVo selectedRecord = (WardViewPatientListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedSpaceStateIsNotNull())
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBedSpaceState());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);                   
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                 
            }
            else
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode());

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.CANCELHOMELEAVE);
        }
        engine.open(form.getForms().Core.BedInfoDialog, new Object[] {BedDialogPatientDataTabs.TAB_CANCEL_RETURNFROMHOMELEAVE});
    }
}
项目:openMAXIMS    文件:Logic.java   
private void returnFromHomeLeave()
{   
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpis = isWardViewPatient &&  ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisodeIsNotNull();

    if (hasInpatientEpis)
    {
        WardViewPatientListVo selectedRecord = (WardViewPatientListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedSpaceStateIsNotNull())
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBedSpaceState());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);                   
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                 
            }
            else
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode());

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.RETURNFROMHOMELEAVE);
        }
        engine.open(form.getForms().Core.BedInfoDialog, new Object[] {BedDialogPatientDataTabs.TAB_RETURNFROMHOMELEAVE});
    }
}
项目:openMAXIMS    文件:Logic.java   
private void recordTransfer()
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpisode = isWardViewPatient && ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode() != null;
    boolean isOnHomeLeaveView = isWardViewPatient && hasInpatientEpisode && form.getLocalContext().getSelectedVIEW() != null && (form.getLocalContext().getSelectedVIEW().equals(ims.core.forms.wardviewpatientsummarycomponent.Logic.ROW_HOME_LEAVE) || form.getLocalContext().getSelectedVIEW().equals(ims.core.forms.wardviewpatientsummarycomponent.Logic.ROW_HOME_LEAVE_WITH_BED));
    boolean isPatientOnHomeLeave  = false;  
    boolean hasPendingTransfer = isWardViewPatient && (Boolean.TRUE.equals(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getHasPendingTransfer()) || ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getPendingTransfer() != null);

    if (isOnHomeLeaveView || (isWardViewPatient && hasInpatientEpisode))
    {
        WardViewPatientListVo selectedRecord = (WardViewPatientListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedSpaceStateIsNotNull())
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBedSpaceState());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                 
                isPatientOnHomeLeave = hasInpatientEpisode &&  selectedPatientBedSpace.getInpatientEpisodeIsNotNull() && Boolean.TRUE.equals(selectedPatientBedSpace.getInpatientEpisode().getIsOnHomeLeave());
            }
            else                
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode());

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
                isPatientOnHomeLeave = hasInpatientEpisode &&  Boolean.TRUE.equals(selectedInpatientEpisode.getIsOnHomeLeave());
            }
        }

        form.getGlobalContext().Core.setBedInfoAction(isOnHomeLeaveView  || isPatientOnHomeLeave ? BedInfoAction.TRANSFERHOMELEAVEPATIENT : (form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull() ? BedInfoAction.TRANSFERWAITINGAREAPATIENT : BedInfoAction.TRANSFERWARDPATIENT));
        if (hasInpatientEpisode || hasPendingTransfer)
        {   
            form.getGlobalContext().Core.setADTPendingTransfer(hasPendingTransfer ? domain.getPendingTransferLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getPendingTransfer()) : (hasInpatientEpisode ? domain.getPendingTransferForInpatientEpisode(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode()) : null));
        }
        engine.open(form.getForms().Core.BedInfoDialog, new Object[] {!isOnHomeLeaveView || hasPendingTransfer ? BedDialogPatientDataTabs.TAB_TRANSFER_OUT : BedDialogPatientDataTabs.TAB_TRANSFER_CONSULTANT});
    }
}
项目:openMAXIMS    文件:Logic.java   
private void dischargePatient() 
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;

    if (isWardViewPatient)
    {
        WardViewPatientListVo selectedRecord = (WardViewPatientListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedSpaceStateIsNotNull())
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBedSpaceState());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);                   
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                 
            }
            else
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode());

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEHOMELEAVEPATIENT);
        }

        engine.open(form.getForms().Core.BedInfoDialog, new Object[] {BedDialogPatientDataTabs.TAB_DISCHARGE});
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void cancelReturnFromHomeLeave()
{
    if (form.dyngrdPatients().getValue() == null)
        return;

    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof SpecialtyOutlierInpatientEpisodeListVo;

    if (isWardViewPatient)
    {
        SpecialtyOutlierInpatientEpisodeListVo selectedRecord = (SpecialtyOutlierInpatientEpisodeListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedIsNotNull() && selectedRecord.getBed().getBedSpace() != null)
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBed().getBedSpace());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                                 
            }
            else                
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((SpecialtyOutlierInpatientEpisodeListVo)form.dyngrdPatients().getValue()));

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
        }
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.CANCELRETURNFROMHOMELEAVE);

        engine.open(form.getForms().Core.BedInfoDialog);
    }   

}
项目:openMAXIMS    文件:Logic.java   
private void cancelHomeLeave()
{
    if (form.dyngrdPatients().getValue() == null)
        return;

    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof SpecialtyOutlierInpatientEpisodeListVo;

    if (isWardViewPatient)
    {
        SpecialtyOutlierInpatientEpisodeListVo selectedRecord = (SpecialtyOutlierInpatientEpisodeListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedIsNotNull() && selectedRecord.getBed().getBedSpace() != null)
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBed().getBedSpace());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                             
            }
            else                
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((SpecialtyOutlierInpatientEpisodeListVo)form.dyngrdPatients().getValue()));

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
        }
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.CANCELHOMELEAVE);

        engine.open(form.getForms().Core.BedInfoDialog);
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void returnFromHomeLeave()
{
    if (form.dyngrdPatients().getValue() == null)
        return;

    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof SpecialtyOutlierInpatientEpisodeListVo;

    if (isWardViewPatient)
    {
        SpecialtyOutlierInpatientEpisodeListVo selectedRecord = (SpecialtyOutlierInpatientEpisodeListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedIsNotNull() && selectedRecord.getBed().getBedSpace() != null)
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBed().getBedSpace());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                                 
            }
            else                
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((SpecialtyOutlierInpatientEpisodeListVo)form.dyngrdPatients().getValue()));

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
        }
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.RETURNFROMHOMELEAVE);

        engine.open(form.getForms().Core.BedInfoDialog);
    }   
}
项目:openMAXIMS    文件:Logic.java   
private void vacatePatientBed()
{
    if (form.dyngrdPatients().getValue() == null)
        return;

    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof SpecialtyOutlierInpatientEpisodeListVo;

    if (isWardViewPatient)
    {
        SpecialtyOutlierInpatientEpisodeListVo selectedRecord = (SpecialtyOutlierInpatientEpisodeListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedIsNotNull() && selectedRecord.getBed().getBedSpace() != null)
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBed().getBedSpace());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                                 
            }
            else                
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((SpecialtyOutlierInpatientEpisodeListVo)form.dyngrdPatients().getValue()));

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
        }
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.VACATEBED);

        engine.open(form.getForms().Core.BedInfoDialog);
    }   

}
项目:openMAXIMS    文件:Logic.java   
private void editHomeLeave()
{
    if (form.dyngrdPatients().getValue() == null)
        return;

    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof SpecialtyOutlierInpatientEpisodeListVo;

    if (isWardViewPatient)
    {
        SpecialtyOutlierInpatientEpisodeListVo selectedRecord = (SpecialtyOutlierInpatientEpisodeListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedIsNotNull() && selectedRecord.getBed().getBedSpace() != null)
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBed().getBedSpace());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                                 
            }
            else                
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((SpecialtyOutlierInpatientEpisodeListVo)form.dyngrdPatients().getValue()));

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
        }
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.EDITHOMELEAVE);

        engine.open(form.getForms().Core.BedInfoDialog);
    }   

}
项目:openMAXIMS    文件:Logic.java   
private void dischargePatient() 
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof SpecialtyOutlierInpatientEpisodeListVo;

    if (isWardViewPatient)
    {
        SpecialtyOutlierInpatientEpisodeListVo selectedRecord = (SpecialtyOutlierInpatientEpisodeListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedIsNotNull() && selectedRecord.getBed().getBedSpace() != null)
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBed().getBedSpace());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);                   
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                     
            }
            else
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((SpecialtyOutlierInpatientEpisodeListVo)form.dyngrdPatients().getValue()));

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEWARDPATIENT);
        }
        engine.open(form.getForms().Core.BedInfoDialog);
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void recordTransfer() 
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof SpecialtyOutlierInpatientEpisodeListVo;

    if (isWardViewPatient)
    {
        SpecialtyOutlierInpatientEpisodeListVo selectedRecord = (SpecialtyOutlierInpatientEpisodeListVo) form.dyngrdPatients().getValue();
        if (selectedRecord != null)
        {   
            if (selectedRecord.getBedIsNotNull() && selectedRecord.getBed().getBedSpace() != null)
            {
                BedSpaceStateLiteVo selectedPatientBedSpace = domain.getSelectedBedSpaceState(selectedRecord.getBed().getBedSpace());

                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null);
                form.getGlobalContext().Core.setSelectedBedSpaceState(selectedPatientBedSpace);                                 
            }
            else                
            {
                InpatientEpisodeLiteVo selectedInpatientEpisode = domain.getInpatientEpisodeLite(((SpecialtyOutlierInpatientEpisodeListVo)form.dyngrdPatients().getValue()));

                form.getGlobalContext().Core.setSelectedBedSpaceState(null);
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient(selectedInpatientEpisode);                   
            }
        }
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.TRANSFERWARDPATIENT);

        engine.open(form.getForms().Core.BedInfoDialog);
    }       
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.CoreNamespace.WardView.TRANSFER:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.TRANSFERWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.DISCHARGE:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.CANCEL_TRANSFER:
            cancelTransfer();
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.ASSIGNWARD:

            if( ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue() == true ) //wdev-18936
            {
                form.getGlobalContext().Core.setPatientElectiveListForWardViewVo((PatientElectiveListForWardViewVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
            }
            else
                form.getGlobalContext().Core.setPendingElectiveAdmission((PendingElectiveAdmissionAdmitVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());

            engine.open(form.getForms().Core.AssignWard);
        break;
        default :
        break;
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.CoreNamespace.WardView.TRANSFER:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.TRANSFERWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.DISCHARGE:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.CANCEL_TRANSFER:
            cancelTransfer();
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.ASSIGNWARD:

            if( ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue() == true ) //wdev-18936
            {
                form.getGlobalContext().Core.setPatientElectiveListForWardViewVo((PatientElectiveListForWardViewVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
            }
            else
                form.getGlobalContext().Core.setPendingElectiveAdmission((PendingElectiveAdmissionAdmitVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());

            engine.open(form.getForms().Core.AssignWard);
        break;
        default :
        break;
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.CoreNamespace.WardView.TRANSFER:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.TRANSFERWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.DISCHARGE:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.CANCEL_TRANSFER:
            cancelTransfer();
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.ASSIGNWARD:

            if( ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue() == true ) //wdev-18936
            {
                form.getGlobalContext().Core.setPatientElectiveListForWardViewVo((PatientElectiveListForWardViewVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
            }
            else
                form.getGlobalContext().Core.setPendingElectiveAdmission((PendingElectiveAdmissionAdmitVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());

            engine.open(form.getForms().Core.AssignWard);
        break;
        default :
        break;
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.CoreNamespace.WardView.TRANSFER:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.TRANSFERWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.DISCHARGE:
            form.getGlobalContext().Core.setSelectedBedSpaceState(null);
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEWAITINGAREAPATIENT); 
            if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo)
            {
                form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
                engine.open(form.getForms().Core.BedInfoDialog);
            }
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.CANCEL_TRANSFER:
            cancelTransfer();
        break;
        case GenForm.ContextMenus.CoreNamespace.WardView.ASSIGNWARD:

            if( ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue() == true ) //wdev-18936
            {
                form.getGlobalContext().Core.setPatientElectiveListForWardViewVo((PatientElectiveListForWardViewVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());
            }
            else
                form.getGlobalContext().Core.setPendingElectiveAdmission((PendingElectiveAdmissionAdmitVo) form.dyngrdDisplay().getSelectedRow().getIdentifier());

            engine.open(form.getForms().Core.AssignWard);
        break;
        default :
        break;
    }
}