Java Code Examples for ims.ocrr.configuration.vo.InvestigationRefVo

The following are top voted examples for showing how to use ims.ocrr.configuration.vo.InvestigationRefVo. 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 removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean breachedInvestigationIsInRefusedList(BreachedInvestigationsVo breachedInvestigationsVo) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(breachedInvestigationsVo == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getInvestigationId()) || (refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getParentId())))
			return true;
	}
	
	return false;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean investigationIdIsInRefusedList(Integer investigationId) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(investigationId == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(investigationId))
			return true;
	}
	
	return false;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(ReOrderPeriodMessageVo reOrderPeriodMessageVo) 
{
	if(reOrderPeriodMessageVo == null || reOrderPeriodMessageVo.getInvestigationId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(reOrderPeriodMessageVo.getInvestigationId()) || inv.getID_Investigation().equals(reOrderPeriodMessageVo.getParentId()))
			return true;
	}
	
	return false;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(GeneralQuestionAnswerVo generalQuestionAnswerVo) 
{
	if(generalQuestionAnswerVo == null || generalQuestionAnswerVo.getItemId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(generalQuestionAnswerVo.getItemId()) || inv.getID_Investigation().equals(generalQuestionAnswerVo.getParentid()))
			return true;
	}
	
	return false;
}
 
Example 7
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
private boolean isInvestigationAdded(InvestigationRefVo voRefInvestigation, OcsQASessionVo voOcsQA)
{
	if(voRefInvestigation == null || voOcsQA == null)
		return false;
	
	for (int i = 0; voOcsQA.getCategoryQuestionAnswersIsNotNull() && i < voOcsQA.getCategoryQuestionAnswers().size(); i++)
	{
		CategoryQuestionAnswerVo categoryQuestionAnswerVo = voOcsQA.getCategoryQuestionAnswers().get(i);
		for (int j = 0; categoryQuestionAnswerVo.getServiceQuestionAnswersIsNotNull() && j < categoryQuestionAnswerVo.getServiceQuestionAnswers().size(); j++)
		{
			ServiceQuestionAnswerVo serviceQuestionAnswerVo = categoryQuestionAnswerVo.getServiceQuestionAnswers().get(j);
			for (int k = 0; serviceQuestionAnswerVo.getInvestigationQuestionAnswers() != null && k < serviceQuestionAnswerVo.getInvestigationQuestionAnswers().size(); k++)
			{
				if(voRefInvestigation.equals(serviceQuestionAnswerVo.getInvestigationQuestionAnswers().get(k).getInvestigation()))
					return true;
			}
		}
	}
	
	return false;
}
 
Example 8
Project: AvoinApotti   File: MyOrderImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to retrieve the questions and answers for an investigation
 */
public InvestigationQuestionAnswerVoCollection getInvestigationQuestionsAnswers(InvestigationRefVo investigation, OcsOrderSessionRefVo orderDetails)
{
	if (investigation == null || orderDetails == null)
		return null;
	
	StringBuilder query = new StringBuilder();
	
	query.append("SELECT questions FROM OcsOrderSession AS ocsorder LEFT JOIN ocsorder.clinicalInfo AS clinInfo LEFT JOIN clinInfo.categoryQuestionAnswers AS category ");
	query.append(" LEFT JOIN category.serviceQuestionAnswers AS serviceQA LEFT JOIN serviceQA.investigationQuestionAnswers AS questions ");
	query.append(" LEFT JOIN questions.investigation AS investigation");
	query.append(" WHERE ocsorder.id = :ID_ORDERDETAILS AND investigation.id = :ID_INVESTIGATION");
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	paramNames.add("ID_ORDERDETAILS");		paramValues.add(orderDetails.getID_OcsOrderSession());
	paramNames.add("ID_INVESTIGATION");		paramValues.add(investigation.getID_Investigation());

	return InvestigationQuestionAnswerVoAssembler.createInvestigationQuestionAnswerVoCollectionFromInvestigationQuestionAnswer(getDomainFactory().find(query.toString(), paramNames, paramValues));
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean breachedInvestigationIsInRefusedList(BreachedInvestigationsVo breachedInvestigationsVo) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(breachedInvestigationsVo == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getInvestigationId()) || (refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getParentId())))
			return true;
	}
	
	return false;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean investigationIdIsInRefusedList(Integer investigationId) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(investigationId == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(investigationId))
			return true;
	}
	
	return false;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(ReOrderPeriodMessageVo reOrderPeriodMessageVo) 
{
	if(reOrderPeriodMessageVo == null || reOrderPeriodMessageVo.getInvestigationId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(reOrderPeriodMessageVo.getInvestigationId()) || inv.getID_Investigation().equals(reOrderPeriodMessageVo.getParentId()))
			return true;
	}
	
	return false;
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(GeneralQuestionAnswerVo generalQuestionAnswerVo) 
{
	if(generalQuestionAnswerVo == null || generalQuestionAnswerVo.getItemId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(generalQuestionAnswerVo.getItemId()) || inv.getID_Investigation().equals(generalQuestionAnswerVo.getParentid()))
			return true;
	}
	
	return false;
}
 
