Java Code Examples for ims.ocrr.vo.InvestigationSelectOrderVo

The following are top voted examples for showing how to use ims.ocrr.vo.InvestigationSelectOrderVo. 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 analyzeProfile(InvestigationSelectOrderVo profile)
{
	if (profile == null)
		return;

	if (profile.getAssocInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
		{
			analyzeComponents(profile.getAssocInvestigations().get(x));
		}
	}
	if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
		{
			analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
		}
	}
}
 
Example 2
Project: AvoinApotti   File: OrderEntryTemplatePopulation.java   Source Code and License 6 votes vote down vote up
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
	StringBuffer tooltip = new StringBuffer();
	
	if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
	}
	else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		
		if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
			tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	return tooltip;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void analyzeProfile(InvestigationSelectOrderVo profile)
{
	if (profile == null)
		return;

	if (profile.getAssocInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
		{
			analyzeComponents(profile.getAssocInvestigations().get(x));
		}
	}
	if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
		{
			analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
		}
	}
}
 
Example 4
Project: openMAXIMS   File: OrderEntryTemplatePopulation.java   Source Code and License 6 votes vote down vote up
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
	StringBuffer tooltip = new StringBuffer();
	
	if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
	}
	else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		
		if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
			tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	return tooltip;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void analyzeProfile(InvestigationSelectOrderVo profile)
{
	if (profile == null)
		return;

	if (profile.getAssocInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
		{
			analyzeComponents(profile.getAssocInvestigations().get(x));
		}
	}
	if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
		{
			analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
		}
	}
}
 
Example 6
Project: openMAXIMS   File: OrderEntryTemplatePopulation.java   Source Code and License 6 votes vote down vote up
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
	StringBuffer tooltip = new StringBuffer();
	
	if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
	}
	else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		
		if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
			tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	return tooltip;
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void analyzeProfile(InvestigationSelectOrderVo profile)
{
	if (profile == null)
		return;

	if (profile.getAssocInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
		{
			analyzeComponents(profile.getAssocInvestigations().get(x));
		}
	}
	if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
	{
		for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
		{
			analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
		}
	}
}
 
Example 8
Project: openmaxims-linux   File: OrderEntryTemplatePopulation.java   Source Code and License 6 votes vote down vote up
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
	StringBuffer tooltip = new StringBuffer();
	
	if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
	}
	else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		
		if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
			tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	return tooltip;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
	addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

	//if (((Boolean) cell.getValue()).booleanValue())
	{
		InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

		clearAnalyzedChildComponents();
		markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
		clearAnalyzedChildComponents();
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
	if(item == null || item.getComponent() == null)
		return null;
	
	InvestigationRefVoCollection coll = new InvestigationRefVoCollection();
	
	for(int i=0; i<item.getComponent().size(); i++)
	{
		OrderSetComponentForHelpTextVo component = item.getComponent().get(i);
		
		if(component == null)
			continue;
		
		InvestigationSelectOrderVo inv = component.getInvestigation();
		
		if(inv.getInvestigationIndex().getIsProfile())
		{
			if(inv.getAssocInvestigations() != null)
			{
				for(int j=0; j<inv.getAssocInvestigations().size(); j++)
				{
					InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);
					
					if(invinv == null)
						continue;
					
					coll.add(invinv);
				}
			}
		}
		else
		{
			coll.add(inv);
		}
	}
	
	return coll;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private Integer[] getInvestigationIdCollection(SelectedComponentFromSelectOrderVoCollection voColl)
{
	List<Integer> ids = new ArrayList<Integer>();
	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		//WDEV-3306
		if(voColl.get(i).getComponentTypeIsNotNull() && voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.PROFILE))
		{
			InvestigationSelectOrderVo voInvSelOrder = domain.getChildComponentsForInvestigationOrProfile(voColl.get(i).getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			for (int j = 0; voInvSelOrder != null && voInvSelOrder.getAssocInvestigationsIsNotNull() && j < voInvSelOrder.getAssocInvestigations().size(); j++)
			{
				//WDEV-16762
				if(voInvSelOrder.getAssocInvestigations().get(j) == null || voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation() == null)
					continue;
				
				//WDEV-16762
				if(!investigationIdIsInRefusedList(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation()))
				{
					ids.add(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation());
				}
			}
		}
		else
		{
			if(voColl.get(i).getIDIsNotNull() && voColl.get(i).getParentInvestigationId() == null && (voColl.get(i).getComponentTypeIsNotNull() && !voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.ORDERSET))) //WDEV-11408
				ids.add(voColl.get(i).getID());
		}
	}
	
	if (ids.size() > 0)
	{
		Integer[] intValues = new Integer[ids.size()];
		ids.toArray(intValues);
		return intValues;
	}
	
	return null;
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
	if (investigation == null)
		return "";
	
	StringBuilder tooltip = new StringBuilder();
	
	tooltip.append(investigation.getInvestigationIndex().getDescription());

	if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
	}
	else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	// Amend '&' characters with space not to cause problems in tool tip boxes
	// as these are HTML and '&' is a special character
	for (int i = tooltip.length() - 1; i >= 0; i--)
	{
		if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
			tooltip.insert(i, " ");
	}
	
	return tooltip.toString();
}
 
