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

The following are Jave code examples for showing how to use getAssessmentQuestionIsNotNull() 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 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if (assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();

	for (int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if (assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}

	return new PatientAssessmentQuestionVo();
}
 
Example 2
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License Vote up 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if(assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();
	
	for(int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if(assessmentQuestion != null 
				&& assessmentQuestion.getAssessmentQuestionIsNotNull()
				&& assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}
	
	return new PatientAssessmentQuestionVo();
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if (assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();

	for (int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if (assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}

	return new PatientAssessmentQuestionVo();
}
 
Example 4
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License Vote up 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if(assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();
	
	for(int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if(assessmentQuestion != null 
				&& assessmentQuestion.getAssessmentQuestionIsNotNull()
				&& assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}
	
	return new PatientAssessmentQuestionVo();
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if (assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();

	for (int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if (assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}

	return new PatientAssessmentQuestionVo();
}
 
Example 6
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License Vote up 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if(assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();
	
	for(int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if(assessmentQuestion != null 
				&& assessmentQuestion.getAssessmentQuestionIsNotNull()
				&& assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}
	
	return new PatientAssessmentQuestionVo();
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if (assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();

	for (int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if (assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}

	return new PatientAssessmentQuestionVo();
}
 
Example 8
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License Vote up 6 votes
private PatientAssessmentQuestionVo findOrCreateAnswer(PatientAssessmentQuestionVoCollection assesmentQuestions, AssessmentQuestionVo question)
{
	if(assesmentQuestions == null || question == null)
		return new PatientAssessmentQuestionVo();
	
	for(int x = 0; x < assesmentQuestions.size(); x++)
	{
		PatientAssessmentQuestionVo assessmentQuestion = assesmentQuestions.get(x);
		if(assessmentQuestion != null 
				&& assessmentQuestion.getAssessmentQuestionIsNotNull()
				&& assessmentQuestion.getAssessmentQuestion().equals(question))
		{
			return assessmentQuestion;
		}
	}
	
	return new PatientAssessmentQuestionVo();
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private String getNotApplicableQuestions()
{
	PatientAssessmentVo voPatientAssessment = filterQuestions(form.getLocalContext().getPatientAssessmentVo(), NOT_APPLICABLE);
	StringBuffer questions = new StringBuffer();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull() && voPatientAssessment.getAssessmentData().getAnswerGroupsIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo group = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < group.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo voPatientAssessmentQuestion = group.getAssessmentAnswers().get(j);
				if (voPatientAssessmentQuestion != null && voPatientAssessmentQuestion.getAssessmentQuestionIsNotNull() && voPatientAssessmentQuestion.getAssessmentQuestion().getQuestionIsNotNull())
				{
					questions.append(voPatientAssessmentQuestion.getAssessmentQuestion().getQuestion().getText());
					questions.append("\n");
				}
			}
		}
	}

	if(questions.length() > 0)
	{
		questions.insert(0, "The following questions are marked as Non Applicable:\n");
		questions.append("Please confirm. \n");
		return questions.toString();
	}
	
	return null;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private String getNotApplicableQuestions()
{
	PatientAssessmentVo voPatientAssessment = filterQuestions(form.getLocalContext().getPatientAssessmentVo(), NOT_APPLICABLE);
	StringBuffer questions = new StringBuffer();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull() && voPatientAssessment.getAssessmentData().getAnswerGroupsIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo group = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < group.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo voPatientAssessmentQuestion = group.getAssessmentAnswers().get(j);
				if (voPatientAssessmentQuestion != null && voPatientAssessmentQuestion.getAssessmentQuestionIsNotNull() && voPatientAssessmentQuestion.getAssessmentQuestion().getQuestionIsNotNull())
				{
					questions.append(voPatientAssessmentQuestion.getAssessmentQuestion().getQuestion().getText());
					questions.append("\n");
				}
			}
		}
	}

	if(questions.length() > 0)
	{
		questions.insert(0, "The following questions are marked as Non Applicable:\n");
		questions.append("Please confirm. \n");
		return questions.toString();
	}
	
	return null;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private String getNotApplicableQuestions()
{
	PatientAssessmentVo voPatientAssessment = filterQuestions(form.getLocalContext().getPatientAssessmentVo(), NOT_APPLICABLE);
	StringBuffer questions = new StringBuffer();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull() && voPatientAssessment.getAssessmentData().getAnswerGroupsIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo group = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < group.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo voPatientAssessmentQuestion = group.getAssessmentAnswers().get(j);
				if (voPatientAssessmentQuestion != null && voPatientAssessmentQuestion.getAssessmentQuestionIsNotNull() && voPatientAssessmentQuestion.getAssessmentQuestion().getQuestionIsNotNull())
				{
					questions.append(voPatientAssessmentQuestion.getAssessmentQuestion().getQuestion().getText());
					questions.append("\n");
				}
			}
		}
	}

	if(questions.length() > 0)
	{
		questions.insert(0, "The following questions are marked as Non Applicable:\n");
		questions.append("Please confirm. \n");
		return questions.toString();
	}
	
	return null;
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private String getNotApplicableQuestions()
{
	PatientAssessmentVo voPatientAssessment = filterQuestions(form.getLocalContext().getPatientAssessmentVo(), NOT_APPLICABLE);
	StringBuffer questions = new StringBuffer();
	if (voPatientAssessment != null && voPatientAssessment.getAssessmentDataIsNotNull() && voPatientAssessment.getAssessmentData().getAnswerGroupsIsNotNull())
	{
		for (int i = 0; i < voPatientAssessment.getAssessmentData().getAnswerGroups().size(); i++)
		{
			PatientAssessmentGroupVo group = voPatientAssessment.getAssessmentData().getAnswerGroups().get(i);
			for (int j = 0; j < group.getAssessmentAnswers().size(); j++)
			{
				PatientAssessmentQuestionVo voPatientAssessmentQuestion = group.getAssessmentAnswers().get(j);
				if (voPatientAssessmentQuestion != null && voPatientAssessmentQuestion.getAssessmentQuestionIsNotNull() && voPatientAssessmentQuestion.getAssessmentQuestion().getQuestionIsNotNull())
				{
					questions.append(voPatientAssessmentQuestion.getAssessmentQuestion().getQuestion().getText());
					questions.append("\n");
				}
			}
		}
	}

	if(questions.length() > 0)
	{
		questions.insert(0, "The following questions are marked as Non Applicable:\n");
		questions.append("Please confirm. \n");
		return questions.toString();
	}
	
	return null;
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private String getUrlText(PatientAssessmentQuestionVo voPatAssQuestion)
{
	return voPatAssQuestion.getAssessmentQuestionIsNotNull()?voPatAssQuestion.getAssessmentQuestion().getURL():"";
}
 
Example 14
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License Vote up 4 votes
private PatientAssessmentGroupVoCollection calculateScores(PatientAssessmentGroupVoCollection groups)
{
	if(groups == null)
		return null;
			
	for(int x = 0; x < groups.size(); x++)
	{
		Float groupScore = new Float(0);
		PatientAssessmentGroupVo group = groups.get(x);
			
		if(group != null && group.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < group.getAssessmentAnswers().size(); y++)
			{
				PatientAssessmentQuestionVo assessmentQuestion = group.getAssessmentAnswers().get(y);
				
				if(assessmentQuestion.getPatientAnswers() != null)
				{
					for(int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
					{						
						PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);
					
						if(assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && answerDetail.getAnswerDetailsIsNotNull())
						{
							AssessmentQuestionVo question = assessmentQuestion.getAssessmentQuestion();
							if(question.getScoringAnswerTypeIsNotNull())
							{
								for(int z = 0; z < answerDetail.getAnswerDetails().size(); z++)
								{								
									AnswerDetailsVo answerDetails = answerDetail.getAnswerDetails().get(z);
									if(answerDetails != null && answerDetails.getAnswerTypeIsNotNull())
									{									
										if(answerDetails.getAnswerType().equals(question.getScoringAnswerType()))
										{
											if(answerDetails.getPicklist() != null && answerDetails.getAnswerType().getOptionsIsNotNull())
											{
												for(int o = 0; o < answerDetails.getAnswerType().getOptions().size(); o++)
												{
													if(answerDetails.getPicklist().equals(answerDetails.getAnswerType().getOptions().get(o)))
													{
														if(answerDetails.getAnswerType().getOptions().get(o).getScoreIsNotNull())
														{
															groupScore += answerDetails.getAnswerType().getOptions().get(o).getScore();
															break;
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			
			//WDEV-3916
			group.setCurrentScore(new Float(groupScore));			
			groups.set(x, group);
		}
	}
	
	return groups;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
private String getUrlText(PatientAssessmentQuestionVo voPatAssQuestion)
{
	return voPatAssQuestion.getAssessmentQuestionIsNotNull()?voPatAssQuestion.getAssessmentQuestion().getURL():"";
}
 
Example 16
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License Vote up 4 votes
private PatientAssessmentGroupVoCollection calculateScores(PatientAssessmentGroupVoCollection groups)
{
	if(groups == null)
		return null;
			
	for(int x = 0; x < groups.size(); x++)
	{
		Float groupScore = new Float(0);
		PatientAssessmentGroupVo group = groups.get(x);
			
		if(group != null && group.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < group.getAssessmentAnswers().size(); y++)
			{
				PatientAssessmentQuestionVo assessmentQuestion = group.getAssessmentAnswers().get(y);
				
				if(assessmentQuestion.getPatientAnswers() != null)
				{
					for(int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
					{						
						PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);
					
						if(assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && answerDetail.getAnswerDetailsIsNotNull())
						{
							AssessmentQuestionVo question = assessmentQuestion.getAssessmentQuestion();
							if(question.getScoringAnswerTypeIsNotNull())
							{
								for(int z = 0; z < answerDetail.getAnswerDetails().size(); z++)
								{								
									AnswerDetailsVo answerDetails = answerDetail.getAnswerDetails().get(z);
									if(answerDetails != null && answerDetails.getAnswerTypeIsNotNull())
									{									
										if(answerDetails.getAnswerType().equals(question.getScoringAnswerType()))
										{
											if(answerDetails.getPicklist() != null && answerDetails.getAnswerType().getOptionsIsNotNull())
											{
												for(int o = 0; o < answerDetails.getAnswerType().getOptions().size(); o++)
												{
													if(answerDetails.getPicklist().equals(answerDetails.getAnswerType().getOptions().get(o)))
													{
														if(answerDetails.getAnswerType().getOptions().get(o).getScoreIsNotNull())
														{
															groupScore += answerDetails.getAnswerType().getOptions().get(o).getScore();
															break;
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			
			//WDEV-3916
			group.setCurrentScore(new Float(groupScore));			
			groups.set(x, group);
		}
	}
	
	return groups;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
private String getUrlText(PatientAssessmentQuestionVo voPatAssQuestion)
{
	return voPatAssQuestion.getAssessmentQuestionIsNotNull()?voPatAssQuestion.getAssessmentQuestion().getURL():"";
}
 
Example 18
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License Vote up 4 votes
private PatientAssessmentGroupVoCollection calculateScores(PatientAssessmentGroupVoCollection groups)
{
	if(groups == null)
		return null;
			
	for(int x = 0; x < groups.size(); x++)
	{
		Float groupScore = new Float(0);
		PatientAssessmentGroupVo group = groups.get(x);
			
		if(group != null && group.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < group.getAssessmentAnswers().size(); y++)
			{
				PatientAssessmentQuestionVo assessmentQuestion = group.getAssessmentAnswers().get(y);
				
				if(assessmentQuestion.getPatientAnswers() != null)
				{
					for(int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
					{						
						PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);
					
						if(assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && answerDetail.getAnswerDetailsIsNotNull())
						{
							AssessmentQuestionVo question = assessmentQuestion.getAssessmentQuestion();
							if(question.getScoringAnswerTypeIsNotNull())
							{
								for(int z = 0; z < answerDetail.getAnswerDetails().size(); z++)
								{								
									AnswerDetailsVo answerDetails = answerDetail.getAnswerDetails().get(z);
									if(answerDetails != null && answerDetails.getAnswerTypeIsNotNull())
									{									
										if(answerDetails.getAnswerType().equals(question.getScoringAnswerType()))
										{
											if(answerDetails.getPicklist() != null && answerDetails.getAnswerType().getOptionsIsNotNull())
											{
												for(int o = 0; o < answerDetails.getAnswerType().getOptions().size(); o++)
												{
													if(answerDetails.getPicklist().equals(answerDetails.getAnswerType().getOptions().get(o)))
													{
														if(answerDetails.getAnswerType().getOptions().get(o).getScoreIsNotNull())
														{
															groupScore += answerDetails.getAnswerType().getOptions().get(o).getScore();
															break;
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			
			//WDEV-3916
			group.setCurrentScore(new Float(groupScore));			
			groups.set(x, group);
		}
	}
	
	return groups;
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 4 votes
private String getUrlText(PatientAssessmentQuestionVo voPatAssQuestion)
{
	return voPatAssQuestion.getAssessmentQuestionIsNotNull()?voPatAssQuestion.getAssessmentQuestion().getURL():"";
}
 
Example 20
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License Vote up 4 votes
private PatientAssessmentGroupVoCollection calculateScores(PatientAssessmentGroupVoCollection groups)
{
	if(groups == null)
		return null;
			
	for(int x = 0; x < groups.size(); x++)
	{
		Float groupScore = new Float(0);
		PatientAssessmentGroupVo group = groups.get(x);
			
		if(group != null && group.getAssessmentAnswersIsNotNull())
		{
			for(int y = 0; y < group.getAssessmentAnswers().size(); y++)
			{
				PatientAssessmentQuestionVo assessmentQuestion = group.getAssessmentAnswers().get(y);
				
				if(assessmentQuestion.getPatientAnswers() != null)
				{
					for(int i = 0; i < assessmentQuestion.getPatientAnswers().size(); i++)
					{						
						PatientAssessmentAnswerVo answerDetail = assessmentQuestion.getPatientAnswers().get(i);
					
						if(assessmentQuestion != null && assessmentQuestion.getAssessmentQuestionIsNotNull() && answerDetail.getAnswerDetailsIsNotNull())
						{
							AssessmentQuestionVo question = assessmentQuestion.getAssessmentQuestion();
							if(question.getScoringAnswerTypeIsNotNull())
							{
								for(int z = 0; z < answerDetail.getAnswerDetails().size(); z++)
								{								
									AnswerDetailsVo answerDetails = answerDetail.getAnswerDetails().get(z);
									if(answerDetails != null && answerDetails.getAnswerTypeIsNotNull())
									{									
										if(answerDetails.getAnswerType().equals(question.getScoringAnswerType()))
										{
											if(answerDetails.getPicklist() != null && answerDetails.getAnswerType().getOptionsIsNotNull())
											{
												for(int o = 0; o < answerDetails.getAnswerType().getOptions().size(); o++)
												{
													if(answerDetails.getPicklist().equals(answerDetails.getAnswerType().getOptions().get(o)))
													{
														if(answerDetails.getAnswerType().getOptions().get(o).getScoreIsNotNull())
														{
															groupScore += answerDetails.getAnswerType().getOptions().get(o).getScore();
															break;
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			
			//WDEV-3916
			group.setCurrentScore(new Float(groupScore));			
			groups.set(x, group);
		}
	}
	
	return groups;
}