Java Code Examples for ims.core.vo.lookups.PreActiveActiveInactiveStatus.equals()

The following are Jave code examples for showing how to use equals() of the ims.core.vo.lookups.PreActiveActiveInactiveStatus 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 6 votes
private void loadCombos()
{
	//Status
	form.cmbStatus().clear();
	PreActiveActiveInactiveStatusCollection statusColl = LookupHelper.getPreActiveActiveInactiveStatus(domain.getLookupService());
	for(int i=0; statusColl != null && i<statusColl.size(); i++)
	{
		PreActiveActiveInactiveStatus status = statusColl.get(i);
		if(isNewQuestion())
		{
			//When we have a new Question - Remove Inactive entry (cannot create a new Inactive Record)
			if(status.equals(PreActiveActiveInactiveStatus.INACTIVE))
				continue;
		}
		else
		{
			//When record is active don't allow to Preactivate it
			if(isRecordActive() && status.equals(PreActiveActiveInactiveStatus.PREACTIVE))
				continue;
		}
		
		form.cmbStatus().newRow(status, status.toString());
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void loadStatusCombo()
{
	// Status
	PreActiveActiveInactiveStatus prevStatus = form.lyrTabs().tabNewQuestion().cmbStatus().getValue();
	
	form.lyrTabs().tabNewQuestion().cmbStatus().clear();
	PreActiveActiveInactiveStatusCollection statusColl = LookupHelper.getPreActiveActiveInactiveStatus(domain.getLookupService());
	for (int i = 0; statusColl != null && i < statusColl.size(); i++)
	{
		PreActiveActiveInactiveStatus status = statusColl.get(i);
		if (isNewQuestion() || isNewScoringAssessmentQuestion())
		{
			// When we have a new Question - Remove Inactive entry (cannot
			// create a new Inactive Record)
			if (status.equals(PreActiveActiveInactiveStatus.INACTIVE))
				continue;
		}
		else
		{
			// When record is active don't allow to Preactivate it
			if (isRecordActive() && status.equals(PreActiveActiveInactiveStatus.PREACTIVE))
				continue;
		}

		form.lyrTabs().tabNewQuestion().cmbStatus().newRow(status, status.toString(), status.getImage(), status.getColor());
	}
	
	form.lyrTabs().tabNewQuestion().cmbStatus().setValue(prevStatus);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private boolean isStatusActive()
{
	QuestionInformationVo voQInfo = form.getLocalContext().getVoQuestionInformation();
	if(voQInfo != null)
	{
		PreActiveActiveInactiveStatus status = voQInfo.getStatus();
		return status != null && status.equals(PreActiveActiveInactiveStatus.ACTIVE);
	}
	return false;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private boolean isStatusInactive()
{
	QuestionInformationVo voQInfo = form.getLocalContext().getVoQuestionInformation();
	if(voQInfo != null)
	{
		PreActiveActiveInactiveStatus status = voQInfo.getStatus();
		return status != null && status.equals(PreActiveActiveInactiveStatus.INACTIVE);
	}
	
	return false;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void setScreenMode() 
{
	if(form.getGlobalContext().Admin.getSelectedQuestionIsNotNull())
	{
		//QuestionInformationVo voQInfo = form.getGlobalContext().Admin.getSelectedQuestion();
		PreActiveActiveInactiveStatus status = form.cmbStatus().getValue();
		if(status != null)
		{
			if(status.equals(PreActiveActiveInactiveStatus.INACTIVE) || isDialogViewMode())
			{
				form.setMode(FormMode.VIEW);
				form.btnCancel().setText("Ok");
			}
			else if(status.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				form.setMode(FormMode.EDIT);
				if(isNewQuestion() == false)
				{
					enableEditableControls(false);
				}
				setControlsStatus();
				enableUpdatableControls(true);
			}
			else
			{
				form.setMode(FormMode.EDIT);
				enableEditableControls(true);
				setControlsStatus();
				enableUpdatableControls(true);
			}
		}	
		else
		{
			form.setMode(FormMode.EDIT);
			enableEditableControls(true);
			enableUpdatableControls(true);
		}
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private boolean isStatusInactive()
{
	DrawingGraphicFindingVo voDrawingGraphicFinding = form.getLocalContext().getVoDrawingGraphicFinding();
	PreActiveActiveInactiveStatus status = voDrawingGraphicFinding != null?voDrawingGraphicFinding.getActiveStatus():null;
	if (status != null && (status.equals(PreActiveActiveInactiveStatus.INACTIVE)))
		return true;
	return false;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private boolean isStatusActive()
{
	DrawingGraphicFindingVo voDrawingGraphicFinding = form.getLocalContext().getVoDrawingGraphicFinding();
	PreActiveActiveInactiveStatus status = voDrawingGraphicFinding != null?voDrawingGraphicFinding.getActiveStatus():null;
	if (status != null && (status.equals(PreActiveActiveInactiveStatus.ACTIVE)))
		return true;
	return false;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private boolean isStatusInactive()
{
	GraphicAssessmentVo voGraphicAssessment = form.getLocalContext().getGraphicAssessmentVo();
	if(voGraphicAssessment != null)
	{
		PreActiveActiveInactiveStatus status = voGraphicAssessment.getActiveStatus();
		if(status != null && (status.equals(PreActiveActiveInactiveStatus.INACTIVE)))
			return true;
	}
	return false;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private boolean isStatusActive()
{
	GraphicAssessmentVo voGraphicAssessment = form.getLocalContext().getGraphicAssessmentVo();
	if(voGraphicAssessment != null)
	{
		PreActiveActiveInactiveStatus status = voGraphicAssessment.getActiveStatus();
		if(status != null && (status.equals(PreActiveActiveInactiveStatus.ACTIVE)))
			return true;
	}
	return false;
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private boolean isStatusActiveOrInactive()
{
	GraphicAssessmentVo voGraphicAssessment = form.getLocalContext().getGraphicAssessmentVo();
	if(voGraphicAssessment != null)
	{
		PreActiveActiveInactiveStatus status = voGraphicAssessment.getActiveStatus();
		if(status != null && (status.equals(PreActiveActiveInactiveStatus.ACTIVE) || status.equals(PreActiveActiveInactiveStatus.INACTIVE)))
			return true;
	}
	
	return false;
}
 
Example 11
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   View Source Code Vote up 5 votes
private boolean isCategoryQuestionActive(CategoryQuestionShortVo categoryQuestion)
{
	if(categoryQuestion == null)
		return false;
	
	PreActiveActiveInactiveStatus questionStatus = categoryQuestion.getQuestionInformationIsNotNull()?categoryQuestion.getQuestionInformation().getStatus():null;
	if(questionStatus != null && questionStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
	{
		return true;
	}
	
	return false;
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void populateStatus(PreActiveActiveInactiveStatus current)
{
	form.ctnDetails().lyrDetails().tabPage1().cmbStatus().clear();  //wdev-13616
	if (current== null)
	{
		addLookup(PreActiveActiveInactiveStatus.PREACTIVE);
		addLookup(PreActiveActiveInactiveStatus.ACTIVE);
		return;
	}
	else
	{
		addLookup(current);
		
		if (current.equals(PreActiveActiveInactiveStatus.PREACTIVE))
		{
			addLookup(PreActiveActiveInactiveStatus.ACTIVE);
			addLookup(PreActiveActiveInactiveStatus.INACTIVE);
			return;
		}
		if (current.equals(PreActiveActiveInactiveStatus.ACTIVE))
		{
			addLookup(PreActiveActiveInactiveStatus.INACTIVE);
			return;
		}
		if (current.equals(PreActiveActiveInactiveStatus.INACTIVE))
		{
			addLookup(PreActiveActiveInactiveStatus.PREACTIVE);
			addLookup(PreActiveActiveInactiveStatus.ACTIVE);
		}
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private boolean isNotActive(PreActiveActiveInactiveStatus activeStatus)
{
	return form.chkDisplayActive().getValue() && activeStatus != null && !activeStatus.equals(PreActiveActiveInactiveStatus.ACTIVE);
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void updateControlState()
{
	FormMode mode = form.getMode();

	PreActiveActiveInactiveStatus status = null;
	if(form.getLocalContext().getSelectedPathwayIsNotNull())
		status = form.getLocalContext().getSelectedPathway().getStatus();
	
	boolean inactiveStatusSelected = false;
	
	if (status != null)
		inactiveStatusSelected = status.equals(PreActiveActiveInactiveStatus.INACTIVE);

	boolean editingActiveRecord = false;
	if (status != null)
		editingActiveRecord = status.equals(PreActiveActiveInactiveStatus.ACTIVE) && form.getLocalContext().getSelectedPathwayIsNotNull() && form.getLocalContext().getSelectedPathway().getID_PathwayIsNotNull();

	boolean inactivePTStatusSelected = false;
	if(form.ctnTargets().grdTargets().getSelectedRow() != null)
		inactivePTStatusSelected =  form.ctnTargets().grdTargets().getSelectedRow().getValue().getStatusIsNotNull() && form.ctnTargets().grdTargets().getSelectedRow().getValue().getStatus().equals(PreActiveActiveInactiveStatus.INACTIVE);
	
	
	form.getContextMenus().Pathways.getPathwayTargetsADDItem().setVisible(mode.equals(FormMode.EDIT) && !inactiveStatusSelected && !editingActiveRecord & !inactivePTStatusSelected);
	form.getContextMenus().Pathways.getPathwayTargetsEDITItem().setVisible(mode.equals(FormMode.EDIT) && form.ctnTargets().grdTargets().getSelectedRow() != null && !inactiveStatusSelected && !editingActiveRecord && !inactivePTStatusSelected);
	form.getContextMenus().Pathways.getPathwayTargetsVIEWItem().setVisible(form.ctnTargets().grdTargets().getSelectedRow() != null);

	if (form.getMode().equals(FormMode.EDIT))
	{
		for (int i = 0; i < form.ctnTargets().grdTargets().getRows().size(); i++)
			form.ctnTargets().grdTargets().getRows().get(i).setReadOnly(inactiveStatusSelected);

		form.customControlMappings().setComponentMode(FormMode.EDIT);
	}
	else
	{
		form.customControlMappings().setComponentMode(FormMode.VIEW);
		form.btnEdit().setVisible(form.getLocalContext().getSelectedPathwayIsNotNull() && form.getLocalContext().getSelectedPathway().getID_PathwayIsNotNull() && !inactiveStatusSelected);
	}

	form.ctnTargets().grdTargets().setReadOnly(!form.getMode().equals(FormMode.EDIT));					
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(int brushId, GraphicAssessmentStageVo stageVo)
{
	PatientAssessmentDataVo voPatAssessmentData = form.getLocalContext().getPatientAssessment().getAssessmentData();

	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				//TODO - this works for Graphical Assessment and Graphical Assessment with questions where we have
				// 1:1 relationship between GraphicAssessmentFinding and FindingStageQuestions
				// need to review for the third type of assessment
				if(findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
				{
					for (int j = 0; j < findingColl.get(i).getFindingStage().size(); j++)
					{
						if(findingColl.get(i).getFindingStage().get(j).getAssessmentStageIsNotNull() && findingColl.get(i).getFindingStage().get(j).getAssessmentStage().equals(stageVo))
						{
							questions = findingColl.get(i).getFindingStage().get(j).getAssociatedQuestions();
							break;
						}
					}
				}
				
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			//WDEV-1211 - Go back to configurtation for every new findings 
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(PatientAssessmentDataVo voPatAssessmentData, int brushId, GraphicAssessmentStageVo stageVo)
{
	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				if(findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
				{
					for (int j = 0; j < findingColl.get(i).getFindingStage().size(); j++)
					{
						if(findingColl.get(i).getFindingStage().get(j).getAssessmentStageIsNotNull() && findingColl.get(i).getFindingStage().get(j).getAssessmentStage().equals(stageVo))
						{
							questions = findingColl.get(i).getFindingStage().get(j).getAssociatedQuestions();
							break;
						}
					}
				}
				
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			//WDEV-1211 - Go back to configurtation for every new findings 
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private Patient_GraphicAssessmentFindingQuestionAnswerVoCollection get_FindingQuestion(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	Graphic_AssessmentFindingVoCollection findingColl = get_FindingCollection(voDrawingGraphicImage);
	Graphic_AssessmentFindingQuestionVoCollection questions = null;
	Patient_GraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new Patient_GraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				// TODO - this works for Graphical Assessment and Graphical Assessment with questions where we have
				// 1:1 relationship between GraphicAssessmentFinding and FindingStageQuestions
				// need to review for the third type of assessment
				if (findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
					questions = findingColl.get(i).getFindingStage().get(0).getAssociatedQuestions();

				break;
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			Graphic_AssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			// WDEV-11366
			if (isQuestionInvalidForPatient(voFindingQuestion.getQuestion()))
				continue;
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			// WDEV-1211 - Go back to configurtation for every new findings
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{

				Patient_GraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new Patient_GraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				//TODO - this works for Graphical Assessment and Graphical Assessment with questions where we have
				// 1:1 relationship between GraphicAssessmentFinding and FindingStageQuestions
				// need to review for the third type of assessment
				if(findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
					questions = findingColl.get(i).getFindingStage().get(0).getAssociatedQuestions();
				
				break;
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			//WDEV-1211 - Go back to configurtation for every new findings 
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 19
Project: AvoinApotti   File: StructuredAssessmentsHelper.java   View Source Code Vote up 4 votes
private boolean isNotActive(PreActiveActiveInactiveStatus activeStatus)
{
	return displayActive && activeStatus != null && !activeStatus.equals(PreActiveActiveInactiveStatus.ACTIVE);
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 2 votes
/**
 * @param currentStatus
 * @param previousStatus
 * @return
 */
private boolean isPreviousStatusNotActive(PreActiveActiveInactiveStatus currentStatus, PreActiveActiveInactiveStatus previousStatus)
{
	return currentStatus != null && currentStatus.equals(PreActiveActiveInactiveStatus.ACTIVE) && (previousStatus == null  || !previousStatus.equals(PreActiveActiveInactiveStatus.ACTIVE));
}