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

The following are Jave code examples for showing how to use getSequenceIsNotNull() 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.
+ Save this method
Example 1
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if (answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();

	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for (int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}

	for (int x = 0; x < size; x++)
	{
		for (int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);

			if (source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if (source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x];
					sorted[x] = sorted[y];
					sorted[y] = temp;
				}
			}
		}
	}

	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for (int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}

	return sortedAnswers;
}
 
Example 2
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if(answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();
	
	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for(int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}
	
	for(int x = 0; x < size; x++)
	{
		for(int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);
				
			if(source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if(source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x]; 
					sorted[x] = sorted[y];
					sorted[y] = temp;	
				}
			}
		}
	}
	
	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for(int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}
	
	return sortedAnswers;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if (answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();

	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for (int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}

	for (int x = 0; x < size; x++)
	{
		for (int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);

			if (source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if (source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x];
					sorted[x] = sorted[y];
					sorted[y] = temp;
				}
			}
		}
	}

	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for (int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}

	return sortedAnswers;
}
 
Example 4
Project: openMAXIMS   File: UserAssessmentInstHelper.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if(answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();
	
	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for(int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}
	
	for(int x = 0; x < size; x++)
	{
		for(int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);
				
			if(source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if(source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x]; 
					sorted[x] = sorted[y];
					sorted[y] = temp;	
				}
			}
		}
	}
	
	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for(int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}
	
	return sortedAnswers;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if (answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();

	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for (int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}

	for (int x = 0; x < size; x++)
	{
		for (int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);

			if (source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if (source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x];
					sorted[x] = sorted[y];
					sorted[y] = temp;
				}
			}
		}
	}

	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for (int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}

	return sortedAnswers;
}
 
Example 6
Project: openMAXIMS   File: UserAssessmentInstHelper.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if(answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();
	
	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for(int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}
	
	for(int x = 0; x < size; x++)
	{
		for(int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);
				
			if(source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if(source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x]; 
					sorted[x] = sorted[y];
					sorted[y] = temp;	
				}
			}
		}
	}
	
	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for(int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}
	
	return sortedAnswers;
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if (answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();

	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for (int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}

	for (int x = 0; x < size; x++)
	{
		for (int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);

			if (source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if (source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x];
					sorted[x] = sorted[y];
					sorted[y] = temp;
				}
			}
		}
	}

	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for (int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}

	return sortedAnswers;
}
 
Example 8
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   View Source Code Vote up 5 votes
private PatientAssessmentQuestionVoCollection sortAnswersBySequence(PatientAssessmentQuestionVoCollection answersToBeSorted)
{
	if(answersToBeSorted == null)
		return new PatientAssessmentQuestionVoCollection();
	
	int size = answersToBeSorted.size();
	int[] sorted = new int[size];
	for(int x = 0; x < size; x++)
	{
		sorted[x] = x;
	}
	
	for(int x = 0; x < size; x++)
	{
		for(int y = 0; y < size; y++)
		{
			PatientAssessmentQuestionVo source = answersToBeSorted.get(sorted[x]);
			PatientAssessmentQuestionVo compare = answersToBeSorted.get(sorted[y]);
				
			if(source.getSequenceIsNotNull() && compare.getSequenceIsNotNull())
			{
				if(source.getSequence().compareTo(compare.getSequence()) < 0)
				{
					int temp = sorted[x]; 
					sorted[x] = sorted[y];
					sorted[y] = temp;	
				}
			}
		}
	}
	
	PatientAssessmentQuestionVoCollection sortedAnswers = new PatientAssessmentQuestionVoCollection();
	for(int x = 0; x < size; x++)
	{
		sortedAnswers.add(answersToBeSorted.get(sorted[x]));
	}
	
	return sortedAnswers;
}