Example 13
Project: AvoinApotti   File: OrderEntryTemplatePopulation.java   Source Code and License 5 votes vote down vote up
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
	if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
		return investigationNames;
	
	visitedOrderSet.add(orderSet);
	OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();
	
	for(int i=0; i<orderSetComponent.size(); i++)
	{
		OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);
		
		if(component == null)
			continue;
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
			investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
		{
			for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
			{
				InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);
				
				if(!investigationChild.getInvestigationIndexIsNotNull())
					continue;
				
				if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
					investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
			}
		}
			
		getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
	}
	
	return investigationNames;
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
	addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

	//if (((Boolean) cell.getValue()).booleanValue())
	{
		InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

		clearAnalyzedChildComponents();
		markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
		clearAnalyzedChildComponents();
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
	if(item == null || item.getComponent() == null)
		return null;
	
	InvestigationRefVoCollection coll = new InvestigationRefVoCollection();
	
	for(int i=0; i<item.getComponent().size(); i++)
	{
		OrderSetComponentForHelpTextVo component = item.getComponent().get(i);
		
		if(component == null)
			continue;
		
		InvestigationSelectOrderVo inv = component.getInvestigation();
		
		if(inv.getInvestigationIndex().getIsProfile())
		{
			if(inv.getAssocInvestigations() != null)
			{
				for(int j=0; j<inv.getAssocInvestigations().size(); j++)
				{
					InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);
					
					if(invinv == null)
						continue;
					
					coll.add(invinv);
				}
			}
		}
		else
		{
			coll.add(inv);
		}
	}
	
	return coll;
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private Integer[] getInvestigationIdCollection(SelectedComponentFromSelectOrderVoCollection voColl)
{
	List<Integer> ids = new ArrayList<Integer>();
	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		//WDEV-3306
		if(voColl.get(i).getComponentTypeIsNotNull() && voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.PROFILE))
		{
			InvestigationSelectOrderVo voInvSelOrder = domain.getChildComponentsForInvestigationOrProfile(voColl.get(i).getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			for (int j = 0; voInvSelOrder != null && voInvSelOrder.getAssocInvestigationsIsNotNull() && j < voInvSelOrder.getAssocInvestigations().size(); j++)
			{
				//WDEV-16762
				if(voInvSelOrder.getAssocInvestigations().get(j) == null || voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation() == null)
					continue;
				
				//WDEV-16762
				if(!investigationIdIsInRefusedList(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation()))
				{
					ids.add(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation());
				}
			}
		}
		else
		{
			if(voColl.get(i).getIDIsNotNull() && voColl.get(i).getParentInvestigationId() == null && (voColl.get(i).getComponentTypeIsNotNull() && !voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.ORDERSET))) //WDEV-11408
				ids.add(voColl.get(i).getID());
		}
	}
	
	if (ids.size() > 0)
	{
		Integer[] intValues = new Integer[ids.size()];
		ids.toArray(intValues);
		return intValues;
	}
	
	return null;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
	if (investigation == null)
		return "";
	
	StringBuilder tooltip = new StringBuilder();
	
	tooltip.append(investigation.getInvestigationIndex().getDescription());

	if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
	}
	else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	// Amend '&' characters with space not to cause problems in tool tip boxes
	// as these are HTML and '&' is a special character
	for (int i = tooltip.length() - 1; i >= 0; i--)
	{
		if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
			tooltip.insert(i, " ");
	}
	
	return tooltip.toString();
}
 
