Java Code Examples for ims.ocrr.vo.lookups.SpecimenCollectionStatus

The following are top voted examples for showing how to use ims.ocrr.vo.lookups.SpecimenCollectionStatus. 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   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if(collEnum != null)
	{
		if(collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{	
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}
	
	return null;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	ims.ocrr.forms.specimencollectioncliniccomponent.GenForm.GroupStatusEnumeration status = form.GroupStatus().getValue();
	form.getLocalContext().setCollectionStatus(status);
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}

	return null;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if (collEnum != null)
	{
		if (collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;

		if (collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;

		if (collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;

		if (collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}

	return null;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void listRound()
{
	form.dyngrdCollect().getRows().clear();
	form.getGlobalContext().Core.setPatientShort(null); //WDEV-16767
	
	if(form.cmbRound().getValue() == null)
		return;
	
	SpecimenCollectionStatus status = null;
	
	if(form.GroupFilter().getValue().equals(GroupFilterEnumeration.rdoCollected))
		status = SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	else if(form.GroupFilter().getValue().equals(GroupFilterEnumeration.rdoCouldNotCollect))
		status = SpecimenCollectionStatus.COULDNOTCOLLECT;
	else if(form.GroupFilter().getValue().equals(GroupFilterEnumeration.rdoForCollection))
		status = SpecimenCollectionStatus.FORCOLLECTION;
	
	SpecimenWorkListitemCustomVoCollection list = domain.listWorkListItems(form.cmbRound().getValue(), status);
	
	displayRound(list);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupStatusEnumeration status = form.GroupStatus().getValue();
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}
	return null;
}
 
Example 6
Project: AvoinApotti   File: SpecimenCollectionClinicImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if(orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	
	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);
	
	if(orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE) && doSpecimenWorkListItem.getSpecimen() != null)
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 7
Project: AvoinApotti   File: WardSpecimenCollectionImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if (orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	DomainFactory factory = getDomainFactory();

	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);

	if(doSpecimenWorkListItem.getSpecimen()!=null && orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE))
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 8
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if(collEnum != null)
	{
		if(collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{	
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}
	
	return null;
}
 
Example 9
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	ims.ocrr.forms.specimencollectioncliniccomponent.GenForm.GroupStatusEnumeration status = form.GroupStatus().getValue();
	form.getLocalContext().setCollectionStatus(status);
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}

	return null;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if (collEnum != null)
	{
		if (collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;

		if (collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;

		if (collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;

		if (collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}

	return null;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupStatusEnumeration status = form.GroupStatus().getValue();
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}
	return null;
}
 
Example 12
Project: openMAXIMS   File: SpecimenCollectionClinicImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if(orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	
	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);
	
	if(orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE) && doSpecimenWorkListItem.getSpecimen() != null)
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 13
Project: openMAXIMS   File: WardSpecimenCollectionImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if (orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	DomainFactory factory = getDomainFactory();

	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);

	if(doSpecimenWorkListItem.getSpecimen()!=null && orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE))
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 14
Project: openMAXIMS   File: OutpatientPhlebotomyImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if(orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);
	
	if(orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE))
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if(collEnum != null)
	{
		if(collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{	
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}
	
	return null;
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	ims.ocrr.forms.specimencollectioncliniccomponent.GenForm.GroupStatusEnumeration status = form.GroupStatus().getValue();
	form.getLocalContext().setCollectionStatus(status);
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}

	return null;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if (collEnum != null)
	{
		if (collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;

		if (collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;

		if (collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;

		if (collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}

	return null;
}
 
Example 18
Project: openmaxims-linux   File: SpecimenCollectionClinicImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if(orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	
	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);
	
	if(orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE) && doSpecimenWorkListItem.getSpecimen() != null)
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 19
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void listRound()
{
	form.dyngrdCollect().getRows().clear();
	form.getGlobalContext().Core.setPatientShort(null); //WDEV-16767
	
	if(form.cmbRound().getValue() == null)
		return;
	
	SpecimenCollectionStatus status = null;
	
	if(form.GroupFilter().getValue().equals(GroupFilterEnumeration.rdoCollected))
		status = SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	else if(form.GroupFilter().getValue().equals(GroupFilterEnumeration.rdoCouldNotCollect))
		status = SpecimenCollectionStatus.COULDNOTCOLLECT;
	else if(form.GroupFilter().getValue().equals(GroupFilterEnumeration.rdoForCollection))
		status = SpecimenCollectionStatus.FORCOLLECTION;
	
	SpecimenWorkListitemCustomVoCollection list = domain.listWorkListItems(form.cmbRound().getValue(), status);
	
	displayRound(list);
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupStatusEnumeration status = form.GroupStatus().getValue();
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}
	return null;
}
 
Example 21
Project: openMAXIMS   File: SpecimenCollectionClinicImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if(orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	
	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);
	
	if(orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE) && doSpecimenWorkListItem.getSpecimen() != null)
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 22
Project: openMAXIMS   File: WardSpecimenCollectionImpl.java   View source code 6 votes vote down vote up
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo orderSpecimenVo) throws StaleObjectException
{
	if (orderSpecimenVo == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	DomainFactory factory = getDomainFactory();

	SpecimenWorkListItem doSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, orderSpecimenVo);

	if(doSpecimenWorkListItem.getSpecimen()!=null && orderSpecimenVo.getCollectionStatusIsNotNull() && orderSpecimenVo.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE))
	{
		java.util.Set investigations = doSpecimenWorkListItem.getSpecimen().getInvestigations();
		for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();)
		{
			Object obj = iter.next();
			if (obj instanceof OrderInvestigation)
			{
				OrderInvestigation element = (OrderInvestigation) obj;
				element.setDisplayDateTime(orderSpecimenVo.getSpecimen().getCollDateTimePlacer().getJavaDate());
				element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL));
			}
		}
	}
	
	factory.save(doSpecimenWorkListItem);
	return SpecimenWorkListItemListVoAssembler.create(doSpecimenWorkListItem);
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if(collEnum != null)
	{
		if(collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
		
		if(collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{	
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}
	
	return null;
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupStatusEnumeration status = form.GroupStatus().getValue();
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}
	return null;
}
 
Example 25
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	ims.ocrr.forms.specimencollectioncliniccomponent.GenForm.GroupStatusEnumeration status = form.GroupStatus().getValue();
	form.getLocalContext().setCollectionStatus(status);
	if(status.equals(GroupStatusEnumeration.rdoForCollection))
	{
		return SpecimenCollectionStatus.FORCOLLECTION;
	}
	if(status.equals(GroupStatusEnumeration.rdoCollected))
	{
		return SpecimenCollectionStatus.COLLECTIONCOMPLETE;
	}
	if(status.equals(GroupStatusEnumeration.rdoCancelled))
	{
		return SpecimenCollectionStatus.COULDNOTCOLLECT;
	}

	return null;
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private SpecimenCollectionStatus getStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if (collEnum != null)
	{
		if (collEnum.equals(GroupCollectedEnumeration.rdoCancelled))
			return SpecimenCollectionStatus.CANCELLED;

		if (collEnum.equals(GroupCollectedEnumeration.rdoOutstanding))
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;

		if (collEnum.equals(GroupCollectedEnumeration.rdoCollected))
			return SpecimenCollectionStatus.COLLECTIONCOMPLETE;

		if (collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{
			return SpecimenCollectionStatus.FORCOLLECTION;
		}
	}

	return null;
}
 
Example 27
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private SpecimenCollectionStatus getSecondStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if(collEnum != null)
	{
		if(collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{	
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;
		}
	}
	
	return null;
}
 
Example 28
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setAnswersOptionsToCell(DynamicGridCell cell)
{
	if (cell == null)
		return;

	cell.getItems().newItem(SpecimenCollectionStatus.COLLECTIONCOMPLETE);
	cell.getItems().newItem(SpecimenCollectionStatus.CANCELLED);
}
 
Example 29
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void refreshRecord(SpecimenWorkListItemListVo specimenWorkListItemList)
{
	if(specimenWorkListItemList != null && specimenWorkListItemList.getCollectionStatus().equals(SpecimenCollectionStatus.MOVEDTOPHLEBOTOMY))
	{
		DynamicGridRow row = form.dyngrdCollect().getSelectedRow();
		if(row != null)
		{
			//WDEV-2990 - clear existing cell and then set the value to the selected row 
			clearVariableCells(row);
			removeCommonCells(row);
			displayCommonCells(specimenWorkListItemList, row);
			row.setValue(specimenWorkListItemList);
		}
	}
}
 
Example 30
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setAnswersOptionsToCell(DynamicGridCell cell)
{
	if (cell == null)
		return;

	cell.getItems().newItem(SpecimenCollectionStatus.COLLECTIONCOMPLETE);
	cell.getItems().newItem(SpecimenCollectionStatus.COULDNOTCOLLECT);
}
 
Example 31
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private SpecimenCollectionStatus getSecondStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if (collEnum != null)
	{
		if (collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;
		}
	}

	return null;
}
 