Example 15
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
private boolean isInvestigationRemoved(InvestigationRefVo voRefInvestigation, InvestigationOcsQuestionsVoCollection investigationOcsQuestionsColl)
{
	for (int i = 0; investigationOcsQuestionsColl != null && i < investigationOcsQuestionsColl.size(); i++)
	{
		if(investigationOcsQuestionsColl.get(i).equals(voRefInvestigation))
			return false;
	}
			
	return true;
}
 
Example 16
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
private boolean isInvestigationAdded(InvestigationRefVo voRefInvestigation, OcsQASessionVo voOcsQA)
{
	if(voRefInvestigation == null || voOcsQA == null)
		return false;
	
	for (int i = 0; voOcsQA.getCategoryQuestionAnswersIsNotNull() && i < voOcsQA.getCategoryQuestionAnswers().size(); i++)
	{
		CategoryQuestionAnswerVo categoryQuestionAnswerVo = voOcsQA.getCategoryQuestionAnswers().get(i);
		for (int j = 0; categoryQuestionAnswerVo.getServiceQuestionAnswersIsNotNull() && j < categoryQuestionAnswerVo.getServiceQuestionAnswers().size(); j++)
		{
			ServiceQuestionAnswerVo serviceQuestionAnswerVo = categoryQuestionAnswerVo.getServiceQuestionAnswers().get(j);
			for (int k = 0; serviceQuestionAnswerVo.getInvestigationQuestionAnswers() != null && k < serviceQuestionAnswerVo.getInvestigationQuestionAnswers().size(); k++)
			{
				if(voRefInvestigation.equals(serviceQuestionAnswerVo.getInvestigationQuestionAnswers().get(k).getInvestigation()))
					return true;
			}
		}
	}
	
	return false;
}
 
Example 17
Project: openMAXIMS   File: MyOrderImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to retrieve the questions and answers for an investigation
 */
