Java Code Examples for ims.assessment.helper.UserAssessmentInstHelper

The following are top voted examples for showing how to use ims.assessment.helper.UserAssessmentInstHelper. 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: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientAssessmentVo getNewPatientAssessment(PatientAssessmentVo voPatientAssessment) throws PresentationLogicException
{
	UserAssessmentVo voUserAssessment = form.getGlobalContext().Nursing.getUserAssessmentDPP();
	if (voUserAssessment != null)
	{
		voPatientAssessment = new PatientAssessmentVo();
		UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
		helper.populate(voUserAssessment);
		
		PatientAssessmentDataVo assessmentData = new PatientAssessmentDataVo();
		assessmentData.setUserAssessment(voUserAssessment);
		PatientAssessmentGroupVoCollection voColl = helper.getAnswers(assessmentData.getAnswerGroups());
		voColl = setAsNotAnswerdNonStandardQuestions(voUserAssessment, voColl);
		assessmentData.setAnswerGroups(voColl);
		
		voPatientAssessment.setAssessmentData(assessmentData);
		form.getLocalContext().setPatientAssessmentVo(voPatientAssessment);
	}
	else
	{
		throw new CodingRuntimeException("Cannot Instantiate data with null Daily Patient Record.");
	}
	return voPatientAssessment;
}
 
Example 3
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 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientAssessmentVo getNewPatientAssessment(PatientAssessmentVo voPatientAssessment) throws PresentationLogicException
{
	UserAssessmentVo voUserAssessment = form.getGlobalContext().Nursing.getUserAssessmentDPP();
	if (voUserAssessment != null)
	{
		voPatientAssessment = new PatientAssessmentVo();
		UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
		helper.populate(voUserAssessment);
		
		PatientAssessmentDataVo assessmentData = new PatientAssessmentDataVo();
		assessmentData.setUserAssessment(voUserAssessment);
		PatientAssessmentGroupVoCollection voColl = helper.getAnswers(assessmentData.getAnswerGroups());
		voColl = setAsNotAnswerdNonStandardQuestions(voUserAssessment, voColl);
		assessmentData.setAnswerGroups(voColl);
		
		voPatientAssessment.setAssessmentData(assessmentData);
		form.getLocalContext().setPatientAssessmentVo(voPatientAssessment);
	}
	else
	{
		throw new CodingRuntimeException("Cannot Instantiate data with null Daily Patient Record.");
	}
	return voPatientAssessment;
}
 
Example 5
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 6
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private PatientAssessmentVo getNewPatientAssessment(PatientAssessmentVo voPatientAssessment) throws PresentationLogicException
{
	UserAssessmentVo voUserAssessment = form.getGlobalContext().Nursing.getUserAssessmentDPP();
	if (voUserAssessment != null)
	{
		voPatientAssessment = new PatientAssessmentVo();
		UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
		helper.populate(voUserAssessment);
		
		PatientAssessmentDataVo assessmentData = new PatientAssessmentDataVo();
		assessmentData.setUserAssessment(voUserAssessment);
		PatientAssessmentGroupVoCollection voColl = helper.getAnswers(assessmentData.getAnswerGroups());
		voColl = setAsNotAnswerdNonStandardQuestions(voUserAssessment, voColl);
		assessmentData.setAnswerGroups(voColl);
		
		voPatientAssessment.setAssessmentData(assessmentData);
		form.getLocalContext().setPatientAssessmentVo(voPatientAssessment);
	}
	else
	{
		throw new CodingRuntimeException("Cannot Instantiate data with null Daily Patient Record.");
	}
	return voPatientAssessment;
}
 
