Java Code Examples for ims.ocrr.vo.SpecimenWorkListItemListVo.isValidated()

The following are Jave code examples for showing how to use isValidated() of the ims.ocrr.vo.SpecimenWorkListItemListVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: MoveToWardSpecimenCollectionImpl.java   View Source Code Vote up 5 votes
public void saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem) throws StaleObjectException
{
	if (specimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null specimenWorkListItem");

	if (!specimenWorkListItem.isValidated())
		throw new DomainRuntimeException("SpecimenWorkListItemVo Not Validated.");

	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem domainSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);

	factory.save(domainSpecimenWorkListItem);
}
 
Example 2
Project: AvoinApotti   File: WardSpecimenMoveToImpl.java   View Source Code Vote up 5 votes
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem, SpecimenWorkListItemListVo prevSpecimenWorkListItem) throws StaleObjectException
{
	if(specimenWorkListItem == null || prevSpecimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	if(specimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Current SpecimenWorkListItemListVo is not validated");
	}
	if(prevSpecimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Parent SpecimenWorkListItemListVo is not validated");
	}
			
	DomainFactory factory = getDomainFactory();

	//Save previous specimen
	SpecimenWorkListItem doPrevSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, prevSpecimenWorkListItem);
	factory.save(doPrevSpecimen);
	SpecimenWorkListItemListVo voPrevSpecimen = SpecimenWorkListItemListVoAssembler.create(doPrevSpecimen);

	//Avoid stale object Exception by setting again the specimen and setting the comment from the old vo
	OrderSpecimenListVo newSpecimen = voPrevSpecimen.getSpecimen();
	specimenWorkListItem.getSpecimen().setCollectorComment(newSpecimen.getCollectorComment());
	specimenWorkListItem.setSpecimen(newSpecimen);
	//Save the newly created specimen
	SpecimenWorkListItem doSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);
	factory.save(doSpecimen);

	return voPrevSpecimen;
}
 
Example 3
Project: openMAXIMS   File: MoveToWardSpecimenCollectionImpl.java   View Source Code Vote up 5 votes
public void saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem) throws StaleObjectException
{
	if (specimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null specimenWorkListItem");

	if (!specimenWorkListItem.isValidated())
		throw new DomainRuntimeException("SpecimenWorkListItemVo Not Validated.");

	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem domainSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);

	factory.save(domainSpecimenWorkListItem);
}
 
Example 4
Project: openMAXIMS   File: WardSpecimenMoveToImpl.java   View Source Code Vote up 5 votes
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem, SpecimenWorkListItemListVo prevSpecimenWorkListItem) throws StaleObjectException
{
	if(specimenWorkListItem == null || prevSpecimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	if(specimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Current SpecimenWorkListItemListVo is not validated");
	}
	if(prevSpecimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Parent SpecimenWorkListItemListVo is not validated");
	}
			
	DomainFactory factory = getDomainFactory();

	//Save previous specimen
	SpecimenWorkListItem doPrevSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, prevSpecimenWorkListItem);
	factory.save(doPrevSpecimen);
	SpecimenWorkListItemListVo voPrevSpecimen = SpecimenWorkListItemListVoAssembler.create(doPrevSpecimen);

	//Avoid stale object Exception by setting again the specimen and setting the comment from the old vo
	OrderSpecimenListVo newSpecimen = voPrevSpecimen.getSpecimen();
	specimenWorkListItem.getSpecimen().setCollectorComment(newSpecimen.getCollectorComment());
	specimenWorkListItem.setSpecimen(newSpecimen);
	//Save the newly created specimen
	SpecimenWorkListItem doSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);
	factory.save(doSpecimen);

	return voPrevSpecimen;
}
 
Example 5
Project: openMAXIMS   File: MoveToWardSpecimenCollectionImpl.java   View Source Code Vote up 5 votes
public void saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem) throws StaleObjectException
{
	if (specimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null specimenWorkListItem");

	if (!specimenWorkListItem.isValidated())
		throw new DomainRuntimeException("SpecimenWorkListItemVo Not Validated.");

	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem domainSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);

	factory.save(domainSpecimenWorkListItem);
}
 
Example 6
Project: openMAXIMS   File: WardSpecimenMoveToImpl.java   View Source Code Vote up 5 votes
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem, SpecimenWorkListItemListVo prevSpecimenWorkListItem) throws StaleObjectException
{
	if(specimenWorkListItem == null || prevSpecimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	if(specimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Current SpecimenWorkListItemListVo is not validated");
	}
	if(prevSpecimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Parent SpecimenWorkListItemListVo is not validated");
	}
			
	DomainFactory factory = getDomainFactory();

	//Save previous specimen
	SpecimenWorkListItem doPrevSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, prevSpecimenWorkListItem);
	factory.save(doPrevSpecimen);
	SpecimenWorkListItemListVo voPrevSpecimen = SpecimenWorkListItemListVoAssembler.create(doPrevSpecimen);

	//Avoid stale object Exception by setting again the specimen and setting the comment from the old vo
	OrderSpecimenListVo newSpecimen = voPrevSpecimen.getSpecimen();
	specimenWorkListItem.getSpecimen().setCollectorComment(newSpecimen.getCollectorComment());
	specimenWorkListItem.setSpecimen(newSpecimen);
	//Save the newly created specimen
	SpecimenWorkListItem doSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);
	factory.save(doSpecimen);

	return voPrevSpecimen;
}
 
Example 7
Project: openmaxims-linux   File: MoveToWardSpecimenCollectionImpl.java   View Source Code Vote up 5 votes
public void saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem) throws StaleObjectException
{
	if (specimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null specimenWorkListItem");

	if (!specimenWorkListItem.isValidated())
		throw new DomainRuntimeException("SpecimenWorkListItemVo Not Validated.");

	DomainFactory factory = getDomainFactory();
	SpecimenWorkListItem domainSpecimenWorkListItem = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);

	factory.save(domainSpecimenWorkListItem);
}
 
Example 8
Project: openmaxims-linux   File: WardSpecimenMoveToImpl.java   View Source Code Vote up 5 votes
public SpecimenWorkListItemListVo saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem, SpecimenWorkListItemListVo prevSpecimenWorkListItem) throws StaleObjectException
{
	if(specimenWorkListItem == null || prevSpecimenWorkListItem == null)
		throw new CodingRuntimeException("Cannot save null SpecimenWorkListItemListVo");
	if(specimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Current SpecimenWorkListItemListVo is not validated");
	}
	if(prevSpecimenWorkListItem.isValidated() == false)
	{
		throw new RuntimeException("Parent SpecimenWorkListItemListVo is not validated");
	}
			
	DomainFactory factory = getDomainFactory();

	//Save previous specimen
	SpecimenWorkListItem doPrevSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, prevSpecimenWorkListItem);
	factory.save(doPrevSpecimen);
	SpecimenWorkListItemListVo voPrevSpecimen = SpecimenWorkListItemListVoAssembler.create(doPrevSpecimen);

	//Avoid stale object Exception by setting again the specimen and setting the comment from the old vo
	OrderSpecimenListVo newSpecimen = voPrevSpecimen.getSpecimen();
	specimenWorkListItem.getSpecimen().setCollectorComment(newSpecimen.getCollectorComment());
	specimenWorkListItem.setSpecimen(newSpecimen);
	//Save the newly created specimen
	SpecimenWorkListItem doSpecimen = SpecimenWorkListItemListVoAssembler.extractSpecimenWorkListItem(factory, specimenWorkListItem);
	factory.save(doSpecimen);

	return voPrevSpecimen;
}