Java Code Examples for ims.ocrr.vo.SelectedComponentFromSelectOrderVo

The following are top voted examples for showing how to use ims.ocrr.vo.SelectedComponentFromSelectOrderVo. 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 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 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private MyOrderComponentVo addComponentToTree(TreeNode node, SelectedComponentFromSelectOrderVo component, Image image)
{
	node.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	node.setCollapsedImage(image);

	MyOrderComponentVo orderComponent = new MyOrderComponentVo();
	orderComponent.setID(component.getID());
	orderComponent.setComponentType(component.getComponentType());
	orderComponent.setText(component.getText());
	orderComponent.setCategory(component.getCategory());
	orderComponent.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	orderComponent.setParentInvestigationId(component.getParentInvestigationId());
	orderComponent.setIsAddon(component.getIsAddon());
	orderComponent.setRequiresSite(component.getRequiresSite());
	orderComponent.setServiceID(component.getServiceID());
	orderComponent.setMinReOrderPeriod(component.getMinReOrderPeriod());
	orderComponent.setMinReOrderVal(component.getMinReOrderVal());
	orderComponent.setMinReOrderFemalePeriod(component.getMinReOrderFemalePeriod());
	orderComponent.setMinReOrderFemaleVal(component.getMinReOrderFemaleVal());
	orderComponent.setPhlebMayCollect(component.getPhlebMayCollect());
	orderComponent.setGenderSpecific(component.getGenderSpecific());
	orderComponent.setReOrderReason(component.getReOrderReason());//WDEV-16624

	return orderComponent;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
	if(component == null)
		return null;
	
	GenderInvestigationVo inv = new GenderInvestigationVo();
	inv.setID_Investigation(component.getID());
	
	InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
	invIndex.setName(component.getText());
	invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));
	
	inv.setInvestigationIndex(invIndex);
	
	return inv;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 5
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 6
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 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 8
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 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private MyOrderComponentVo addComponentToTree(TreeNode node, SelectedComponentFromSelectOrderVo component, Image image)
{
	node.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	node.setCollapsedImage(image);

	MyOrderComponentVo orderComponent = new MyOrderComponentVo();
	orderComponent.setID(component.getID());
	orderComponent.setComponentType(component.getComponentType());
	orderComponent.setText(component.getText());
	orderComponent.setCategory(component.getCategory());
	orderComponent.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	orderComponent.setParentInvestigationId(component.getParentInvestigationId());
	orderComponent.setIsAddon(component.getIsAddon());
	orderComponent.setRequiresSite(component.getRequiresSite());
	orderComponent.setServiceID(component.getServiceID());
	orderComponent.setMinReOrderPeriod(component.getMinReOrderPeriod());
	orderComponent.setMinReOrderVal(component.getMinReOrderVal());
	orderComponent.setMinReOrderFemalePeriod(component.getMinReOrderFemalePeriod());
	orderComponent.setMinReOrderFemaleVal(component.getMinReOrderFemaleVal());
	orderComponent.setPhlebMayCollect(component.getPhlebMayCollect());
	orderComponent.setGenderSpecific(component.getGenderSpecific());
	orderComponent.setReOrderReason(component.getReOrderReason());//WDEV-16624

	return orderComponent;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
	if(component == null)
		return null;
	
	GenderInvestigationVo inv = new GenderInvestigationVo();
	inv.setID_Investigation(component.getID());
	
	InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
	invIndex.setName(component.getText());
	invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));
	
	inv.setInvestigationIndex(invIndex);
	
	return inv;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 12
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 13
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 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 15
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 16
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private MyOrderComponentVo addComponentToTree(TreeNode node, SelectedComponentFromSelectOrderVo component, Image image)
{
	node.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	node.setCollapsedImage(image);

	MyOrderComponentVo orderComponent = new MyOrderComponentVo();
	orderComponent.setID(component.getID());
	orderComponent.setComponentType(component.getComponentType());
	orderComponent.setText(component.getText());
	orderComponent.setCategory(component.getCategory());
	orderComponent.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	orderComponent.setParentInvestigationId(component.getParentInvestigationId());
	orderComponent.setIsAddon(component.getIsAddon());
	orderComponent.setRequiresSite(component.getRequiresSite());
	orderComponent.setServiceID(component.getServiceID());
	orderComponent.setMinReOrderPeriod(component.getMinReOrderPeriod());
	orderComponent.setMinReOrderVal(component.getMinReOrderVal());
	orderComponent.setMinReOrderFemalePeriod(component.getMinReOrderFemalePeriod());
	orderComponent.setMinReOrderFemaleVal(component.getMinReOrderFemaleVal());
	orderComponent.setPhlebMayCollect(component.getPhlebMayCollect());
	orderComponent.setGenderSpecific(component.getGenderSpecific());
	orderComponent.setReOrderReason(component.getReOrderReason());//WDEV-16624

	return orderComponent;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
	if(component == null)
		return null;
	
	GenderInvestigationVo inv = new GenderInvestigationVo();
	inv.setID_Investigation(component.getID());
	
	InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
	invIndex.setName(component.getText());
	invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));
	
	inv.setInvestigationIndex(invIndex);
	
	return inv;
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private 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 20
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 21
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 22
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 23
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private MyOrderComponentVo addComponentToTree(TreeNode node, SelectedComponentFromSelectOrderVo component, Image image)
{
	node.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	node.setCollapsedImage(image);

	MyOrderComponentVo orderComponent = new MyOrderComponentVo();
	orderComponent.setID(component.getID());
	orderComponent.setComponentType(component.getComponentType());
	orderComponent.setText(component.getText());
	orderComponent.setCategory(component.getCategory());
	orderComponent.setTooltip(escapeAmpersandInTooltip(component.getTooltip()));
	orderComponent.setParentInvestigationId(component.getParentInvestigationId());
	orderComponent.setIsAddon(component.getIsAddon());
	orderComponent.setRequiresSite(component.getRequiresSite());
	orderComponent.setServiceID(component.getServiceID());
	orderComponent.setMinReOrderPeriod(component.getMinReOrderPeriod());
	orderComponent.setMinReOrderVal(component.getMinReOrderVal());
	orderComponent.setMinReOrderFemalePeriod(component.getMinReOrderFemalePeriod());
	orderComponent.setMinReOrderFemaleVal(component.getMinReOrderFemaleVal());
	orderComponent.setPhlebMayCollect(component.getPhlebMayCollect());
	orderComponent.setGenderSpecific(component.getGenderSpecific());
	orderComponent.setReOrderReason(component.getReOrderReason());//WDEV-16624

	return orderComponent;
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
	if(component == null)
		return null;
	
	GenderInvestigationVo inv = new GenderInvestigationVo();
	inv.setID_Investigation(component.getID());
	
	InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
	invIndex.setName(component.getText());
	invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));
	
	inv.setInvestigationIndex(invIndex);
	
	return inv;
}
 