Example 18
Project: openMAXIMS   File: OrderEntryTemplatePopulation.java   Source Code and License 5 votes vote down vote up
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
	if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
		return investigationNames;
	
	visitedOrderSet.add(orderSet);
	OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();
	
	for(int i=0; i<orderSetComponent.size(); i++)
	{
		OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);
		
		if(component == null)
			continue;
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
			investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
		{
			for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
			{
				InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);
				
				if(!investigationChild.getInvestigationIndexIsNotNull())
					continue;
				
				if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
					investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
			}
		}
			
		getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
	}
	
	return investigationNames;
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
	addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

	//if (((Boolean) cell.getValue()).booleanValue())
	{
		InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

		clearAnalyzedChildComponents();
		markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
		clearAnalyzedChildComponents();
	}
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
	if(item == null || item.getComponent() == null)
		return null;
	
	InvestigationRefVoCollection coll = new InvestigationRefVoCollection();
	
	for(int i=0; i<item.getComponent().size(); i++)
	{
		OrderSetComponentForHelpTextVo component = item.getComponent().get(i);
		
		if(component == null)
			continue;
		
		InvestigationSelectOrderVo inv = component.getInvestigation();
		
		if(inv.getInvestigationIndex().getIsProfile())
		{
			if(inv.getAssocInvestigations() != null)
			{
				for(int j=0; j<inv.getAssocInvestigations().size(); j++)
				{
					InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);
					
					if(invinv == null)
						continue;
					
					coll.add(invinv);
				}
			}
		}
		else
		{
			coll.add(inv);
		}
	}
	
	return coll;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private Integer[] getInvestigationIdCollection(SelectedComponentFromSelectOrderVoCollection voColl)
{
	List<Integer> ids = new ArrayList<Integer>();
	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		//WDEV-3306
		if(voColl.get(i).getComponentTypeIsNotNull() && voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.PROFILE))
		{
			InvestigationSelectOrderVo voInvSelOrder = domain.getChildComponentsForInvestigationOrProfile(voColl.get(i).getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			for (int j = 0; voInvSelOrder != null && voInvSelOrder.getAssocInvestigationsIsNotNull() && j < voInvSelOrder.getAssocInvestigations().size(); j++)
			{
				//WDEV-16762
				if(voInvSelOrder.getAssocInvestigations().get(j) == null || voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation() == null)
					continue;
				
				//WDEV-16762
				if(!investigationIdIsInRefusedList(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation()))
				{
					ids.add(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation());
				}
			}
		}
		else
		{
			if(voColl.get(i).getIDIsNotNull() && voColl.get(i).getParentInvestigationId() == null && (voColl.get(i).getComponentTypeIsNotNull() && !voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.ORDERSET))) //WDEV-11408
				ids.add(voColl.get(i).getID());
		}
	}
	
	if (ids.size() > 0)
	{
		Integer[] intValues = new Integer[ids.size()];
		ids.toArray(intValues);
		return intValues;
	}
	
	return null;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
	if (investigation == null)
		return "";
	
	StringBuilder tooltip = new StringBuilder();
	
	tooltip.append(investigation.getInvestigationIndex().getDescription());

	if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
	}
	else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	// Amend '&' characters with space not to cause problems in tool tip boxes
	// as these are HTML and '&' is a special character
	for (int i = tooltip.length() - 1; i >= 0; i--)
	{
		if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
			tooltip.insert(i, " ");
	}
	
	return tooltip.toString();
}
 
