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

项目:AvoinApotti    文件:Logic.java   
private String getGroupTooltip(AssessmentQuestionGroupVo group)
{
    StringBuffer sb = new StringBuffer();

    sb.append("<b>Name: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); 
    sb.append(group.getName());
    sb.append(CR);
    sb.append("<b>Description: </b>&nbsp;"); 
    sb.append(group.getDescriptionIsNotNull() ? group.getDescription() :"");
    sb.append(CR);
    sb.append("<b>Status: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "");
    sb.append(CR);
    sb.append("<b>Score:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : "");

    return sb.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void refreshGroupGrid()
{
    form.lyrTabs().tabGroups().grdGroups().getRows().clear();
    AssessmentQuestionGroupVoCollection voColl = form.getLocalContext().getHiddenGroups();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        AssessmentQuestionGroupVo voAssessQGroup = voColl.get(i);
        GenForm.lyrTabsLayer.tabGroupsContainer.grdGroupsRow row = form.lyrTabs().tabGroups().grdGroups().getRows().newRow();

        row.setcolName(voAssessQGroup.getName());
        row.setcolDescription(voAssessQGroup.getDescription());
        row.setcolStatus(voAssessQGroup.getActiveStatus());
        row.setcolScore(voAssessQGroup.getGroupScoreIsNotNull() ? voAssessQGroup.getGroupScore().toString() : "");
        row.setValue(voAssessQGroup);
    }

    refreshGroupContextMenu();
}
项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow findRow(AssessmentQuestionGroupVo assessmentQuestionGroup)
{
    if (assessmentQuestionGroup == null)
        return null;

    for (int x = 0; x < this.grid.getRows().size(); x++)
    {
        DynamicGridRow row = this.grid.getRows().get(x);
        if (row.getIdentifier() != null)
        {
            if (row.getIdentifier() instanceof AssessmentQuestionGroupVo)
            {
                if (row.getIdentifier().equals(assessmentQuestionGroup))
                    return row;
            }
            else if (row.getIdentifier() instanceof GroupRowData)
            {
                if (((GroupRowData) row.getIdentifier()).getConfigGroup().equals(assessmentQuestionGroup))
                    return row;
            }
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private PatientAssessmentQuestionVo getInstAnswer(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup, AssessmentQuestionVo configQuestion)
{
    if (data == null || configGroup == null || configQuestion == null)
        return null;

    PatientAssessmentGroupVo instGroup = getInstGroup(data, configGroup);
    if (instGroup == null)
        return null;

    for (int x = 0; x < instGroup.getAssessmentAnswers().size(); x++)
    {
        if (instGroup.getAssessmentAnswers().get(x) != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion() != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion().equals(configQuestion))
        {
            return instGroup.getAssessmentAnswers().get(x);
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private AssessmentQuestionVoCollection buildExistingQuestions(PatientAssessmentDataVo data, AssessmentQuestionGroupVo group) throws PresentationLogicException
{
    if (data.getAnswerGroups() == null || group == null)
        return new AssessmentQuestionVoCollection();
    checkDataIntegrity(data);

    AssessmentQuestionVoCollection result = new AssessmentQuestionVoCollection();

    for (int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if (data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(group))
        {
            PatientAssessmentQuestionVoCollection answers = sortAnswersBySequence(data.getAnswerGroups().get(x).getAssessmentAnswers());
            for (int y = 0; y < answers.size(); y++)
            {
                result.add(data.getAnswerGroups().get(x).getAssessmentAnswers().get(y).getAssessmentQuestion());
            }
        }
    }

    return result;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private DynamicGridRow findRow(AssessmentQuestionGroupVo assessmentQuestionGroup)
{
    if(assessmentQuestionGroup == null)
        return null;

    for(int x = 0; x < this.grid.getRows().size(); x++)
    {
        DynamicGridRow row = this.grid.getRows().get(x);
            if(row.getIdentifier() != null)
            {
                if(row.getIdentifier() instanceof AssessmentQuestionGroupVo)
        {
            if(row.getIdentifier().equals(assessmentQuestionGroup))
                return row;
        }
                else if(row.getIdentifier() instanceof GroupRowData)
                {
                    if(((GroupRowData)row.getIdentifier()).getConfigGroup().equals(assessmentQuestionGroup))
                        return row; 
                }
            }
    }

    return null;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private PatientAssessmentGroupVo getInstGroup(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup)
{
    if(data == null || configGroup == null)
        return null;

    for(int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if(data.getAnswerGroups().get(x) != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(configGroup))
        {
            return data.getAnswerGroups().get(x);
        }
    }

    return null;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private PatientAssessmentQuestionVo getInstAnswer(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup, AssessmentQuestionVo configQuestion)
{
    if(data == null || configGroup == null || configQuestion == null)
        return null; 

    PatientAssessmentGroupVo instGroup = getInstGroup(data, configGroup);
    if(instGroup == null)
        return null;

    for(int x = 0; x < instGroup.getAssessmentAnswers().size(); x++)
    {
        if(instGroup.getAssessmentAnswers().get(x) != null
                && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion() != null
                && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion().equals(configQuestion))
        {
            return instGroup.getAssessmentAnswers().get(x);
        }               
    }

    return null;
}
项目:AvoinApotti    文件:UserAssessmentInstHelper.java   
private AssessmentQuestionVoCollection buildExistingQuestions(PatientAssessmentDataVo data, AssessmentQuestionGroupVo group) throws PresentationLogicException
{
    if(data.getAnswerGroups() == null || group == null)
        return new AssessmentQuestionVoCollection();
    checkDataIntegrity(data);       

    AssessmentQuestionVoCollection result = new AssessmentQuestionVoCollection();

    for(int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if(data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(group))
        {
            PatientAssessmentQuestionVoCollection answers = sortAnswersBySequence(data.getAnswerGroups().get(x).getAssessmentAnswers()); 
            for(int y = 0; y < answers.size(); y++)
            {
                result.add(data.getAnswerGroups().get(x).getAssessmentAnswers().get(y).getAssessmentQuestion());
            }
        }
    }

    return result;
}
项目:AvoinApotti    文件:StructuredAssessmentsHelper.java   
public void updateGroupRow(AssessmentQuestionGroupVo group, DynamicGridRow row, boolean createNewQuestionGroupCell)
{
    if(group == null || row == null)
        return;

    if(createNewQuestionGroupCell)
        row.getCells().newCell(getGridColumn(COLUMN_QUESTIONGROUP), DynamicCellType.STRING);
    row.setValue(group);
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setValue(group.getName());
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setReadOnly(true);
    createToolTip(row, getGridColumn(COLUMN_QUESTIONGROUP), getGroupTooltip(group));
    row.setBold(true);
    row.setBackColor(Color.Beige);
    row.setExpanded(true);

    dynGrid.setValue(row.getValue());
}
项目:AvoinApotti    文件:StructuredAssessmentsHelper.java   
private String getGroupTooltip(AssessmentQuestionGroupVo group)
{
    StringBuffer sb = new StringBuffer();

    sb.append("<b>Name: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getName());
    sb.append(CR);
    sb.append("<b>Description: </b>&nbsp;");
    sb.append(group.getDescription());
    sb.append(CR);
    sb.append("<b>Status: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "");
    sb.append(CR);
    sb.append("<b>Score:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : "");

    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private String getGroupTooltip(AssessmentQuestionGroupVo group)
{
    StringBuffer sb = new StringBuffer();

    sb.append("<b>Name: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); 
    sb.append(group.getName());
    sb.append(CR);
    sb.append("<b>Description: </b>&nbsp;"); 
    sb.append(group.getDescriptionIsNotNull() ? group.getDescription() :"");
    sb.append(CR);
    sb.append("<b>Status: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "");
    sb.append(CR);
    sb.append("<b>Score:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : "");

    return sb.toString();
}
项目:openmaxims-linux    文件:Logic.java   
private PatientAssessmentQuestionVo getInstAnswer(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup, AssessmentQuestionVo configQuestion)
{
    if (data == null || configGroup == null || configQuestion == null)
        return null;

    PatientAssessmentGroupVo instGroup = getInstGroup(data, configGroup);
    if (instGroup == null)
        return null;

    for (int x = 0; x < instGroup.getAssessmentAnswers().size(); x++)
    {
        if (instGroup.getAssessmentAnswers().get(x) != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion() != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion().equals(configQuestion))
        {
            return instGroup.getAssessmentAnswers().get(x);
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void refreshGroupGrid()
{
    form.lyrTabs().tabGroups().grdGroups().getRows().clear();
    AssessmentQuestionGroupVoCollection voColl = form.getLocalContext().getHiddenGroups();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        AssessmentQuestionGroupVo voAssessQGroup = voColl.get(i);
        GenForm.lyrTabsLayer.tabGroupsContainer.grdGroupsRow row = form.lyrTabs().tabGroups().grdGroups().getRows().newRow();

        row.setcolName(voAssessQGroup.getName());
        row.setcolDescription(voAssessQGroup.getDescription());
        row.setcolStatus(voAssessQGroup.getActiveStatus());
        row.setcolScore(voAssessQGroup.getGroupScoreIsNotNull() ? voAssessQGroup.getGroupScore().toString() : "");
        row.setValue(voAssessQGroup);
    }

    refreshGroupContextMenu();
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow findRow(AssessmentQuestionGroupVo assessmentQuestionGroup)
{
    if (assessmentQuestionGroup == null)
        return null;

    for (int x = 0; x < this.grid.getRows().size(); x++)
    {
        DynamicGridRow row = this.grid.getRows().get(x);
        if (row.getIdentifier() != null)
        {
            if (row.getIdentifier() instanceof AssessmentQuestionGroupVo)
            {
                if (row.getIdentifier().equals(assessmentQuestionGroup))
                    return row;
            }
            else if (row.getIdentifier() instanceof GroupRowData)
            {
                if (((GroupRowData) row.getIdentifier()).getConfigGroup().equals(assessmentQuestionGroup))
                    return row;
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private PatientAssessmentQuestionVo getInstAnswer(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup, AssessmentQuestionVo configQuestion)
{
    if (data == null || configGroup == null || configQuestion == null)
        return null;

    PatientAssessmentGroupVo instGroup = getInstGroup(data, configGroup);
    if (instGroup == null)
        return null;

    for (int x = 0; x < instGroup.getAssessmentAnswers().size(); x++)
    {
        if (instGroup.getAssessmentAnswers().get(x) != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion() != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion().equals(configQuestion))
        {
            return instGroup.getAssessmentAnswers().get(x);
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private AssessmentQuestionVoCollection buildExistingQuestions(PatientAssessmentDataVo data, AssessmentQuestionGroupVo group) throws PresentationLogicException
{
    if (data.getAnswerGroups() == null || group == null)
        return new AssessmentQuestionVoCollection();
    checkDataIntegrity(data);

    AssessmentQuestionVoCollection result = new AssessmentQuestionVoCollection();

    for (int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if (data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(group))
        {
            PatientAssessmentQuestionVoCollection answers = sortAnswersBySequence(data.getAnswerGroups().get(x).getAssessmentAnswers());
            for (int y = 0; y < answers.size(); y++)
            {
                result.add(data.getAnswerGroups().get(x).getAssessmentAnswers().get(y).getAssessmentQuestion());
            }
        }
    }

    return result;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private PatientAssessmentGroupVo getInstGroup(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup)
{
    if(data == null || configGroup == null)
        return null;

    for(int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if(data.getAnswerGroups().get(x) != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(configGroup))
        {
            return data.getAnswerGroups().get(x);
        }
    }

    return null;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private AssessmentQuestionVoCollection buildExistingQuestions(PatientAssessmentDataVo data, AssessmentQuestionGroupVo group) throws PresentationLogicException
{
    if(data.getAnswerGroups() == null || group == null)
        return new AssessmentQuestionVoCollection();
    checkDataIntegrity(data);       

    AssessmentQuestionVoCollection result = new AssessmentQuestionVoCollection();

    for(int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if(data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(group))
        {
            PatientAssessmentQuestionVoCollection answers = sortAnswersBySequence(data.getAnswerGroups().get(x).getAssessmentAnswers()); 
            for(int y = 0; y < answers.size(); y++)
            {
                result.add(data.getAnswerGroups().get(x).getAssessmentAnswers().get(y).getAssessmentQuestion());
            }
        }
    }

    return result;
}
项目:openMAXIMS    文件:StructuredAssessmentsHelper.java   
public void updateGroupRow(AssessmentQuestionGroupVo group, DynamicGridRow row, boolean createNewQuestionGroupCell)
{
    if(group == null || row == null)
        return;

    if(createNewQuestionGroupCell)
        row.getCells().newCell(getGridColumn(COLUMN_QUESTIONGROUP), DynamicCellType.STRING);
    row.setValue(group);
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setValue(group.getName());
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setReadOnly(true);
    createToolTip(row, getGridColumn(COLUMN_QUESTIONGROUP), getGroupTooltip(group));
    row.setBold(true);
    row.setBackColor(Color.Beige);
    row.setExpanded(true);

    dynGrid.setValue(row.getValue());
}
项目:openMAXIMS    文件:StructuredAssessmentsHelper.java   
private String getGroupTooltip(AssessmentQuestionGroupVo group)
{
    StringBuffer sb = new StringBuffer();

    sb.append("<b>Name: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getName());
    sb.append(CR);
    sb.append("<b>Description: </b>&nbsp;");
    sb.append(group.getDescription());
    sb.append(CR);
    sb.append("<b>Status: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "");
    sb.append(CR);
    sb.append("<b>Score:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : "");

    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private String getGroupTooltip(AssessmentQuestionGroupVo group)
{
    StringBuffer sb = new StringBuffer();

    sb.append("<b>Name: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); 
    sb.append(group.getName());
    sb.append(CR);
    sb.append("<b>Description: </b>&nbsp;"); 
    sb.append(group.getDescriptionIsNotNull() ? group.getDescription() :"");
    sb.append(CR);
    sb.append("<b>Status: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "");
    sb.append(CR);
    sb.append("<b>Score:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : "");

    return sb.toString();
}
项目:openmaxims-linux    文件:Logic.java   
private String getGroupTooltip(AssessmentQuestionGroupVo group)
{
    StringBuffer sb = new StringBuffer();

    sb.append("<b>Name: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); 
    sb.append(group.getName());
    sb.append(CR);
    sb.append("<b>Description: </b>&nbsp;"); 
    sb.append(group.getDescriptionIsNotNull() ? group.getDescription() :"");
    sb.append(CR);
    sb.append("<b>Status: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "");
    sb.append(CR);
    sb.append("<b>Score:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : "");

    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void refreshGroupGrid()
{
    form.lyrTabs().tabGroups().grdGroups().getRows().clear();
    AssessmentQuestionGroupVoCollection voColl = form.getLocalContext().getHiddenGroups();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        AssessmentQuestionGroupVo voAssessQGroup = voColl.get(i);
        GenForm.lyrTabsLayer.tabGroupsContainer.grdGroupsRow row = form.lyrTabs().tabGroups().grdGroups().getRows().newRow();

        row.setcolName(voAssessQGroup.getName());
        row.setcolDescription(voAssessQGroup.getDescription());
        row.setcolStatus(voAssessQGroup.getActiveStatus());
        row.setcolScore(voAssessQGroup.getGroupScoreIsNotNull() ? voAssessQGroup.getGroupScore().toString() : "");
        row.setValue(voAssessQGroup);
    }

    refreshGroupContextMenu();
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow findRow(AssessmentQuestionGroupVo assessmentQuestionGroup)
{
    if (assessmentQuestionGroup == null)
        return null;

    for (int x = 0; x < this.grid.getRows().size(); x++)
    {
        DynamicGridRow row = this.grid.getRows().get(x);
        if (row.getIdentifier() != null)
        {
            if (row.getIdentifier() instanceof AssessmentQuestionGroupVo)
            {
                if (row.getIdentifier().equals(assessmentQuestionGroup))
                    return row;
            }
            else if (row.getIdentifier() instanceof GroupRowData)
            {
                if (((GroupRowData) row.getIdentifier()).getConfigGroup().equals(assessmentQuestionGroup))
                    return row;
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private PatientAssessmentQuestionVo getInstAnswer(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup, AssessmentQuestionVo configQuestion)
{
    if (data == null || configGroup == null || configQuestion == null)
        return null;

    PatientAssessmentGroupVo instGroup = getInstGroup(data, configGroup);
    if (instGroup == null)
        return null;

    for (int x = 0; x < instGroup.getAssessmentAnswers().size(); x++)
    {
        if (instGroup.getAssessmentAnswers().get(x) != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion() != null && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion().equals(configQuestion))
        {
            return instGroup.getAssessmentAnswers().get(x);
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private AssessmentQuestionVoCollection buildExistingQuestions(PatientAssessmentDataVo data, AssessmentQuestionGroupVo group) throws PresentationLogicException
{
    if (data.getAnswerGroups() == null || group == null)
        return new AssessmentQuestionVoCollection();
    checkDataIntegrity(data);

    AssessmentQuestionVoCollection result = new AssessmentQuestionVoCollection();

    for (int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if (data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(group))
        {
            PatientAssessmentQuestionVoCollection answers = sortAnswersBySequence(data.getAnswerGroups().get(x).getAssessmentAnswers());
            for (int y = 0; y < answers.size(); y++)
            {
                result.add(data.getAnswerGroups().get(x).getAssessmentAnswers().get(y).getAssessmentQuestion());
            }
        }
    }

    return result;
}
项目:openmaxims-linux    文件:UserAssessmentInstHelper.java   
private PatientAssessmentGroupVo getInstGroup(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup)
{
    if(data == null || configGroup == null)
        return null;

    for(int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if(data.getAnswerGroups().get(x) != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(configGroup))
        {
            return data.getAnswerGroups().get(x);
        }
    }

    return null;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private PatientAssessmentQuestionVo getInstAnswer(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup, AssessmentQuestionVo configQuestion)
{
    if(data == null || configGroup == null || configQuestion == null)
        return null; 

    PatientAssessmentGroupVo instGroup = getInstGroup(data, configGroup);
    if(instGroup == null)
        return null;

    for(int x = 0; x < instGroup.getAssessmentAnswers().size(); x++)
    {
        if(instGroup.getAssessmentAnswers().get(x) != null
                && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion() != null
                && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion().equals(configQuestion))
        {
            return instGroup.getAssessmentAnswers().get(x);
        }               
    }

    return null;
}
项目:openMAXIMS    文件:UserAssessmentInstHelper.java   
private AssessmentQuestionVoCollection buildExistingQuestions(PatientAssessmentDataVo data, AssessmentQuestionGroupVo group) throws PresentationLogicException
{
    if(data.getAnswerGroups() == null || group == null)
        return new AssessmentQuestionVoCollection();
    checkDataIntegrity(data);       

    AssessmentQuestionVoCollection result = new AssessmentQuestionVoCollection();

    for(int x = 0; x < data.getAnswerGroups().size(); x++)
    {
        if(data.getAnswerGroups().get(x).getAssessmentQuestionGroup() != null
                && data.getAnswerGroups().get(x).getAssessmentQuestionGroup().equals(group))
        {
            PatientAssessmentQuestionVoCollection answers = sortAnswersBySequence(data.getAnswerGroups().get(x).getAssessmentAnswers()); 
            for(int y = 0; y < answers.size(); y++)
            {
                result.add(data.getAnswerGroups().get(x).getAssessmentAnswers().get(y).getAssessmentQuestion());
            }
        }
    }

    return result;
}
项目:openmaxims-linux    文件:UserAssessmentInstHelper.java   
private PatientAssessmentQuestionVo getInstAnswer(PatientAssessmentDataVo data, AssessmentQuestionGroupVo configGroup, AssessmentQuestionVo configQuestion)
{
    if(data == null || configGroup == null || configQuestion == null)
        return null; 

    PatientAssessmentGroupVo instGroup = getInstGroup(data, configGroup);
    if(instGroup == null)
        return null;

    for(int x = 0; x < instGroup.getAssessmentAnswers().size(); x++)
    {
        if(instGroup.getAssessmentAnswers().get(x) != null
                && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion() != null
                && instGroup.getAssessmentAnswers().get(x).getAssessmentQuestion().equals(configQuestion))
        {
            return instGroup.getAssessmentAnswers().get(x);
        }               
    }

    return null;
}
项目:openMAXIMS    文件:StructuredAssessmentsHelper.java   
public void updateGroupRow(AssessmentQuestionGroupVo group, DynamicGridRow row, boolean createNewQuestionGroupCell)
{
    if(group == null || row == null)
        return;

    if(createNewQuestionGroupCell)
        row.getCells().newCell(getGridColumn(COLUMN_QUESTIONGROUP), DynamicCellType.STRING);
    row.setValue(group);
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setValue(group.getName());
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setReadOnly(true);
    createToolTip(row, getGridColumn(COLUMN_QUESTIONGROUP), getGroupTooltip(group));
    row.setBold(true);
    row.setBackColor(Color.Beige);
    row.setExpanded(true);

    dynGrid.setValue(row.getValue());
}
项目:openmaxims-linux    文件:Logic.java   
private void refreshGroupGrid()
{
    form.lyrTabs().tabGroups().grdGroups().getRows().clear();
    AssessmentQuestionGroupVoCollection voColl = form.getLocalContext().getHiddenGroups();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        AssessmentQuestionGroupVo voAssessQGroup = voColl.get(i);
        GenForm.lyrTabsLayer.tabGroupsContainer.grdGroupsRow row = form.lyrTabs().tabGroups().grdGroups().getRows().newRow();

        row.setcolName(voAssessQGroup.getName());
        row.setcolDescription(voAssessQGroup.getDescription());
        row.setcolStatus(voAssessQGroup.getActiveStatus());
        row.setcolScore(voAssessQGroup.getGroupScoreIsNotNull() ? voAssessQGroup.getGroupScore().toString() : "");
        row.setValue(voAssessQGroup);
    }

    refreshGroupContextMenu();
}
项目:openMAXIMS    文件:StructuredAssessmentsHelper.java   
private String getGroupTooltip(AssessmentQuestionGroupVo group)
{
    StringBuffer sb = new StringBuffer();

    sb.append("<b>Name: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getName());
    sb.append(CR);
    sb.append("<b>Description: </b>&nbsp;");
    sb.append(group.getDescription());
    sb.append(CR);
    sb.append("<b>Status: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "");
    sb.append(CR);
    sb.append("<b>Score:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    sb.append(group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : "");

    return sb.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    super.clearScreen();
    AssessmentQuestionGroupVo group = form.getGlobalContext().Core.getSelectedQuestionGroup();

    if(group != null)
    {
        super.populateScreenFromData(group);
    }
    else
    {
        //WDEV-1751 - when adding a new group can we default the 'status combobox' to active. 
        form.cmbStatus().setValue(ims.core.vo.lookups.PreActiveActiveInactiveStatus.ACTIVE);
    }
}
项目:AvoinApotti    文件:Logic.java   
private UserAssessmentVo getFilteredOnRoleUserAssessment(UserAssessmentVo voUserAssesmentOriginal, AssessmentRoleVo voAssessmentRole)
{
    if(voUserAssesmentOriginal == null)
        return voUserAssesmentOriginal;

    UserAssessmentVo voUserAssesment = (UserAssessmentVo) voUserAssesmentOriginal.clone();
    if (voUserAssesment != null && voAssessmentRole != null && voUserAssesment.getAssessmentRoles().size() > 0)
    {
        for (int i = 0; voUserAssesment.getQuestionGroupsIsNotNull() && i < voUserAssesment.getQuestionGroups().size(); i++)
        {
            boolean deleted = true;
            while (deleted)
            {
                deleted = false;
                AssessmentQuestionGroupVo voAssessQuestion = voUserAssesment.getQuestionGroups().get(i);
                for (int j = 0; j < voAssessQuestion.getQuestions().size(); j++)
                {
                    AssessmentQuestionVo assessmentQuestionVo = voAssessQuestion.getQuestions().get(j);
                    boolean found = isRoleAdded(voAssessmentRole, assessmentQuestionVo);

                    if (found == false)
                    {
                        voAssessQuestion.getQuestions().remove(j);
                        deleted = true;
                        break;
                    }
                }
            }
        }
    }

    return voUserAssesment;
}
项目:AvoinApotti    文件:Logic.java   
private void updateGroupRow(AssessmentQuestionGroupVo group, DynamicGridRow row)
{
    row.setValue(group);
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setValue(group.getName());
    row.getCells().get(getGridColumn(COLUMN_QUESTIONGROUP)).setReadOnly(true);
    //createToolTip(row, getGridColumn(COLUMN_QUESTIONGROUP), "Description: " + group.getDescription() + CR + "Status: " + (group.getActiveStatusIsNotNull() ? group.getActiveStatus().getText() : "") + CR + "Score: " + (group.getGroupScoreIsNotNull() ? group.getGroupScore().toString() : ""));
    createToolTip(row, getGridColumn(COLUMN_QUESTIONGROUP), getGroupTooltip(group));
    row.setBold(true);
    row.setBackColor(Color.Beige);
    row.setExpanded(true);

    form.lyrTabs().tabAssessments().dyngrdDetails().setValue(row.getValue());
}
项目:AvoinApotti    文件:Logic.java   
private boolean populateGroupCollectionFromScreenMultipleGroupNoFlat(UserAssessmentVo assessment)
{
    assessment.getQuestionGroups().clear();
    int seqNo = 1;
    for(int i = 0; i < form.lyrTabs().tabAssessments().dyngrdDetails().getRows().size(); i++)
    {
        DynamicGridRow row = form.lyrTabs().tabAssessments().dyngrdDetails().getRows().get(i);

        AssessmentQuestionGroupVo assessmentQuestionGroupVo = (AssessmentQuestionGroupVo) row.getValue();
        if(assessmentQuestionGroupVo.getQuestionsIsNotNull())
            assessmentQuestionGroupVo.getQuestions().clear();
        else
            assessmentQuestionGroupVo.setQuestions(new AssessmentQuestionVoCollection());

        for (int j = 0; j < row.getRows().size(); j++)
        {
            DynamicGridRow childRow = row.getRows().get(j);

            if(childRow.getValue() instanceof AssessmentQuestionVo)
            {
                AssessmentQuestionVo value = (AssessmentQuestionVo) childRow.getValue();
                value.setIsMandatory((Boolean) childRow.getCells().get(getGridColumn(COLUMN_MANDATORY)).getValue());
                if(value.getIsMandatory() == null)
                    value.setIsMandatory(Boolean.FALSE);
                value.setAllowsMultipleAnswers((Boolean) childRow.getCells().get(getGridColumn(COLUMN_MULTIANSWERS)).getValue());
                if(value.getAllowsMultipleAnswers() == null)
                    value.setAllowsMultipleAnswers(Boolean.FALSE);
                value.setActiveStatus( (PreActiveActiveInactiveStatus) childRow.getCells().get(getGridColumn(COLUMN_STATUS)).getValue());
                value.setSequence(new Integer(seqNo++));
                value.setAssessmentAnswerRole(getQuestionRole(value));
                assessmentQuestionGroupVo.getQuestions().add(value);
            }
        }

        if(assessment.getQuestionGroups().contains(assessmentQuestionGroupVo) == false)
            assessment.getQuestionGroups().add(assessmentQuestionGroupVo);
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private AssessmentQuestionGroupVo getGroupByQuestion(AssessmentQuestionVo assessmentQuestionVo, UserAssessmentVo assessment)
{
    for(int i = 0; i < assessment.getQuestionGroups().size(); i++)
    {
        AssessmentQuestionGroupVo group = assessment.getQuestionGroups().get(i);

        for (int j = 0; j < group.getQuestions().size(); j++)
        {
            if(group.getQuestions().get(j).equals(assessmentQuestionVo))//getID_AssessmentQuestionIsNotNull() && group.getQuestions().get(j).getID_AssessmentQuestion().equals(assessmentQuestionVo.getID_AssessmentQuestion()))
                return group;
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void editGroup()
{
    if (isAssessmentTabSelected())
        form.getGlobalContext().Core.setSelectedQuestionGroup((AssessmentQuestionGroupVo) form.lyrTabs().tabAssessments().dyngrdDetails().getValue());
    if (isGroupTabSelected())
        form.getGlobalContext().Core.setSelectedQuestionGroup(form.lyrTabs().tabGroups().grdGroups().getValue());
    form.getGlobalContext().Core.setUserAssessmentAction("E");
    engine.open(form.getForms().Assessment.GroupSelectNew, "Edit Group");
}