Example 25
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
	{
		removeComponentFromRefusedInvestigations(newComponent.getID());
	}
	
	if(newComponent.getAssociatedInvestigations() != null)
	{
		for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
		{
			InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
			if(invId == null)
				continue;
				
			removeComponentFromRefusedInvestigations(invId.getID_Investigation());
		}
	}
}
 
Example 26
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 27
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 28
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
		return false;
	
	if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))// 	WDEV-16762
		return false;
	
	for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
	{
		if(refusedInv == null || refusedInv.getID_Investigation() == null)
			continue;
		
		if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
			return true;
	}
	
	return false;
}
 
Example 29
Project: 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 30
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void processSearchComponentSelection(DynamicGridCell cell)
{
	if (cell.getType().getID() == DynamicCellType.BOOL.getID())
	{
		DynamicGrid grid = form.lyrTemplates().tabSearch().dyngrdSearch();
		int columnIndex = grid.getColumns().indexOf(cell.getColumn());
		DynamicGridColumn valueColumn = grid.getColumns().get(columnIndex + 2);
		Object value = cell.getRow().getCells().get(valueColumn).getIdentifier();

		if (value != null && value instanceof SelectedComponentFromSelectOrderVo)
		{
			SelectedComponentFromSelectOrderVo component = (SelectedComponentFromSelectOrderVo) value;
			form.getLocalContext().setSelectedCell(null);
			form.getLocalContext().setSelectedGrid(null);
			if (((Boolean) cell.getValue()).booleanValue())
			{
				if(validateSelectionHasLaunchedConfirmationDialog(cell, component))
					return;
			}

			doSelection(cell, component);
		}

		populateSearch();
		addRemoveOrderRelatedNodes();
	}
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private GenderInvestigationVoCollection isInvAppropriateFromComponent(GenderSpecific instGenderSpecific, boolean isFemale, SelectedComponentFromSelectOrderVo component) 
{
	GenderInvestigationVoCollection invColl = new GenderInvestigationVoCollection();
	
	if (instGenderSpecific != null)
	{
		if (!instGenderSpecific.equals(GenderSpecific.NOTAPPLICABLE))
		{
			if (instGenderSpecific.equals(GenderSpecific.FEMALE))
			{
				if (!isFemale)
				{
					invColl.add(getGenderInvestigationFromSelectedComponentFromSelectOrder(component));
				}
			}
			else if (instGenderSpecific.equals(GenderSpecific.MALE))
			{
				if (isFemale)
				{
					invColl.add(getGenderInvestigationFromSelectedComponentFromSelectOrder(component));
				}
			}
		}
	}
	
	return invColl.size() > 0 ? invColl : null;
}
 
Example 32
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
	addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

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

		clearAnalyzedChildComponents();
		markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
		clearAnalyzedChildComponents();
	}
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	return wasAnalyzed(component);
}
 
