Java Code Examples for ims.assessment.vo.PatientAssessmentGroupVo

The following are top voted examples for showing how to use ims.assessment.vo.PatientAssessmentGroupVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setPocFlag(PatientAssessmentGroupVoCollection currentAnswer, UserAssessmentInstHelper helper)
{
	// Add the records checked
	for (int i = 0; i < currentAnswer.size(); i++)
	{
		PatientAssessmentGroupVo voPatAssessGroup = currentAnswer.get(i);
		for (int j = 0; j < voPatAssessGroup.getAssessmentAnswers().size(); j++)
		{
			PatientAssessmentQuestionVo voPatAssessmQuestion = voPatAssessGroup.getAssessmentAnswers().get(j);
			AssessmentQuestionVo voAssessmQuestion = voPatAssessmQuestion.getAssessmentQuestion();
			//Do not modify the POC if the questions has no Answers 
			boolean isPocSelected = isPocSelected(helper, voAssessmQuestion) && hasAnswers(voPatAssessmQuestion);
			voPatAssessmQuestion.setIsPoc(new Boolean(isPocSelected));
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNAQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				AnswerStatus answerStatus = voPatAssGroup.getAssessmentAnswers().get(j).getIsAnswered();
				if (answerStatus != null && answerStatus.equals(AnswerStatus.NOTAPPLICABLE))
					return true;
			}
		}
	}

	return false;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNotAsnweredQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				if(isNonStandard(voPatAssGroup.getAssessmentAnswers().get(j)))
					return true;
			}
		}
	}
	return true;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if (answers == null)
		return;

	for (int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if (answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for (int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y), answerGroup);
			}
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if (answerGroup == null)
		return false;

	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());
	
	if (groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData) groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	

	for (int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x), answerGroup);
	}

	return true;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 7
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if(answers == null)
		return;
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if(answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y));
			}
		}
	}
}
 
Example 8
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if(answerGroup == null)
		return false;
	
	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());	
	if(groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData)groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	
	
	for(int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x));
	}
	
	return true;
}
 
Example 9
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 10
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setPocFlag(PatientAssessmentGroupVoCollection currentAnswer, UserAssessmentInstHelper helper)
{
	// Add the records checked
	for (int i = 0; i < currentAnswer.size(); i++)
	{
		PatientAssessmentGroupVo voPatAssessGroup = currentAnswer.get(i);
		for (int j = 0; j < voPatAssessGroup.getAssessmentAnswers().size(); j++)
		{
			PatientAssessmentQuestionVo voPatAssessmQuestion = voPatAssessGroup.getAssessmentAnswers().get(j);
			AssessmentQuestionVo voAssessmQuestion = voPatAssessmQuestion.getAssessmentQuestion();
			//Do not modify the POC if the questions has no Answers 
			boolean isPocSelected = isPocSelected(helper, voAssessmQuestion) && hasAnswers(voPatAssessmQuestion);
			voPatAssessmQuestion.setIsPoc(new Boolean(isPocSelected));
		}
	}
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNAQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				AnswerStatus answerStatus = voPatAssGroup.getAssessmentAnswers().get(j).getIsAnswered();
				if (answerStatus != null && answerStatus.equals(AnswerStatus.NOTAPPLICABLE))
					return true;
			}
		}
	}

	return false;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNotAsnweredQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				if(isNonStandard(voPatAssGroup.getAssessmentAnswers().get(j)))
					return true;
			}
		}
	}
	return true;
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if (answers == null)
		return;

	for (int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if (answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for (int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y), answerGroup);
			}
		}
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if (answerGroup == null)
		return false;

	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());
	
	if (groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData) groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	

	for (int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x), answerGroup);
	}

	return true;
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 17
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if(answers == null)
		return;
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if(answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y));
			}
		}
	}
}
 
Example 18
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if(answerGroup == null)
		return false;
	
	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());	
	if(groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData)groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	
	
	for(int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x));
	}
	
	return true;
}
 