Example 23
Project: openMAXIMS   File: OrderEntryTemplatePopulation.java   Source Code and License 5 votes vote down vote up
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
	if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
		return investigationNames;
	
	visitedOrderSet.add(orderSet);
	OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();
	
	for(int i=0; i<orderSetComponent.size(); i++)
	{
		OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);
		
		if(component == null)
			continue;
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
			investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
		{
			for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
			{
				InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);
				
				if(!investigationChild.getInvestigationIndexIsNotNull())
					continue;
				
				if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
					investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
			}
		}
			
		getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
	}
	
	return investigationNames;
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
	addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

	//if (((Boolean) cell.getValue()).booleanValue())
	{
		InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

		clearAnalyzedChildComponents();
		markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
		clearAnalyzedChildComponents();
	}
}
 
Example 25
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
	if(item == null || item.getComponent() == null)
		return null;
	
	InvestigationRefVoCollection coll = new InvestigationRefVoCollection();
	
	for(int i=0; i<item.getComponent().size(); i++)
	{
		OrderSetComponentForHelpTextVo component = item.getComponent().get(i);
		
		if(component == null)
			continue;
		
		InvestigationSelectOrderVo inv = component.getInvestigation();
		
		if(inv.getInvestigationIndex().getIsProfile())
		{
			if(inv.getAssocInvestigations() != null)
			{
				for(int j=0; j<inv.getAssocInvestigations().size(); j++)
				{
					InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);
					
					if(invinv == null)
						continue;
					
					coll.add(invinv);
				}
			}
		}
		else
		{
			coll.add(inv);
		}
	}
	
	return coll;
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private Integer[] getInvestigationIdCollection(SelectedComponentFromSelectOrderVoCollection voColl)
{
	List<Integer> ids = new ArrayList<Integer>();
	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		//WDEV-3306
		if(voColl.get(i).getComponentTypeIsNotNull() && voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.PROFILE))
		{
			InvestigationSelectOrderVo voInvSelOrder = domain.getChildComponentsForInvestigationOrProfile(voColl.get(i).getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			for (int j = 0; voInvSelOrder != null && voInvSelOrder.getAssocInvestigationsIsNotNull() && j < voInvSelOrder.getAssocInvestigations().size(); j++)
			{
				//WDEV-16762
				if(voInvSelOrder.getAssocInvestigations().get(j) == null || voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation() == null)
					continue;
				
				//WDEV-16762
				if(!investigationIdIsInRefusedList(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation()))
				{
					ids.add(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation());
				}
			}
		}
		else
		{
			if(voColl.get(i).getIDIsNotNull() && voColl.get(i).getParentInvestigationId() == null && (voColl.get(i).getComponentTypeIsNotNull() && !voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.ORDERSET))) //WDEV-11408
				ids.add(voColl.get(i).getID());
		}
	}
	
	if (ids.size() > 0)
	{
		Integer[] intValues = new Integer[ids.size()];
		ids.toArray(intValues);
		return intValues;
	}
	
	return null;
}
 
Example 27
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
	if (investigation == null)
		return "";
	
	StringBuilder tooltip = new StringBuilder();
	
	tooltip.append(investigation.getInvestigationIndex().getDescription());

	if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
	}
	else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
	{
		tooltip.append(" - Expected Turn Around: ");
		tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
		tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
	}
	
	// Amend '&' characters with space not to cause problems in tool tip boxes
	// as these are HTML and '&' is a special character
	for (int i = tooltip.length() - 1; i >= 0; i--)
	{
		if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
			tooltip.insert(i, " ");
	}
	
	return tooltip.toString();
}
 
