Java Code Examples for ims.ocrr.vo.SelectedComponentFromSelectOrderVoCollection

The following are top voted examples for showing how to use ims.ocrr.vo.SelectedComponentFromSelectOrderVoCollection. 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 repopulateFromMyOrder() throws PresentationLogicException
{
	SelectedComponentFromSelectOrderVoCollection voCollSelectedComponents = new SelectedComponentFromSelectOrderVoCollection();

	MyOrderComponentVoCollection voCollMyOrderComponents = form.getGlobalContext().OCRR.getMyOrderComponents();
	if(voCollMyOrderComponents != null)
	{
		for (int i = 0; i < voCollMyOrderComponents.size(); i++)
		{
			voCollSelectedComponents.add(voCollMyOrderComponents.get(i));
			if (voCollMyOrderComponents.get(i).getComponentsIsNotNull())
			{
				for (int p = 0; p < voCollMyOrderComponents.get(i).getComponents().size(); p++)
					voCollSelectedComponents.add(voCollMyOrderComponents.get(i).getComponents().get(p));
			}
		}
	}

	form.getLocalContext().setSelectedComponents(voCollSelectedComponents);
	switchToPreviewView();
	switchToSearchView();
	form.treDetails().setValue(searchNodeValue);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectionIsEmpty()
{
	SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
	if (selection == null || selection.size() == 0)
		return true;

	for (int x = 0; x < selection.size(); x++)
	{
		SelectedComponentFromSelectOrderVo component = selection.get(x);
		if (component != null && component.getComponentTypeIsNotNull()
				&& component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
			return false;
	}

	return true;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return;
	
	for(int i = selectedComponents.size() - 1; i >= 0; i--)
	{
		SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);
		
		if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
			continue;
		
		if(!doesProfileHasInvestigationsSelected(selectedComponent))
		{
			selectedComponents.remove(selectedComponent);
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean doesProfileHasInvestigationsSelected(SelectedComponentFromSelectOrderVo profile) 
{
	if(profile == null)
		return true;
	
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return true;
	
	for(SelectedComponentFromSelectOrderVo selectedComponent : selectedComponents)
	{
		if(selectedComponent == null || selectedComponent.getParentInvestigationId() == null)
			continue;
		
		if(selectedComponent.getParentInvestigationId().equals(profile.getID()))
			return true;
	}
	
	return false;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void resetOrder() throws PresentationLogicException
{
	form.getLocalContext().setSelectedComponents(new SelectedComponentFromSelectOrderVoCollection());	
	form.getGlobalContext().OCRR.setGenderInvestigations(null);//WDEV-16762
	form.getGlobalContext().OCRR.setRefusedInvestigation(null);// 	WDEV-16762
	form.getLocalContext().setBreachedInvestigations(null);// 	WDEV-16762
	clearAnalyzedChildComponents();

	
	if (isTemplateNodeSelected())
		populateTemplateIfSelected();

	if (isSearchNodeSelected())
		new OrderEntryTemplatePopulation(form.lyrTemplates().tabSearch().dyngrdSearch(), form.getImages().OCRR.Investigation, form.getImages().OCRR.Profile, form.getImages().OCRR.OrderSet).populateSearch(form.getLocalContext().getLastSearchResults(), new SelectedComponentFromSelectOrderVoCollection(), new SelectedComponentFromSelectOrderVoCollection());

	if (isPreviewNodeSelected())
		populateMyOrderPreview();

	addRemoveOrderRelatedNodes();
	//WDEV-17035
	updateControlsState();
	

}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void repopulateFromMyOrder() throws PresentationLogicException
{
	SelectedComponentFromSelectOrderVoCollection voCollSelectedComponents = new SelectedComponentFromSelectOrderVoCollection();

	MyOrderComponentVoCollection voCollMyOrderComponents = form.getGlobalContext().OCRR.getMyOrderComponents();
	if(voCollMyOrderComponents != null)
	{
		for (int i = 0; i < voCollMyOrderComponents.size(); i++)
		{
			voCollSelectedComponents.add(voCollMyOrderComponents.get(i));
			if (voCollMyOrderComponents.get(i).getComponentsIsNotNull())
			{
				for (int p = 0; p < voCollMyOrderComponents.get(i).getComponents().size(); p++)
					voCollSelectedComponents.add(voCollMyOrderComponents.get(i).getComponents().get(p));
			}
		}
	}

	form.getLocalContext().setSelectedComponents(voCollSelectedComponents);
	switchToPreviewView();
	switchToSearchView();
	form.treDetails().setValue(searchNodeValue);
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectionIsEmpty()
{
	SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
	if (selection == null || selection.size() == 0)
		return true;

	for (int x = 0; x < selection.size(); x++)
	{
		SelectedComponentFromSelectOrderVo component = selection.get(x);
		if (component != null && component.getComponentTypeIsNotNull()
				&& component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
			return false;
	}

	return true;
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return;
	
	for(int i = selectedComponents.size() - 1; i >= 0; i--)
	{
		SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);
		
		if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
			continue;
		
		if(!doesProfileHasInvestigationsSelected(selectedComponent))
		{
			selectedComponents.remove(selectedComponent);
		}
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean doesProfileHasInvestigationsSelected(SelectedComponentFromSelectOrderVo profile) 
{
	if(profile == null)
		return true;
	
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return true;
	
	for(SelectedComponentFromSelectOrderVo selectedComponent : selectedComponents)
	{
		if(selectedComponent == null || selectedComponent.getParentInvestigationId() == null)
			continue;
		
		if(selectedComponent.getParentInvestigationId().equals(profile.getID()))
			return true;
	}
	
	return false;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void resetOrder() throws PresentationLogicException
{
	form.getLocalContext().setSelectedComponents(new SelectedComponentFromSelectOrderVoCollection());	
	form.getGlobalContext().OCRR.setGenderInvestigations(null);//WDEV-16762
	form.getGlobalContext().OCRR.setRefusedInvestigation(null);// 	WDEV-16762
	form.getLocalContext().setBreachedInvestigations(null);// 	WDEV-16762
	clearAnalyzedChildComponents();

	
	if (isTemplateNodeSelected())
		populateTemplateIfSelected();

	if (isSearchNodeSelected())
		new OrderEntryTemplatePopulation(form.lyrTemplates().tabSearch().dyngrdSearch(), form.getImages().OCRR.Investigation, form.getImages().OCRR.Profile, form.getImages().OCRR.OrderSet).populateSearch(form.getLocalContext().getLastSearchResults(), new SelectedComponentFromSelectOrderVoCollection(), new SelectedComponentFromSelectOrderVoCollection());

	if (isPreviewNodeSelected())
		populateMyOrderPreview();

	addRemoveOrderRelatedNodes();
	//WDEV-17035
	updateControlsState();
	

}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void repopulateFromMyOrder() throws PresentationLogicException
{
	SelectedComponentFromSelectOrderVoCollection voCollSelectedComponents = new SelectedComponentFromSelectOrderVoCollection();

	MyOrderComponentVoCollection voCollMyOrderComponents = form.getGlobalContext().OCRR.getMyOrderComponents();
	if(voCollMyOrderComponents != null)
	{
		for (int i = 0; i < voCollMyOrderComponents.size(); i++)
		{
			voCollSelectedComponents.add(voCollMyOrderComponents.get(i));
			if (voCollMyOrderComponents.get(i).getComponentsIsNotNull())
			{
				for (int p = 0; p < voCollMyOrderComponents.get(i).getComponents().size(); p++)
					voCollSelectedComponents.add(voCollMyOrderComponents.get(i).getComponents().get(p));
			}
		}
	}

	form.getLocalContext().setSelectedComponents(voCollSelectedComponents);
	switchToPreviewView();
	switchToSearchView();
	form.treDetails().setValue(searchNodeValue);
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectionIsEmpty()
{
	SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
	if (selection == null || selection.size() == 0)
		return true;

	for (int x = 0; x < selection.size(); x++)
	{
		SelectedComponentFromSelectOrderVo component = selection.get(x);
		if (component != null && component.getComponentTypeIsNotNull()
				&& component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
			return false;
	}

	return true;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return;
	
	for(int i = selectedComponents.size() - 1; i >= 0; i--)
	{
		SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);
		
		if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
			continue;
		
		if(!doesProfileHasInvestigationsSelected(selectedComponent))
		{
			selectedComponents.remove(selectedComponent);
		}
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean doesProfileHasInvestigationsSelected(SelectedComponentFromSelectOrderVo profile) 
{
	if(profile == null)
		return true;
	
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return true;
	
	for(SelectedComponentFromSelectOrderVo selectedComponent : selectedComponents)
	{
		if(selectedComponent == null || selectedComponent.getParentInvestigationId() == null)
			continue;
		
		if(selectedComponent.getParentInvestigationId().equals(profile.getID()))
			return true;
	}
	
	return false;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void resetOrder() throws PresentationLogicException
{
	form.getLocalContext().setSelectedComponents(new SelectedComponentFromSelectOrderVoCollection());	
	form.getGlobalContext().OCRR.setGenderInvestigations(null);//WDEV-16762
	form.getGlobalContext().OCRR.setRefusedInvestigation(null);// 	WDEV-16762
	form.getLocalContext().setBreachedInvestigations(null);// 	WDEV-16762
	clearAnalyzedChildComponents();

	
	if (isTemplateNodeSelected())
		populateTemplateIfSelected();

	if (isSearchNodeSelected())
		new OrderEntryTemplatePopulation(form.lyrTemplates().tabSearch().dyngrdSearch(), form.getImages().OCRR.Investigation, form.getImages().OCRR.Profile, form.getImages().OCRR.OrderSet).populateSearch(form.getLocalContext().getLastSearchResults(), new SelectedComponentFromSelectOrderVoCollection(), new SelectedComponentFromSelectOrderVoCollection());

	if (isPreviewNodeSelected())
		populateMyOrderPreview();

	addRemoveOrderRelatedNodes();
	//WDEV-17035
	updateControlsState();
	

}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void repopulateFromMyOrder() throws PresentationLogicException
{
	SelectedComponentFromSelectOrderVoCollection voCollSelectedComponents = new SelectedComponentFromSelectOrderVoCollection();

	MyOrderComponentVoCollection voCollMyOrderComponents = form.getGlobalContext().OCRR.getMyOrderComponents();
	if(voCollMyOrderComponents != null)
	{
		for (int i = 0; i < voCollMyOrderComponents.size(); i++)
		{
			voCollSelectedComponents.add(voCollMyOrderComponents.get(i));
			if (voCollMyOrderComponents.get(i).getComponentsIsNotNull())
			{
				for (int p = 0; p < voCollMyOrderComponents.get(i).getComponents().size(); p++)
					voCollSelectedComponents.add(voCollMyOrderComponents.get(i).getComponents().get(p));
			}
		}
	}

	form.getLocalContext().setSelectedComponents(voCollSelectedComponents);
	switchToPreviewView();
	switchToSearchView();
	form.treDetails().setValue(searchNodeValue);
}
 
Example 17
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectionIsEmpty()
{
	SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
	if (selection == null || selection.size() == 0)
		return true;

	for (int x = 0; x < selection.size(); x++)
	{
		SelectedComponentFromSelectOrderVo component = selection.get(x);
		if (component != null && component.getComponentTypeIsNotNull()
				&& component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
			return false;
	}

	return true;
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return;
	
	for(int i = selectedComponents.size() - 1; i >= 0; i--)
	{
		SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);
		
		if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
			continue;
		
		if(!doesProfileHasInvestigationsSelected(selectedComponent))
		{
			selectedComponents.remove(selectedComponent);
		}
	}
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean doesProfileHasInvestigationsSelected(SelectedComponentFromSelectOrderVo profile) 
{
	if(profile == null)
		return true;
	
	SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();
	
	if(selectedComponents == null || selectedComponents.size() == 0)
		return true;
	
	for(SelectedComponentFromSelectOrderVo selectedComponent : selectedComponents)
	{
		if(selectedComponent == null || selectedComponent.getParentInvestigationId() == null)
			continue;
		
		if(selectedComponent.getParentInvestigationId().equals(profile.getID()))
			return true;
	}
	
	return false;
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void resetOrder() throws PresentationLogicException
{
	form.getLocalContext().setSelectedComponents(new SelectedComponentFromSelectOrderVoCollection());	
	form.getGlobalContext().OCRR.setGenderInvestigations(null);//WDEV-16762
	form.getGlobalContext().OCRR.setRefusedInvestigation(null);// 	WDEV-16762
	form.getLocalContext().setBreachedInvestigations(null);// 	WDEV-16762
	clearAnalyzedChildComponents();

	
	if (isTemplateNodeSelected())
		populateTemplateIfSelected();

	if (isSearchNodeSelected())
		new OrderEntryTemplatePopulation(form.lyrTemplates().tabSearch().dyngrdSearch(), form.getImages().OCRR.Investigation, form.getImages().OCRR.Profile, form.getImages().OCRR.OrderSet).populateSearch(form.getLocalContext().getLastSearchResults(), new SelectedComponentFromSelectOrderVoCollection(), new SelectedComponentFromSelectOrderVoCollection());

	if (isPreviewNodeSelected())
		populateMyOrderPreview();

	addRemoveOrderRelatedNodes();
	//WDEV-17035
	updateControlsState();
	

}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private SelectedComponentFromSelectOrderVoCollection getChildInvestigationsForProfile(SelectedComponentFromSelectOrderVo profile)
{
	if (profile == null)
		return new SelectedComponentFromSelectOrderVoCollection();

	clearAnalyzedChildComponents();
	analyzeProfile(domain.getChildComponentsForInvestigationOrProfile(profile.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels()));
	return form.getLocalContext().getAnalyzedChildComponent();
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean wasAnalyzed(SelectedComponentFromSelectOrderVo component)
{
	SelectedComponentFromSelectOrderVoCollection analyzed = form.getLocalContext().getAnalyzedChildComponent();
	if (analyzed == null)
		return false;
	return analyzed.contains(component);
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkIfTemplatesNeedUnchecked(SelectedComponentFromSelectOrderVoCollection selectedComponents, SelectedComponentFromSelectOrderVoCollection selectedLinkedComponents)
{
	if (selectedComponents == null || selectedLinkedComponents == null)
	{
		return;
	}
	
	Boolean exists;

	for (int a = 0; a < selectedComponents.size(); a++)
	{
		exists = Boolean.FALSE;
		
		if (SelectAndOrderComponentType.ORDERSET.equals(selectedComponents.get(a).getComponentType()))
		{
			ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(selectedComponents.get(a).getID(), form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			
			for (int b = 0; b < selectedLinkedComponents.size(); b++)
			{
				for (int c = 0; c < childComponents.size(); c++)
				{
					if (selectedLinkedComponents.get(b).getID().equals(childComponents.get(c).getInvestigation().getID_Investigation()))
					{
						exists = Boolean.TRUE;
						break;
					}
				}

				if (exists)
					break;
			}

			if (!exists)
			{
				selectedComponents.remove(selectedComponents.get(a));
			}
		}
	}
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void unselectComponent(SelectedComponentFromSelectOrderVo component, boolean markAsUnselected)
{
	if (component == null)
		return;

	SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
	
	if (selection.contains(component))
	{
		selection.remove(component);
		form.getLocalContext().setSelectedComponents(selection);			
	}
	
	checkIfTemplatesNeedUnchecked(selection, form.getLocalContext().getSelectedComponents()); //WDEV-16908
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private CategoryCollection getCategories(SelectedComponentFromSelectOrderVoCollection voColl)
{
	CategoryCollection coll = new CategoryCollection();
	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		if(voColl.get(i).getCategoryIsNotNull())
			coll.add(voColl.get(i).getCategory());
	}
	
	return coll;
}
 
Example 26
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 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private SelectedComponentFromSelectOrderVoCollection getChildInvestigationsForProfile(SelectedComponentFromSelectOrderVo profile)
{
	if (profile == null)
		return new SelectedComponentFromSelectOrderVoCollection();

	clearAnalyzedChildComponents();
	analyzeProfile(domain.getChildComponentsForInvestigationOrProfile(profile.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels()));
	return form.getLocalContext().getAnalyzedChildComponent();
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean wasAnalyzed(SelectedComponentFromSelectOrderVo component)
{
	SelectedComponentFromSelectOrderVoCollection analyzed = form.getLocalContext().getAnalyzedChildComponent();
	if (analyzed == null)
		return false;
	return analyzed.contains(component);
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkIfTemplatesNeedUnchecked(SelectedComponentFromSelectOrderVoCollection selectedComponents, SelectedComponentFromSelectOrderVoCollection selectedLinkedComponents)
{
	if (selectedComponents == null || selectedLinkedComponents == null)
	{
		return;
	}
	
	Boolean exists;

	for (int a = 0; a < selectedComponents.size(); a++)
	{
		exists = Boolean.FALSE;
		
		if (SelectAndOrderComponentType.ORDERSET.equals(selectedComponents.get(a).getComponentType()))
		{
			ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(selectedComponents.get(a).getID(), form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			
			for (int b = 0; b < selectedLinkedComponents.size(); b++)
			{
				for (int c = 0; c < childComponents.size(); c++)
				{
					if (selectedLinkedComponents.get(b).getID().equals(childComponents.get(c).getInvestigation().getID_Investigation()))
					{
						exists = Boolean.TRUE;
						break;
					}
				}

				if (exists)
					break;
			}

			if (!exists)
			{
				selectedComponents.remove(selectedComponents.get(a));
			}
		}
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void unselectComponent(SelectedComponentFromSelectOrderVo component, boolean markAsUnselected)
{
	if (component == null)
		return;

	SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
	
	if (selection.contains(component))
	{
		selection.remove(component);
		form.getLocalContext().setSelectedComponents(selection);			
	}
	
	checkIfTemplatesNeedUnchecked(selection, form.getLocalContext().getSelectedComponents()); //WDEV-16908
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private CategoryCollection getCategories(SelectedComponentFromSelectOrderVoCollection voColl)
{
	CategoryCollection coll = new CategoryCollection();
	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		if(voColl.get(i).getCategoryIsNotNull())
			coll.add(voColl.get(i).getCategory());
	}
	
	return coll;
}
 
Example 32
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 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private SelectedComponentFromSelectOrderVoCollection getChildInvestigationsForProfile(SelectedComponentFromSelectOrderVo profile)
{
	if (profile == null)
		return new SelectedComponentFromSelectOrderVoCollection();

	clearAnalyzedChildComponents();
	analyzeProfile(domain.getChildComponentsForInvestigationOrProfile(profile.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels()));
	return form.getLocalContext().getAnalyzedChildComponent();
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean wasAnalyzed(SelectedComponentFromSelectOrderVo component)
{
	SelectedComponentFromSelectOrderVoCollection analyzed = form.getLocalContext().getAnalyzedChildComponent();
	if (analyzed == null)
		return false;
	return analyzed.contains(component);
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkIfTemplatesNeedUnchecked(SelectedComponentFromSelectOrderVoCollection selectedComponents, SelectedComponentFromSelectOrderVoCollection selectedLinkedComponents)
{
	if (selectedComponents == null || selectedLinkedComponents == null)
	{
		return;
	}
	
	Boolean exists;

	for (int a = 0; a < selectedComponents.size(); a++)
	{
		exists = Boolean.FALSE;
		
		if (SelectAndOrderComponentType.ORDERSET.equals(selectedComponents.get(a).getComponentType()))
		{
			ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(selectedComponents.get(a).getID(), form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
			
			for (int b = 0; b < selectedLinkedComponents.size(); b++)
			{
				for (int c = 0; c < childComponents.size(); c++)
				{
					if (selectedLinkedComponents.get(b).getID().equals(childComponents.get(c).getInvestigation().getID_Investigation()))
					{
						exists = Boolean.TRUE;
						break;
					}
				}

				if (exists)
					break;
			}

			if (!exists)
			{
				selectedComponents.remove(selectedComponents.get(a));
			}
		}
	}
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void unselectComponent(SelectedComponentFromSelectOrderVo component, boolean markAsUnselected)
{
	if (component == null)
		return;

	SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
	
	if (selection.contains(component))
	{
		selection.remove(component);
		form.getLocalContext().setSelectedComponents(selection);			
	}
	
	checkIfTemplatesNeedUnchecked(selection, form.getLocalContext().getSelectedComponents()); //WDEV-16908
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private CategoryCollection getCategories(SelectedComponentFromSelectOrderVoCollection voColl)
{
	CategoryCollection coll = new CategoryCollection();
	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		if(voColl.get(i).getCategoryIsNotNull())
			coll.add(voColl.get(i).getCategory());
	}
	
	return coll;
}
 
Example 38
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 39
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private SelectedComponentFromSelectOrderVoCollection getChildInvestigationsForProfile(SelectedComponentFromSelectOrderVo profile)
{
	if (profile == null)
		return new SelectedComponentFromSelectOrderVoCollection();

	clearAnalyzedChildComponents();
	analyzeProfile(domain.getChildComponentsForInvestigationOrProfile(profile.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels()));
	return form.getLocalContext().getAnalyzedChildComponent();
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean wasAnalyzed(SelectedComponentFromSelectOrderVo component)
{
	SelectedComponentFromSelectOrderVoCollection analyzed = form.getLocalContext().getAnalyzedChildComponent();
	if (analyzed == null)
		return false;
	return analyzed.contains(component);
}