Example 7
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 8
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSelectNAQuestionsClick() throws PresentationLogicException
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getPatientAssessmentVo();
	//Get the changes user eventualy made in the questions
	//updatePatientAssessmentWithTheChanges(currentAssessment);
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabNonApplicable().dynNonApplic());
	currentAssessment = helper.updateQuestionStatusToAnswered(currentAssessment, AnswerStatus.NOTAPPLICABLE);
	
	form.getLocalContext().setPatientAssessmentVo(currentAssessment);
	populateQuestionsGrid(filterQuestions(currentAssessment, DPP));
	form.lyrTabs().showtabCurrent();
	enableContextMenu();
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSelectNSQuestionsClick() throws PresentationLogicException
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getPatientAssessmentVo();
	//Get the changes user eventualy made in the questions
	//updatePatientAssessmentWithTheChanges(currentAssessment);
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabStandardQuestion().dyngrdNonStandard());
	currentAssessment = helper.updateQuestionStatusToAnswered(currentAssessment, AnswerStatus.NOTANSWERED);
	
	form.getLocalContext().setPatientAssessmentVo(currentAssessment);
	currentAssessment = filterQuestions(currentAssessment, DPP);
	populateQuestionsGrid(currentAssessment);
	form.lyrTabs().showtabCurrent();
	enableContextMenu();
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean populateAssessmentDataFromScreen(PatientAssessmentVo vo, boolean createPOCRecords)
{
	if(vo == null)
		return false;
	
	PatientAssessmentVo initialAssessment = vo != null ? (PatientAssessmentVo) vo.clone() : null;
	if (vo.getAssessmentData() == null)
	{
		PatientAssessmentDataVo assessmentData = new PatientAssessmentDataVo();
		assessmentData.setUserAssessment(form.getGlobalContext().Nursing.getUserAssessmentDPP());
		vo.setAssessmentData(assessmentData);
	}
 
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
	PatientAssessmentGroupVoCollection currentAnswer = helper.getAnswers(vo.getAssessmentData().getAnswerGroups());

	/*DynamicAssessmentHelper.populateHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	DynamicAssessmentHelper.populateConfirmingHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());*/
	
	/*PatientAssessmentGroupVoCollection notAvailableAnswColl = getNotApplicableAndNotAnswered(vo.getAssessmentData().getAnswerGroups());
	removeNotAnswered(vo.getAssessmentData().getAnswerGroups());
	vo.getAssessmentData().setAnswerGroups(getAnswerGroups(currentAnswer, notAvailableAnswColl));*/
	
	DynamicAssessmentHelper.populateHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	DynamicAssessmentHelper.populateConfirmingHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	
	if (createPOCRecords)
	{
		return populatePlanOfCareVoCollection(currentAnswer, helper);
	}

	return true;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private UserAssessmentInstHelper getHelper(DynamicGrid dynGrid, boolean showSelect)
{
	boolean isDpp = true;
	boolean displayOnlyAsnwered = false;
	boolean showConfirmation = engine.hasRight(AppRight.CAN_CONFIRM_NURSING_DOCUMENTATION);
	UserAssessmentInstHelper helper = new UserAssessmentInstHelper(dynGrid, form.getImages().Core.QuestionSmall, form.getImages().Core.TextBox, form.getImages().Core.SmallNew, form.getImages().Core.SmallCancel, form.getImages().Core.MandatoryQuestion, isDpp, displayOnlyAsnwered, showConfirmation, showSelect);
	return helper;
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateQuestionsGrid(PatientAssessmentVo voPatientAssessment) throws PresentationLogicException
{
	if (voPatientAssessment != null)
	{
		UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
		setReadOnlyFlagRoles(voPatientAssessment.getAssessmentData().getAnswerGroups());
		setIsConfirmedFlag(voPatientAssessment.getAssessmentData().getAnswerGroups());
		helper.populate(voPatientAssessment.getAssessmentData(), voPatientAssessment.getStatusReason());
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getAnswerText(PatientAssessmentQuestionVo voAnswer)
{
	if(voAnswer != null)
	{
		return UserAssessmentInstHelper.getDPPQuestionAndAnswers(voAnswer);
	}
	
	return "";
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean isPocSelected(UserAssessmentInstHelper helper, AssessmentQuestionRefVo voAssessmQuestion)
{
	if (helper == null || voAssessmQuestion == null)
		return false;

	return helper.isPocSelected(voAssessmQuestion);
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addNonApplicableQuestions() throws PresentationLogicException
{
	form.lyrTabs().showtabNonApplicable();
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabNonApplicable().dynNonApplic(), true);
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	voPatientAssessment = filterQuestions(voPatientAssessment, NOT_APPLICABLE);
	helper.populate(voPatientAssessment.getAssessmentData(), voPatientAssessment.getStatusReason(), AnswerStatus.NOTAPPLICABLE);
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addNonStandardQuestion() throws PresentationLogicException
{
	form.lyrTabs().showtabStandardQuestion();
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabStandardQuestion().dyngrdNonStandard(), true);
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	voPatientAssessment = filterQuestions(voPatientAssessment, NON_STANDARD);
	helper.populate(voPatientAssessment.getAssessmentData(), voPatientAssessment.getStatusReason(), AnswerStatus.NOTANSWERED);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAnswersDataFromScreen(PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	PatientGraphicalAssessmentStageVo pgasVo = form.getGlobalContext().Assessment.getPatientGraphicalAssessmentStage();
	
	UserAssessmentInstHelper helper = getHelper();
	
	if(voPatientGraphicAssessmentFinding.getStage() == null)
		voPatientGraphicAssessmentFinding.setStage(new PatientGraphicalAssessmentStageVoCollection());
	
	if(pgasVo.getID_PatientGraphicalAssessmentStage() == null)
		voPatientGraphicAssessmentFinding.getStage().add(pgasVo);
	
	pgasVo.setFindingQuestion(helper.getGraphicFindingAnswers(pgasVo.getFindingQuestion()));
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestions(Patient_GraphicAssessmentFindingVo voPatient_GraphicAssessmentFinding) throws PresentationLogicException
{
	if (voPatient_GraphicAssessmentFinding == null)
		return;
	
	UserAssessmentInstHelper helper = getHelper();		
	helper.populateGraphicFinding(form.getGlobalContext().Core.getPatient_AssessmentFull(), voPatient_GraphicAssessmentFinding);
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestions(PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding) throws PresentationLogicException
{
	if (voPatientGraphicAssessmentFinding == null)
		return;
	
	UserAssessmentInstHelper helper = getHelper();		
	helper.populateGraphicFinding(form.getGlobalContext().Core.getPatientAssessmentFull(), voPatientGraphicAssessmentFinding);
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAnswersDataFromScreen(Patient_GraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	UserAssessmentInstHelper helper = getHelper();
	//TODO to implement 1:N relationship
	
	if(voPatientGraphicAssessmentFinding.getStage() == null)
		voPatientGraphicAssessmentFinding.setStage(new Patient_GraphicalAssessmentStageVoCollection());
	
	if(voPatientGraphicAssessmentFinding.getStage().size() == 0)
		voPatientGraphicAssessmentFinding.getStage().add(new Patient_GraphicalAssessmentStageVo());
	
	Patient_GraphicalAssessmentStageVo annotatedStage = null;
	for (int i = 0; i < voPatientGraphicAssessmentFinding.getStage().size(); i++)
	{
		Patient_GraphicalAssessmentStageVo stage = voPatientGraphicAssessmentFinding.getStage().get(i);
		
		if(stage.getStageIsNotNull() 
				&& stage.getStage().getAssessmentStageIsNotNull() 
				&& stage.getStage().getAssessmentStage().getIsAnnotatedIsNotNull()
				&& stage.getStage().getAssessmentStage().getIsAnnotated().booleanValue())
		{
			annotatedStage = stage;
			break;
		}
	}
	
	if(annotatedStage == null)
	{
		//we should always have an annotated stage
		annotatedStage = voPatientGraphicAssessmentFinding.getStage().get(0);
	}
	
	annotatedStage.setFindingQuestion(helper.get_GraphicFindingAnswers(annotatedStage.getFindingQuestion()));
	//voPatientGraphicAssessmentFinding.setFindingQuestion(helper.getGraphicFindingAnswers());
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAnswersDataFromScreen(PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	UserAssessmentInstHelper helper = getHelper();
	//TODO to implement 1:N relationship
	
	if(voPatientGraphicAssessmentFinding.getStage() == null)
		voPatientGraphicAssessmentFinding.setStage(new PatientGraphicalAssessmentStageVoCollection());
	
	if(voPatientGraphicAssessmentFinding.getStage().size() == 0)
		voPatientGraphicAssessmentFinding.getStage().add(new PatientGraphicalAssessmentStageVo());
	
	PatientGraphicalAssessmentStageVo annotatedStage = null;
	for (int i = 0; i < voPatientGraphicAssessmentFinding.getStage().size(); i++)
	{
		PatientGraphicalAssessmentStageVo stage = voPatientGraphicAssessmentFinding.getStage().get(i);
		
		if(stage.getStageIsNotNull() 
				&& stage.getStage().getAssessmentStageIsNotNull() 
				&& stage.getStage().getAssessmentStage().getIsAnnotatedIsNotNull()
				&& stage.getStage().getAssessmentStage().getIsAnnotated().booleanValue())
		{
			annotatedStage = stage;
			break;
		}
	}
	
	if(annotatedStage == null)
	{
		//we should always have an annotated stage
		annotatedStage = voPatientGraphicAssessmentFinding.getStage().get(0);
	}
	
	annotatedStage.setFindingQuestion(helper.getGraphicFindingAnswers(annotatedStage.getFindingQuestion()));
	//voPatientGraphicAssessmentFinding.setFindingQuestion(helper.getGraphicFindingAnswers());
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setAnswers()
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getCurrentAssessment();
	PatientAssessmentDataVo assessmentData = currentAssessment.getAssessmentData();
	UserAssessmentInstHelper helper = getHelper();
	PatientAssessmentGroupVoCollection currentAnswer = helper.getAnswers(assessmentData.getAnswerGroups());
	assessmentData.setAnswerGroups(currentAnswer);
	
	currentAssessment.setStatus(form.cmbStatus().getValue());
	currentAssessment.setStatusReason(form.cmbReason().getValue());
	
	currentAssessment.setAuthoringInformation(form.customControlAuthoring().getValue());
	
	form.getLocalContext().setCurrentAssessment(currentAssessment);
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSelectNAQuestionsClick() throws PresentationLogicException
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getPatientAssessmentVo();
	//Get the changes user eventualy made in the questions
	//updatePatientAssessmentWithTheChanges(currentAssessment);
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabNonApplicable().dynNonApplic());
	currentAssessment = helper.updateQuestionStatusToAnswered(currentAssessment, AnswerStatus.NOTAPPLICABLE);
	
	form.getLocalContext().setPatientAssessmentVo(currentAssessment);
	populateQuestionsGrid(filterQuestions(currentAssessment, DPP));
	form.lyrTabs().showtabCurrent();
	enableContextMenu();
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSelectNSQuestionsClick() throws PresentationLogicException
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getPatientAssessmentVo();
	//Get the changes user eventualy made in the questions
	//updatePatientAssessmentWithTheChanges(currentAssessment);
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabStandardQuestion().dyngrdNonStandard());
	currentAssessment = helper.updateQuestionStatusToAnswered(currentAssessment, AnswerStatus.NOTANSWERED);
	
	form.getLocalContext().setPatientAssessmentVo(currentAssessment);
	currentAssessment = filterQuestions(currentAssessment, DPP);
	populateQuestionsGrid(currentAssessment);
	form.lyrTabs().showtabCurrent();
	enableContextMenu();
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean populateAssessmentDataFromScreen(PatientAssessmentVo vo, boolean createPOCRecords)
{
	if(vo == null)
		return false;
	
	PatientAssessmentVo initialAssessment = vo != null ? (PatientAssessmentVo) vo.clone() : null;
	if (vo.getAssessmentData() == null)
	{
		PatientAssessmentDataVo assessmentData = new PatientAssessmentDataVo();
		assessmentData.setUserAssessment(form.getGlobalContext().Nursing.getUserAssessmentDPP());
		vo.setAssessmentData(assessmentData);
	}
 
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
	PatientAssessmentGroupVoCollection currentAnswer = helper.getAnswers(vo.getAssessmentData().getAnswerGroups());

	/*DynamicAssessmentHelper.populateHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	DynamicAssessmentHelper.populateConfirmingHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());*/
	
	/*PatientAssessmentGroupVoCollection notAvailableAnswColl = getNotApplicableAndNotAnswered(vo.getAssessmentData().getAnswerGroups());
	removeNotAnswered(vo.getAssessmentData().getAnswerGroups());
	vo.getAssessmentData().setAnswerGroups(getAnswerGroups(currentAnswer, notAvailableAnswColl));*/
	
	DynamicAssessmentHelper.populateHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	DynamicAssessmentHelper.populateConfirmingHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	
	if (createPOCRecords)
	{
		return populatePlanOfCareVoCollection(currentAnswer, helper);
	}

	return true;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private UserAssessmentInstHelper getHelper(DynamicGrid dynGrid, boolean showSelect)
{
	boolean isDpp = true;
	boolean displayOnlyAsnwered = false;
	boolean showConfirmation = engine.hasRight(AppRight.CAN_CONFIRM_NURSING_DOCUMENTATION);
	UserAssessmentInstHelper helper = new UserAssessmentInstHelper(dynGrid, form.getImages().Core.QuestionSmall, form.getImages().Core.TextBox, form.getImages().Core.SmallNew, form.getImages().Core.SmallCancel, form.getImages().Core.MandatoryQuestion, isDpp, displayOnlyAsnwered, showConfirmation, showSelect);
	return helper;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateQuestionsGrid(PatientAssessmentVo voPatientAssessment) throws PresentationLogicException
{
	if (voPatientAssessment != null)
	{
		UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
		setReadOnlyFlagRoles(voPatientAssessment.getAssessmentData().getAnswerGroups());
		setIsConfirmedFlag(voPatientAssessment.getAssessmentData().getAnswerGroups());
		helper.populate(voPatientAssessment.getAssessmentData(), voPatientAssessment.getStatusReason());
	}
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getAnswerText(PatientAssessmentQuestionVo voAnswer)
{
	if(voAnswer != null)
	{
		return UserAssessmentInstHelper.getDPPQuestionAndAnswers(voAnswer);
	}
	
	return "";
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean isPocSelected(UserAssessmentInstHelper helper, AssessmentQuestionRefVo voAssessmQuestion)
{
	if (helper == null || voAssessmQuestion == null)
		return false;

	return helper.isPocSelected(voAssessmQuestion);
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addNonApplicableQuestions() throws PresentationLogicException
{
	form.lyrTabs().showtabNonApplicable();
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabNonApplicable().dynNonApplic(), true);
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	voPatientAssessment = filterQuestions(voPatientAssessment, NOT_APPLICABLE);
	helper.populate(voPatientAssessment.getAssessmentData(), voPatientAssessment.getStatusReason(), AnswerStatus.NOTAPPLICABLE);
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addNonStandardQuestion() throws PresentationLogicException
{
	form.lyrTabs().showtabStandardQuestion();
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabStandardQuestion().dyngrdNonStandard(), true);
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getPatientAssessmentVo();
	voPatientAssessment = filterQuestions(voPatientAssessment, NON_STANDARD);
	helper.populate(voPatientAssessment.getAssessmentData(), voPatientAssessment.getStatusReason(), AnswerStatus.NOTANSWERED);
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAnswersDataFromScreen(PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	PatientGraphicalAssessmentStageVo pgasVo = form.getGlobalContext().Assessment.getPatientGraphicalAssessmentStage();
	
	UserAssessmentInstHelper helper = getHelper();
	
	if(voPatientGraphicAssessmentFinding.getStage() == null)
		voPatientGraphicAssessmentFinding.setStage(new PatientGraphicalAssessmentStageVoCollection());
	
	if(pgasVo.getID_PatientGraphicalAssessmentStage() == null)
		voPatientGraphicAssessmentFinding.getStage().add(pgasVo);
	
	pgasVo.setFindingQuestion(helper.getGraphicFindingAnswers(pgasVo.getFindingQuestion()));
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestions(Patient_GraphicAssessmentFindingVo voPatient_GraphicAssessmentFinding) throws PresentationLogicException
{
	if (voPatient_GraphicAssessmentFinding == null)
		return;
	
	UserAssessmentInstHelper helper = getHelper();		
	helper.populateGraphicFinding(form.getGlobalContext().Core.getPatient_AssessmentFull(), voPatient_GraphicAssessmentFinding);
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayQuestions(PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding) throws PresentationLogicException
{
	if (voPatientGraphicAssessmentFinding == null)
		return;
	
	UserAssessmentInstHelper helper = getHelper();		
	helper.populateGraphicFinding(form.getGlobalContext().Core.getPatientAssessmentFull(), voPatientGraphicAssessmentFinding);
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAnswersDataFromScreen(Patient_GraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	UserAssessmentInstHelper helper = getHelper();
	//TODO to implement 1:N relationship
	
	if(voPatientGraphicAssessmentFinding.getStage() == null)
		voPatientGraphicAssessmentFinding.setStage(new Patient_GraphicalAssessmentStageVoCollection());
	
	if(voPatientGraphicAssessmentFinding.getStage().size() == 0)
		voPatientGraphicAssessmentFinding.getStage().add(new Patient_GraphicalAssessmentStageVo());
	
	Patient_GraphicalAssessmentStageVo annotatedStage = null;
	for (int i = 0; i < voPatientGraphicAssessmentFinding.getStage().size(); i++)
	{
		Patient_GraphicalAssessmentStageVo stage = voPatientGraphicAssessmentFinding.getStage().get(i);
		
		if(stage.getStageIsNotNull() 
				&& stage.getStage().getAssessmentStageIsNotNull() 
				&& stage.getStage().getAssessmentStage().getIsAnnotatedIsNotNull()
				&& stage.getStage().getAssessmentStage().getIsAnnotated().booleanValue())
		{
			annotatedStage = stage;
			break;
		}
	}
	
	if(annotatedStage == null)
	{
		//we should always have an annotated stage
		annotatedStage = voPatientGraphicAssessmentFinding.getStage().get(0);
	}
	
	annotatedStage.setFindingQuestion(helper.get_GraphicFindingAnswers(annotatedStage.getFindingQuestion()));
	//voPatientGraphicAssessmentFinding.setFindingQuestion(helper.getGraphicFindingAnswers());
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAnswersDataFromScreen(PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	UserAssessmentInstHelper helper = getHelper();
	//TODO to implement 1:N relationship
	
	if(voPatientGraphicAssessmentFinding.getStage() == null)
		voPatientGraphicAssessmentFinding.setStage(new PatientGraphicalAssessmentStageVoCollection());
	
	if(voPatientGraphicAssessmentFinding.getStage().size() == 0)
		voPatientGraphicAssessmentFinding.getStage().add(new PatientGraphicalAssessmentStageVo());
	
	PatientGraphicalAssessmentStageVo annotatedStage = null;
	for (int i = 0; i < voPatientGraphicAssessmentFinding.getStage().size(); i++)
	{
		PatientGraphicalAssessmentStageVo stage = voPatientGraphicAssessmentFinding.getStage().get(i);
		
		if(stage.getStageIsNotNull() 
				&& stage.getStage().getAssessmentStageIsNotNull() 
				&& stage.getStage().getAssessmentStage().getIsAnnotatedIsNotNull()
				&& stage.getStage().getAssessmentStage().getIsAnnotated().booleanValue())
		{
			annotatedStage = stage;
			break;
		}
	}
	
	if(annotatedStage == null)
	{
		//we should always have an annotated stage
		annotatedStage = voPatientGraphicAssessmentFinding.getStage().get(0);
	}
	
	annotatedStage.setFindingQuestion(helper.getGraphicFindingAnswers(annotatedStage.getFindingQuestion()));
	//voPatientGraphicAssessmentFinding.setFindingQuestion(helper.getGraphicFindingAnswers());
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setAnswers()
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getCurrentAssessment();
	PatientAssessmentDataVo assessmentData = currentAssessment.getAssessmentData();
	UserAssessmentInstHelper helper = getHelper();
	PatientAssessmentGroupVoCollection currentAnswer = helper.getAnswers(assessmentData.getAnswerGroups());
	assessmentData.setAnswerGroups(currentAnswer);
	
	currentAssessment.setStatus(form.cmbStatus().getValue());
	currentAssessment.setStatusReason(form.cmbReason().getValue());
	
	currentAssessment.setAuthoringInformation(form.customControlAuthoring().getValue());
	
	form.getLocalContext().setCurrentAssessment(currentAssessment);
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSelectNAQuestionsClick() throws PresentationLogicException
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getPatientAssessmentVo();
	//Get the changes user eventualy made in the questions
	//updatePatientAssessmentWithTheChanges(currentAssessment);
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabNonApplicable().dynNonApplic());
	currentAssessment = helper.updateQuestionStatusToAnswered(currentAssessment, AnswerStatus.NOTAPPLICABLE);
	
	form.getLocalContext().setPatientAssessmentVo(currentAssessment);
	populateQuestionsGrid(filterQuestions(currentAssessment, DPP));
	form.lyrTabs().showtabCurrent();
	enableContextMenu();
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSelectNSQuestionsClick() throws PresentationLogicException
{
	PatientAssessmentVo currentAssessment = form.getLocalContext().getPatientAssessmentVo();
	//Get the changes user eventualy made in the questions
	//updatePatientAssessmentWithTheChanges(currentAssessment);
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabStandardQuestion().dyngrdNonStandard());
	currentAssessment = helper.updateQuestionStatusToAnswered(currentAssessment, AnswerStatus.NOTANSWERED);
	
	form.getLocalContext().setPatientAssessmentVo(currentAssessment);
	currentAssessment = filterQuestions(currentAssessment, DPP);
	populateQuestionsGrid(currentAssessment);
	form.lyrTabs().showtabCurrent();
	enableContextMenu();
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean populateAssessmentDataFromScreen(PatientAssessmentVo vo, boolean createPOCRecords)
{
	if(vo == null)
		return false;
	
	PatientAssessmentVo initialAssessment = vo != null ? (PatientAssessmentVo) vo.clone() : null;
	if (vo.getAssessmentData() == null)
	{
		PatientAssessmentDataVo assessmentData = new PatientAssessmentDataVo();
		assessmentData.setUserAssessment(form.getGlobalContext().Nursing.getUserAssessmentDPP());
		vo.setAssessmentData(assessmentData);
	}
 
	UserAssessmentInstHelper helper = getHelper(form.lyrTabs().tabCurrent().dynQuestions());
	PatientAssessmentGroupVoCollection currentAnswer = helper.getAnswers(vo.getAssessmentData().getAnswerGroups());

	/*DynamicAssessmentHelper.populateHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	DynamicAssessmentHelper.populateConfirmingHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());*/
	
	/*PatientAssessmentGroupVoCollection notAvailableAnswColl = getNotApplicableAndNotAnswered(vo.getAssessmentData().getAnswerGroups());
	removeNotAnswered(vo.getAssessmentData().getAnswerGroups());
	vo.getAssessmentData().setAnswerGroups(getAnswerGroups(currentAnswer, notAvailableAnswColl));*/
	
	DynamicAssessmentHelper.populateHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	DynamicAssessmentHelper.populateConfirmingHCPDataForAnswers(initialAssessment, vo, (HcpLiteVo)domain.getHcpLiteUser(), new DateTime());
	
	if (createPOCRecords)
	{
		return populatePlanOfCareVoCollection(currentAnswer, helper);
	}

	return true;
}