Example 19
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 20
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setPocFlag(PatientAssessmentGroupVoCollection currentAnswer, UserAssessmentInstHelper helper)
{
	// Add the records checked
	for (int i = 0; i < currentAnswer.size(); i++)
	{
		PatientAssessmentGroupVo voPatAssessGroup = currentAnswer.get(i);
		for (int j = 0; j < voPatAssessGroup.getAssessmentAnswers().size(); j++)
		{
			PatientAssessmentQuestionVo voPatAssessmQuestion = voPatAssessGroup.getAssessmentAnswers().get(j);
			AssessmentQuestionVo voAssessmQuestion = voPatAssessmQuestion.getAssessmentQuestion();
			//Do not modify the POC if the questions has no Answers 
			boolean isPocSelected = isPocSelected(helper, voAssessmQuestion) && hasAnswers(voPatAssessmQuestion);
			voPatAssessmQuestion.setIsPoc(new Boolean(isPocSelected));
		}
	}
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNAQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				AnswerStatus answerStatus = voPatAssGroup.getAssessmentAnswers().get(j).getIsAnswered();
				if (answerStatus != null && answerStatus.equals(AnswerStatus.NOTAPPLICABLE))
					return true;
			}
		}
	}

	return false;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNotAsnweredQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				if(isNonStandard(voPatAssGroup.getAssessmentAnswers().get(j)))
					return true;
			}
		}
	}
	return true;
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if (answers == null)
		return;

	for (int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if (answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for (int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y), answerGroup);
			}
		}
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if (answerGroup == null)
		return false;

	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());
	
	if (groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData) groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	

	for (int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x), answerGroup);
	}

	return true;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 27
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if(answers == null)
		return;
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if(answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y));
			}
		}
	}
}
 
Example 28
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if(answerGroup == null)
		return false;
	
	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());	
	if(groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData)groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	
	
	for(int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x));
	}
	
	return true;
}
 
Example 29
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 30
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setPocFlag(PatientAssessmentGroupVoCollection currentAnswer, UserAssessmentInstHelper helper)
{
	// Add the records checked
	for (int i = 0; i < currentAnswer.size(); i++)
	{
		PatientAssessmentGroupVo voPatAssessGroup = currentAnswer.get(i);
		for (int j = 0; j < voPatAssessGroup.getAssessmentAnswers().size(); j++)
		{
			PatientAssessmentQuestionVo voPatAssessmQuestion = voPatAssessGroup.getAssessmentAnswers().get(j);
			AssessmentQuestionVo voAssessmQuestion = voPatAssessmQuestion.getAssessmentQuestion();
			//Do not modify the POC if the questions has no Answers 
			boolean isPocSelected = isPocSelected(helper, voAssessmQuestion) && hasAnswers(voPatAssessmQuestion);
			voPatAssessmQuestion.setIsPoc(new Boolean(isPocSelected));
		}
	}
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNAQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				AnswerStatus answerStatus = voPatAssGroup.getAssessmentAnswers().get(j).getIsAnswered();
				if (answerStatus != null && answerStatus.equals(AnswerStatus.NOTAPPLICABLE))
					return true;
			}
		}
	}

	return false;
}
 
Example 33
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isVisibleNotAsnweredQuestion()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo voPatAssGroup = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				if(isNonStandard(voPatAssGroup.getAssessmentAnswers().get(j)))
					return true;
			}
		}
	}
	return true;
}
 
Example 34
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if (answers == null)
		return;

	for (int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if (answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for (int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y), answerGroup);
			}
		}
	}
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if (answerGroup == null)
		return false;

	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());
	
	if (groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData) groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	

	for (int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x), answerGroup);
	}

	return true;
}
 
Example 36
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 37
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private void setAnswersFlat(PatientAssessmentGroupVoCollection answers)
{
	if(answers == null)
		return;
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientAssessmentGroupVo answerGroup = answers.get(x);
		if(answerGroup != null && answerGroup.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < answerGroup.getAssessmentAnswers().size(); y++)
			{
				setQuestionRowAnswer(null, answerGroup.getAssessmentAnswers().get(y));
			}
		}
	}
}
 
Example 38
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private boolean setGroupRowAnswer(PatientAssessmentGroupVo answerGroup)
{
	if(answerGroup == null)
		return false;
	
	DynamicGridRow groupRow = findRow(answerGroup.getAssessmentQuestionGroup());	
	if(groupRow == null)
		return false;
	
	GroupRowData groupData = (GroupRowData)groupRow.getIdentifier();
	groupRow.setIdentifier(new GroupRowData(groupData.getConfigGroup(), answerGroup));
	
	
	for(int x = 0; x < answerGroup.getAssessmentAnswers().size(); x++)
	{
		setQuestionRowAnswer(groupRow, answerGroup.getAssessmentAnswers().get(x));
	}
	
	return true;
}
 
Example 39
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 40
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
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;
}