Java 类ims.clinical.vo.SECSRangeScoreVo 实例源码

项目:AvoinApotti    文件:Logic.java   
public String[] validateUIRules()
{
    ArrayList<String> errors = new ArrayList<String>();

    //validating that a type has been set for each parameter
    if(form.getLocalContext().getSelectedInstanceIsNotNull())
    {
        SECSConfigurationVoCollection voCollConfig = form.getLocalContext().getSelectedInstance().getConfiguration();
        if(voCollConfig != null)
        {
            for(int i=0;i<voCollConfig.size();i++)
            {
                if(voCollConfig.get(i).getType() == null)
                {
                    errors.add("Parameter is a mandatory field");
                    break;
                }
                else
                {
                    if(isRange(voCollConfig.get(i).getType()))
                    {
                        if(voCollConfig.get(i).getRangeConfigIsNotNull() && voCollConfig.get(i).getRangeConfig().getRangeScoresIsNotNull())
                        {
                            for(int p=0;p<voCollConfig.get(i).getRangeConfig().getRangeScores().size();p++)
                            {
                                SECSRangeScoreVo score = voCollConfig.get(i).getRangeConfig().getRangeScores().get(p);
                                if(score.getGreaterThanIntValueIsNotNull() && score.getLessThanIntValueIsNotNull())
                                {
                                    if(score.getGreaterThanIntValue().intValue() >= score.getLessThanIntValue().intValue())
                                    {
                                        errors.add("'Greater Than' value must be less than 'Less Than' value.");
                                        break;
                                    }
                                }
                                if(score.getWarningTextIsNotNull() && score.getWarningText().length()>255){
                                    errors.add("Warning text should be less than 255 characters in length.");
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
    }


    if((form.lyrDetail().tabOxygen().intMaxNormal().getValue() != null && form.lyrDetail().tabOxygen().intFractionRate().getValue() == null) || (form.lyrDetail().tabOxygen().intMaxNormal().getValue() == null && form.lyrDetail().tabOxygen().intFractionRate().getValue() != null))
        errors.add("'Min. Normal Oxygen Sats Level on Oxygen' and 'Fraction Rate' must be both entered or not at all");

    String[] arrErrors = null;
    if(errors.size() > 0)
    {
        arrErrors = new String[errors.size()];
        for(int i=0;i<errors.size();i++)
            arrErrors[i] = errors.get(i);
    }

    return arrErrors;
}
项目:openMAXIMS    文件:Logic.java   
public String[] validateUIRules()
    {
        ArrayList<String> errors = new ArrayList<String>();

        //validating that a type has been set for each parameter
        if(form.getLocalContext().getSelectedInstanceIsNotNull())
        {
            SECSConfigurationVoCollection voCollConfig = form.getLocalContext().getSelectedInstance().getConfiguration();
            if(voCollConfig != null)
            {
                for(int i=0;i<voCollConfig.size();i++)
                {
                    if(voCollConfig.get(i).getType() == null)
                    {
                        errors.add("Parameter is a mandatory field");
                        break;
                    }
                    else
                    {
                        if(isRange(voCollConfig.get(i).getType()))
                        {
                            if(voCollConfig.get(i).getRangeConfigIsNotNull() && voCollConfig.get(i).getRangeConfig().getRangeScoresIsNotNull())
                            {
                                for(int p=0;p<voCollConfig.get(i).getRangeConfig().getRangeScores().size();p++)
                                {
                                    SECSRangeScoreVo score = voCollConfig.get(i).getRangeConfig().getRangeScores().get(p);
                                    if(score.getGreaterThanIntValueIsNotNull() && score.getLessThanIntValueIsNotNull())
                                    {
                                        if(score.getGreaterThanIntValue().intValue() >= score.getLessThanIntValue().intValue())
                                        {
                                            //http://jira/browse/WDEV-22399
//                                          errors.add("'Greater Than' value must be less than 'Less Than' value."); 
                                            errors.add("'Greater Than Or Equal To' value must be less or equal than 'Less Than Or Equal To' value."); //WDEV-22399
                                            break;
                                        }
                                    }
                                    if(score.getWarningTextIsNotNull() && score.getWarningText().length()>255){
                                        errors.add("Warning text should be less than 255 characters in length.");
                                        break;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }


        if((form.lyrDetail().tabOxygen().intMaxNormal().getValue() != null && form.lyrDetail().tabOxygen().intFractionRate().getValue() == null) || (form.lyrDetail().tabOxygen().intMaxNormal().getValue() == null && form.lyrDetail().tabOxygen().intFractionRate().getValue() != null))
            errors.add("'Min. Normal Oxygen Sats Level on Oxygen' and 'Fraction Rate' must be both entered or not at all");

        String[] arrErrors = null;
        if(errors.size() > 0)
        {
            arrErrors = new String[errors.size()];
            for(int i=0;i<errors.size();i++)
                arrErrors[i] = errors.get(i);
        }

        return arrErrors;
    }
项目:openMAXIMS    文件:Logic.java   
public String[] validateUIRules()
{
    ArrayList<String> errors = new ArrayList<String>();

    //validating that a type has been set for each parameter
    if(form.getLocalContext().getSelectedInstanceIsNotNull())
    {
        SECSConfigurationVoCollection voCollConfig = form.getLocalContext().getSelectedInstance().getConfiguration();
        if(voCollConfig != null)
        {
            for(int i=0;i<voCollConfig.size();i++)
            {
                if(voCollConfig.get(i).getType() == null)
                {
                    errors.add("Parameter is a mandatory field");
                    break;
                }
                else
                {
                    if(isRange(voCollConfig.get(i).getType()))
                    {
                        if(voCollConfig.get(i).getRangeConfigIsNotNull() && voCollConfig.get(i).getRangeConfig().getRangeScoresIsNotNull())
                        {
                            for(int p=0;p<voCollConfig.get(i).getRangeConfig().getRangeScores().size();p++)
                            {
                                SECSRangeScoreVo score = voCollConfig.get(i).getRangeConfig().getRangeScores().get(p);
                                if(score.getGreaterThanIntValueIsNotNull() && score.getLessThanIntValueIsNotNull())
                                {
                                    if(score.getGreaterThanIntValue().intValue() >= score.getLessThanIntValue().intValue())
                                    {
                                        errors.add("'Greater Than' value must be less than 'Less Than' value.");
                                        break;
                                    }
                                }
                                if(score.getWarningTextIsNotNull() && score.getWarningText().length()>255){
                                    errors.add("Warning text should be less than 255 characters in length.");
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
    }


    if((form.lyrDetail().tabOxygen().intMaxNormal().getValue() != null && form.lyrDetail().tabOxygen().intFractionRate().getValue() == null) || (form.lyrDetail().tabOxygen().intMaxNormal().getValue() == null && form.lyrDetail().tabOxygen().intFractionRate().getValue() != null))
        errors.add("'Min. Normal Oxygen Sats Level on Oxygen' and 'Fraction Rate' must be both entered or not at all");

    String[] arrErrors = null;
    if(errors.size() > 0)
    {
        arrErrors = new String[errors.size()];
        for(int i=0;i<errors.size();i++)
            arrErrors[i] = errors.get(i);
    }

    return arrErrors;
}
项目:openmaxims-linux    文件:Logic.java   
public String[] validateUIRules()
{
    ArrayList<String> errors = new ArrayList<String>();

    //validating that a type has been set for each parameter
    if(form.getLocalContext().getSelectedInstanceIsNotNull())
    {
        SECSConfigurationVoCollection voCollConfig = form.getLocalContext().getSelectedInstance().getConfiguration();
        if(voCollConfig != null)
        {
            for(int i=0;i<voCollConfig.size();i++)
            {
                if(voCollConfig.get(i).getType() == null)
                {
                    errors.add("Parameter is a mandatory field");
                    break;
                }
                else
                {
                    if(isRange(voCollConfig.get(i).getType()))
                    {
                        if(voCollConfig.get(i).getRangeConfigIsNotNull() && voCollConfig.get(i).getRangeConfig().getRangeScoresIsNotNull())
                        {
                            for(int p=0;p<voCollConfig.get(i).getRangeConfig().getRangeScores().size();p++)
                            {
                                SECSRangeScoreVo score = voCollConfig.get(i).getRangeConfig().getRangeScores().get(p);
                                if(score.getGreaterThanIntValueIsNotNull() && score.getLessThanIntValueIsNotNull())
                                {
                                    if(score.getGreaterThanIntValue().intValue() >= score.getLessThanIntValue().intValue())
                                    {
                                        errors.add("'Greater Than' value must be less than 'Less Than' value.");
                                        break;
                                    }
                                }
                                if(score.getWarningTextIsNotNull() && score.getWarningText().length()>255){
                                    errors.add("Warning text should be less than 255 characters in length.");
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
    }


    if((form.lyrDetail().tabOxygen().intMaxNormal().getValue() != null && form.lyrDetail().tabOxygen().intFractionRate().getValue() == null) || (form.lyrDetail().tabOxygen().intMaxNormal().getValue() == null && form.lyrDetail().tabOxygen().intFractionRate().getValue() != null))
        errors.add("'Min. Normal Oxygen Sats Level on Oxygen' and 'Fraction Rate' must be both entered or not at all");

    String[] arrErrors = null;
    if(errors.size() > 0)
    {
        arrErrors = new String[errors.size()];
        for(int i=0;i<errors.size();i++)
            arrErrors[i] = errors.get(i);
    }

    return arrErrors;
}