Java Code Examples for ims.assessment.vo.PatientAssessmentQuestionVo.getID_PatientAssessmentQuestionIsNotNull()

The following are Jave code examples for showing how to use getID_PatientAssessmentQuestionIsNotNull() of the ims.assessment.vo.PatientAssessmentQuestionVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private PatientAssessmentGroupVoCollection getAnswerGroups(PatientAssessmentGroupVoCollection currentAnswer, PatientAssessmentGroupVoCollection notAvailableAnswColl)
{
	if(currentAnswer != null && currentAnswer.size() > 0)
	{
		for (int i = 0; notAvailableAnswColl != null && i < notAvailableAnswColl.size(); i++)
		{
			//Get the first group and add those questions.....
			PatientAssessmentGroupVo voPatAssGroup = notAvailableAnswColl.get(i);
			//Add all Patient Assessment Question to existing Answers
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo patientAssessmentQuestionVo = voPatAssGroup.getAssessmentAnswers().get(j);
				//Clear the id of the record or we will get a Flush Dirty error - TODO Please check if it can be done differently...
				if(patientAssessmentQuestionVo.getID_PatientAssessmentQuestionIsNotNull())
					patientAssessmentQuestionVo.setID_PatientAssessmentQuestion(null);
				for (int k = 0; patientAssessmentQuestionVo.getPatientAnswersIsNotNull() && k < patientAssessmentQuestionVo.getPatientAnswers().size(); k++)
				{
					patientAssessmentQuestionVo.getPatientAnswers().get(k).setID_PatientAssessmentAnswer(null);
					if(patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetailsIsNotNull())
					{
						for (int index = 0; index < patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().size(); index++)
						{
							patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().get(index).setID_PatientAnswerDetails(null);	
						}
					}
				}
				//End clear Id
					
				currentAnswer.get(0).getAssessmentAnswers().add(patientAssessmentQuestionVo);						
			}
		}
	}
	else
	{
		return notAvailableAnswColl;	
	}

	return currentAnswer;
}
 
Example 2
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private PatientAssessmentGroupVoCollection getAnswerGroups(PatientAssessmentGroupVoCollection currentAnswer, PatientAssessmentGroupVoCollection notAvailableAnswColl)
{
	if(currentAnswer != null && currentAnswer.size() > 0)
	{
		for (int i = 0; notAvailableAnswColl != null && i < notAvailableAnswColl.size(); i++)
		{
			//Get the first group and add those questions.....
			PatientAssessmentGroupVo voPatAssGroup = notAvailableAnswColl.get(i);
			//Add all Patient Assessment Question to existing Answers
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo patientAssessmentQuestionVo = voPatAssGroup.getAssessmentAnswers().get(j);
				//Clear the id of the record or we will get a Flush Dirty error - TODO Please check if it can be done differently...
				if(patientAssessmentQuestionVo.getID_PatientAssessmentQuestionIsNotNull())
					patientAssessmentQuestionVo.setID_PatientAssessmentQuestion(null);
				for (int k = 0; patientAssessmentQuestionVo.getPatientAnswersIsNotNull() && k < patientAssessmentQuestionVo.getPatientAnswers().size(); k++)
				{
					patientAssessmentQuestionVo.getPatientAnswers().get(k).setID_PatientAssessmentAnswer(null);
					if(patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetailsIsNotNull())
					{
						for (int index = 0; index < patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().size(); index++)
						{
							patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().get(index).setID_PatientAnswerDetails(null);	
						}
					}
				}
				//End clear Id
					
				currentAnswer.get(0).getAssessmentAnswers().add(patientAssessmentQuestionVo);						
			}
		}
	}
	else
	{
		return notAvailableAnswColl;	
	}

	return currentAnswer;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private PatientAssessmentGroupVoCollection getAnswerGroups(PatientAssessmentGroupVoCollection currentAnswer, PatientAssessmentGroupVoCollection notAvailableAnswColl)
{
	if(currentAnswer != null && currentAnswer.size() > 0)
	{
		for (int i = 0; notAvailableAnswColl != null && i < notAvailableAnswColl.size(); i++)
		{
			//Get the first group and add those questions.....
			PatientAssessmentGroupVo voPatAssGroup = notAvailableAnswColl.get(i);
			//Add all Patient Assessment Question to existing Answers
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo patientAssessmentQuestionVo = voPatAssGroup.getAssessmentAnswers().get(j);
				//Clear the id of the record or we will get a Flush Dirty error - TODO Please check if it can be done differently...
				if(patientAssessmentQuestionVo.getID_PatientAssessmentQuestionIsNotNull())
					patientAssessmentQuestionVo.setID_PatientAssessmentQuestion(null);
				for (int k = 0; patientAssessmentQuestionVo.getPatientAnswersIsNotNull() && k < patientAssessmentQuestionVo.getPatientAnswers().size(); k++)
				{
					patientAssessmentQuestionVo.getPatientAnswers().get(k).setID_PatientAssessmentAnswer(null);
					if(patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetailsIsNotNull())
					{
						for (int index = 0; index < patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().size(); index++)
						{
							patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().get(index).setID_PatientAnswerDetails(null);	
						}
					}
				}
				//End clear Id
					
				currentAnswer.get(0).getAssessmentAnswers().add(patientAssessmentQuestionVo);						
			}
		}
	}
	else
	{
		return notAvailableAnswColl;	
	}

	return currentAnswer;
}
 