Example 32
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setAnswersOptionsToCell(DynamicGridCell cell)
{
	if (cell == null)
		return;

	cell.getItems().newItem(SpecimenCollectionStatus.COLLECTIONCOMPLETE);
	cell.getItems().newItem(SpecimenCollectionStatus.CANCELLED);
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void refreshRecord(SpecimenWorkListItemListVo specimenWorkListItemList)
{
	
	if (specimenWorkListItemList != null)
	{
		DynamicGridRow row = form.dyngrdCollect().getSelectedRow();
		
		if (specimenWorkListItemList.getCollectionStatus().equals(SpecimenCollectionStatus.MOVEDTOPHLEBOTOMY))
		{
			if (row != null)
			{
				// WDEV-2990 - clear existing cell and then set the value to
				// the
				// selected row
				clearVariableCells(row);
				removeCommonCells(row);
				displayCommonCells(specimenWorkListItemList, row);
				row.setValue(specimenWorkListItemList);
			}
		} //WDEV-16764
		else if (SpecimenCollectionStatus.COLLECTIONCOMPLETE.equals(specimenWorkListItemList.getCollectionStatus()) || SpecimenCollectionStatus.CANCELLED.equals(specimenWorkListItemList.getCollectionStatus()))
		{
			row.setBackColor(Color.LightGray);
			removeCommonCells(row);
			displayCommonCells(specimenWorkListItemList, row);
			enableContextMenu();
		}
	}
}
 
Example 34
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void processCellPostback(DynamicGridCell cell)
{
	if(cell.getColumn().equals(form.dyngrdCollect().getColumns().get(COLLECTED_COLUMN.intValue())))
	{
		if(cell.getValue() == null)
		{
			clearVariableCells(cell.getRow());
			
			//WDEV-16813
			SpecimenWorkListitemCustomVo item = (SpecimenWorkListitemCustomVo) cell.getRow().getValue();

			if (item != null && item.getCollectionComments() != null && item.getCollectionComments().length() > 0)
			{
				DynamicGridCell cellText = cell.getRow().getCells().newCell(form.dyngrdCollect().getColumns().getByIdentifier(COMMENTS_COLUMN), DynamicCellType.STRING);
				cellText.setValue(item.getCollectionComments());
				cellText.setTooltip(item.getCollectionComments());
				cellText.setReadOnly(true);
			}
		}
		else if(cell.getValue().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE))
		{
			createControlsForCollection(cell.getRow(), null);
		}
		else
		{
			createControlsForNotCollection(cell.getRow(), null);
		}
	}
	
	//WDEV-16581
	if(cell.getColumn().equals(form.dyngrdCollect().getColumns().get(PRINT_COL.intValue())))
	{
		if(PrintStatus.PRINTED.equals(cell.getValue()) || cell.getValue() == null)
		{
			cell.getItems().clear();
			cell.getItems().newItem(PrintStatus.FORPRINTING);
		}
	}
}
 
