Java 类ims.core.vo.WardBayConfigVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void wardValueChanged()
{
    form.getGlobalContext().Core.setSelectingPatientForm(null);
    form.getGlobalContext().Core.setPatientShort(null);
    form.getGlobalContext().Core.setCurrentCareContext(null);

    form.imbRefresh().setEnabled(false);

    if(form.cmbWard().getValue() != null)
    {
        WardBayConfigVo voWardBayConfig = domain.getWardBayConfigByWard(form.cmbWard().getValue());
        if(voWardBayConfig != null)
            form.getGlobalContext().Core.setHasWaitingArea(voWardBayConfig.getIsWaitingAreaIsNotNull() && voWardBayConfig != null && voWardBayConfig.getIsWaitingArea());

        form.imbRefresh().setEnabled(true);
    }

    loadData();
    populateDynamicGridFromData();
    populateInpatientsGrid();
}
项目:AvoinApotti    文件:Logic.java   
private void loadBays(WardBayConfigVo voWardBayConfig, DynamicGridRow row)
{       
    if(row == null || voWardBayConfig == null)
        throw new CodingRuntimeException("madatory parameters not present in method loadBays");

    BayConfigVoCollection bays = voWardBayConfig.getBays();
    if(bays != null)
    {
        for(int x = 0; x < bays.size(); x++)            
        {
         //wdev-13964
         if (bays.get(x).getIsActive())
         {
             addBay(row, bays.get(x)); 
         }

        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void wardValueChanged()
{
    clearDisplay(false);
    form.imbRefresh().setEnabled(false);

    form.lblMainSpecialty().setValue("");
    form.lblMainSpecialty().setTooltip("");
    WardBayConfigVo voWardBayConfig = null;
    if(form.cmbWard().getValue() != null)
    {
        voWardBayConfig = domain.getWardBayConfigByWard(form.cmbWard().getValue());
        if(voWardBayConfig != null && voWardBayConfig.getMainSpecialtyIsNotNull())
        {
            form.lblMainSpecialty().setValue(voWardBayConfig.getMainSpecialty().getText());
            form.lblMainSpecialty().setTooltip("Specialties : " + voWardBayConfig.getSpecialtiesTooltip());
        }
        form.getGlobalContext().Core.setHasWaitingArea(voWardBayConfig != null && voWardBayConfig.getIsWaitingAreaIsNotNull() && voWardBayConfig != null && voWardBayConfig.getIsWaitingArea());
    }

    loadBaysForSelectedWard(voWardBayConfig);
    form.getGlobalContext().Core.setADTWard(form.cmbWard().getValue());
}
项目:AvoinApotti    文件:Logic.java   
private void loadBaysForSelectedWard(WardBayConfigVo voWardBayConfig) 
{   
    form.cmbBay().clear();

    if (form.cmbWard().getValue() == null)
        return;


    LocationLiteVoCollection baysColl = domain.listBaysForCurrentWard(form.cmbWard().getValue());
    if(baysColl != null)
    {
        for(int x = 0; x < baysColl.size(); x++)
        {
            if(isfloorBedSpaceLayoutActive(voWardBayConfig, baysColl.get(x)))
                addBays(baysColl.get(x));
        }

        if (form.cmbBay().getValues().size() == 1)
        {
            form.cmbBay().setValue((LocationLiteVo) form.cmbBay().getValues().get(0));
            bayValueChanged();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean isfloorBedSpaceLayoutActive(WardBayConfigVo voWardBayConfig, LocationLiteVo voBay)
{
    if(voWardBayConfig == null)
        throw new CodingRuntimeException("voWardBayConfig cannot be null in method isfloorBedSpaceLayoutActive");
    if (voBay == null)
        throw new CodingRuntimeException("voBay cannot be null in method isfloorBedSpaceLayoutActive");

    if(voWardBayConfig.getBaysIsNotNull())
    {
        for(BayConfigVo voBayConfig : voWardBayConfig.getBays())
        {
            if(voBayConfig.getBay().equals(voBay))
            {
                if(voBayConfig.getFloorBedSpaceLayoutIsNotNull() && voBayConfig.getFloorBedSpaceLayout().getStatusIsNotNull())
                    if(voBayConfig.getFloorBedSpaceLayout().getStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
                        return true;
            }
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void loadBays(WardBayConfigVo voWardBayConfig, DynamicGridRow row)
{       
    if(row == null || voWardBayConfig == null)
        throw new CodingRuntimeException("madatory parameters not present in method loadBays");

    BayConfigVoCollection bays = voWardBayConfig.getBays();
    if(bays != null)
    {
        BayConfigVoCollection baysSorted = bays.sort(new BayComparator(SortOrder.ASCENDING)); //WDEV-20228
        for(int x = 0; x < baysSorted.size(); x++)          
        {
            //wdev-13964
            if (baysSorted.get(x).getIsActive())
            {
                addBay(row, baysSorted.get(x)); 
            }

        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private WardBayConfigVo populateDataFromScreen(WardBayConfigVo voWardBayConfig)
{
    if (voWardBayConfig == null)
        throw new CodingRuntimeException("voWardBayConfig cannot be null in method populateDataFromScreen");

    voWardBayConfig.setIsWaitingArea(form.chkWaiting().getValue());
    voWardBayConfig.setSpecialties(getSelectedSpecialties());
    voWardBayConfig.setMainSpecialty(getMainSpecialty());
    voWardBayConfig.setBays(getSelectedBays());
    voWardBayConfig.setBedsAllocated(getNoOfAllocatedBeds());

    //WDEV-20217
    voWardBayConfig.setNumOfBeds(form.getLocalContext().getLCTotalNoOfBeds());

    return voWardBayConfig;
}
项目:openMAXIMS    文件:Logic.java   
private void wardValueChanged()
{
    form.getGlobalContext().Core.setSelectingPatientForm(null);
    form.getGlobalContext().Core.setPatientShort(null);
    form.getGlobalContext().Core.setCurrentCareContext(null);

    form.imbRefresh().setEnabled(false);

    if(form.cmbWard().getValue() != null)
    {
        WardBayConfigVo voWardBayConfig = domain.getWardBayConfigByWard(form.cmbWard().getValue());
        if(voWardBayConfig != null)
            form.getGlobalContext().Core.setHasWaitingArea(voWardBayConfig.getIsWaitingAreaIsNotNull() && voWardBayConfig != null && voWardBayConfig.getIsWaitingArea());

        form.imbRefresh().setEnabled(true);
    }

    loadData();
    populateDynamicGridFromData();
    populateInpatientsGrid();
}
项目:openMAXIMS    文件:Logic.java   
private void loadBays(WardBayConfigVo voWardBayConfig, DynamicGridRow row)
{       
    if(row == null || voWardBayConfig == null)
        throw new CodingRuntimeException("madatory parameters not present in method loadBays");

    BayConfigVoCollection bays = voWardBayConfig.getBays();
    if(bays != null)
    {
        for(int x = 0; x < bays.size(); x++)            
        {
         //wdev-13964
         if (bays.get(x).getIsActive())
         {
             addBay(row, bays.get(x)); 
         }

        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void wardValueChanged()
{
    clearDisplay(false);
    form.imbRefresh().setEnabled(false);

    form.lblMainSpecialty().setValue("");
    form.lblMainSpecialty().setTooltip("");
    WardBayConfigVo voWardBayConfig = null;
    if(form.cmbWard().getValue() != null)
    {
        voWardBayConfig = domain.getWardBayConfigByWard(form.cmbWard().getValue());
        if(voWardBayConfig != null && voWardBayConfig.getMainSpecialtyIsNotNull())
        {
            form.lblMainSpecialty().setValue(voWardBayConfig.getMainSpecialty().getText());
            form.lblMainSpecialty().setTooltip("Specialties : " + voWardBayConfig.getSpecialtiesTooltip());
        }
        form.getGlobalContext().Core.setHasWaitingArea(voWardBayConfig != null && voWardBayConfig.getIsWaitingAreaIsNotNull() && voWardBayConfig != null && voWardBayConfig.getIsWaitingArea());
    }

    loadBaysForSelectedWard(voWardBayConfig);
    form.getGlobalContext().Core.setADTWard(form.cmbWard().getValue());
}
项目:openMAXIMS    文件:Logic.java   
private void loadBaysForSelectedWard(WardBayConfigVo voWardBayConfig) 
{   
    form.cmbBay().clear();

    if (form.cmbWard().getValue() == null)
        return;


    LocationLiteVoCollection baysColl = domain.listBaysForCurrentWard(form.cmbWard().getValue());
    if(baysColl != null)
    {
        for(int x = 0; x < baysColl.size(); x++)
        {
            if(isfloorBedSpaceLayoutActive(voWardBayConfig, baysColl.get(x)))
                addBays(baysColl.get(x));
        }

        if (form.cmbBay().getValues().size() == 1)
        {
            form.cmbBay().setValue((LocationLiteVo) form.cmbBay().getValues().get(0));
            bayValueChanged();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean isfloorBedSpaceLayoutActive(WardBayConfigVo voWardBayConfig, LocationLiteVo voBay)
{
    if(voWardBayConfig == null)
        throw new CodingRuntimeException("voWardBayConfig cannot be null in method isfloorBedSpaceLayoutActive");
    if (voBay == null)
        throw new CodingRuntimeException("voBay cannot be null in method isfloorBedSpaceLayoutActive");

    if(voWardBayConfig.getBaysIsNotNull())
    {
        for(BayConfigVo voBayConfig : voWardBayConfig.getBays())
        {
            if(voBayConfig.getBay().equals(voBay))
            {
                if(voBayConfig.getFloorBedSpaceLayoutIsNotNull() && voBayConfig.getFloorBedSpaceLayout().getStatusIsNotNull())
                    if(voBayConfig.getFloorBedSpaceLayout().getStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
                        return true;
            }
        }
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void wardValueChanged()
{
    form.getGlobalContext().Core.setSelectingPatientForm(null);
    form.getGlobalContext().Core.setPatientShort(null);
    form.getGlobalContext().Core.setCurrentCareContext(null);

    form.imbRefresh().setEnabled(false);

    if(form.cmbWard().getValue() != null)
    {
        WardBayConfigVo voWardBayConfig = domain.getWardBayConfigByWard(form.cmbWard().getValue());
        if(voWardBayConfig != null)
            form.getGlobalContext().Core.setHasWaitingArea(voWardBayConfig.getIsWaitingAreaIsNotNull() && voWardBayConfig != null && voWardBayConfig.getIsWaitingArea());

        form.imbRefresh().setEnabled(true);
    }

    loadData();
    populateDynamicGridFromData();
    populateInpatientsGrid();
}
项目:openmaxims-linux    文件:Logic.java   
private void loadBays(WardBayConfigVo voWardBayConfig, DynamicGridRow row)
{       
    if(row == null || voWardBayConfig == null)
        throw new CodingRuntimeException("madatory parameters not present in method loadBays");

    BayConfigVoCollection bays = voWardBayConfig.getBays();
    if(bays != null)
    {
        for(int x = 0; x < bays.size(); x++)            
        {
         //wdev-13964
         if (bays.get(x).getIsActive())
         {
             addBay(row, bays.get(x)); 
         }

        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void wardValueChanged()
{
    clearDisplay(false);
    form.imbRefresh().setEnabled(false);

    form.lblMainSpecialty().setValue("");
    form.lblMainSpecialty().setTooltip("");
    WardBayConfigVo voWardBayConfig = null;
    if(form.cmbWard().getValue() != null)
    {
        voWardBayConfig = domain.getWardBayConfigByWard(form.cmbWard().getValue());
        if(voWardBayConfig != null && voWardBayConfig.getMainSpecialtyIsNotNull())
        {
            form.lblMainSpecialty().setValue(voWardBayConfig.getMainSpecialty().getText());
            form.lblMainSpecialty().setTooltip("Specialties : " + voWardBayConfig.getSpecialtiesTooltip());
        }
        form.getGlobalContext().Core.setHasWaitingArea(voWardBayConfig != null && voWardBayConfig.getIsWaitingAreaIsNotNull() && voWardBayConfig != null && voWardBayConfig.getIsWaitingArea());
    }

    loadBaysForSelectedWard(voWardBayConfig);
    form.getGlobalContext().Core.setADTWard(form.cmbWard().getValue());
}
项目:openmaxims-linux    文件:Logic.java   
private void loadBaysForSelectedWard(WardBayConfigVo voWardBayConfig) 
{   
    form.cmbBay().clear();

    if (form.cmbWard().getValue() == null)
        return;


    LocationLiteVoCollection baysColl = domain.listBaysForCurrentWard(form.cmbWard().getValue());
    if(baysColl != null)
    {
        for(int x = 0; x < baysColl.size(); x++)
        {
            if(isfloorBedSpaceLayoutActive(voWardBayConfig, baysColl.get(x)))
                addBays(baysColl.get(x));
        }

        if (form.cmbBay().getValues().size() == 1)
        {
            form.cmbBay().setValue((LocationLiteVo) form.cmbBay().getValues().get(0));
            bayValueChanged();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isfloorBedSpaceLayoutActive(WardBayConfigVo voWardBayConfig, LocationLiteVo voBay)
{
    if(voWardBayConfig == null)
        throw new CodingRuntimeException("voWardBayConfig cannot be null in method isfloorBedSpaceLayoutActive");
    if (voBay == null)
        throw new CodingRuntimeException("voBay cannot be null in method isfloorBedSpaceLayoutActive");

    if(voWardBayConfig.getBaysIsNotNull())
    {
        for(BayConfigVo voBayConfig : voWardBayConfig.getBays())
        {
            if(voBayConfig.getBay().equals(voBay))
            {
                if(voBayConfig.getFloorBedSpaceLayoutIsNotNull() && voBayConfig.getFloorBedSpaceLayout().getStatusIsNotNull())
                    if(voBayConfig.getFloorBedSpaceLayout().getStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
                        return true;
            }
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdLinksRowSelectionChanged(DynamicGridRow row)
{
    WardBayConfigVo voWardBayConfig = getWardBayConfig();
    form.getGlobalContext().STHK.setWardBayConfigVo(voWardBayConfig);
    engine.open(form.getForms().Core.WardBayConfigDialog);
}
项目:AvoinApotti    文件:Logic.java   
private WardBayConfigVo populateDataFromScreen(WardBayConfigVo voWardBayConfig)
{
    if (voWardBayConfig == null)
        throw new CodingRuntimeException("voWardBayConfig cannot be null in method populateDataFromScreen");

    voWardBayConfig.setIsWaitingArea(form.chkWaiting().getValue());
    voWardBayConfig.setSpecialties(getSelectedSpecialties());
    voWardBayConfig.setMainSpecialty(getMainSpecialty());
    voWardBayConfig.setBays(getSelectedBays());

    return voWardBayConfig;
}
项目:AvoinApotti    文件:BayLayoutConfigImpl.java   
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward)
{
    if (ward == null || ward.getID_Location() == null)
        throw new CodingRuntimeException("ward is null or id not provided in method getWardBayConfigByWard");

    DomainFactory factory = getDomainFactory();
    List lstWbc = factory.find("from WardBayConfig wbc where wbc.ward.id = '" + ward.getID_Location() + "'");
    if(lstWbc != null && lstWbc.size() == 1)
        return WardBayConfigVoAssembler.create((WardBayConfig) lstWbc.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdLinksRowSelectionChanged(DynamicGridRow row)
{
    WardBayConfigVo voWardBayConfig = getWardBayConfig();
    form.getGlobalContext().STHK.setWardBayConfigVo(voWardBayConfig);
    engine.open(form.getForms().Core.WardBayConfigDialog);
}
项目:openMAXIMS    文件:Logic.java   
private void calculateNrOfBeds()
{
    int numberOfBeds = 0;
    WardBayConfigVo voWardBayConf = form.getGlobalContext().STHK.getWardBayConfigVo();
    if(voWardBayConf == null)
        return;

    if (YesNo.YES.equals(form.ansYesNo().getValue()))
    {
        for(int i = 0; i < form.grdLayouts().getRows().size(); i++)
        {
            if (Boolean.TRUE.equals(form.grdLayouts().getRows().get(i).getActive()) && form.grdLayouts().getRows().get(i).getBayBedSpaceLayout().getValue() != null)
            {
                FloorBedSpaceLayoutLiteVo floorBedSpaceLayoutLite = (FloorBedSpaceLayoutLiteVo) form.grdLayouts().getRows().get(i).getBayBedSpaceLayout().getValue();
                numberOfBeds = numberOfBeds + getNrOfBeds(floorBedSpaceLayoutLite);
            }
        }
    }
    else if (Boolean.TRUE.equals(form.cmbTemplates().getVisible()) && form.cmbTemplates().getValue() != null)
    {
        numberOfBeds =getNrOfBeds( form.cmbTemplates().getValue());
    }

    String numberOfBedSpaces = " (Total Number of Bed Spaces: " + numberOfBeds + ")";
    form.getLocalContext().setLCTotalNoOfBeds(numberOfBeds);
    form.lblWard().setValue(voWardBayConf.getWard() != null ? voWardBayConf.getWard().getName() + numberOfBedSpaces : "");      
}
项目:openMAXIMS    文件:BayLayoutConfigImpl.java   
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward)
{
    if (ward == null || ward.getID_Location() == null)
        throw new CodingRuntimeException("ward is null or id not provided in method getWardBayConfigByWard");

    DomainFactory factory = getDomainFactory();
    List<?> lstWbc = factory.find("from WardBayConfig wbc where wbc.ward.id = '" + ward.getID_Location() + "'");
    if(lstWbc != null && lstWbc.size() == 1)
        return WardBayConfigVoAssembler.create((WardBayConfig) lstWbc.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdLinksRowSelectionChanged(DynamicGridRow row)
{
    WardBayConfigVo voWardBayConfig = getWardBayConfig();
    form.getGlobalContext().STHK.setWardBayConfigVo(voWardBayConfig);
    engine.open(form.getForms().Core.WardBayConfigDialog);
}
项目:openMAXIMS    文件:Logic.java   
private WardBayConfigVo populateDataFromScreen(WardBayConfigVo voWardBayConfig)
{
    if (voWardBayConfig == null)
        throw new CodingRuntimeException("voWardBayConfig cannot be null in method populateDataFromScreen");

    voWardBayConfig.setIsWaitingArea(form.chkWaiting().getValue());
    voWardBayConfig.setSpecialties(getSelectedSpecialties());
    voWardBayConfig.setMainSpecialty(getMainSpecialty());
    voWardBayConfig.setBays(getSelectedBays());

    return voWardBayConfig;
}
项目:openMAXIMS    文件:BayLayoutConfigImpl.java   
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward)
{
    if (ward == null || ward.getID_Location() == null)
        throw new CodingRuntimeException("ward is null or id not provided in method getWardBayConfigByWard");

    DomainFactory factory = getDomainFactory();
    List lstWbc = factory.find("from WardBayConfig wbc where wbc.ward.id = '" + ward.getID_Location() + "'");
    if(lstWbc != null && lstWbc.size() == 1)
        return WardBayConfigVoAssembler.create((WardBayConfig) lstWbc.get(0));

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onDyngrdLinksRowSelectionChanged(DynamicGridRow row)
{
    WardBayConfigVo voWardBayConfig = getWardBayConfig();
    form.getGlobalContext().STHK.setWardBayConfigVo(voWardBayConfig);
    engine.open(form.getForms().Core.WardBayConfigDialog);
}
项目:openmaxims-linux    文件:Logic.java   
private WardBayConfigVo populateDataFromScreen(WardBayConfigVo voWardBayConfig)
{
    if (voWardBayConfig == null)
        throw new CodingRuntimeException("voWardBayConfig cannot be null in method populateDataFromScreen");

    voWardBayConfig.setIsWaitingArea(form.chkWaiting().getValue());
    voWardBayConfig.setSpecialties(getSelectedSpecialties());
    voWardBayConfig.setMainSpecialty(getMainSpecialty());
    voWardBayConfig.setBays(getSelectedBays());

    return voWardBayConfig;
}
项目:openmaxims-linux    文件:BayLayoutConfigImpl.java   
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward)
{
    if (ward == null || ward.getID_Location() == null)
        throw new CodingRuntimeException("ward is null or id not provided in method getWardBayConfigByWard");

    DomainFactory factory = getDomainFactory();
    List lstWbc = factory.find("from WardBayConfig wbc where wbc.ward.id = '" + ward.getID_Location() + "'");
    if(lstWbc != null && lstWbc.size() == 1)
        return WardBayConfigVoAssembler.create((WardBayConfig) lstWbc.get(0));

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData()
{
    WardBayConfigVo voWardBayConf = form.getGlobalContext().STHK.getWardBayConfigVo();
    if(voWardBayConf == null)
        throw new CodingRuntimeException("voWardBayConf is null in method populateScreenFromData");

    form.getLocalContext().setSelectedBay(null);
    form.getLocalContext().setSelectedBayConfig(null);

    form.lblWard().setValue(voWardBayConf.getWard() != null ? voWardBayConf.getWard().getName() : "");
    form.chkWaiting().setValue(voWardBayConf.getIsWaitingArea());
    if(voWardBayConf.getID_WardBayConfig() == null)
        form.chkWaiting().setValue(true);

    form.ansYesNo().setValue(voWardBayConf.getBays() != null &&  voWardBayConf.getBays().size() > 1 ? YesNo.YES : YesNo.NO);
    ansBoxValueChanged();

    populateBayConfigsGridFromData(voWardBayConf.getBays());
    populateSpecialtiesGridFromData(voWardBayConf.getSpecialties(), voWardBayConf.getMainSpecialty());

    if(form.ansYesNo().getValue() != null)
    {
        if(form.ansYesNo().getValue().equals(YesNo.NO))
        {
            if(voWardBayConf.getID_WardBayConfigIsNotNull() && voWardBayConf.getBays().size() > 0)              //wdev-13279                    
            {
                form.cmbTemplates().newRow(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout(), voWardBayConf.getBays().get(0).getFloorBedSpaceLayout().getName());
                form.cmbTemplates().setValue(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout());
                form.getLocalContext().setSelectedBay(voWardBayConf.getBays().get(0).getBay());
                form.getLocalContext().setSelectedBayConfig(voWardBayConf.getBays().get(0));
            }
        }
        if(voWardBayConf.getID_WardBayConfigIsNotNull())
        {
            form.ansYesNo().setEnabled(true);
            form.cmbTemplates().setEnabled(false);
        }

        if(form.grdLayouts().getRows().size() > 1)
            form.ansYesNo().setEnabled(false);
    }
}
项目:AvoinApotti    文件:WardViewImpl.java   
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward)
{
    BayLayoutConfig impl = (BayLayoutConfig) getDomainImpl(BayLayoutConfigImpl.class);
    return impl.getWardBayConfigByWard(ward);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData()
    {
        WardBayConfigVo voWardBayConf = form.getGlobalContext().STHK.getWardBayConfigVo();
        if(voWardBayConf == null)
            throw new CodingRuntimeException("voWardBayConf is null in method populateScreenFromData");

        form.getLocalContext().setSelectedBay(null);
        form.getLocalContext().setSelectedBayConfig(null);

//      form.lblWard().setValue(voWardBayConf.getWard() != null ? voWardBayConf.getWard().getName() + (ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue() ? numberOfBedSpaces : "")  : "");

        form.chkWaiting().setValue(voWardBayConf.getIsWaitingArea());
        if(voWardBayConf.getID_WardBayConfig() == null)
            form.chkWaiting().setValue(true);

        form.ansYesNo().setValue(voWardBayConf.getBays() != null &&  voWardBayConf.getBays().size() > 1 ? YesNo.YES : YesNo.NO);
        ansBoxValueChanged();

        populateBayConfigsGridFromData(voWardBayConf.getBays());
        populateSpecialtiesGridFromData(voWardBayConf.getSpecialties(), voWardBayConf.getMainSpecialty(), voWardBayConf.getBedsAllocated());

        if(form.ansYesNo().getValue() != null)
        {
            if(form.ansYesNo().getValue().equals(YesNo.NO))
            {
                if(voWardBayConf.getID_WardBayConfigIsNotNull() && voWardBayConf.getBays().size() > 0)              //wdev-13279                    
                {
                    form.cmbTemplates().newRow(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout(), voWardBayConf.getBays().get(0).getFloorBedSpaceLayout().getName());
                    form.cmbTemplates().setValue(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout());
                    form.chkFemale().setValue(Boolean.TRUE.equals(voWardBayConf.getBays().get(0).getFemale()) ? true : false);
                    form.chkWeekDays().setValue(Boolean.TRUE.equals(voWardBayConf.getBays().get(0).getWeekdaysOnly()) ? true : false);//WDEV-20390
                    form.chkMale().setValue(Boolean.TRUE.equals(voWardBayConf.getBays().get(0).getMale()) ? true : false);
                    form.chkPaediatric().setValue(Boolean.TRUE.equals(voWardBayConf.getBays().get(0).getPaediatric()) ? true : false);
                    form.cmbDependency().setValue(voWardBayConf.getBays().get(0).getDependencyIsNotNull() ? voWardBayConf.getBays().get(0).getDependency() : null);
                    form.timOpening().setValue(voWardBayConf.getBays().get(0).getOpeningTime());
                    form.timClosing().setValue(voWardBayConf.getBays().get(0).getClosingTime());
                    form.getLocalContext().setSelectedBay(voWardBayConf.getBays().get(0).getBay());
                    form.getLocalContext().setSelectedBayConfig(voWardBayConf.getBays().get(0));
                }
            }
            if(voWardBayConf.getID_WardBayConfigIsNotNull())
            {
                form.ansYesNo().setEnabled(true);
            }

            if(form.grdLayouts().getRows().size() > 1)
                form.ansYesNo().setEnabled(false);
        }
    }
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    form.getContextMenus().Core.getWardBayConfigDialogCONFIGURE_BED_TIMESItem().setVisible(false);//ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue() && form.grdLayouts().getValue() != null);

    form.grdLayouts().setEnabled(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.YES) ? true : false);
    form.grdLayouts().setReadOnly(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.YES) ? false : true);
    form.grdLayouts().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.YES) ? true : false);

    form.lblLayout().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    WardBayConfigVo voWardBayConf = form.getGlobalContext().STHK.getWardBayConfigVo();
    form.cmbTemplates().setEnabled(form.ansYesNo().getValue() != null && voWardBayConf.getID_WardBayConfigIsNotNull() ? false : true);
    form.cmbTemplates().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.getContextMenus().Core.getWardBayConfigDialogADDItem().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.YES) ? true : false);

    form.chkFemale().setEnabled(YesNo.NO.equals(form.ansYesNo().getValue()) ? true : false);
    form.chkFemale().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.chkMale().setEnabled(YesNo.NO.equals(form.ansYesNo().getValue()) ? true : false);
    form.chkMale().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.chkPaediatric().setEnabled(YesNo.NO.equals(form.ansYesNo().getValue()) ? true : false);
    form.chkPaediatric().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.chkWeekDays().setEnabled(YesNo.NO.equals(form.ansYesNo().getValue()) ? true : false);//WDEV-20390
    form.chkWeekDays().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);//WDEV-20390
    form.lblWeekdays().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.cmbDependency().setEnabled(YesNo.NO.equals(form.ansYesNo().getValue()) ? true : false);
    form.cmbDependency().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.lblDependency().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.lblOpeningTime().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);
    form.timOpening().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.lblClosingTime().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);
    form.timClosing().setVisible(form.ansYesNo().getValue() != null && form.ansYesNo().getValue().equals(YesNo.NO) ? true : false);

    form.timOpening().setRequired(YesNo.NO.equals(form.ansYesNo().getValue()) && form.timClosing().getValue() != null && form.timOpening().getValue() == null);
    form.timClosing().setRequired(YesNo.NO.equals(form.ansYesNo().getValue()) && form.timOpening().getValue() != null && form.timClosing().getValue() == null);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData()
{
    WardBayConfigVo voWardBayConf = form.getGlobalContext().STHK.getWardBayConfigVo();
    if(voWardBayConf == null)
        throw new CodingRuntimeException("voWardBayConf is null in method populateScreenFromData");

    form.getLocalContext().setSelectedBay(null);
    form.getLocalContext().setSelectedBayConfig(null);

    form.lblWard().setValue(voWardBayConf.getWard() != null ? voWardBayConf.getWard().getName() : "");
    form.chkWaiting().setValue(voWardBayConf.getIsWaitingArea());
    if(voWardBayConf.getID_WardBayConfig() == null)
        form.chkWaiting().setValue(true);

    form.ansYesNo().setValue(voWardBayConf.getBays() != null &&  voWardBayConf.getBays().size() > 1 ? YesNo.YES : YesNo.NO);
    ansBoxValueChanged();

    populateBayConfigsGridFromData(voWardBayConf.getBays());
    populateSpecialtiesGridFromData(voWardBayConf.getSpecialties(), voWardBayConf.getMainSpecialty());

    if(form.ansYesNo().getValue() != null)
    {
        if(form.ansYesNo().getValue().equals(YesNo.NO))
        {
            if(voWardBayConf.getID_WardBayConfigIsNotNull() && voWardBayConf.getBays().size() > 0)              //wdev-13279                    
            {
                form.cmbTemplates().newRow(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout(), voWardBayConf.getBays().get(0).getFloorBedSpaceLayout().getName());
                form.cmbTemplates().setValue(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout());
                form.getLocalContext().setSelectedBay(voWardBayConf.getBays().get(0).getBay());
                form.getLocalContext().setSelectedBayConfig(voWardBayConf.getBays().get(0));
            }
        }
        if(voWardBayConf.getID_WardBayConfigIsNotNull())
        {
            form.ansYesNo().setEnabled(true);
            form.cmbTemplates().setEnabled(false);
        }

        if(form.grdLayouts().getRows().size() > 1)
            form.ansYesNo().setEnabled(false);
    }
}
项目:openMAXIMS    文件:WardViewImpl.java   
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward)
{
    BayLayoutConfig impl = (BayLayoutConfig) getDomainImpl(BayLayoutConfigImpl.class);
    return impl.getWardBayConfigByWard(ward);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData()
{
    WardBayConfigVo voWardBayConf = form.getGlobalContext().STHK.getWardBayConfigVo();
    if(voWardBayConf == null)
        throw new CodingRuntimeException("voWardBayConf is null in method populateScreenFromData");

    form.getLocalContext().setSelectedBay(null);
    form.getLocalContext().setSelectedBayConfig(null);

    form.lblWard().setValue(voWardBayConf.getWard() != null ? voWardBayConf.getWard().getName() : "");
    form.chkWaiting().setValue(voWardBayConf.getIsWaitingArea());
    if(voWardBayConf.getID_WardBayConfig() == null)
        form.chkWaiting().setValue(true);

    form.ansYesNo().setValue(voWardBayConf.getBays() != null &&  voWardBayConf.getBays().size() > 1 ? YesNo.YES : YesNo.NO);
    ansBoxValueChanged();

    populateBayConfigsGridFromData(voWardBayConf.getBays());
    populateSpecialtiesGridFromData(voWardBayConf.getSpecialties(), voWardBayConf.getMainSpecialty());

    if(form.ansYesNo().getValue() != null)
    {
        if(form.ansYesNo().getValue().equals(YesNo.NO))
        {
            if(voWardBayConf.getID_WardBayConfigIsNotNull() && voWardBayConf.getBays().size() > 0)              //wdev-13279                    
            {
                form.cmbTemplates().newRow(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout(), voWardBayConf.getBays().get(0).getFloorBedSpaceLayout().getName());
                form.cmbTemplates().setValue(voWardBayConf.getBays().get(0).getFloorBedSpaceLayout());
                form.getLocalContext().setSelectedBay(voWardBayConf.getBays().get(0).getBay());
                form.getLocalContext().setSelectedBayConfig(voWardBayConf.getBays().get(0));
            }
        }
        if(voWardBayConf.getID_WardBayConfigIsNotNull())
        {
            form.ansYesNo().setEnabled(true);
            form.cmbTemplates().setEnabled(false);
        }

        if(form.grdLayouts().getRows().size() > 1)
            form.ansYesNo().setEnabled(false);
    }
}
项目:openmaxims-linux    文件:WardViewImpl.java   
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward)
{
    BayLayoutConfig impl = (BayLayoutConfig) getDomainImpl(BayLayoutConfigImpl.class);
    return impl.getWardBayConfigByWard(ward);
}