Example 34
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 35
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	markAsAnalyzed(component);
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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 37
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
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 38
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void removeFromBreachedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getLocalContext().getBreachedInvestigations() == null || form.getLocalContext().getBreachedInvestigations().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()))
	{
		removeComponentFromBreachedInvestigations(newComponent.getID());// 	WDEV-16762
	}
	else
	{
		if(newComponent.getAssociatedInvestigations() != null)
		{
			for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
			{
				InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
				if(invId == null)
					continue;
				
				removeComponentFromBreachedInvestigations(invId.getID_Investigation());// 	WDEV-16762
			}
		}
	}
}
 
Example 39
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 40
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(SelectedComponentFromSelectOrderVo o1, SelectedComponentFromSelectOrderVo o2)
{
	if(o1 != null && o1.getTextIsNotNull() && o2 != null && o2.getTextIsNotNull())
			return order*o1.getText().compareToIgnoreCase(o2.getText());
	
	if (o1 == null || !o1.getTextIsNotNull())
		return -1 * order;
	
	if (o2 == null || !o2.getTextIsNotNull())
		return order;
	
	return 0;
}
 
Example 41
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateControlsState()
{
	form.lyrTemplates().tabPreview().btnContinue().setEnabled(!selectionIsEmpty());
	form.getContextMenus().getOCRRSelectAndOrderREMOVEItem().setVisible((form.treDetails().getSelectedNode() != null && previewNodeValue.equals(form.treDetails().getSelectedNode().getValue().toString()) || (form.treDetails().getSelectedNode() != null && form.treDetails().getSelectedNode().getValue() instanceof SelectedComponentFromSelectOrderVo))|| form.lyrTemplates().tabPreview().lyrPreview().tabItems().trePreview().getSelectedNode() != null);
	if (form.getContextMenus().getOCRRSelectAndOrderREMOVEItem().isVisible())
	{	
		form.getContextMenus().getOCRRSelectAndOrderREMOVEItem().setEnabled(Boolean.TRUE.equals(form.lyrTemplates().tabPreview().lyrPreview().tabItems().trePreview().getSelectedNode() != null || form.treDetails().getSelectedNode().getValue() instanceof SelectedComponentFromSelectOrderVo)); // != null && form.treDetails().getSelectedNode().getParent() != null && previewNodeValue.equals(form.treDetails().getSelectedNode().getParent().getValue().toString())));
		
	}
}
 