public InvestigationQuestionAnswerVoCollection getInvestigationQuestionsAnswers(InvestigationRefVo investigation, OcsOrderSessionRefVo orderDetails)
{
	if (investigation == null || orderDetails == null)
		return null;
	
	StringBuilder query = new StringBuilder();
	
	query.append("SELECT questions FROM OcsOrderSession AS ocsorder LEFT JOIN ocsorder.clinicalInfo AS clinInfo LEFT JOIN clinInfo.categoryQuestionAnswers AS category ");
	query.append(" LEFT JOIN category.serviceQuestionAnswers AS serviceQA LEFT JOIN serviceQA.investigationQuestionAnswers AS questions ");
	query.append(" LEFT JOIN questions.investigation AS investigation");
	query.append(" WHERE ocsorder.id = :ID_ORDERDETAILS AND investigation.id = :ID_INVESTIGATION");
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	paramNames.add("ID_ORDERDETAILS");		paramValues.add(orderDetails.getID_OcsOrderSession());
	paramNames.add("ID_INVESTIGATION");		paramValues.add(investigation.getID_Investigation());

	return InvestigationQuestionAnswerVoAssembler.createInvestigationQuestionAnswerVoCollectionFromInvestigationQuestionAnswer(getDomainFactory().find(query.toString(), paramNames, paramValues));
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean breachedInvestigationIsInRefusedList(BreachedInvestigationsVo breachedInvestigationsVo) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(breachedInvestigationsVo == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getInvestigationId()) || (refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getParentId())))
			return true;
	}
	
	return false;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean investigationIdIsInRefusedList(Integer investigationId) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(investigationId == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(investigationId))
			return true;
	}
	
	return false;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(ReOrderPeriodMessageVo reOrderPeriodMessageVo) 
{
	if(reOrderPeriodMessageVo == null || reOrderPeriodMessageVo.getInvestigationId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(reOrderPeriodMessageVo.getInvestigationId()) || inv.getID_Investigation().equals(reOrderPeriodMessageVo.getParentId()))
			return true;
	}
	
	return false;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(GeneralQuestionAnswerVo generalQuestionAnswerVo) 
{
	if(generalQuestionAnswerVo == null || generalQuestionAnswerVo.getItemId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(generalQuestionAnswerVo.getItemId()) || inv.getID_Investigation().equals(generalQuestionAnswerVo.getParentid()))
			return true;
	}
	
	return false;
}
 
Example 24
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
private boolean isInvestigationAdded(InvestigationRefVo voRefInvestigation, OcsQASessionVo voOcsQA)
{
	if(voRefInvestigation == null || voOcsQA == null)
		return false;
	
	for (int i = 0; voOcsQA.getCategoryQuestionAnswersIsNotNull() && i < voOcsQA.getCategoryQuestionAnswers().size(); i++)
	{
		CategoryQuestionAnswerVo categoryQuestionAnswerVo = voOcsQA.getCategoryQuestionAnswers().get(i);
		for (int j = 0; categoryQuestionAnswerVo.getServiceQuestionAnswersIsNotNull() && j < categoryQuestionAnswerVo.getServiceQuestionAnswers().size(); j++)
		{
			ServiceQuestionAnswerVo serviceQuestionAnswerVo = categoryQuestionAnswerVo.getServiceQuestionAnswers().get(j);
			for (int k = 0; serviceQuestionAnswerVo.getInvestigationQuestionAnswers() != null && k < serviceQuestionAnswerVo.getInvestigationQuestionAnswers().size(); k++)
			{
				if(voRefInvestigation.equals(serviceQuestionAnswerVo.getInvestigationQuestionAnswers().get(k).getInvestigation()))
					return true;
			}
		}
	}
	
	return false;
}
 
Example 25
Project: openMAXIMS   File: MyOrderImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to retrieve the questions and answers for an investigation
 */
public InvestigationQuestionAnswerVoCollection getInvestigationQuestionsAnswers(InvestigationRefVo investigation, OcsOrderSessionRefVo orderDetails)
{
	if (investigation == null || orderDetails == null)
		return null;
	
	StringBuilder query = new StringBuilder();
	
	query.append("SELECT questions FROM OcsOrderSession AS ocsorder LEFT JOIN ocsorder.clinicalInfo AS clinInfo LEFT JOIN clinInfo.categoryQuestionAnswers AS category ");
	query.append(" LEFT JOIN category.serviceQuestionAnswers AS serviceQA LEFT JOIN serviceQA.investigationQuestionAnswers AS questions ");
	query.append(" LEFT JOIN questions.investigation AS investigation");
	query.append(" WHERE ocsorder.id = :ID_ORDERDETAILS AND investigation.id = :ID_INVESTIGATION");
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	paramNames.add("ID_ORDERDETAILS");		paramValues.add(orderDetails.getID_OcsOrderSession());
	paramNames.add("ID_INVESTIGATION");		paramValues.add(investigation.getID_Investigation());

	return InvestigationQuestionAnswerVoAssembler.createInvestigationQuestionAnswerVoCollectionFromInvestigationQuestionAnswer(getDomainFactory().find(query.toString(), paramNames, paramValues));
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 27
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean breachedInvestigationIsInRefusedList(BreachedInvestigationsVo breachedInvestigationsVo) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(breachedInvestigationsVo == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getInvestigationId()) || (refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getParentId())))
			return true;
	}
	
	return false;
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 29
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean investigationIdIsInRefusedList(Integer investigationId) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(investigationId == null)
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(investigationId))
			return true;
	}
	
	return false;
}
 
