Java Code Examples for ims.assessment.vo.GraphicAssessmentQuestionVo

The following are top voted examples for showing how to use ims.assessment.vo.GraphicAssessmentQuestionVo. 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 PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicQuestionIsNotNull() && answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 2
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicQuestionIsNotNull()
				&& answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicQuestionIsNotNull() && answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 4
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicQuestionIsNotNull()
				&& answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicQuestionIsNotNull() && answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 6
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicQuestionIsNotNull()
				&& answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if (answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();

	for (int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if (answer != null && answer.getGraphicQuestionIsNotNull() && answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}

	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 8
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 6 votes vote down vote up
private PatientGraphicAssessmentQuestionAnswerVo findOrCreateAnswer(PatientGraphicAssessmentQuestionAnswerVoCollection answers, GraphicAssessmentQuestionVo question)
{
	if(answers == null || question == null)
		return new PatientGraphicAssessmentQuestionAnswerVo();
	
	for(int x = 0; x < answers.size(); x++)
	{
		PatientGraphicAssessmentQuestionAnswerVo answer = answers.get(x);
		if(answer != null 
				&& answer.getGraphicQuestionIsNotNull()
				&& answer.getGraphicQuestion().equals(question))
		{
			return answer;
		}
	}
	
	return new PatientGraphicAssessmentQuestionAnswerVo();
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdAssociatedQuestionsRow getAssociatedQuestionRowByQuestion(QuestionInformationShortVo voQuestionInfoShort)
{
	for (int i = 0; i < form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().size(); i++)
	{
		GraphicAssessmentQuestionVo voGAQuestion = form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i).getValue();
		if (voGAQuestion != null && voGAQuestion.getQuestionIsNotNull() && voGAQuestion.getQuestion().equals(voQuestionInfoShort))
			return form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i);
	}
	return null;
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if (graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if (voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");

	if (voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 12
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if(graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue(); 
	}
	return false;
}
 
Example 13
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if(voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");
	
	if(voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdAssociatedQuestionsRow getAssociatedQuestionRowByQuestion(QuestionInformationShortVo voQuestionInfoShort)
{
	for (int i = 0; i < form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().size(); i++)
	{
		GraphicAssessmentQuestionVo voGAQuestion = form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i).getValue();
		if (voGAQuestion != null && voGAQuestion.getQuestionIsNotNull() && voGAQuestion.getQuestion().equals(voQuestionInfoShort))
			return form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i);
	}
	return null;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if (graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if (voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");

	if (voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 17
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if(graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue(); 
	}
	return false;
}
 
Example 18
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if(voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");
	
	if(voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdAssociatedQuestionsRow getAssociatedQuestionRowByQuestion(QuestionInformationShortVo voQuestionInfoShort)
{
	for (int i = 0; i < form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().size(); i++)
	{
		GraphicAssessmentQuestionVo voGAQuestion = form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i).getValue();
		if (voGAQuestion != null && voGAQuestion.getQuestionIsNotNull() && voGAQuestion.getQuestion().equals(voQuestionInfoShort))
			return form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i);
	}
	return null;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if (graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if (voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");

	if (voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 22
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if(graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue(); 
	}
	return false;
}
 
Example 23
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if(voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");
	
	if(voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private grdAssociatedQuestionsRow getAssociatedQuestionRowByQuestion(QuestionInformationShortVo voQuestionInfoShort)
{
	for (int i = 0; i < form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().size(); i++)
	{
		GraphicAssessmentQuestionVo voGAQuestion = form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i).getValue();
		if (voGAQuestion != null && voGAQuestion.getQuestionIsNotNull() && voGAQuestion.getQuestion().equals(voQuestionInfoShort))
			return form.lyrDetails().tabQuestions().grdAssociatedQuestions().getRows().get(i);
	}
	return null;
}
 
Example 25
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if (graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue();
	}
	return false;
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if (voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");

	if (voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 27
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private boolean allowMutlipleAnswers(GraphicAssessmentQuestionVo graphicQuestion)
{
	if(graphicQuestion != null)
	{
		return graphicQuestion.getAllowsMultipleAnswersIsNotNull() && graphicQuestion.getAllowsMultipleAnswers().booleanValue(); 
	}
	return false;
}
 
Example 28
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 5 votes vote down vote up
private void checkDataIntegrity(GraphicAssessmentQuestionVo voGraphicAssessmentQuestion) throws PresentationLogicException
{
	if(voGraphicAssessmentQuestion == null)
		throw new PresentationLogicException("Invalid graphic assessment question data");
	
	if(voGraphicAssessmentQuestion.getQuestion() == null)
		throw new PresentationLogicException("Invalid graphic assessment question");
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException
{
	checkDataIntegrity(question);

	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();

	Image rowQuestionImage = this.questionImage;
	if (question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;

	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if (imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);
	}

	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);

	if (buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());
	questionCell.setReadOnly(true);

	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);

	if (question.getQuestion().getAnswerTypesIsNotNull())
	{
		for (int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if (question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() && question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}
 
Example 30
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException 
{
	checkDataIntegrity(question);
	
	addGraphicQuestionLegend(question.getQuestion().getLegendText());
	
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();
	
	Image rowQuestionImage = this.questionImage;
	if(question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;
	
	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if(imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);				
	}
	
	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);
	
	if(buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);			
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);			
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);		
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());			
	questionCell.setReadOnly(true);	
	
	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);
	
	if(question.getQuestion().getAnswerTypesIsNotNull())
	{
		for(int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if(question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() 
					&& question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException
{
	checkDataIntegrity(question);

	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();

	Image rowQuestionImage = this.questionImage;
	if (question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;

	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if (imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);
	}

	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);

	if (buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());
	questionCell.setReadOnly(true);

	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);

	if (question.getQuestion().getAnswerTypesIsNotNull())
	{
		for (int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if (question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() && question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}
 
Example 32
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException 
{
	checkDataIntegrity(question);
	
	addGraphicQuestionLegend(question.getQuestion().getLegendText());
	
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();
	
	Image rowQuestionImage = this.questionImage;
	if(question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;
	
	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if(imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);				
	}
	
	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);
	
	if(buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);			
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);			
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);		
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());			
	questionCell.setReadOnly(true);	
	
	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);
	
	if(question.getQuestion().getAnswerTypesIsNotNull())
	{
		for(int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if(question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() 
					&& question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException
{
	checkDataIntegrity(question);

	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();

	Image rowQuestionImage = this.questionImage;
	if (question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;

	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if (imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);
	}

	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);

	if (buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());
	questionCell.setReadOnly(true);

	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);

	if (question.getQuestion().getAnswerTypesIsNotNull())
	{
		for (int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if (question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() && question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}
 
Example 34
Project: openMAXIMS   File: UserAssessmentInstHelper.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException 
{
	checkDataIntegrity(question);
	
	addGraphicQuestionLegend(question.getQuestion().getLegendText());
	
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();
	
	Image rowQuestionImage = this.questionImage;
	if(question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;
	
	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if(imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);				
	}
	
	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);
	
	if(buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);			
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);			
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);		
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());			
	questionCell.setReadOnly(true);	
	
	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);
	
	if(question.getQuestion().getAnswerTypesIsNotNull())
	{
		for(int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if(question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() 
					&& question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException
{
	checkDataIntegrity(question);

	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();

	Image rowQuestionImage = this.questionImage;
	if (question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;

	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if (imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);
	}

	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);

	if (buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());
	questionCell.setReadOnly(true);

	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);

	if (question.getQuestion().getAnswerTypesIsNotNull())
	{
		for (int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if (question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() && question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}
 
Example 36
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   Source Code and License 4 votes vote down vote up
private void addGraphicQuestionRow(GraphicAssessmentQuestionVo question, PatientGraphicAssessmentQuestionAnswerVo voPatientGraphicAssessmentQuestionAnswer, boolean allowMultipleQuestion) throws PresentationLogicException 
{
	checkDataIntegrity(question);
	
	addGraphicQuestionLegend(question.getQuestion().getLegendText());
	
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridColumn buttonColumn = this.grid.getColumns().getByIdentifier(BUTTON_COLUMN);

	DynamicGridRow row = this.grid.getRows().newRow();
	
	Image rowQuestionImage = this.questionImage;
	if(question.getIsMandatoryIsNotNull() && question.getIsMandatory().booleanValue())
		rowQuestionImage = this.mandatoryQuestionImage;
	
	DynamicGridColumn imageColumn = this.grid.getColumns().getByIdentifier(IMAGE_COLUMN);
	if(imageColumn != null)
	{
		row.getCells().newCell(imageColumn, DynamicCellType.IMAGE).setValue(rowQuestionImage);				
	}
	
	row.setIdentifier(question);
	row.setExpandedImage(rowQuestionImage);
	row.setCollapsedImage(rowQuestionImage);
	
	if(buttonColumn != null && allowMultipleQuestion)
	{
		DynamicGridCell buttonCell = row.getCells().newCell(buttonColumn, DynamicCellType.IMAGEBUTTON);			
		buttonCell.setTooltip("Create new answer for this question");
		buttonCell.setValue(this.buttonAddImage);
		buttonCell.setIdentifier(BUTTON_ADD_ANSWER);			
		buttonColumn.setWidth(DEFAULT_BUTTON_CELL_WIDTH);
	}

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.WRAPTEXT);		
	questionCell.setValue(question.getQuestion().getShortText());
	questionCell.setTooltip(question.getQuestion().getText());			
	questionCell.setReadOnly(true);	
	
	questionCell.setIdentifier(voPatientGraphicAssessmentQuestionAnswer);
	
	if(question.getQuestion().getAnswerTypesIsNotNull())
	{
		for(int x = 0; x < question.getQuestion().getAnswerTypes().size(); x++)
		{
			if(question.getQuestion().getAnswerTypes().get(x).getActiveStatusIsNotNull() 
					&& question.getQuestion().getAnswerTypes().get(x).getActiveStatus().booleanValue())
			{
				addAnswerCell(row, getAnswerColumn(x), question.getQuestion().getAnswerTypes().get(x), getInstAnswerType(voPatientGraphicAssessmentQuestionAnswer.getPatientAnswers(), question.getQuestion().getAnswerTypes().get(x)));
			}
		}
	}
}