Example 42
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 43
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void processSearchComponentSelection(DynamicGridCell cell)
{
	if (cell.getType().getID() == DynamicCellType.BOOL.getID())
	{
		DynamicGrid grid = form.lyrTemplates().tabSearch().dyngrdSearch();
		int columnIndex = grid.getColumns().indexOf(cell.getColumn());
		DynamicGridColumn valueColumn = grid.getColumns().get(columnIndex + 2);
		Object value = cell.getRow().getCells().get(valueColumn).getIdentifier();

		if (value != null && value instanceof SelectedComponentFromSelectOrderVo)
		{
			SelectedComponentFromSelectOrderVo component = (SelectedComponentFromSelectOrderVo) value;
			form.getLocalContext().setSelectedCell(null);
			form.getLocalContext().setSelectedGrid(null);
			if (((Boolean) cell.getValue()).booleanValue())
			{
				if(validateSelectionHasLaunchedConfirmationDialog(cell, component))
					return;
			}

			doSelection(cell, component);
		}

		populateSearch();
		addRemoveOrderRelatedNodes();
	}
}
 
Example 44
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private GenderInvestigationVoCollection isInvAppropriateFromComponent(GenderSpecific instGenderSpecific, boolean isFemale, SelectedComponentFromSelectOrderVo component) 
{
	GenderInvestigationVoCollection invColl = new GenderInvestigationVoCollection();
	
	if (instGenderSpecific != null)
	{
		if (!instGenderSpecific.equals(GenderSpecific.NOTAPPLICABLE))
		{
			if (instGenderSpecific.equals(GenderSpecific.FEMALE))
			{
				if (!isFemale)
				{
					invColl.add(getGenderInvestigationFromSelectedComponentFromSelectOrder(component));
				}
			}
			else if (instGenderSpecific.equals(GenderSpecific.MALE))
			{
				if (isFemale)
				{
					invColl.add(getGenderInvestigationFromSelectedComponentFromSelectOrder(component));
				}
			}
		}
	}
	
	return invColl.size() > 0 ? invColl : null;
}
 
Example 45
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
	addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

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

		clearAnalyzedChildComponents();
		markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
		clearAnalyzedChildComponents();
	}
}
 
Example 46
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	return wasAnalyzed(component);
}
 
Example 47
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 48
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	markAsAnalyzed(component);
}
 
Example 49
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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 50
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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 51
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void removeFromBreachedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
	if(newComponent == null)
		return;
	
	if(form.getLocalContext().getBreachedInvestigations() == null || form.getLocalContext().getBreachedInvestigations().size() == 0)
		return;
	
	if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()))
	{
		removeComponentFromBreachedInvestigations(newComponent.getID());// 	WDEV-16762
	}
	else
	{
		if(newComponent.getAssociatedInvestigations() != null)
		{
			for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
			{
				InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);
				
				if(invId == null)
					continue;
				
				removeComponentFromBreachedInvestigations(invId.getID_Investigation());// 	WDEV-16762
			}
		}
	}
}
 
Example 52
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 53
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(SelectedComponentFromSelectOrderVo o1, SelectedComponentFromSelectOrderVo o2)
{
	if(o1 != null && o1.getTextIsNotNull() && o2 != null && o2.getTextIsNotNull())
			return order*o1.getText().compareToIgnoreCase(o2.getText());
	
	if (o1 == null || !o1.getTextIsNotNull())
		return -1 * order;
	
	if (o2 == null || !o2.getTextIsNotNull())
		return order;
	
	return 0;
}
 
