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

项目:AvoinApotti    文件:Logic.java   
private boolean hasAnswers(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return false;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return answerDetail.getMultiSelectAnswers().size() > 0;
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean hasAnswers(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return false;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return answerDetail.getMultiSelectAnswers().size() > 0;
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private PatientAssessmentAnswerVo getMultiSelectAnswer(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return null;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i);
            }
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private AuthoringInformationVo getAuthoringInfoForMultiSelectAnswer(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return null;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i).getAuthoringInfo();
            }
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isConfirmed(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return false;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i).getConfirmingInfoIsNotNull();
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isAnswered(AnswerDetailsVo answerDetail)
{
    if (answerDetail == null || answerDetail.getAnswerType() == null || answerDetail.getAnswerType().getAnswerType() == null)
        return false;

    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DATE))
        return answerDetail.getDateAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DECIMAL))
        return answerDetail.getDecimalAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.INTEGER))
        return answerDetail.getIntegerAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.MULTISELECT))
        return answerDetail.getMultiSelectAnswersIsNotNull() && answerDetail.getMultiSelectAnswers().size() > 0;
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PARTIALDATE))
        return answerDetail.getPartialDateIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PICKLIST))
        return answerDetail.getPicklistIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TEXT))
        return answerDetail.getStringAnswerIsNotNull() && answerDetail.getStringAnswer().trim().length() > 0;
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TIME))
        return answerDetail.getTimeAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.YESNO))
        return answerDetail.getBoolValueAnswerIsNotNull();

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentQuestionVo instQuestion, QuestionAnswerTypeVo configAnswerType)
{
    if (instQuestion == null || instQuestion.getPatientAnswers() == null || instQuestion.getPatientAnswers().size() == 0 || configAnswerType == null)
        return null;

    for (int x = 0; x < instQuestion.getPatientAnswers().size(); x++)
    {
        PatientAssessmentAnswerVo answer = instQuestion.getPatientAnswers().get(x);
        if (answer != null && answer.getAnswerDetails() != null)
        {
            for (int y = 0; y < answer.getAnswerDetails().size(); y++)
            {
                if (answer.getAnswerDetails().get(y).getAnswerTypeIsNotNull() && answer.getAnswerDetails().get(y).getAnswerType().equals(configAnswerType))
                {
                    return answer.getAnswerDetails().get(y);
                }
            }
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if (patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if (voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:AvoinApotti    文件:DynamicAssessmentHelper.java   
private static AnswerDetailsVo findAnswerDetails(PatientAssessmentAnswerVo initialAnswer, Integer id) 
{
    if(initialAnswer == null || 
            initialAnswer.getAnswerDetails() == null ||                 
            id == null)
        return null;

    int details = initialAnswer.getAnswerDetails().size();

    for(int x = 0; x < details; x++)
    {
        AnswerDetailsVo answerDetails = initialAnswer.getAnswerDetails().get(x);
        if(answerDetails != null && 
                answerDetails.getID_PatientAnswerDetails() != null &&
                answerDetails.getID_PatientAnswerDetails().intValue() == id.intValue())
        {
            return answerDetails;
        }
    }

    return null;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private boolean isAnswered(AnswerDetailsVo answerDetail)
{
    if(answerDetail == null || answerDetail.getAnswerType() == null || answerDetail.getAnswerType().getAnswerType() == null)
        return false;

    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DATE))
        return answerDetail.getDateAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DECIMAL))
        return answerDetail.getDecimalAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.INTEGER))
        return answerDetail.getIntegerAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.MULTISELECT))
        return answerDetail.getMultiSelectAnswersIsNotNull() && answerDetail.getMultiSelectAnswers().size() > 0; 
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PARTIALDATE))
        return answerDetail.getPartialDateIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PICKLIST))
        return answerDetail.getPicklistIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TEXT))
        return answerDetail.getStringAnswerIsNotNull() && answerDetail.getStringAnswer().trim().length() > 0;
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TIME))
        return answerDetail.getTimeAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.YESNO))
        return answerDetail.getBoolValueAnswerIsNotNull();

    return false;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentQuestionVo instQuestion, QuestionAnswerTypeVo configAnswerType)
{
    if(instQuestion == null || instQuestion.getPatientAnswers() == null || instQuestion.getPatientAnswers().size() == 0 || configAnswerType == null)
        return null;

    for(int x = 0; x < instQuestion.getPatientAnswers().size(); x++)
    {
        PatientAssessmentAnswerVo answer = instQuestion.getPatientAnswers().get(x);     
        if(answer != null && answer.getAnswerDetails() != null)
        {
            for(int y = 0; y < answer.getAnswerDetails().size(); y++)
            {
                if(answer.getAnswerDetails().get(y).getAnswerTypeIsNotNull() && answer.getAnswerDetails().get(y).getAnswerType().equals(configAnswerType))
                {
                    return answer.getAnswerDetails().get(y);
                }
            }
        }       
    }

    return null;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if(patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if(voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
    checkDataIntegrity(configAnswer);

    DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
    DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);

    cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
    cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
    cell.setIdentifier(configAnswer);
    cell.setReadOnly(readOnly);
    setAnswerCellValue(cell, configAnswer, instAnswer);             
    setCellTooltip(cell, configAnswer);
    if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
    {
        cell.setAutoPostBack(true);
    }

    return cell;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private boolean isYellowOrRedColourCellsSelected(DynamicGridRow row)
{
    DynamicGridCell answerCell = getDppAnswerCell(row);
    if (answerCell != null)
    {
        AnswerDetailsVo answerDetail = getCellAnswer(answerCell);
        if (answerDetail != null && answerDetail.getMultiSelectAnswers() != null)
        {
            for (int i = 0; i < answerDetail.getMultiSelectAnswers().size(); i++)
            {
                AnswerOptionVo voAnswerOption = answerDetail.getMultiSelectAnswers().get(i);
                //WDEV-3916
                Float score = voAnswerOption.getScore();
                if (score != null && (score.intValue() == getYellowScore() || score.intValue() == getRedScore()))
                    return true;
            }
        }
    }

    return false;
}
项目:AvoinApotti    文件:DailyPatientProgressHelper.java   
private boolean hasAnswers(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return false;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return answerDetail.getMultiSelectAnswers().size() > 0;
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:MyOrderQuestionsPopulation.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if(patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if(voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:AvoinApotti    文件:MyOrderQuestionsPopulation.java   
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)  throws PresentationLogicException
{
    checkDataIntegrity(configAnswer);

    DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
    DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);

    cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
    cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
    cell.setIdentifier(configAnswer);
    cell.setReadOnly(readOnly);
    setAnswerCellValue(cell, configAnswer, instAnswer);
    setCellAnswer(cell, instAnswer);

    if (instAnswer == null)
    {
        setCellTooltip(cell, configAnswer);
    }
    else //WDEV-16927
    {
        setCellAnswerTooltip(cell, instAnswer);
    }

    return cell;
}
项目:AvoinApotti    文件:MyOrderQuestionsPopulation.java   
private void addAnswerData(DynamicGridRow row,  GeneralQuestionAnswerVo voQuestionAnswer)
{
    if(voQuestionAnswer.getPatientAnswers() == null)
        return;

    for(int x = 0; x < voQuestionAnswer.getPatientAnswers().get(0).getAnswerDetails().size(); x++)
    {
        AnswerDetailsVo answer = voQuestionAnswer.getPatientAnswers().get(0).getAnswerDetails().get(x);
        DynamicGridCell cell = findCell(row, answer.getAnswerType());

        if(cell != null)
        {
            setCellAnswer(cell, answer);
        }
    }
}
项目:AvoinApotti    文件:MyOrderQuestionsPopulation.java   
private boolean isAnswered(AnswerDetailsVo answerDetail)
{
    if(answerDetail == null || answerDetail.getAnswerType() == null || answerDetail.getAnswerType().getAnswerType() == null)
        return false;

    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DATE))
        return answerDetail.getDateAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DECIMAL))
        return answerDetail.getDecimalAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.INTEGER))
        return answerDetail.getIntegerAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.MULTISELECT))
        return answerDetail.getMultiSelectAnswersIsNotNull() && answerDetail.getMultiSelectAnswers().size() > 0; 
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PARTIALDATE))
        return answerDetail.getPartialDateIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PICKLIST))
        return answerDetail.getPicklistIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TEXT))
        return answerDetail.getStringAnswerIsNotNull() && answerDetail.getStringAnswer().trim().length() > 0;
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TIME))
        return answerDetail.getTimeAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.YESNO))
        return answerDetail.getBoolValueAnswerIsNotNull();

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAnswers(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return false;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return answerDetail.getMultiSelectAnswers().size() > 0;
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private PatientAssessmentAnswerVo getMultiSelectAnswer(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return null;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i);
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private AuthoringInformationVo getAuthoringInfoForMultiSelectAnswer(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return null;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i).getAuthoringInfo();
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isConfirmed(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return false;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i).getConfirmingInfoIsNotNull();
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isAnswered(AnswerDetailsVo answerDetail)
{
    if (answerDetail == null || answerDetail.getAnswerType() == null || answerDetail.getAnswerType().getAnswerType() == null)
        return false;

    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DATE))
        return answerDetail.getDateAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DECIMAL))
        return answerDetail.getDecimalAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.INTEGER))
        return answerDetail.getIntegerAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.MULTISELECT))
        return answerDetail.getMultiSelectAnswersIsNotNull() && answerDetail.getMultiSelectAnswers().size() > 0;
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PARTIALDATE))
        return answerDetail.getPartialDateIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PICKLIST))
        return answerDetail.getPicklistIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TEXT))
        return answerDetail.getStringAnswerIsNotNull() && answerDetail.getStringAnswer().trim().length() > 0;
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TIME))
        return answerDetail.getTimeAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.YESNO))
        return answerDetail.getBoolValueAnswerIsNotNull();

    return false;
}
项目:openMAXIMS    文件:MyOrderQuestionsPopulation.java   
private void addAnswerData(DynamicGridRow row,  GeneralQuestionAnswerVo voQuestionAnswer)
{
    if(voQuestionAnswer.getPatientAnswers() == null)
        return;

    for(int x = 0; x < voQuestionAnswer.getPatientAnswers().get(0).getAnswerDetails().size(); x++)
    {
        AnswerDetailsVo answer = voQuestionAnswer.getPatientAnswers().get(0).getAnswerDetails().get(x);
        DynamicGridCell cell = findCell(row, answer.getAnswerType());

        if(cell != null)
        {
            setCellAnswer(cell, answer);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if (patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if (voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:MyOrderQuestionsPopulation.java   
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)  throws PresentationLogicException
{
    checkDataIntegrity(configAnswer);

    DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
    DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);

    cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
    cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
    cell.setIdentifier(configAnswer);
    cell.setReadOnly(readOnly);
    setAnswerCellValue(cell, configAnswer, instAnswer);
    setCellAnswer(cell, instAnswer);

    if (instAnswer == null)
    {
        setCellTooltip(cell, configAnswer);
    }
    else //WDEV-16927
    {
        setCellAnswerTooltip(cell, instAnswer);
    }

    return cell;
}
项目:openmaxims-linux    文件:Logic.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if (patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if (voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:DynamicAssessmentHelper.java   
private static AnswerDetailsVo findAnswerDetails(PatientAssessmentAnswerVo initialAnswer, Integer id) 
{
    if(initialAnswer == null || 
            initialAnswer.getAnswerDetails() == null ||                 
            id == null)
        return null;

    int details = initialAnswer.getAnswerDetails().size();

    for(int x = 0; x < details; x++)
    {
        AnswerDetailsVo answerDetails = initialAnswer.getAnswerDetails().get(x);
        if(answerDetails != null && 
                answerDetails.getID_PatientAnswerDetails() != null &&
                answerDetails.getID_PatientAnswerDetails().intValue() == id.intValue())
        {
            return answerDetails;
        }
    }

    return null;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private boolean isAnswered(AnswerDetailsVo answerDetail)
{
    if(answerDetail == null || answerDetail.getAnswerType() == null || answerDetail.getAnswerType().getAnswerType() == null)
        return false;

    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DATE))
        return answerDetail.getDateAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DECIMAL))
        return answerDetail.getDecimalAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.INTEGER))
        return answerDetail.getIntegerAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.MULTISELECT))
        return answerDetail.getMultiSelectAnswersIsNotNull() && answerDetail.getMultiSelectAnswers().size() > 0; 
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PARTIALDATE))
        return answerDetail.getPartialDateIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PICKLIST))
        return answerDetail.getPicklistIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TEXT))
        return answerDetail.getStringAnswerIsNotNull() && answerDetail.getStringAnswer().trim().length() > 0;
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TIME))
        return answerDetail.getTimeAnswerIsNotNull();
    if(answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.YESNO))
        return answerDetail.getBoolValueAnswerIsNotNull();

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isAnswered(AnswerDetailsVo answerDetail)
{
    if (answerDetail == null || answerDetail.getAnswerType() == null || answerDetail.getAnswerType().getAnswerType() == null)
        return false;

    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DATE))
        return answerDetail.getDateAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.DECIMAL))
        return answerDetail.getDecimalAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.INTEGER))
        return answerDetail.getIntegerAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.MULTISELECT))
        return answerDetail.getMultiSelectAnswersIsNotNull() && answerDetail.getMultiSelectAnswers().size() > 0;
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PARTIALDATE))
        return answerDetail.getPartialDateIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.PICKLIST))
        return answerDetail.getPicklistIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TEXT))
        return answerDetail.getStringAnswerIsNotNull() && answerDetail.getStringAnswer().trim().length() > 0;
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.TIME))
        return answerDetail.getTimeAnswerIsNotNull();
    if (answerDetail.getAnswerType().getAnswerType().equals(QuestionAnswerType.YESNO))
        return answerDetail.getBoolValueAnswerIsNotNull();

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private AuthoringInformationVo getAuthoringInfoForMultiSelectAnswer(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return null;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i).getAuthoringInfo();
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:MyOrderQuestionsPopulation.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if(patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if(voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
    checkDataIntegrity(configAnswer);

    DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
    DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);

    cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
    cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
    cell.setIdentifier(configAnswer);
    cell.setReadOnly(readOnly);
    setAnswerCellValue(cell, configAnswer, instAnswer);             
    setCellTooltip(cell, configAnswer);
    if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
    {
        cell.setAutoPostBack(true);
    }

    return cell;
}
项目:openmaxims-linux    文件:UserAssessmentInstHelper.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if(patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if(voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private boolean isYellowOrRedColourCellsSelected(DynamicGridRow row)
{
    DynamicGridCell answerCell = getDppAnswerCell(row);
    if (answerCell != null)
    {
        AnswerDetailsVo answerDetail = getCellAnswer(answerCell);
        if (answerDetail != null && answerDetail.getMultiSelectAnswers() != null)
        {
            for (int i = 0; i < answerDetail.getMultiSelectAnswers().size(); i++)
            {
                AnswerOptionVo voAnswerOption = answerDetail.getMultiSelectAnswers().get(i);
                //WDEV-3916
                Float score = voAnswerOption.getScore();
                if (score != null && (score.intValue() == getYellowScore() || score.intValue() == getRedScore()))
                    return true;
            }
        }
    }

    return false;
}
项目:openmaxims-linux    文件:DynamicAssessmentHelper.java   
private static AnswerDetailsVo findAnswerDetails(PatientAssessmentAnswerVo initialAnswer, Integer id) 
{
    if(initialAnswer == null || 
            initialAnswer.getAnswerDetails() == null ||                 
            id == null)
        return null;

    int details = initialAnswer.getAnswerDetails().size();

    for(int x = 0; x < details; x++)
    {
        AnswerDetailsVo answerDetails = initialAnswer.getAnswerDetails().get(x);
        if(answerDetails != null && 
                answerDetails.getID_PatientAnswerDetails() != null &&
                answerDetails.getID_PatientAnswerDetails().intValue() == id.intValue())
        {
            return answerDetails;
        }
    }

    return null;
}
项目:openMAXIMS    文件:MyOrderQuestionsPopulation.java   
private AnswerDetailsVo getInstAnswerType(PatientAssessmentAnswerVoCollection patientAnswers, QuestionAnswerTypeVo configAnswerType)
{
    if(patientAnswers == null || patientAnswers.size() == 0 || configAnswerType == null)
        return null;

    for (int i = 0; i < patientAnswers.size(); i++)
    {
        PatientAssessmentAnswerVo voPatAssAnswerVo = patientAnswers.get(i);
        for (int j = 0; voPatAssAnswerVo != null && j < voPatAssAnswerVo.getAnswerDetails().size(); j++)
        {
            if(voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerTypeIsNotNull() && voPatAssAnswerVo.getAnswerDetails().get(j).getAnswerType().equals(configAnswerType))
            {
                return voPatAssAnswerVo.getAnswerDetails().get(j);
            }
        }
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private PatientAssessmentAnswerVo getMultiSelectAnswer(PatientAssessmentQuestionVo voAssessQuestion)
{
    if(voAssessQuestion == null)
        return null;

    for (int i = 0; i < voAssessQuestion.getPatientAnswers().size(); i++)
    {
        for (int j = 0; j < voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().size(); j++)
        {
            AnswerDetailsVo answerDetail = voAssessQuestion.getPatientAnswers().get(i).getAnswerDetails().get(j);
            if(isMultiSelectAnswer(answerDetail))
            {
                return voAssessQuestion.getPatientAnswers().get(i);
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
    checkDataIntegrity(configAnswer);

    DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
    DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);

    cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
    cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
    cell.setIdentifier(configAnswer);
    cell.setReadOnly(readOnly);
    setAnswerCellValue(cell, configAnswer, instAnswer);             
    setCellTooltip(cell, configAnswer);
    if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
    {
        cell.setAutoPostBack(true);
    }

    return cell;
}