Java Code Examples for ims.ocrr.vo.InvestShortVoCollection

The following are top voted examples for showing how to use ims.ocrr.vo.InvestShortVoCollection. 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 populateItemsAlreadySelected()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	InvestShortVoCollection profiles = new InvestShortVoCollection();
	
	for(int x = 0; x < form.grdComponents().getRows().size(); x++)
	{
		OrderSetComponentEditVo item = form.grdComponents().getRows().get(x).getValue();
		if(item != null)
		{
			if(item.getInvestigationIsNotNull() && item.getInvestigation().getInvestigationIndexIsNotNull())
			{
				if(item.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull() && item.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue())
					profiles.add(item.getInvestigation());
				else						
					investigations.add(item.getInvestigation());
			}
		}		
	}
	
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
	form.getGlobalContext().OCRR.setPreselectedProfiles(profiles);
	
}
 
Example 2
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateItemsAlreadySelected()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	InvestShortVoCollection profiles = new InvestShortVoCollection();
	
	for(int x = 0; x < form.grdComponents().getRows().size(); x++)
	{
		OrderSetComponentEditVo item = form.grdComponents().getRows().get(x).getValue();
		if(item != null)
		{
			if(item.getInvestigationIsNotNull() && item.getInvestigation().getInvestigationIndexIsNotNull())
			{
				if(item.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull() && item.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue())
					profiles.add(item.getInvestigation());
				else						
					investigations.add(item.getInvestigation());
			}
		}		
	}
	
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
	form.getGlobalContext().OCRR.setPreselectedProfiles(profiles);
	
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateItemsAlreadySelected()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	InvestShortVoCollection profiles = new InvestShortVoCollection();
	
	for(int x = 0; x < form.grdComponents().getRows().size(); x++)
	{
		OrderSetComponentEditVo item = form.grdComponents().getRows().get(x).getValue();
		if(item != null)
		{
			if(item.getInvestigationIsNotNull() && item.getInvestigation().getInvestigationIndexIsNotNull())
			{
				if(item.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull() && item.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue())
					profiles.add(item.getInvestigation());
				else						
					investigations.add(item.getInvestigation());
			}
		}		
	}
	
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
	form.getGlobalContext().OCRR.setPreselectedProfiles(profiles);
	
}
 