Example 54
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateControlsState()
{
	form.lyrTemplates().tabPreview().btnContinue().setEnabled(!selectionIsEmpty());
	form.getContextMenus().getOCRRSelectAndOrderREMOVEItem().setVisible((form.treDetails().getSelectedNode() != null && previewNodeValue.equals(form.treDetails().getSelectedNode().getValue().toString()) || (form.treDetails().getSelectedNode() != null && form.treDetails().getSelectedNode().getValue() instanceof SelectedComponentFromSelectOrderVo))|| form.lyrTemplates().tabPreview().lyrPreview().tabItems().trePreview().getSelectedNode() != null);
	if (form.getContextMenus().getOCRRSelectAndOrderREMOVEItem().isVisible())
	{	
		form.getContextMenus().getOCRRSelectAndOrderREMOVEItem().setEnabled(Boolean.TRUE.equals(form.lyrTemplates().tabPreview().lyrPreview().tabItems().trePreview().getSelectedNode() != null || form.treDetails().getSelectedNode().getValue() instanceof SelectedComponentFromSelectOrderVo)); // != null && form.treDetails().getSelectedNode().getParent() != null && previewNodeValue.equals(form.treDetails().getSelectedNode().getParent().getValue().toString())));
		
	}
}
 
Example 55
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 56
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void processSearchComponentSelection(DynamicGridCell cell)
{
	if (cell.getType().getID() == DynamicCellType.BOOL.getID())
	{
		DynamicGrid grid = form.lyrTemplates().tabSearch().dyngrdSearch();
		int columnIndex = grid.getColumns().indexOf(cell.getColumn());
		DynamicGridColumn valueColumn = grid.getColumns().get(columnIndex + 2);
		Object value = cell.getRow().getCells().get(valueColumn).getIdentifier();

		if (value != null && value instanceof SelectedComponentFromSelectOrderVo)
		{
			SelectedComponentFromSelectOrderVo component = (SelectedComponentFromSelectOrderVo) value;
			form.getLocalContext().setSelectedCell(null);
			form.getLocalContext().setSelectedGrid(null);
			if (((Boolean) cell.getValue()).booleanValue())
			{
				if(validateSelectionHasLaunchedConfirmationDialog(cell, component))
					return;
			}

			doSelection(cell, component);
		}

		populateSearch();
		addRemoveOrderRelatedNodes();
	}
}
 
Example 57
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private GenderInvestigationVoCollection isInvAppropriateFromComponent(GenderSpecific instGenderSpecific, boolean isFemale, SelectedComponentFromSelectOrderVo component) 
{
	GenderInvestigationVoCollection invColl = new GenderInvestigationVoCollection();
	
	if (instGenderSpecific != null)
	{
		if (!instGenderSpecific.equals(GenderSpecific.NOTAPPLICABLE))
		{
			if (instGenderSpecific.equals(GenderSpecific.FEMALE))
			{
				if (!isFemale)
				{
					invColl.add(getGenderInvestigationFromSelectedComponentFromSelectOrder(component));
				}
			}
			else if (instGenderSpecific.equals(GenderSpecific.MALE))
			{
				if (isFemale)
				{
					invColl.add(getGenderInvestigationFromSelectedComponentFromSelectOrder(component));
				}
			}
		}
	}
	
	return invColl.size() > 0 ? invColl : null;
}
 
Example 58
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
	addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

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

		clearAnalyzedChildComponents();
		markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
		clearAnalyzedChildComponents();
	}
}
 
Example 59
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
	SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
	component.setID(id);
	component.setComponentType(type);
	return wasAnalyzed(component);
}
 
Example 60
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);
}