Example 35
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setAnswersOptionsToCell(DynamicGridCell cell)
{
	if (cell == null)
		return;

	cell.getItems().newItem(SpecimenCollectionStatus.COLLECTIONCOMPLETE);
	cell.getItems().newItem(SpecimenCollectionStatus.COULDNOTCOLLECT);
}
 
Example 36
Project: AvoinApotti   File: PhelbotomyDefaultCollectorImpl.java   View source code 5 votes vote down vote up
public PhlebotomyRoundVo savePhlebotomyRound(PhlebotomyRoundVo phlebotomyRoundItem, SpecimenWorkListitemCustomVoCollection collectionItems) throws StaleObjectException
{
	//long t1 = System.currentTimeMillis();
	
	DomainFactory factory = getDomainFactory();
	
	PhlebotomyRound phlebotomyRoundItemBo = PhlebotomyRoundVoAssembler.extractPhlebotomyRound(factory, phlebotomyRoundItem);
	
	for (int i = 0; collectionItems!=null && i < collectionItems.size(); i++)//WDEV-12893
	{
		SpecimenWorkListItem workListItemBo = (SpecimenWorkListItem) factory.getDomainObject(SpecimenWorkListItem.class, collectionItems.get(i).getWorkListitemId());
		
		if(workListItemBo.getSpecimen() != null 
				&& workListItemBo.getSpecimen().getOrder() != null
				&& workListItemBo.getSpecimen().getOrder().getPatient() != null)
		{
			//workListItemBo.setWard(workListItemBo.getSpecimen().getOrder().getPatient().getWard());
			workListItemBo.setWard((Location) factory.getDomainObject(Location.class, collectionItems.get(i).getWardId()));
			factory.save(workListItemBo);
		}
		else if (workListItemBo.getDFTOrderInvestigation() != null)
		{
			workListItemBo.setWard((Location) factory.getDomainObject(Location.class, collectionItems.get(i).getWardId()));
			workListItemBo.setCollectionStatus(factory.getLookupInstance(SpecimenCollectionStatus.COLLECTIONCOMPLETE.getId()));
		}
		
		phlebotomyRoundItemBo.getCollectionItems().add(workListItemBo);
	}
	
	factory.save(phlebotomyRoundItemBo);
	
	//long t2 = System.currentTimeMillis();
	
	//System.out.println((t2-t1) + " ms");
	
	return PhlebotomyRoundVoAssembler.create(phlebotomyRoundItemBo);
}
 