Example 4
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateItemsAlreadySelected()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	InvestShortVoCollection profiles = new InvestShortVoCollection();
	
	for(int x = 0; x < form.grdComponents().getRows().size(); x++)
	{
		OrderSetComponentEditVo item = form.grdComponents().getRows().get(x).getValue();
		if(item != null)
		{
			if(item.getInvestigationIsNotNull() && item.getInvestigation().getInvestigationIndexIsNotNull())
			{
				if(item.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull() && item.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue())
					profiles.add(item.getInvestigation());
				else						
					investigations.add(item.getInvestigation());
			}
		}		
	}
	
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
	form.getGlobalContext().OCRR.setPreselectedProfiles(profiles);
	
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateExistingLinkedTests()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	for (int x = 0; x < form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().size(); x++)
	{
		InvestShortVo item = form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().get(x).getValue();
		if (item != null)
		{
			if (item.getInvestigationIndexIsNotNull())
				investigations.add(item);
		}
	}
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void searchData()
{
	form.grdListedTests().getRows().clear();
	
	if(form.cmbCategory().getValue() == null && form.txtName().getValue() == null)
	{
		engine.showMessage("Please Enter Some Search Criteria");
		return;
	}
	
	if(form.getGlobalContext().OCRR.getItemSelectionTypeIsNotNull())
	{
		if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.INVESTIGATION) || form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE))
		{
			InvestShortVoCollection voColl = domain.listInvestigationsOrProfiles(
					form.cmbCategory().getValue(), 
					form.txtName().getValue(),
					form.getGlobalContext().OCRR.getProvider(), 
					form.getGlobalContext().OCRR.getProviderService(), 
					new Boolean(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE)),Boolean.TRUE, engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.TestEdit) || engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit), Boolean.TRUE, new Boolean(engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit)),null,null);
			populateSearchResults(voColl);
		}
		else if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.ORDERSET))
		{
			OrderSetShortVoCollection results = domain.listOrderSets(form.txtName().getValue());
			populateSearchResults(results);
		}
	}		
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSearchResults(InvestShortVoCollection searchResults)
{
	form.grdListedTests().getRows().clear();
	if(searchResults.size() == 0)
	{
		engine.showMessage("There are no Records for the Search Criteria Provided");
		return;
	}
	
	for(int x = 0; x < searchResults.size(); x++)
	{
		addToList(searchResults.get(x));			
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateExistingLinkedTests()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	for (int x = 0; x < form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().size(); x++)
	{
		InvestShortVo item = form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().get(x).getValue();
		if (item != null)
		{
			if (item.getInvestigationIndexIsNotNull())
				investigations.add(item);
		}
	}
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void searchData()
{
	form.grdListedTests().getRows().clear();
	
	if(form.cmbCategory().getValue() == null && form.txtName().getValue() == null)
	{
		engine.showMessage("Please Enter Some Search Criteria");
		return;
	}
	
	if(form.getGlobalContext().OCRR.getItemSelectionTypeIsNotNull())
	{
		if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.INVESTIGATION) || form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE))
		{
			InvestShortVoCollection voColl = domain.listInvestigationsOrProfiles(
					form.cmbCategory().getValue(), 
					form.txtName().getValue(),
					form.getGlobalContext().OCRR.getProvider(), 
					form.getGlobalContext().OCRR.getProviderService(), 
					new Boolean(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE)),Boolean.TRUE, engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.TestEdit) || engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit), Boolean.TRUE, new Boolean(engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit)),null,null);
			populateSearchResults(voColl);
		}
		else if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.ORDERSET))
		{
			OrderSetShortVoCollection results = domain.listOrderSets(form.txtName().getValue());
			populateSearchResults(results);
		}
	}		
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSearchResults(InvestShortVoCollection searchResults)
{
	form.grdListedTests().getRows().clear();
	if(searchResults.size() == 0)
	{
		engine.showMessage("There are no Records for the Search Criteria Provided");
		return;
	}
	
	for(int x = 0; x < searchResults.size(); x++)
	{
		addToList(searchResults.get(x));			
	}
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateExistingLinkedTests()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	for (int x = 0; x < form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().size(); x++)
	{
		InvestShortVo item = form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().get(x).getValue();
		if (item != null)
		{
			if (item.getInvestigationIndexIsNotNull())
				investigations.add(item);
		}
	}
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void searchData()
{
	form.grdListedTests().getRows().clear();
	
	if(form.cmbCategory().getValue() == null && form.txtName().getValue() == null)
	{
		engine.showMessage("Please Enter Some Search Criteria");
		return;
	}
	
	if(form.getGlobalContext().OCRR.getItemSelectionTypeIsNotNull())
	{
		if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.INVESTIGATION) || form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE))
		{
			InvestShortVoCollection voColl = domain.listInvestigationsOrProfiles(
					form.cmbCategory().getValue(), 
					form.txtName().getValue(),
					form.getGlobalContext().OCRR.getProvider(), 
					form.getGlobalContext().OCRR.getProviderService(), 
					new Boolean(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE)),Boolean.TRUE, engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.TestEdit) || engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit), Boolean.TRUE, new Boolean(engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit)),null,null);
			populateSearchResults(voColl);
		}
		else if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.ORDERSET))
		{
			OrderSetShortVoCollection results = domain.listOrderSets(form.txtName().getValue());
			populateSearchResults(results);
		}
	}		
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSearchResults(InvestShortVoCollection searchResults)
{
	form.grdListedTests().getRows().clear();
	if(searchResults.size() == 0)
	{
		engine.showMessage("There are no Records for the Search Criteria Provided");
		return;
	}
	
	for(int x = 0; x < searchResults.size(); x++)
	{
		addToList(searchResults.get(x));			
	}
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateExistingLinkedTests()
{
	InvestShortVoCollection investigations = new InvestShortVoCollection();
	for (int x = 0; x < form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().size(); x++)
	{
		InvestShortVo item = form.lyrInvestigations().tabLinkedInvestigations().grdTests().getRows().get(x).getValue();
		if (item != null)
		{
			if (item.getInvestigationIndexIsNotNull())
				investigations.add(item);
		}
	}
	form.getGlobalContext().OCRR.setPreselectedInvestigations(investigations);
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void searchData()
{
	form.grdListedTests().getRows().clear();
	
	if(form.cmbCategory().getValue() == null && form.txtName().getValue() == null)
	{
		engine.showMessage("Please Enter Some Search Criteria");
		return;
	}
	
	if(form.getGlobalContext().OCRR.getItemSelectionTypeIsNotNull())
	{
		if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.INVESTIGATION) || form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE))
		{
			InvestShortVoCollection voColl = domain.listInvestigationsOrProfiles(
					form.cmbCategory().getValue(), 
					form.txtName().getValue(),
					form.getGlobalContext().OCRR.getProvider(), 
					form.getGlobalContext().OCRR.getProviderService(), 
					new Boolean(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.PROFILE)),Boolean.TRUE, engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.TestEdit) || engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit), Boolean.TRUE, new Boolean(engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ProfileEdit)),null,null);
			populateSearchResults(voColl);
		}
		else if(form.getGlobalContext().OCRR.getItemSelectionType().equals(ItemSelectionType.ORDERSET))
		{
			OrderSetShortVoCollection results = domain.listOrderSets(form.txtName().getValue());
			populateSearchResults(results);
		}
	}		
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSearchResults(InvestShortVoCollection searchResults)
{
	form.grdListedTests().getRows().clear();
	if(searchResults.size() == 0)
	{
		engine.showMessage("There are no Records for the Search Criteria Provided");
		return;
	}
	
	for(int x = 0; x < searchResults.size(); x++)
	{
		addToList(searchResults.get(x));			
	}
}
 
Example 17
Project: AvoinApotti   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
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 18
Project: openMAXIMS   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
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: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
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 20
Project: openmaxims-linux   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
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;
}