Example 28
Project: openmaxims-linux   File: OrderEntryTemplatePopulation.java   Source Code and License 5 votes vote down vote up
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
	if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
		return investigationNames;
	
	visitedOrderSet.add(orderSet);
	OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();
	
	for(int i=0; i<orderSetComponent.size(); i++)
	{
		OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);
		
		if(component == null)
			continue;
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
			investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863
		
		if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
		{
			for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
			{
				InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);
				
				if(!investigationChild.getInvestigationIndexIsNotNull())
					continue;
				
				if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
					investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
			}
		}
			
		getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
	}
	
	return investigationNames;
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkComponent(OrderEntryTemplateComponentShortVo component, boolean mark, String reorderReason)//WDEV-16624
{
	if (component.getInvestigationIsNotNull())
	{
		// Investigation or profile selected, will check the type now
		boolean isProfile = false;
		if (component.getInvestigation().getInvestigationIndexIsNotNull())
		{
			if (component.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull())
				isProfile = component.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue();
		}

		markUnmarkComponent(component.getInvestigation(), isProfile, mark, false, reorderReason);//WDEV-16624

		// mark/unmark all child components
		//if (mark)
		{
			InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getInvestigation().getID_Investigation(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

			clearAnalyzedChildComponents();
			markUnmarkChildComponentsRecursive(investigation, false, null, null, 0, mark, reorderReason);//WDEV-16624
			clearAnalyzedChildComponents();
		}
	}
	else if (component.getOrderSetIsNotNull())
	{
		// Order set selected
		markUnmarkComponent(component.getOrderSet(), mark, false);

		// mark/unmark all child components
		//if (mark)
		{
			ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(component.getOrderSet().getID_OrderSet(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			if (childComponents != null)
			{
				for (int x = 0; x < childComponents.size(); x++)
				{
					if (childComponents.get(x) != null)
					{
						clearAnalyzedChildComponents();
						markUnmarkChildComponentsRecursive(childComponents.get(x).getInvestigation(), null, new Integer(0), 0, component.getOrderSetIsNotNull(), mark, reorderReason);//WDEV-16624
						clearAnalyzedChildComponents();
					}
				}
			}
		}
	}
}
 
Example 30
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
	markUnmarkChildComponentsRecursive(childInvestigation, true, parentInvId, idCurrentInvestigation, level, fromOrderSet, mark, reorderReason);
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean mark, String reorderReason)//WDEV-16624
{
	markUnmarkChildComponentsRecursive(childInvestigation, addRoot, parentInvId, idCurrentInvestigation, level, false, mark, reorderReason);
}
 
Example 32
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
	if (childInvestigation == null || childInvestigation.getInvestigationIndex() == null)
		return;

	SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
	if (childInvestigation.getInvestigationIndex().getIsProfileIsNotNull() && childInvestigation.getInvestigationIndex().getIsProfile().booleanValue())
		type = SelectAndOrderComponentType.PROFILE;

	int requiredLevel = fromOrderSet ? -1 : 1; // WDEV-4821

	if (!wasAnalyzed(childInvestigation.getID_Investigation(), type))
	{
		markAsAnalyzed(childInvestigation.getID_Investigation(), type);
		if (addRoot)
		{
			SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
			component.setID(childInvestigation.getID_Investigation());
			component.setComponentType(type);
			component.setText(childInvestigation.getInvestigationIndex().getName());
			component.setCategory(childInvestigation.getInvestigationIndex().getCategory());
			component.setTooltip(getComponentInvestigationTooltip(childInvestigation));
			component.setParentInvestigationId(parentInvId);
			component.setIsAddon(childInvestigation.getIsAddon());
			component.setRequiresSite(childInvestigation.getInvestigationIndex().getRequiresSiteSpecifier());
			component.setPhlebMayCollect(childInvestigation.getInvestigationIndex().getPhlebMayCollect());
			component.setGenderSpecific(childInvestigation.getInvestigationIndex().getGenderSpecific());
			
			if (childInvestigation.getProviderServiceIsNotNull() && childInvestigation.getProviderService().getLocationServiceIsNotNull() && childInvestigation.getProviderService().getLocationService().getServiceIsNotNull())
				component.setServiceID(childInvestigation.getProviderService().getLocationService().getService().getID_Service());
			
			//WDEV-16624
			if(checkIfInvestigationIsInBreachedList(childInvestigation.getID_Investigation()))
			{
				component.setReOrderReason(reorderReason);
			}
			
			if (childInvestigation.getInvestigationIndex().getActiveStatusIsNotNull() && childInvestigation.getInvestigationIndex().getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
				addRemoveSelection(component, mark, true);
		}

		if (childInvestigation.getAssocInvestigationsIsNotNull())
		{
			for (int x = 0; x < childInvestigation.getAssocInvestigations().size(); x++)
			{
				if (idCurrentInvestigation != null && (idCurrentInvestigation != childInvestigation.getID_Investigation()))
					level++;

				if (level < requiredLevel || requiredLevel == -1) // WDEV-4821
					markUnmarkChildComponentsRecursive(childInvestigation.getAssocInvestigations().get(x), true, childInvestigation.getID_Investigation(), childInvestigation.getID_Investigation(), level, mark, reorderReason);//WDEV-16624
			}
		}
	}
}
 
Example 33
Project: AvoinApotti   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
/**
 * method will filter any items that don't pass security checks WDEV-11071,WDEV-11109
 */
public InvestigationSelectOrderVo getChildComponentsForInvestigationOrProfile(Integer investigationID, RoleDisciplineSecurityLevelLiteGCVo voSecurity) 
{
	Investigation doInvest = (Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue());
	boolean isProfile =  doInvest.getInvestigationIndex().isIsProfile();
	
	InvestigationSelectOrderVo invest = InvestigationSelectOrderVoAssembler.create((Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue()));

	//enforce Security here for profiles to filter out children that do not pass the security check
	if(isProfile)
	{
		InvestigationSelectOrderVoCollection removableComponenets = new InvestigationSelectOrderVoCollection();
		for(InvestigationSelectOrderVo comp : invest.getAssocInvestigations())
		{
			if(voSecurity != null)
			{
				SecurityLevelAndServiceCheckVo voSecLevelAndService = getSecurityLevelAndServiceForInvestigation(comp.getID_Investigation());
				if(voSecLevelAndService != null && voSecLevelAndService.getSecurityLevelIsNotNull() && voSecLevelAndService.getServiceIsNotNull())
				{
					if(!voSecurity.doesInvPassSecurityCheck(voSecLevelAndService.getService(),voSecLevelAndService.getSecurityLevel(),true)) //WDEV-11622
					{
						removableComponenets.add(comp);
						continue;
					}
				}
			}
		}
		
		if(removableComponenets.size() > 0)
		{
			for(InvestigationSelectOrderVo compToRemove : removableComponenets)
			{
				invest.getAssocInvestigations().remove(compToRemove);
			}
		}
		
		//if the profile now has no secure children return null which will tell ui that none of the children passed the security check
		if(invest.getAssocInvestigations().size() == 0)
			return null;
	}
	
	return invest;
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkComponent(OrderEntryTemplateComponentShortVo component, boolean mark, String reorderReason)//WDEV-16624
{
	if (component.getInvestigationIsNotNull())
	{
		// Investigation or profile selected, will check the type now
		boolean isProfile = false;
		if (component.getInvestigation().getInvestigationIndexIsNotNull())
		{
			if (component.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull())
				isProfile = component.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue();
		}

		markUnmarkComponent(component.getInvestigation(), isProfile, mark, false, reorderReason);//WDEV-16624

		// mark/unmark all child components
		//if (mark)
		{
			InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getInvestigation().getID_Investigation(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

			clearAnalyzedChildComponents();
			markUnmarkChildComponentsRecursive(investigation, false, null, null, 0, mark, reorderReason);//WDEV-16624
			clearAnalyzedChildComponents();
		}
	}
	else if (component.getOrderSetIsNotNull())
	{
		// Order set selected
		markUnmarkComponent(component.getOrderSet(), mark, false);

		// mark/unmark all child components
		//if (mark)
		{
			ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(component.getOrderSet().getID_OrderSet(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			if (childComponents != null)
			{
				for (int x = 0; x < childComponents.size(); x++)
				{
					if (childComponents.get(x) != null)
					{
						clearAnalyzedChildComponents();
						markUnmarkChildComponentsRecursive(childComponents.get(x).getInvestigation(), null, new Integer(0), 0, component.getOrderSetIsNotNull(), mark, reorderReason);//WDEV-16624
						clearAnalyzedChildComponents();
					}
				}
			}
		}
	}
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
	markUnmarkChildComponentsRecursive(childInvestigation, true, parentInvId, idCurrentInvestigation, level, fromOrderSet, mark, reorderReason);
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean mark, String reorderReason)//WDEV-16624
{
	markUnmarkChildComponentsRecursive(childInvestigation, addRoot, parentInvId, idCurrentInvestigation, level, false, mark, reorderReason);
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
	if (childInvestigation == null || childInvestigation.getInvestigationIndex() == null)
		return;

	SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
	if (childInvestigation.getInvestigationIndex().getIsProfileIsNotNull() && childInvestigation.getInvestigationIndex().getIsProfile().booleanValue())
		type = SelectAndOrderComponentType.PROFILE;

	int requiredLevel = fromOrderSet ? -1 : 1; // WDEV-4821

	if (!wasAnalyzed(childInvestigation.getID_Investigation(), type))
	{
		markAsAnalyzed(childInvestigation.getID_Investigation(), type);
		if (addRoot)
		{
			SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
			component.setID(childInvestigation.getID_Investigation());
			component.setComponentType(type);
			component.setText(childInvestigation.getInvestigationIndex().getName());
			component.setCategory(childInvestigation.getInvestigationIndex().getCategory());
			component.setTooltip(getComponentInvestigationTooltip(childInvestigation));
			component.setParentInvestigationId(parentInvId);
			component.setIsAddon(childInvestigation.getIsAddon());
			component.setRequiresSite(childInvestigation.getInvestigationIndex().getRequiresSiteSpecifier());
			component.setPhlebMayCollect(childInvestigation.getInvestigationIndex().getPhlebMayCollect());
			component.setGenderSpecific(childInvestigation.getInvestigationIndex().getGenderSpecific());
			
			if (childInvestigation.getProviderServiceIsNotNull() && childInvestigation.getProviderService().getLocationServiceIsNotNull() && childInvestigation.getProviderService().getLocationService().getServiceIsNotNull())
				component.setServiceID(childInvestigation.getProviderService().getLocationService().getService().getID_Service());
			
			//WDEV-16624
			if(checkIfInvestigationIsInBreachedList(childInvestigation.getID_Investigation()))
			{
				component.setReOrderReason(reorderReason);
			}
			
			if (childInvestigation.getInvestigationIndex().getActiveStatusIsNotNull() && childInvestigation.getInvestigationIndex().getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
				addRemoveSelection(component, mark, true);
		}

		if (childInvestigation.getAssocInvestigationsIsNotNull())
		{
			for (int x = 0; x < childInvestigation.getAssocInvestigations().size(); x++)
			{
				if (idCurrentInvestigation != null && (idCurrentInvestigation != childInvestigation.getID_Investigation()))
					level++;

				if (level < requiredLevel || requiredLevel == -1) // WDEV-4821
					markUnmarkChildComponentsRecursive(childInvestigation.getAssocInvestigations().get(x), true, childInvestigation.getID_Investigation(), childInvestigation.getID_Investigation(), level, mark, reorderReason);//WDEV-16624
			}
		}
	}
}
 
Example 38
Project: openMAXIMS   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
/**
 * method will filter any items that don't pass security checks WDEV-11071,WDEV-11109
 */
public InvestigationSelectOrderVo getChildComponentsForInvestigationOrProfile(Integer investigationID, RoleDisciplineSecurityLevelLiteGCVo voSecurity) 
{
	Investigation doInvest = (Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue());
	boolean isProfile =  doInvest.getInvestigationIndex().isIsProfile();
	
	InvestigationSelectOrderVo invest = InvestigationSelectOrderVoAssembler.create((Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue()));

	//enforce Security here for profiles to filter out children that do not pass the security check
	if(isProfile)
	{
		InvestigationSelectOrderVoCollection removableComponenets = new InvestigationSelectOrderVoCollection();
		for(InvestigationSelectOrderVo comp : invest.getAssocInvestigations())
		{
			if(voSecurity != null)
			{
				SecurityLevelAndServiceCheckVo voSecLevelAndService = getSecurityLevelAndServiceForInvestigation(comp.getID_Investigation());
				if(voSecLevelAndService != null && voSecLevelAndService.getSecurityLevelIsNotNull() && voSecLevelAndService.getServiceIsNotNull())
				{
					if(!voSecurity.doesInvPassSecurityCheck(voSecLevelAndService.getService(),voSecLevelAndService.getSecurityLevel(),true)) //WDEV-11622
					{
						removableComponenets.add(comp);
						continue;
					}
				}
			}
		}
		
		if(removableComponenets.size() > 0)
		{
			for(InvestigationSelectOrderVo compToRemove : removableComponenets)
			{
				invest.getAssocInvestigations().remove(compToRemove);
			}
		}
		
		//if the profile now has no secure children return null which will tell ui that none of the children passed the security check
		if(invest.getAssocInvestigations().size() == 0)
			return null;
	}
	
	return invest;
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkComponent(OrderEntryTemplateComponentShortVo component, boolean mark, String reorderReason)//WDEV-16624
{
	if (component.getInvestigationIsNotNull())
	{
		// Investigation or profile selected, will check the type now
		boolean isProfile = false;
		if (component.getInvestigation().getInvestigationIndexIsNotNull())
		{
			if (component.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull())
				isProfile = component.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue();
		}

		markUnmarkComponent(component.getInvestigation(), isProfile, mark, false, reorderReason);//WDEV-16624

		// mark/unmark all child components
		//if (mark)
		{
			InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getInvestigation().getID_Investigation(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

			clearAnalyzedChildComponents();
			markUnmarkChildComponentsRecursive(investigation, false, null, null, 0, mark, reorderReason);//WDEV-16624
			clearAnalyzedChildComponents();
		}
	}
	else if (component.getOrderSetIsNotNull())
	{
		// Order set selected
		markUnmarkComponent(component.getOrderSet(), mark, false);

		// mark/unmark all child components
		//if (mark)
		{
			ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(component.getOrderSet().getID_OrderSet(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			if (childComponents != null)
			{
				for (int x = 0; x < childComponents.size(); x++)
				{
					if (childComponents.get(x) != null)
					{
						clearAnalyzedChildComponents();
						markUnmarkChildComponentsRecursive(childComponents.get(x).getInvestigation(), null, new Integer(0), 0, component.getOrderSetIsNotNull(), mark, reorderReason);//WDEV-16624
						clearAnalyzedChildComponents();
					}
				}
			}
		}
	}
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
	markUnmarkChildComponentsRecursive(childInvestigation, true, parentInvId, idCurrentInvestigation, level, fromOrderSet, mark, reorderReason);
}