Example 30
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(ReOrderPeriodMessageVo reOrderPeriodMessageVo) 
{
	if(reOrderPeriodMessageVo == null || reOrderPeriodMessageVo.getInvestigationId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(reOrderPeriodMessageVo.getInvestigationId()) || inv.getID_Investigation().equals(reOrderPeriodMessageVo.getParentId()))
			return true;
	}
	
	return false;
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean itemIdIsInRefusedList(GeneralQuestionAnswerVo generalQuestionAnswerVo) 
{
	if(generalQuestionAnswerVo == null || generalQuestionAnswerVo.getItemId() == null)
		return false;
	
	InvestigationRefVoCollection refusedInv = form.getGlobalContext().OCRR.getRefusedInvestigation();
	
	if(refusedInv == null || refusedInv.size() == 0)
		return false;
	
	for(InvestigationRefVo inv : refusedInv)
	{
		if(inv == null)
			continue;
			
		if(inv.getID_Investigation().equals(generalQuestionAnswerVo.getItemId()) || inv.getID_Investigation().equals(generalQuestionAnswerVo.getParentid()))
			return true;
	}
	
	return false;
}
 
Example 32
Project: openmaxims-linux   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
private boolean isInvestigationAdded(InvestigationRefVo voRefInvestigation, OcsQASessionVo voOcsQA)
{
	if(voRefInvestigation == null || voOcsQA == null)
		return false;
	
	for (int i = 0; voOcsQA.getCategoryQuestionAnswersIsNotNull() && i < voOcsQA.getCategoryQuestionAnswers().size(); i++)
	{
		CategoryQuestionAnswerVo categoryQuestionAnswerVo = voOcsQA.getCategoryQuestionAnswers().get(i);
		for (int j = 0; categoryQuestionAnswerVo.getServiceQuestionAnswersIsNotNull() && j < categoryQuestionAnswerVo.getServiceQuestionAnswers().size(); j++)
		{
			ServiceQuestionAnswerVo serviceQuestionAnswerVo = categoryQuestionAnswerVo.getServiceQuestionAnswers().get(j);
			for (int k = 0; serviceQuestionAnswerVo.getInvestigationQuestionAnswers() != null && k < serviceQuestionAnswerVo.getInvestigationQuestionAnswers().size(); k++)
			{
				if(voRefInvestigation.equals(serviceQuestionAnswerVo.getInvestigationQuestionAnswers().get(k).getInvestigation()))
					return true;
			}
		}
	}
	
	return false;
}
 
Example 33
Project: openmaxims-linux   File: MyOrderImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to retrieve the questions and answers for an investigation
 */