Example 4
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private PatientAssessmentGroupVoCollection getAnswerGroups(PatientAssessmentGroupVoCollection currentAnswer, PatientAssessmentGroupVoCollection notAvailableAnswColl)
{
	if(currentAnswer != null && currentAnswer.size() > 0)
	{
		for (int i = 0; notAvailableAnswColl != null && i < notAvailableAnswColl.size(); i++)
		{
			//Get the first group and add those questions.....
			PatientAssessmentGroupVo voPatAssGroup = notAvailableAnswColl.get(i);
			//Add all Patient Assessment Question to existing Answers
			for (int j = 0; j < voPatAssGroup.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo patientAssessmentQuestionVo = voPatAssGroup.getAssessmentAnswers().get(j);
				//Clear the id of the record or we will get a Flush Dirty error - TODO Please check if it can be done differently...
				if(patientAssessmentQuestionVo.getID_PatientAssessmentQuestionIsNotNull())
					patientAssessmentQuestionVo.setID_PatientAssessmentQuestion(null);
				for (int k = 0; patientAssessmentQuestionVo.getPatientAnswersIsNotNull() && k < patientAssessmentQuestionVo.getPatientAnswers().size(); k++)
				{
					patientAssessmentQuestionVo.getPatientAnswers().get(k).setID_PatientAssessmentAnswer(null);
					if(patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetailsIsNotNull())
					{
						for (int index = 0; index < patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().size(); index++)
						{
							patientAssessmentQuestionVo.getPatientAnswers().get(k).getAnswerDetails().get(index).setID_PatientAnswerDetails(null);	
						}
					}
				}
				//End clear Id
					
				currentAnswer.get(0).getAssessmentAnswers().add(patientAssessmentQuestionVo);						
			}
		}
	}
	else
	{
		return notAvailableAnswColl;	
	}

	return currentAnswer;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private boolean setQuestionRowAnswer(DynamicGridRow groupRow, PatientAssessmentQuestionVo assessmentQuestion, PatientAssessmentGroupVo group)
{
	if (assessmentQuestion == null || assessmentQuestion.getPatientAnswers() == null)
		return false;

	DynamicGridRow initialQuestionRow = null;
	DynamicGridRow questionRow = findRow(groupRow, assessmentQuestion.getAssessmentQuestion());
	if (questionRow == null)
		return false;

	if (isDPP)
	{
		DynamicGridColumn pocColumn = this.grid.getColumns().getByIdentifier(POC_COLUMN);
		if (pocColumn != null)
		{
			DynamicGridCell pocCell = questionRow.getCells().get(pocColumn);
			if (pocCell != null)
			{
				Boolean pocChecked = assessmentQuestion != null ? assessmentQuestion.getIsPoc() : Boolean.FALSE;
				// Set readonly the cell when we have a saved POC value
				// against a Question
				if (pocChecked != null && pocChecked.booleanValue() && assessmentQuestion.getID_PatientAssessmentQuestionIsNotNull())
					pocCell.setReadOnly(true);
				pocCell.setValue(pocChecked);
			}
		}
	}

	for (int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
	{
		PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);

		if (answerDetail != null)
		{
			if (i > 0)
			{
				if (initialQuestionRow == null)
					initialQuestionRow = questionRow;

				questionRow = duplicateQuestionRow(initialQuestionRow);
			}

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

				if (cell != null)
				{
					if (x == 0)
						cell.getRow().setValue(answerDetail);
					setCellAnswer(cell, answer);
				}
			}
		}
	}

	return true;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
private boolean setQuestionRowAnswer(DynamicGridRow groupRow, PatientAssessmentQuestionVo assessmentQuestion, PatientAssessmentGroupVo group)
{
	if (assessmentQuestion == null || assessmentQuestion.getPatientAnswers() == null)
		return false;

	DynamicGridRow initialQuestionRow = null;
	DynamicGridRow questionRow = findRow(groupRow, assessmentQuestion.getAssessmentQuestion());
	if (questionRow == null)
		return false;

	if (isDPP)
	{
		DynamicGridColumn pocColumn = this.grid.getColumns().getByIdentifier(POC_COLUMN);
		if (pocColumn != null)
		{
			DynamicGridCell pocCell = questionRow.getCells().get(pocColumn);
			if (pocCell != null)
			{
				Boolean pocChecked = assessmentQuestion != null ? assessmentQuestion.getIsPoc() : Boolean.FALSE;
				// Set readonly the cell when we have a saved POC value
				// against a Question
				if (pocChecked != null && pocChecked.booleanValue() && assessmentQuestion.getID_PatientAssessmentQuestionIsNotNull())
					pocCell.setReadOnly(true);
				pocCell.setValue(pocChecked);
			}
		}
	}

	for (int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
	{
		PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);

		if (answerDetail != null)
		{
			if (i > 0)
			{
				if (initialQuestionRow == null)
					initialQuestionRow = questionRow;

				questionRow = duplicateQuestionRow(initialQuestionRow);
			}

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

				if (cell != null)
				{
					if (x == 0)
						cell.getRow().setValue(answerDetail);
					setCellAnswer(cell, answer);
				}
			}
		}
	}

	return true;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
private boolean setQuestionRowAnswer(DynamicGridRow groupRow, PatientAssessmentQuestionVo assessmentQuestion, PatientAssessmentGroupVo group)
{
	if (assessmentQuestion == null || assessmentQuestion.getPatientAnswers() == null)
		return false;

	DynamicGridRow initialQuestionRow = null;
	DynamicGridRow questionRow = findRow(groupRow, assessmentQuestion.getAssessmentQuestion());
	if (questionRow == null)
		return false;

	if (isDPP)
	{
		DynamicGridColumn pocColumn = this.grid.getColumns().getByIdentifier(POC_COLUMN);
		if (pocColumn != null)
		{
			DynamicGridCell pocCell = questionRow.getCells().get(pocColumn);
			if (pocCell != null)
			{
				Boolean pocChecked = assessmentQuestion != null ? assessmentQuestion.getIsPoc() : Boolean.FALSE;
				// Set readonly the cell when we have a saved POC value
				// against a Question
				if (pocChecked != null && pocChecked.booleanValue() && assessmentQuestion.getID_PatientAssessmentQuestionIsNotNull())
					pocCell.setReadOnly(true);
				pocCell.setValue(pocChecked);
			}
		}
	}

	for (int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
	{
		PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);

		if (answerDetail != null)
		{
			if (i > 0)
			{
				if (initialQuestionRow == null)
					initialQuestionRow = questionRow;

				questionRow = duplicateQuestionRow(initialQuestionRow);
			}

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

				if (cell != null)
				{
					if (x == 0)
						cell.getRow().setValue(answerDetail);
					setCellAnswer(cell, answer);
				}
			}
		}
	}

	return true;
}
 
