Java Code Examples for ims.vo.interfaces.IHotlistShort

The following are top voted examples for showing how to use ims.vo.interfaces.IHotlistShort. 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
/**
 * Gets the hotlists associated with a given object name, based on the current ccitype
 * @param String
 * @return void
 */
private void populateHotlists(Integer cciID) 
{
	IHotlistShort[] collIHotlistShort = domain.listIHotlistShortsByCCI(cciID, form.getLocalContext().getcurrentCciType());
	
	if (collIHotlistShort != null)
	{
		form.getLocalContext().setIHotlistShorts(collIHotlistShort);
		SpecialtyCollection specialties = new SpecialtyCollection();
		
		// loop through results adding each associated specialty to a collection
		for (int i = 0; i < collIHotlistShort.length; i++ )
		{
			if (collIHotlistShort[i].getISpecialtyIsNotNull().booleanValue())
			{
				specialties.add(collIHotlistShort[i].getISpecialty());
			}
				
		}
		form.getGlobalContext().Core.setSpecialties(specialties);
		
		populateHotlistsTree(form.getGlobalContext().Core.getSpecialties());
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Gets a list of configured hotlists and sets the nodes to the appropriate value
 * @param CciType
 * @return void
 */
private void overlayConfiguredHotlists(CciType cciType)
{
	IHotlistShort[] configuredHotlists = domain.listIHotlistShorts(cciType);	
	
	if (configuredHotlists == null) 
		return ;		
	
	for (int i=0; i < configuredHotlists.length; i++)
	{
		for (int j=0; j < form.treConfig().getNodes().size(); j++)
		{
			if (configuredHotlists[i].getISpecialty().equals(form.treConfig().getNodes().get(j).getValue()))
			{
				displayHotlistAsTreeNode(form.treConfig().getNodes().get(j), configuredHotlists[i]);
				break;
			}
		}			
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * This will expand the node by getting the IHotlist based on the node id and current CciType.
 * It will then list the IHotlistItems below
 * @param TreeNode
 * @return void
 */
private void expandNode(TreeNode node)
{
	if (node == null) return;
	
	if ( node.isExpanded() )
	{
		IHotlistShort val = (IHotlistShort) node.getValue();
		IHotlist item = domain.getIHotlist(val.getIHotlistShortID(), form.getLocalContext().getcurrentCciType());
		
		node.setValue(item);
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());			
		node.getNodes().clear();
		
		for ( int i = 0; i < item.getIHotlistItems().length; i++ )
		{
			TreeNode child = node.getNodes().add(item.getIHotlistItems()[i], item.getIHotlistItems()[i].getIGenericItem().getIGenericItemInfoName());
			setNodeImage(child, Color.Blue);
			child.setEnabled(node.isEnabled());
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Sets the local context value depending on whether the node selected is a hotlist or a hotlist item
 * @param TreeNode
 * @return void
 */
private void resetLocalContextSelection(TreeNode node)
{
	// if the node is an IHotlist, no need for a get call, just refresh the value
	if ( node.getValue() instanceof IHotlist )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());
	}
	// if the node is an IHotlistShort, get it's IHotlist and reset the value
	else if ( node.getValue() instanceof IHotlistShort )
	{
		form.getLocalContext().setSelectedHotlist(domain.getIHotlist(((IHotlistShort)node.getValue()).getIHotlistShortID(), form.getLocalContext().getcurrentCciType()));
	}
	// if the node is an IHotlistItem, set the value to that of its parent (IHotlist). 
	else if ( node.getValue() instanceof IHotlistItem )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist)node.getParent().getValue());
	}
	else
		form.getLocalContext().setSelectedHotlist(null);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private TreeNode findChangedNode()
{
	TreeNode node = null;
	IHotlist voVal = (IHotlist)form.getLocalContext().getSelectedHotlist();
	if (voVal == null) return node;			
	
	for (int x = 0 ; x< form.treConfig().getNodes().size(); x++ )
	{ 
		if ( !(form.treConfig().getNodes().get(x).getValue() instanceof Specialty) )
		{
			IHotlistShort voShort = (IHotlistShort) form.treConfig().getNodes().get(x).getValue(); 
			if (voShort.getISpecialty().equals(voVal.getISpecialty()))
			{
				node = form.treConfig().getNodes().get(x);
				node.setExpanded(true);
				form.treConfig().setValue(node.getValue());
				break;
			}
		}
	}	
	return node;
}
 
Example 6
Project: AvoinApotti   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/** 
 * Gets the hotlist short associated with the given Hotlist ID and CciType
 * @param Integer
 * @param CciType
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort getIHotlistShort(Integer hotlistID, CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.create((ProcedureHotlist) factory.getDomainObject(ProcedureHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.create((ProblemHotlist)factory.getDomainObject(ProblemHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.create((DiagnosisHotlist) getDomainFactory().getDomainObject(DiagnosisHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.create((CancerImagingHotlist) getDomainFactory().getDomainObject(CancerImagingHotlist.class, hotlistID));
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in getIHotlistShort = " + cciType.toString());
	}
}
 
Example 7
Project: AvoinApotti   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Lists IHotlistShorts based on a give CciType
 * @param CciType
 * @return IHotlistShort[]
 * @author mmccarthy
 */
public IHotlistShort[] listIHotlistShorts(CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.createProcedureHotlistShortVoCollectionFromProcedureHotlist(factory.listDomainObjects(ProcedureHotlist.class)).toIHotlistShortArray();	
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.createProblemHotlistShortVoCollectionFromProblemHotlist(factory.listDomainObjects(ProblemHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.createDiagnosisHotListShortVoCollectionFromDiagnosisHotlist(factory.listDomainObjects(DiagnosisHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.createCancerImagingHotlistShortVoCollectionFromCancerImagingHotlist(factory.listDomainObjects(CancerImagingHotlist.class)).toIHotlistShortArray();
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in listIHotlistShorts = " + cciType.toString());
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Gets the hotlists associated with a given object name, based on the current ccitype
 * @param String
 * @return void
 */
private void populateHotlists(Integer cciID) 
{
	IHotlistShort[] collIHotlistShort = domain.listIHotlistShortsByCCI(cciID, form.getLocalContext().getcurrentCciType());
	
	if (collIHotlistShort != null)
	{
		form.getLocalContext().setIHotlistShorts(collIHotlistShort);
		SpecialtyCollection specialties = new SpecialtyCollection();
		
		// loop through results adding each associated specialty to a collection
		for (int i = 0; i < collIHotlistShort.length; i++ )
		{
			if (collIHotlistShort[i].getISpecialtyIsNotNull().booleanValue())
			{
				specialties.add(collIHotlistShort[i].getISpecialty());
			}
				
		}
		form.getGlobalContext().Core.setSpecialties(specialties);
		
		populateHotlistsTree(form.getGlobalContext().Core.getSpecialties());
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Gets a list of configured hotlists and sets the nodes to the appropriate value
 * @param CciType
 * @return void
 */
private void overlayConfiguredHotlists(CciType cciType)
{
	IHotlistShort[] configuredHotlists = domain.listIHotlistShorts(cciType);	
	
	if (configuredHotlists == null) 
		return ;		
	
	for (int i=0; i < configuredHotlists.length; i++)
	{
		for (int j=0; j < form.treConfig().getNodes().size(); j++)
		{
			if (configuredHotlists[i].getISpecialty().equals(form.treConfig().getNodes().get(j).getValue()))
			{
				displayHotlistAsTreeNode(form.treConfig().getNodes().get(j), configuredHotlists[i]);
				break;
			}
		}			
	}
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * This will expand the node by getting the IHotlist based on the node id and current CciType.
 * It will then list the IHotlistItems below
 * @param TreeNode
 * @return void
 */
private void expandNode(TreeNode node)
{
	if (node == null) return;
	
	if ( node.isExpanded() )
	{
		IHotlistShort val = (IHotlistShort) node.getValue();
		IHotlist item = domain.getIHotlist(val.getIHotlistShortID(), form.getLocalContext().getcurrentCciType());
		
		node.setValue(item);
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());			
		node.getNodes().clear();
		
		for ( int i = 0; i < item.getIHotlistItems().length; i++ )
		{
			TreeNode child = node.getNodes().add(item.getIHotlistItems()[i], item.getIHotlistItems()[i].getIGenericItem().getIGenericItemInfoName());
			setNodeImage(child, Color.Blue);
			child.setEnabled(node.isEnabled());
		}
	}
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Sets the local context value depending on whether the node selected is a hotlist or a hotlist item
 * @param TreeNode
 * @return void
 */
private void resetLocalContextSelection(TreeNode node)
{
	// if the node is an IHotlist, no need for a get call, just refresh the value
	if ( node.getValue() instanceof IHotlist )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());
	}
	// if the node is an IHotlistShort, get it's IHotlist and reset the value
	else if ( node.getValue() instanceof IHotlistShort )
	{
		form.getLocalContext().setSelectedHotlist(domain.getIHotlist(((IHotlistShort)node.getValue()).getIHotlistShortID(), form.getLocalContext().getcurrentCciType()));
	}
	// if the node is an IHotlistItem, set the value to that of its parent (IHotlist). 
	else if ( node.getValue() instanceof IHotlistItem )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist)node.getParent().getValue());
	}
	else
		form.getLocalContext().setSelectedHotlist(null);
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private TreeNode findChangedNode()
{
	TreeNode node = null;
	IHotlist voVal = (IHotlist)form.getLocalContext().getSelectedHotlist();
	if (voVal == null) return node;			
	
	for (int x = 0 ; x< form.treConfig().getNodes().size(); x++ )
	{ 
		if ( !(form.treConfig().getNodes().get(x).getValue() instanceof Specialty) )
		{
			IHotlistShort voShort = (IHotlistShort) form.treConfig().getNodes().get(x).getValue(); 
			if (voShort.getISpecialty().equals(voVal.getISpecialty()))
			{
				node = form.treConfig().getNodes().get(x);
				node.setExpanded(true);
				form.treConfig().setValue(node.getValue());
				break;
			}
		}
	}	
	return node;
}
 
Example 13
Project: openMAXIMS   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/** 
 * Gets the hotlist short associated with the given Hotlist ID and CciType
 * @param Integer
 * @param CciType
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort getIHotlistShort(Integer hotlistID, CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.create((ProcedureHotlist) factory.getDomainObject(ProcedureHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.create((ProblemHotlist)factory.getDomainObject(ProblemHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.create((DiagnosisHotlist) getDomainFactory().getDomainObject(DiagnosisHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.create((CancerImagingHotlist) getDomainFactory().getDomainObject(CancerImagingHotlist.class, hotlistID));
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in getIHotlistShort = " + cciType.toString());
	}
}
 
Example 14
Project: openMAXIMS   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Lists IHotlistShorts based on a give CciType
 * @param CciType
 * @return IHotlistShort[]
 * @author mmccarthy
 */
public IHotlistShort[] listIHotlistShorts(CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.createProcedureHotlistShortVoCollectionFromProcedureHotlist(factory.listDomainObjects(ProcedureHotlist.class)).toIHotlistShortArray();	
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.createProblemHotlistShortVoCollectionFromProblemHotlist(factory.listDomainObjects(ProblemHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.createDiagnosisHotListShortVoCollectionFromDiagnosisHotlist(factory.listDomainObjects(DiagnosisHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.createCancerImagingHotlistShortVoCollectionFromCancerImagingHotlist(factory.listDomainObjects(CancerImagingHotlist.class)).toIHotlistShortArray();
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in listIHotlistShorts = " + cciType.toString());
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Gets the hotlists associated with a given object name, based on the current ccitype
 * @param String
 * @return void
 */
private void populateHotlists(Integer cciID) 
{
	IHotlistShort[] collIHotlistShort = domain.listIHotlistShortsByCCI(cciID, form.getLocalContext().getcurrentCciType());
	
	if (collIHotlistShort != null)
	{
		form.getLocalContext().setIHotlistShorts(collIHotlistShort);
		SpecialtyCollection specialties = new SpecialtyCollection();
		
		// loop through results adding each associated specialty to a collection
		for (int i = 0; i < collIHotlistShort.length; i++ )
		{
			if (collIHotlistShort[i].getISpecialtyIsNotNull().booleanValue())
			{
				specialties.add(collIHotlistShort[i].getISpecialty());
			}
				
		}
		form.getGlobalContext().Core.setSpecialties(specialties);
		
		populateHotlistsTree(form.getGlobalContext().Core.getSpecialties());
	}
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Gets a list of configured hotlists and sets the nodes to the appropriate value
 * @param CciType
 * @return void
 */
private void overlayConfiguredHotlists(CciType cciType)
{
	IHotlistShort[] configuredHotlists = domain.listIHotlistShorts(cciType);	
	
	if (configuredHotlists == null) 
		return ;		
	
	for (int i=0; i < configuredHotlists.length; i++)
	{
		for (int j=0; j < form.treConfig().getNodes().size(); j++)
		{
			if (configuredHotlists[i].getISpecialty().equals(form.treConfig().getNodes().get(j).getValue()))
			{
				displayHotlistAsTreeNode(form.treConfig().getNodes().get(j), configuredHotlists[i]);
				break;
			}
		}			
	}
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * This will expand the node by getting the IHotlist based on the node id and current CciType.
 * It will then list the IHotlistItems below
 * @param TreeNode
 * @return void
 */
private void expandNode(TreeNode node)
{
	if (node == null) return;
	
	if ( node.isExpanded() )
	{
		IHotlistShort val = (IHotlistShort) node.getValue();
		IHotlist item = domain.getIHotlist(val.getIHotlistShortID(), form.getLocalContext().getcurrentCciType());
		
		node.setValue(item);
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());			
		node.getNodes().clear();
		
		for ( int i = 0; i < item.getIHotlistItems().length; i++ )
		{
			TreeNode child = node.getNodes().add(item.getIHotlistItems()[i], item.getIHotlistItems()[i].getIGenericItem().getIGenericItemInfoName());
			setNodeImage(child, Color.Blue);
			child.setEnabled(node.isEnabled());
		}
	}
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Sets the local context value depending on whether the node selected is a hotlist or a hotlist item
 * @param TreeNode
 * @return void
 */
private void resetLocalContextSelection(TreeNode node)
{
	// if the node is an IHotlist, no need for a get call, just refresh the value
	if ( node.getValue() instanceof IHotlist )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());
	}
	// if the node is an IHotlistShort, get it's IHotlist and reset the value
	else if ( node.getValue() instanceof IHotlistShort )
	{
		form.getLocalContext().setSelectedHotlist(domain.getIHotlist(((IHotlistShort)node.getValue()).getIHotlistShortID(), form.getLocalContext().getcurrentCciType()));
	}
	// if the node is an IHotlistItem, set the value to that of its parent (IHotlist). 
	else if ( node.getValue() instanceof IHotlistItem )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist)node.getParent().getValue());
	}
	else
		form.getLocalContext().setSelectedHotlist(null);
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private TreeNode findChangedNode()
{
	TreeNode node = null;
	IHotlist voVal = (IHotlist)form.getLocalContext().getSelectedHotlist();
	if (voVal == null) return node;			
	
	for (int x = 0 ; x< form.treConfig().getNodes().size(); x++ )
	{ 
		if ( !(form.treConfig().getNodes().get(x).getValue() instanceof Specialty) )
		{
			IHotlistShort voShort = (IHotlistShort) form.treConfig().getNodes().get(x).getValue(); 
			if (voShort.getISpecialty().equals(voVal.getISpecialty()))
			{
				node = form.treConfig().getNodes().get(x);
				node.setExpanded(true);
				form.treConfig().setValue(node.getValue());
				break;
			}
		}
	}	
	return node;
}
 
Example 20
Project: openMAXIMS   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/** 
 * Gets the hotlist short associated with the given Hotlist ID and CciType
 * @param Integer
 * @param CciType
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort getIHotlistShort(Integer hotlistID, CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.create((ProcedureHotlist) factory.getDomainObject(ProcedureHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.create((ProblemHotlist)factory.getDomainObject(ProblemHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.create((DiagnosisHotlist) getDomainFactory().getDomainObject(DiagnosisHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.create((CancerImagingHotlist) getDomainFactory().getDomainObject(CancerImagingHotlist.class, hotlistID));
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in getIHotlistShort = " + cciType.toString());
	}
}
 
Example 21
Project: openMAXIMS   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Lists IHotlistShorts based on a give CciType
 * @param CciType
 * @return IHotlistShort[]
 * @author mmccarthy
 */
public IHotlistShort[] listIHotlistShorts(CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.createProcedureHotlistShortVoCollectionFromProcedureHotlist(factory.listDomainObjects(ProcedureHotlist.class)).toIHotlistShortArray();	
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.createProblemHotlistShortVoCollectionFromProblemHotlist(factory.listDomainObjects(ProblemHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.createDiagnosisHotListShortVoCollectionFromDiagnosisHotlist(factory.listDomainObjects(DiagnosisHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.createCancerImagingHotlistShortVoCollectionFromCancerImagingHotlist(factory.listDomainObjects(CancerImagingHotlist.class)).toIHotlistShortArray();
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in listIHotlistShorts = " + cciType.toString());
	}
}
 
Example 22
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Gets the hotlists associated with a given object name, based on the current ccitype
 * @param String
 * @return void
 */
private void populateHotlists(Integer cciID) 
{
	IHotlistShort[] collIHotlistShort = domain.listIHotlistShortsByCCI(cciID, form.getLocalContext().getcurrentCciType());
	
	if (collIHotlistShort != null)
	{
		form.getLocalContext().setIHotlistShorts(collIHotlistShort);
		SpecialtyCollection specialties = new SpecialtyCollection();
		
		// loop through results adding each associated specialty to a collection
		for (int i = 0; i < collIHotlistShort.length; i++ )
		{
			if (collIHotlistShort[i].getISpecialtyIsNotNull().booleanValue())
			{
				specialties.add(collIHotlistShort[i].getISpecialty());
			}
				
		}
		form.getGlobalContext().Core.setSpecialties(specialties);
		
		populateHotlistsTree(form.getGlobalContext().Core.getSpecialties());
	}
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Gets a list of configured hotlists and sets the nodes to the appropriate value
 * @param CciType
 * @return void
 */
private void overlayConfiguredHotlists(CciType cciType)
{
	IHotlistShort[] configuredHotlists = domain.listIHotlistShorts(cciType);	
	
	if (configuredHotlists == null) 
		return ;		
	
	for (int i=0; i < configuredHotlists.length; i++)
	{
		for (int j=0; j < form.treConfig().getNodes().size(); j++)
		{
			if (configuredHotlists[i].getISpecialty().equals(form.treConfig().getNodes().get(j).getValue()))
			{
				displayHotlistAsTreeNode(form.treConfig().getNodes().get(j), configuredHotlists[i]);
				break;
			}
		}			
	}
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * This will expand the node by getting the IHotlist based on the node id and current CciType.
 * It will then list the IHotlistItems below
 * @param TreeNode
 * @return void
 */
private void expandNode(TreeNode node)
{
	if (node == null) return;
	
	if ( node.isExpanded() )
	{
		IHotlistShort val = (IHotlistShort) node.getValue();
		IHotlist item = domain.getIHotlist(val.getIHotlistShortID(), form.getLocalContext().getcurrentCciType());
		
		node.setValue(item);
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());			
		node.getNodes().clear();
		
		for ( int i = 0; i < item.getIHotlistItems().length; i++ )
		{
			TreeNode child = node.getNodes().add(item.getIHotlistItems()[i], item.getIHotlistItems()[i].getIGenericItem().getIGenericItemInfoName());
			setNodeImage(child, Color.Blue);
			child.setEnabled(node.isEnabled());
		}
	}
}
 
Example 25
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Sets the local context value depending on whether the node selected is a hotlist or a hotlist item
 * @param TreeNode
 * @return void
 */
private void resetLocalContextSelection(TreeNode node)
{
	// if the node is an IHotlist, no need for a get call, just refresh the value
	if ( node.getValue() instanceof IHotlist )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist) node.getValue());
	}
	// if the node is an IHotlistShort, get it's IHotlist and reset the value
	else if ( node.getValue() instanceof IHotlistShort )
	{
		form.getLocalContext().setSelectedHotlist(domain.getIHotlist(((IHotlistShort)node.getValue()).getIHotlistShortID(), form.getLocalContext().getcurrentCciType()));
	}
	// if the node is an IHotlistItem, set the value to that of its parent (IHotlist). 
	else if ( node.getValue() instanceof IHotlistItem )
	{
		form.getLocalContext().setSelectedHotlist((IHotlist)node.getParent().getValue());
	}
	else
		form.getLocalContext().setSelectedHotlist(null);
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private TreeNode findChangedNode()
{
	TreeNode node = null;
	IHotlist voVal = (IHotlist)form.getLocalContext().getSelectedHotlist();
	if (voVal == null) return node;			
	
	for (int x = 0 ; x< form.treConfig().getNodes().size(); x++ )
	{ 
		if ( !(form.treConfig().getNodes().get(x).getValue() instanceof Specialty) )
		{
			IHotlistShort voShort = (IHotlistShort) form.treConfig().getNodes().get(x).getValue(); 
			if (voShort.getISpecialty().equals(voVal.getISpecialty()))
			{
				node = form.treConfig().getNodes().get(x);
				node.setExpanded(true);
				form.treConfig().setValue(node.getValue());
				break;
			}
		}
	}	
	return node;
}
 
Example 27
Project: openmaxims-linux   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/** 
 * Gets the hotlist short associated with the given Hotlist ID and CciType
 * @param Integer
 * @param CciType
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort getIHotlistShort(Integer hotlistID, CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.create((ProcedureHotlist) factory.getDomainObject(ProcedureHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.create((ProblemHotlist)factory.getDomainObject(ProblemHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.create((DiagnosisHotlist) getDomainFactory().getDomainObject(DiagnosisHotlist.class, hotlistID));
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.create((CancerImagingHotlist) getDomainFactory().getDomainObject(CancerImagingHotlist.class, hotlistID));
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in getIHotlistShort = " + cciType.toString());
	}
}
 
Example 28
Project: openmaxims-linux   File: SpecialtyHotlistConfigurationImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Lists IHotlistShorts based on a give CciType
 * @param CciType
 * @return IHotlistShort[]
 * @author mmccarthy
 */
public IHotlistShort[] listIHotlistShorts(CciType cciType)
{
	DomainFactory factory = getDomainFactory();
	
	if ( cciType.equals(CciType.PROCEDURE))
	{
		return ProcedureHotlistShortVoAssembler.createProcedureHotlistShortVoCollectionFromProcedureHotlist(factory.listDomainObjects(ProcedureHotlist.class)).toIHotlistShortArray();	
	}
	else if ( cciType.equals(CciType.PROBLEM) )
	{
		return ProblemHotlistShortVoAssembler.createProblemHotlistShortVoCollectionFromProblemHotlist(factory.listDomainObjects(ProblemHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.DIAGNOSIS) )
	{
		return DiagnosisHotListShortVoAssembler.createDiagnosisHotListShortVoCollectionFromDiagnosisHotlist(factory.listDomainObjects(DiagnosisHotlist.class)).toIHotlistShortArray();
	}
	else if ( cciType.equals(CciType.CANCERIMAGE) )
	{
		return CancerImagingHotlistShortVoAssembler.createCancerImagingHotlistShortVoCollectionFromCancerImagingHotlist(factory.listDomainObjects(CancerImagingHotlist.class)).toIHotlistShortArray();
	}
	else 
	{
		throw new DomainRuntimeException ("Unknown CciType in listIHotlistShorts = " + cciType.toString());
	}
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void displayHotlistAsTreeNode(TreeNode node, IHotlistShort voItem)
{
	node.setValue(voItem);
	setNodeImage(node, Color.Green);
	node.getNodes().add(waitMsg, waitMsg);		
}
 
Example 30
Project: AvoinApotti   File: CCIAdminImpl.java   Source Code and License 4 votes vote down vote up
/**
 * Saves a given IHotlistShort based on its value object type
 * @param IHotlistShort
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort saveIHotlistShort(IHotlistShort iHotlistShort) throws StaleObjectException 
{
	if ( iHotlistShort == null )
	{
		throw new DomainRuntimeException ("Null parameter passed to 'saveIHotlistShort'");
	}
	
	DomainFactory factory = getDomainFactory();
	
	if ( iHotlistShort instanceof ProblemHotlistShortVo )
	{
		ProblemHotlist domProblemHotlist = ProblemHotlistShortVoAssembler.extractProblemHotlist(factory, (ProblemHotlistShortVo)iHotlistShort);
		factory.save(domProblemHotlist);
		return ProblemHotlistShortVoAssembler.create(domProblemHotlist);
	}
	else if ( iHotlistShort instanceof ProcedureHotlistShortVo )
	{
		ProcedureHotlist domProcedureHotlist = ProcedureHotlistShortVoAssembler.extractProcedureHotlist(factory, (ProcedureHotlistShortVo)iHotlistShort);
		factory.save(domProcedureHotlist);
		return ProcedureHotlistShortVoAssembler.create(domProcedureHotlist);
	}
	else if ( iHotlistShort instanceof DiagnosisHotListShortVo )
	{
		DiagnosisHotlist domDiagnosisHotlist = DiagnosisHotListShortVoAssembler.extractDiagnosisHotlist(factory, (DiagnosisHotListShortVo)iHotlistShort);
		factory.save(domDiagnosisHotlist);
		return DiagnosisHotListShortVoAssembler.create(domDiagnosisHotlist);
	}
	else if ( iHotlistShort instanceof CancerImagingHotlistShortVo )
	{
		CancerImagingHotlist domCancerImagingHotlist = CancerImagingHotlistShortVoAssembler.extractCancerImagingHotlist(factory, (CancerImagingHotlistShortVo)iHotlistShort);
		factory.save(domCancerImagingHotlist);
		return CancerImagingHotlistShortVoAssembler.create(domCancerImagingHotlist);
	}
	else if ( iHotlistShort instanceof MedicationHotlistShortVo )
	{
		MedicationHotlist domMedicationHotlist = MedicationHotlistShortVoAssembler.extractMedicationHotlist(factory, (MedicationHotlistShortVo)iHotlistShort);
		factory.save(domMedicationHotlist);
		return MedicationHotlistShortVoAssembler.create(domMedicationHotlist);
	}
	else if ( iHotlistShort instanceof PresentingComplainHotlistVo)
	{
		PresentingComplaintHotlist domPresentingComplainHotlist = PresentingComplainHotlistVoAssembler.extractPresentingComplaintHotlist(factory, (PresentingComplainHotlistVo) iHotlistShort);
		factory.save(domPresentingComplainHotlist);
		return PresentingComplainHotlistVoAssembler.create(domPresentingComplainHotlist);
	}
	//WDEV-17060
	else if ( iHotlistShort instanceof TreatmentInterventionHotlistShortVo)
	{
		TreatmentInterventionHotlist domTreatmentInterventionHotlist = TreatmentInterventionHotlistShortVoAssembler.extractTreatmentInterventionHotlist(factory, (TreatmentInterventionHotlistShortVo) iHotlistShort);
		factory.save(domTreatmentInterventionHotlist);
		return TreatmentInterventionHotlistShortVoAssembler.create(domTreatmentInterventionHotlist);
	}
	else
	{
		throw new DomainRuntimeException("Unknown CCI Type in 'saveIHotlistShort'");
	}
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void displayHotlistAsTreeNode(TreeNode node, IHotlistShort voItem)
{
	node.setValue(voItem);
	setNodeImage(node, Color.Green);
	node.getNodes().add(waitMsg, waitMsg);		
}
 
Example 32
Project: openMAXIMS   File: CCIAdminImpl.java   Source Code and License 4 votes vote down vote up
/**
 * Saves a given IHotlistShort based on its value object type
 * @param IHotlistShort
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort saveIHotlistShort(IHotlistShort iHotlistShort) throws StaleObjectException 
{
	if ( iHotlistShort == null )
	{
		throw new DomainRuntimeException ("Null parameter passed to 'saveIHotlistShort'");
	}
	
	DomainFactory factory = getDomainFactory();
	
	if ( iHotlistShort instanceof ProblemHotlistShortVo )
	{
		ProblemHotlist domProblemHotlist = ProblemHotlistShortVoAssembler.extractProblemHotlist(factory, (ProblemHotlistShortVo)iHotlistShort);
		factory.save(domProblemHotlist);
		return ProblemHotlistShortVoAssembler.create(domProblemHotlist);
	}
	else if ( iHotlistShort instanceof ProcedureHotlistShortVo )
	{
		ProcedureHotlist domProcedureHotlist = ProcedureHotlistShortVoAssembler.extractProcedureHotlist(factory, (ProcedureHotlistShortVo)iHotlistShort);
		factory.save(domProcedureHotlist);
		return ProcedureHotlistShortVoAssembler.create(domProcedureHotlist);
	}
	else if ( iHotlistShort instanceof DiagnosisHotListShortVo )
	{
		DiagnosisHotlist domDiagnosisHotlist = DiagnosisHotListShortVoAssembler.extractDiagnosisHotlist(factory, (DiagnosisHotListShortVo)iHotlistShort);
		factory.save(domDiagnosisHotlist);
		return DiagnosisHotListShortVoAssembler.create(domDiagnosisHotlist);
	}
	else if ( iHotlistShort instanceof CancerImagingHotlistShortVo )
	{
		CancerImagingHotlist domCancerImagingHotlist = CancerImagingHotlistShortVoAssembler.extractCancerImagingHotlist(factory, (CancerImagingHotlistShortVo)iHotlistShort);
		factory.save(domCancerImagingHotlist);
		return CancerImagingHotlistShortVoAssembler.create(domCancerImagingHotlist);
	}
	else if ( iHotlistShort instanceof MedicationHotlistShortVo )
	{
		MedicationHotlist domMedicationHotlist = MedicationHotlistShortVoAssembler.extractMedicationHotlist(factory, (MedicationHotlistShortVo)iHotlistShort);
		factory.save(domMedicationHotlist);
		return MedicationHotlistShortVoAssembler.create(domMedicationHotlist);
	}
	else if ( iHotlistShort instanceof PresentingComplainHotlistVo)
	{
		PresentingComplaintHotlist domPresentingComplainHotlist = PresentingComplainHotlistVoAssembler.extractPresentingComplaintHotlist(factory, (PresentingComplainHotlistVo) iHotlistShort);
		factory.save(domPresentingComplainHotlist);
		return PresentingComplainHotlistVoAssembler.create(domPresentingComplainHotlist);
	}
	//WDEV-17060
	else if ( iHotlistShort instanceof TreatmentInterventionHotlistShortVo)
	{
		TreatmentInterventionHotlist domTreatmentInterventionHotlist = TreatmentInterventionHotlistShortVoAssembler.extractTreatmentInterventionHotlist(factory, (TreatmentInterventionHotlistShortVo) iHotlistShort);
		factory.save(domTreatmentInterventionHotlist);
		return TreatmentInterventionHotlistShortVoAssembler.create(domTreatmentInterventionHotlist);
	}
	else
	{
		throw new DomainRuntimeException("Unknown CCI Type in 'saveIHotlistShort'");
	}
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void displayHotlistAsTreeNode(TreeNode node, IHotlistShort voItem)
{
	node.setValue(voItem);
	setNodeImage(node, Color.Green);
	node.getNodes().add(waitMsg, waitMsg);		
}
 
Example 34
Project: openMAXIMS   File: CCIAdminImpl.java   Source Code and License 4 votes vote down vote up
/**
 * Saves a given IHotlistShort based on its value object type
 * @param IHotlistShort
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort saveIHotlistShort(IHotlistShort iHotlistShort) throws StaleObjectException 
{
	if ( iHotlistShort == null )
	{
		throw new DomainRuntimeException ("Null parameter passed to 'saveIHotlistShort'");
	}
	
	DomainFactory factory = getDomainFactory();
	
	if ( iHotlistShort instanceof ProblemHotlistShortVo )
	{
		ProblemHotlist domProblemHotlist = ProblemHotlistShortVoAssembler.extractProblemHotlist(factory, (ProblemHotlistShortVo)iHotlistShort);
		factory.save(domProblemHotlist);
		return ProblemHotlistShortVoAssembler.create(domProblemHotlist);
	}
	else if ( iHotlistShort instanceof ProcedureHotlistShortVo )
	{
		ProcedureHotlist domProcedureHotlist = ProcedureHotlistShortVoAssembler.extractProcedureHotlist(factory, (ProcedureHotlistShortVo)iHotlistShort);
		factory.save(domProcedureHotlist);
		return ProcedureHotlistShortVoAssembler.create(domProcedureHotlist);
	}
	else if ( iHotlistShort instanceof DiagnosisHotListShortVo )
	{
		DiagnosisHotlist domDiagnosisHotlist = DiagnosisHotListShortVoAssembler.extractDiagnosisHotlist(factory, (DiagnosisHotListShortVo)iHotlistShort);
		factory.save(domDiagnosisHotlist);
		return DiagnosisHotListShortVoAssembler.create(domDiagnosisHotlist);
	}
	else if ( iHotlistShort instanceof CancerImagingHotlistShortVo )
	{
		CancerImagingHotlist domCancerImagingHotlist = CancerImagingHotlistShortVoAssembler.extractCancerImagingHotlist(factory, (CancerImagingHotlistShortVo)iHotlistShort);
		factory.save(domCancerImagingHotlist);
		return CancerImagingHotlistShortVoAssembler.create(domCancerImagingHotlist);
	}
	else if ( iHotlistShort instanceof MedicationHotlistShortVo )
	{
		MedicationHotlist domMedicationHotlist = MedicationHotlistShortVoAssembler.extractMedicationHotlist(factory, (MedicationHotlistShortVo)iHotlistShort);
		factory.save(domMedicationHotlist);
		return MedicationHotlistShortVoAssembler.create(domMedicationHotlist);
	}
	else if ( iHotlistShort instanceof PresentingComplainHotlistVo)
	{
		PresentingComplaintHotlist domPresentingComplainHotlist = PresentingComplainHotlistVoAssembler.extractPresentingComplaintHotlist(factory, (PresentingComplainHotlistVo) iHotlistShort);
		factory.save(domPresentingComplainHotlist);
		return PresentingComplainHotlistVoAssembler.create(domPresentingComplainHotlist);
	}
	//WDEV-17060
	else if ( iHotlistShort instanceof TreatmentInterventionHotlistShortVo)
	{
		TreatmentInterventionHotlist domTreatmentInterventionHotlist = TreatmentInterventionHotlistShortVoAssembler.extractTreatmentInterventionHotlist(factory, (TreatmentInterventionHotlistShortVo) iHotlistShort);
		factory.save(domTreatmentInterventionHotlist);
		return TreatmentInterventionHotlistShortVoAssembler.create(domTreatmentInterventionHotlist);
	}
	else
	{
		throw new DomainRuntimeException("Unknown CCI Type in 'saveIHotlistShort'");
	}
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void displayHotlistAsTreeNode(TreeNode node, IHotlistShort voItem)
{
	node.setValue(voItem);
	setNodeImage(node, Color.Green);
	node.getNodes().add(waitMsg, waitMsg);		
}
 
Example 36
Project: openmaxims-linux   File: CCIAdminImpl.java   Source Code and License 4 votes vote down vote up
/**
 * Saves a given IHotlistShort based on its value object type
 * @param IHotlistShort
 * @return IHotlistShort
 * @author mmccarthy
 */
public IHotlistShort saveIHotlistShort(IHotlistShort iHotlistShort) throws StaleObjectException 
{
	if ( iHotlistShort == null )
	{
		throw new DomainRuntimeException ("Null parameter passed to 'saveIHotlistShort'");
	}
	
	DomainFactory factory = getDomainFactory();
	
	if ( iHotlistShort instanceof ProblemHotlistShortVo )
	{
		ProblemHotlist domProblemHotlist = ProblemHotlistShortVoAssembler.extractProblemHotlist(factory, (ProblemHotlistShortVo)iHotlistShort);
		factory.save(domProblemHotlist);
		return ProblemHotlistShortVoAssembler.create(domProblemHotlist);
	}
	else if ( iHotlistShort instanceof ProcedureHotlistShortVo )
	{
		ProcedureHotlist domProcedureHotlist = ProcedureHotlistShortVoAssembler.extractProcedureHotlist(factory, (ProcedureHotlistShortVo)iHotlistShort);
		factory.save(domProcedureHotlist);
		return ProcedureHotlistShortVoAssembler.create(domProcedureHotlist);
	}
	else if ( iHotlistShort instanceof DiagnosisHotListShortVo )
	{
		DiagnosisHotlist domDiagnosisHotlist = DiagnosisHotListShortVoAssembler.extractDiagnosisHotlist(factory, (DiagnosisHotListShortVo)iHotlistShort);
		factory.save(domDiagnosisHotlist);
		return DiagnosisHotListShortVoAssembler.create(domDiagnosisHotlist);
	}
	else if ( iHotlistShort instanceof CancerImagingHotlistShortVo )
	{
		CancerImagingHotlist domCancerImagingHotlist = CancerImagingHotlistShortVoAssembler.extractCancerImagingHotlist(factory, (CancerImagingHotlistShortVo)iHotlistShort);
		factory.save(domCancerImagingHotlist);
		return CancerImagingHotlistShortVoAssembler.create(domCancerImagingHotlist);
	}
	else if ( iHotlistShort instanceof MedicationHotlistShortVo )
	{
		MedicationHotlist domMedicationHotlist = MedicationHotlistShortVoAssembler.extractMedicationHotlist(factory, (MedicationHotlistShortVo)iHotlistShort);
		factory.save(domMedicationHotlist);
		return MedicationHotlistShortVoAssembler.create(domMedicationHotlist);
	}
	else if ( iHotlistShort instanceof PresentingComplainHotlistVo)
	{
		PresentingComplaintHotlist domPresentingComplainHotlist = PresentingComplainHotlistVoAssembler.extractPresentingComplaintHotlist(factory, (PresentingComplainHotlistVo) iHotlistShort);
		factory.save(domPresentingComplainHotlist);
		return PresentingComplainHotlistVoAssembler.create(domPresentingComplainHotlist);
	}
	//WDEV-17060
	else if ( iHotlistShort instanceof TreatmentInterventionHotlistShortVo)
	{
		TreatmentInterventionHotlist domTreatmentInterventionHotlist = TreatmentInterventionHotlistShortVoAssembler.extractTreatmentInterventionHotlist(factory, (TreatmentInterventionHotlistShortVo) iHotlistShort);
		factory.save(domTreatmentInterventionHotlist);
		return TreatmentInterventionHotlistShortVoAssembler.create(domTreatmentInterventionHotlist);
	}
	else
	{
		throw new DomainRuntimeException("Unknown CCI Type in 'saveIHotlistShort'");
	}
}