public InvestigationQuestionAnswerVoCollection getInvestigationQuestionsAnswers(InvestigationRefVo investigation, OcsOrderSessionRefVo orderDetails)
{
	if (investigation == null || orderDetails == null)
		return null;
	
	StringBuilder query = new StringBuilder();
	
	query.append("SELECT questions FROM OcsOrderSession AS ocsorder LEFT JOIN ocsorder.clinicalInfo AS clinInfo LEFT JOIN clinInfo.categoryQuestionAnswers AS category ");
	query.append(" LEFT JOIN category.serviceQuestionAnswers AS serviceQA LEFT JOIN serviceQA.investigationQuestionAnswers AS questions ");
	query.append(" LEFT JOIN questions.investigation AS investigation");
	query.append(" WHERE ocsorder.id = :ID_ORDERDETAILS AND investigation.id = :ID_INVESTIGATION");
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	paramNames.add("ID_ORDERDETAILS");		paramValues.add(orderDetails.getID_OcsOrderSession());
	paramNames.add("ID_INVESTIGATION");		paramValues.add(investigation.getID_Investigation());

	return InvestigationQuestionAnswerVoAssembler.createInvestigationQuestionAnswerVoCollectionFromInvestigationQuestionAnswer(getDomainFactory().find(query.toString(), paramNames, paramValues));
}
 
Example 34
Project: AvoinApotti   File: OcsIfImpl.java   Source Code and License 5 votes vote down vote up
public ProviderSystemVo getProviderSystem(InvestigationRefVo invVo)
{
	if (invVo == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	Investigation domInv = (Investigation)factory.getDomainObject(Investigation.class, invVo.getID_Investigation());
	return ProviderSystemVoAssembler.create(domInv.getProviderService().getProviderSystem());
}
 
Example 35
Project: AvoinApotti   File: OcsIfImpl.java   Source Code and License 5 votes vote down vote up
public ServiceShortVo getService(InvestigationRefVo invVo)
{
	if (invVo == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	Investigation domInv = (Investigation)factory.getDomainObject(Investigation.class, invVo.getID_Investigation());
	return ServiceShortVoAssembler.create(domInv.getProviderService().getLocationService().getService());
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void removeFromBreachedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getLocalContext().getBreachedInvestigations() == null || form.getLocalContext().getBreachedInvestigations().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()))
	{
		removeComponentFromBreachedInvestigations(newComponent.getID());// 	WDEV-16762
	}
	else
	{
		if(newComponent.getAssociatedInvestigations() != null)
		{
			for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
			{
				InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
				if(invId == null)
					continue;
				
				removeComponentFromBreachedInvestigations(invId.getID_Investigation());// 	WDEV-16762
			}
		}
	}
}
 
Example 37
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License 5 votes vote down vote up
private boolean isInvestigationRemoved(InvestigationRefVo voRefInvestigation, InvestigationOcsQuestionsVoCollection investigationOcsQuestionsColl)
{
	for (int i = 0; investigationOcsQuestionsColl != null && i < investigationOcsQuestionsColl.size(); i++)
	{
		if(investigationOcsQuestionsColl.get(i).equals(voRefInvestigation))
			return false;
	}
			
	return true;
}
 
Example 38
Project: openMAXIMS   File: OcsIfImpl.java   Source Code and License 5 votes vote down vote up
public ProviderSystemVo getProviderSystem(InvestigationRefVo invVo)
{
	if (invVo == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	Investigation domInv = (Investigation)factory.getDomainObject(Investigation.class, invVo.getID_Investigation());
	return ProviderSystemVoAssembler.create(domInv.getProviderService().getProviderSystem());
}
 
Example 39
Project: openMAXIMS   File: OcsIfImpl.java   Source Code and License 5 votes vote down vote up
public ServiceShortVo getService(InvestigationRefVo invVo)
{
	if (invVo == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	Investigation domInv = (Investigation)factory.getDomainObject(Investigation.class, invVo.getID_Investigation());
	return ServiceShortVoAssembler.create(domInv.getProviderService().getLocationService().getService());
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void removeFromBreachedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getLocalContext().getBreachedInvestigations() == null || form.getLocalContext().getBreachedInvestigations().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()))
	{
		removeComponentFromBreachedInvestigations(newComponent.getID());// 	WDEV-16762
	}
	else
	{
		if(newComponent.getAssociatedInvestigations() != null)
		{
			for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
			{
				InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
				if(invId == null)
					continue;
				
				removeComponentFromBreachedInvestigations(invId.getID_Investigation());// 	WDEV-16762
			}
		}
	}
}