Example 8
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 4 votes
private boolean setQuestionRowAnswer(DynamicGridRow groupRow, PatientAssessmentQuestionVo assessmentQuestion, PatientAssessmentGroupVo group)
{
	if (assessmentQuestion == null || assessmentQuestion.getPatientAnswers() == null)
		return false;

	DynamicGridRow initialQuestionRow = null;
	DynamicGridRow questionRow = findRow(groupRow, assessmentQuestion.getAssessmentQuestion());
	if (questionRow == null)
		return false;

	if (isDPP)
	{
		DynamicGridColumn pocColumn = this.grid.getColumns().getByIdentifier(POC_COLUMN);
		if (pocColumn != null)
		{
			DynamicGridCell pocCell = questionRow.getCells().get(pocColumn);
			if (pocCell != null)
			{
				Boolean pocChecked = assessmentQuestion != null ? assessmentQuestion.getIsPoc() : Boolean.FALSE;
				// Set readonly the cell when we have a saved POC value
				// against a Question
				if (pocChecked != null && pocChecked.booleanValue() && assessmentQuestion.getID_PatientAssessmentQuestionIsNotNull())
					pocCell.setReadOnly(true);
				pocCell.setValue(pocChecked);
			}
		}
	}

	for (int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
	{
		PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);

		if (answerDetail != null)
		{
			if (i > 0)
			{
				if (initialQuestionRow == null)
					initialQuestionRow = questionRow;

				questionRow = duplicateQuestionRow(initialQuestionRow);
			}

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

				if (cell != null)
				{
					if (x == 0)
						cell.getRow().setValue(answerDetail);
					setCellAnswer(cell, answer);
				}
			}
		}
	}

	return true;
}