Example 37
Project: AvoinApotti   File: OrderSummaryImpl.java   View source code 5 votes vote down vote up
private void updateSpecimenWorkListItemsForDFT(List<?> orderInvestigations) throws StaleObjectException
{
	if (orderInvestigations == null)
		return;
	
	StringBuilder dftInvestigations = new StringBuilder();
	
	Iterator<?> investigationIterator = orderInvestigations.iterator();
	while (investigationIterator.hasNext())
	{
		OrderInvestigation investigation = (OrderInvestigation) investigationIterator.next();
		
		if (getDomLookup(InvEventType.TIME_SERIES).equals(investigation.getInvestigation().getEventType()))
		{
			if (dftInvestigations.length() > 0)
				dftInvestigations.append(", ");
			dftInvestigations.append(investigation.getId());
		}
	}
	
	if (dftInvestigations.length() > 0)
	{
		List<?> workListItems = getDomainFactory().find("SELECT item FROM SpecimenWorkListItem AS item LEFT JOIN item.dFTOrderInvestigation AS investigation WHERE investigation.id in (" + dftInvestigations.toString() + ")");
		if (workListItems != null && workListItems.size() > 0)
		{
			Iterator<?> worklistIterator = workListItems.iterator();
			while (worklistIterator.hasNext())
			{
				SpecimenWorkListItem worklistItem = (SpecimenWorkListItem) worklistIterator.next();
				worklistItem.setCollectionStatus(getDomLookup(SpecimenCollectionStatus.CANCELLED));
				getDomainFactory().save(worklistItem);
			}
		}
	}
}
 
Example 38
Project: AvoinApotti   File: OrderSummaryImpl.java   View source code 5 votes vote down vote up
/**
 * get a distinct list of the specimens and check for a work list item for each one
 * If one (specimenworklistitem) is found update its SpecimenCollectionStatus to CANCELLED
 * @param doOrdInvs
 */
private void updateSpecimenWorkListItems(List doOrdInvs)  throws StaleObjectException
{
	if (doOrdInvs == null)
		throw new CodingRuntimeException("doOrdInvs cannot be null in method updateSpecimenWorkListItems");
	
	HashMap map = new HashMap<Integer, OrderSpecimen>(); //list of distinct specimens
	Iterator it = doOrdInvs.iterator();
	while(it.hasNext())
	{
		OrderInvestigation doOrdInv = (OrderInvestigation) it.next();
		
		if(doOrdInv.getSpecimen() != null && doOrdInv.getSpecimen().size() > 0)				//wdev-16488
		{
			if(areAllInvestigationsCancelled((OrderSpecimen) doOrdInv.getSpecimen().get(0)))
				map.put(((OrderSpecimen)doOrdInv.getSpecimen().get(0)).getId(), doOrdInv.getSpecimen());
		}
	}
	if(map.size() > 0)
	{
		String idsValues = getSpecimenIdsFromMap(map);
		
		if(idsValues != null && !idsValues.equals(""))
		{
			List workListItems = getDomainFactory().find("from SpecimenWorkListItem item where item.specimen.id in ( " + idsValues + " ) ");
			if(workListItems != null && workListItems.size() > 0)
			{
				Iterator it3 = workListItems.iterator();
				while (it3.hasNext())
				{
					SpecimenWorkListItem item = (SpecimenWorkListItem) it3.next();
					item.setCollectionStatus( getDomLookup( SpecimenCollectionStatus.CANCELLED));
					getDomainFactory().save(item);
				}
			}
		}
		
	}
}
 
Example 39
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private SpecimenCollectionStatus getSecondStatus()
{
	GroupCollectedEnumeration collEnum = form.GroupCollected().getValue();
	if(collEnum != null)
	{
		if(collEnum.equals(GroupCollectedEnumeration.rdoForCollection))
		{	
			return SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT;
		}
	}
	
	return null;
}
 
Example 40
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void setAnswersOptionsToCell(DynamicGridCell cell)
{
	if (cell == null)
		return;

	cell.getItems().newItem(SpecimenCollectionStatus.COLLECTIONCOMPLETE);
	cell.getItems().newItem(SpecimenCollectionStatus.CANCELLED);
}