Java Code Examples for ims.ocrr.vo.SelectedComponentFromSelectOrderVo.setComponentType()

The following are Jave code examples for showing how to use setComponentType() of the ims.ocrr.vo.SelectedComponentFromSelectOrderVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	return wasAnalyzed(component);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	markAsAnalyzed(component);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(InvestShortVo item, boolean isProfile, boolean mark, boolean isChildComponent, String reorderReason)
{
	if (item != null && item.getID_InvestigationIsNotNull() && item.getInvestigationIndexIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_Investigation());
		component.setComponentType(isProfile ? SelectAndOrderComponentType.PROFILE : SelectAndOrderComponentType.INVESTIGATION);
		component.setText(item.getInvestigationIndex().getName());
		component.setCategory(item.getInvestigationIndex().getCategory());
		component.setTooltip(getComponentInvestigationTooltip(item));
		component.setIsAddon(item.getIsAddon());
		component.setRequiresSite(item.getInvestigationIndex().getRequiresSiteSpecifier());
		component.setMinReOrderPeriod(item.getMinReorderPeriodUnit());
		component.setMinReOrderVal(item.getMinReorderPeriodVal());
		component.setMinReOrderFemalePeriod(item.getFemaleMinReorderPeriodUnit());
		component.setMinReOrderFemaleVal(item.getFemaleMinReorderPeriodVal());
		component.setPhlebMayCollect(item.getInvestigationIndex().getPhlebMayCollect());
		component.setGenderSpecific(item.getInvestigationIndex().getGenderSpecific());
		component.setReOrderReason(reorderReason);//WDEV-16624
		component.setAssociatedInvestigations(item.getAssocInvestigations());//WDEV-16624

		if (item.getProviderServiceIsNotNull() && item.getProviderService().getLocationServiceIsNotNull() && item.getProviderService().getLocationService().getServiceIsNotNull())
			component.setServiceID(item.getProviderService().getLocationService().getService().getID_Service());
		if (item.getActiveStatusIsNotNull() && item.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
			addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(OrderSetForHelpTextVo item, boolean mark, boolean isChildComponent)//WDEV-16624
{
	if (item != null && item.getID_OrderSetIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_OrderSet());
		component.setComponentType(SelectAndOrderComponentType.ORDERSET);
		component.setText(item.getName());
		component.setTooltip(escapeAmpersandInTooltip(item.getDescription()));
		component.setAssociatedInvestigations(getInvestigationsFromOrderSet(item));//WDEV-16624
		addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	return wasAnalyzed(component);
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	markAsAnalyzed(component);
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(InvestShortVo item, boolean isProfile, boolean mark, boolean isChildComponent, String reorderReason)
{
	if (item != null && item.getID_InvestigationIsNotNull() && item.getInvestigationIndexIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_Investigation());
		component.setComponentType(isProfile ? SelectAndOrderComponentType.PROFILE : SelectAndOrderComponentType.INVESTIGATION);
		component.setText(item.getInvestigationIndex().getName());
		component.setCategory(item.getInvestigationIndex().getCategory());
		component.setTooltip(getComponentInvestigationTooltip(item));
		component.setIsAddon(item.getIsAddon());
		component.setRequiresSite(item.getInvestigationIndex().getRequiresSiteSpecifier());
		component.setMinReOrderPeriod(item.getMinReorderPeriodUnit());
		component.setMinReOrderVal(item.getMinReorderPeriodVal());
		component.setMinReOrderFemalePeriod(item.getFemaleMinReorderPeriodUnit());
		component.setMinReOrderFemaleVal(item.getFemaleMinReorderPeriodVal());
		component.setPhlebMayCollect(item.getInvestigationIndex().getPhlebMayCollect());
		component.setGenderSpecific(item.getInvestigationIndex().getGenderSpecific());
		component.setReOrderReason(reorderReason);//WDEV-16624
		component.setAssociatedInvestigations(item.getAssocInvestigations());//WDEV-16624

		if (item.getProviderServiceIsNotNull() && item.getProviderService().getLocationServiceIsNotNull() && item.getProviderService().getLocationService().getServiceIsNotNull())
			component.setServiceID(item.getProviderService().getLocationService().getService().getID_Service());
		if (item.getActiveStatusIsNotNull() && item.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
			addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(OrderSetForHelpTextVo item, boolean mark, boolean isChildComponent)//WDEV-16624
{
	if (item != null && item.getID_OrderSetIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_OrderSet());
		component.setComponentType(SelectAndOrderComponentType.ORDERSET);
		component.setText(item.getName());
		component.setTooltip(escapeAmpersandInTooltip(item.getDescription()));
		component.setAssociatedInvestigations(getInvestigationsFromOrderSet(item));//WDEV-16624
		addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	return wasAnalyzed(component);
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	markAsAnalyzed(component);
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(InvestShortVo item, boolean isProfile, boolean mark, boolean isChildComponent, String reorderReason)
{
	if (item != null && item.getID_InvestigationIsNotNull() && item.getInvestigationIndexIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_Investigation());
		component.setComponentType(isProfile ? SelectAndOrderComponentType.PROFILE : SelectAndOrderComponentType.INVESTIGATION);
		component.setText(item.getInvestigationIndex().getName());
		component.setCategory(item.getInvestigationIndex().getCategory());
		component.setTooltip(getComponentInvestigationTooltip(item));
		component.setIsAddon(item.getIsAddon());
		component.setRequiresSite(item.getInvestigationIndex().getRequiresSiteSpecifier());
		component.setMinReOrderPeriod(item.getMinReorderPeriodUnit());
		component.setMinReOrderVal(item.getMinReorderPeriodVal());
		component.setMinReOrderFemalePeriod(item.getFemaleMinReorderPeriodUnit());
		component.setMinReOrderFemaleVal(item.getFemaleMinReorderPeriodVal());
		component.setPhlebMayCollect(item.getInvestigationIndex().getPhlebMayCollect());
		component.setGenderSpecific(item.getInvestigationIndex().getGenderSpecific());
		component.setReOrderReason(reorderReason);//WDEV-16624
		component.setAssociatedInvestigations(item.getAssocInvestigations());//WDEV-16624

		if (item.getProviderServiceIsNotNull() && item.getProviderService().getLocationServiceIsNotNull() && item.getProviderService().getLocationService().getServiceIsNotNull())
			component.setServiceID(item.getProviderService().getLocationService().getService().getID_Service());
		if (item.getActiveStatusIsNotNull() && item.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
			addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(OrderSetForHelpTextVo item, boolean mark, boolean isChildComponent)//WDEV-16624
{
	if (item != null && item.getID_OrderSetIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_OrderSet());
		component.setComponentType(SelectAndOrderComponentType.ORDERSET);
		component.setText(item.getName());
		component.setTooltip(escapeAmpersandInTooltip(item.getDescription()));
		component.setAssociatedInvestigations(getInvestigationsFromOrderSet(item));//WDEV-16624
		addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 13
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	return wasAnalyzed(component);
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	markAsAnalyzed(component);
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(InvestShortVo item, boolean isProfile, boolean mark, boolean isChildComponent, String reorderReason)
{
	if (item != null && item.getID_InvestigationIsNotNull() && item.getInvestigationIndexIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_Investigation());
		component.setComponentType(isProfile ? SelectAndOrderComponentType.PROFILE : SelectAndOrderComponentType.INVESTIGATION);
		component.setText(item.getInvestigationIndex().getName());
		component.setCategory(item.getInvestigationIndex().getCategory());
		component.setTooltip(getComponentInvestigationTooltip(item));
		component.setIsAddon(item.getIsAddon());
		component.setRequiresSite(item.getInvestigationIndex().getRequiresSiteSpecifier());
		component.setMinReOrderPeriod(item.getMinReorderPeriodUnit());
		component.setMinReOrderVal(item.getMinReorderPeriodVal());
		component.setMinReOrderFemalePeriod(item.getFemaleMinReorderPeriodUnit());
		component.setMinReOrderFemaleVal(item.getFemaleMinReorderPeriodVal());
		component.setPhlebMayCollect(item.getInvestigationIndex().getPhlebMayCollect());
		component.setGenderSpecific(item.getInvestigationIndex().getGenderSpecific());
		component.setReOrderReason(reorderReason);//WDEV-16624
		component.setAssociatedInvestigations(item.getAssocInvestigations());//WDEV-16624

		if (item.getProviderServiceIsNotNull() && item.getProviderService().getLocationServiceIsNotNull() && item.getProviderService().getLocationService().getServiceIsNotNull())
			component.setServiceID(item.getProviderService().getLocationService().getService().getID_Service());
		if (item.getActiveStatusIsNotNull() && item.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
			addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private void markUnmarkComponent(OrderSetForHelpTextVo item, boolean mark, boolean isChildComponent)//WDEV-16624
{
	if (item != null && item.getID_OrderSetIsNotNull())
	{
		SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
		component.setID(item.getID_OrderSet());
		component.setComponentType(SelectAndOrderComponentType.ORDERSET);
		component.setText(item.getName());
		component.setTooltip(escapeAmpersandInTooltip(item.getDescription()));
		component.setAssociatedInvestigations(getInvestigationsFromOrderSet(item));//WDEV-16624
		addRemoveSelection(component, mark, isChildComponent);
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
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 18
Project: AvoinApotti   File: SelectandOrderImpl.java   Source Code and License Vote up 4 votes
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
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 20
Project: openMAXIMS   File: SelectandOrderImpl.java   Source Code and License Vote up 4 votes
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
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 22
Project: openMAXIMS   File: SelectandOrderImpl.java   Source Code and License Vote up 4 votes
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 4 votes
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 24
Project: openmaxims-linux   File: SelectandOrderImpl.java   Source Code and License Vote up 4 votes
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}