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

The following are Jave code examples for showing how to use setRoundToCollect() 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: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem)
{
	specimenWorkListItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
	specimenWorkListItem.setListType(SpecimenCollectionMethod.WARDCOLLECTION);
	specimenWorkListItem.setDateToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getDate() : null);
	specimenWorkListItem.setTimeToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getTime() : null);
	specimenWorkListItem.setRoundToCollect(null);
	
	OrderSpecimenListVo item = specimenWorkListItem.getSpecimen(); //WDEV-16898

	for (int j = 0; item.getInvestigationsIsNotNull() && j < item.getInvestigations().size(); j++)
	{
		// cancelled investigations will not be modified
		if (item.getInvestigations().get(j).getInvestigationIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatusIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatusIsNotNull() && (!item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCEL_REQUEST) && !item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCELLED)))
		{
			item.getInvestigations().get(j).setRequiredByDate(form.dtimCollection().getValue());
		}
	}

	String[] errors = specimenWorkListItem.validate(validateUIRules());
	if (errors != null)
	{
		engine.showErrors(errors);
		return false;
	}

	try
	{
		domain.saveWorkListItem(specimenWorkListItem);
	}
	catch (StaleObjectException e)
	{
		if (domain.getSpecimenWorklistItem(form.getLocalContext().getSpecimenWorkListItem().getID_SpecimenWorkListItem()).getWard() != null)
		{
			form.getGlobalContext().OCRR.getMoveToWardDetails().setIsRoundClosed(Boolean.TRUE);
			engine.showMessage("Round was closed by another user. Screen will be refreshed.");
		}
		else
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		
		return true;
	}

	return true;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem()
{
	SpecimenCollectionMethod  colMethod = form.cmbCollection().getValue();
	if(colMethod != null)
	{
		//WDEV-16747
		if (! validateUiRules())
			return false;
		
		//Patient Assessment
		//WDEV-2990 
		SpecimenWorkListItemListVo previousWorkListItemVo = (SpecimenWorkListItemListVo)form.getGlobalContext().OCRR.getSpecimenWorkListItemList().clone();
		previousWorkListItemVo.setCollectionStatus(SpecimenCollectionStatus.MOVEDTOPHLEBOTOMY);
		
		//Newly created Patient Assessment
		SpecimenWorkListItemListVo voItem = new SpecimenWorkListItemListVo();
		//Common info
		voItem.setSpecimen(previousWorkListItemVo.getSpecimen());
		//Update the comment - !!! Any change to the Specimen should be done also in the impl!!!!
		String commentCollected = "Moved to Phlebotomy";
		commentCollected = getPhlebotomistComment(voItem.getSpecimen().getCollectorComment(), engine.getLoggedInUser().getUserRealName(), new DateTime(), commentCollected);
		voItem.getSpecimen().setCollectorComment(commentCollected);
		//------------------
		voItem.setListType(colMethod);
		voItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
		
		if(colMethod.equals(SpecimenCollectionMethod.INPATIENT))
		{
			voItem.setDateToCollect(form.dteDate().getValue());
			voItem.setRoundToCollect(form.cmbRound().getValue());
			updateRequiredByDateField(previousWorkListItemVo, form.dteDate().getValue());//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
		else if(colMethod.equals(SpecimenCollectionMethod.OUTPATIENT))
		{
			Date outpatientDate = calculateOutpatientDate();
			voItem.setDateToCollect(outpatientDate);
			updateRequiredByDateField(previousWorkListItemVo, outpatientDate);//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
	}
	else
	{
		engine.showMessage("Please select a Collection");
		form.cmbCollection().setFocus();
		return false;
	}
	
	return true;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem)
{
	specimenWorkListItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
	specimenWorkListItem.setListType(SpecimenCollectionMethod.WARDCOLLECTION);
	specimenWorkListItem.setDateToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getDate() : null);
	specimenWorkListItem.setTimeToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getTime() : null);
	specimenWorkListItem.setRoundToCollect(null);
	
	OrderSpecimenListVo item = specimenWorkListItem.getSpecimen(); //WDEV-16898

	for (int j = 0; item.getInvestigationsIsNotNull() && j < item.getInvestigations().size(); j++)
	{
		// cancelled investigations will not be modified
		if (item.getInvestigations().get(j).getInvestigationIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatusIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatusIsNotNull() && (!item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCEL_REQUEST) && !item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCELLED)))
		{
			item.getInvestigations().get(j).setRequiredByDate(form.dtimCollection().getValue());
		}
	}

	String[] errors = specimenWorkListItem.validate(validateUIRules());
	if (errors != null)
	{
		engine.showErrors(errors);
		return false;
	}

	try
	{
		domain.saveWorkListItem(specimenWorkListItem);
	}
	catch (StaleObjectException e)
	{
		if (domain.getSpecimenWorklistItem(form.getLocalContext().getSpecimenWorkListItem().getID_SpecimenWorkListItem()).getWard() != null)
		{
			form.getGlobalContext().OCRR.getMoveToWardDetails().setIsRoundClosed(Boolean.TRUE);
			engine.showMessage("Round was closed by another user. Screen will be refreshed.");
		}
		else
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		
		return true;
	}

	return true;
}
 
Example 4
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem()
{
	SpecimenCollectionMethod  colMethod = form.cmbCollection().getValue();
	if(colMethod != null)
	{
		//WDEV-16747
		if (! validateUiRules())
			return false;
		
		//Patient Assessment
		//WDEV-2990 
		SpecimenWorkListItemListVo previousWorkListItemVo = (SpecimenWorkListItemListVo)form.getGlobalContext().OCRR.getSpecimenWorkListItemList().clone();
		previousWorkListItemVo.setCollectionStatus(SpecimenCollectionStatus.MOVEDTOPHLEBOTOMY);
		
		//Newly created Patient Assessment
		SpecimenWorkListItemListVo voItem = new SpecimenWorkListItemListVo();
		//Common info
		voItem.setSpecimen(previousWorkListItemVo.getSpecimen());
		//Update the comment - !!! Any change to the Specimen should be done also in the impl!!!!
		String commentCollected = "Moved to Phlebotomy";
		commentCollected = getPhlebotomistComment(voItem.getSpecimen().getCollectorComment(), engine.getLoggedInUser().getUserRealName(), new DateTime(), commentCollected);
		voItem.getSpecimen().setCollectorComment(commentCollected);
		//------------------
		voItem.setListType(colMethod);
		voItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
		
		if(colMethod.equals(SpecimenCollectionMethod.INPATIENT))
		{
			voItem.setDateToCollect(form.dteDate().getValue());
			voItem.setRoundToCollect(form.cmbRound().getValue());
			updateRequiredByDateField(previousWorkListItemVo, form.dteDate().getValue());//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
		else if(colMethod.equals(SpecimenCollectionMethod.OUTPATIENT))
		{
			Date outpatientDate = calculateOutpatientDate();
			voItem.setDateToCollect(outpatientDate);
			updateRequiredByDateField(previousWorkListItemVo, outpatientDate);//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
	}
	else
	{
		engine.showMessage("Please select a Collection");
		form.cmbCollection().setFocus();
		return false;
	}
	
	return true;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem)
{
	specimenWorkListItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
	specimenWorkListItem.setListType(SpecimenCollectionMethod.WARDCOLLECTION);
	specimenWorkListItem.setDateToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getDate() : null);
	specimenWorkListItem.setTimeToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getTime() : null);
	specimenWorkListItem.setRoundToCollect(null);
	
	OrderSpecimenListVo item = specimenWorkListItem.getSpecimen(); //WDEV-16898

	for (int j = 0; item.getInvestigationsIsNotNull() && j < item.getInvestigations().size(); j++)
	{
		// cancelled investigations will not be modified
		if (item.getInvestigations().get(j).getInvestigationIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatusIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatusIsNotNull() && (!item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCEL_REQUEST) && !item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCELLED)))
		{
			item.getInvestigations().get(j).setRequiredByDate(form.dtimCollection().getValue());
		}
	}

	String[] errors = specimenWorkListItem.validate(validateUIRules());
	if (errors != null)
	{
		engine.showErrors(errors);
		return false;
	}

	try
	{
		domain.saveWorkListItem(specimenWorkListItem);
	}
	catch (StaleObjectException e)
	{
		if (domain.getSpecimenWorklistItem(form.getLocalContext().getSpecimenWorkListItem().getID_SpecimenWorkListItem()).getWard() != null)
		{
			form.getGlobalContext().OCRR.getMoveToWardDetails().setIsRoundClosed(Boolean.TRUE);
			engine.showMessage("Round was closed by another user. Screen will be refreshed.");
		}
		else
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		
		return true;
	}

	return true;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem()
{
	SpecimenCollectionMethod  colMethod = form.cmbCollection().getValue();
	if(colMethod != null)
	{
		//WDEV-16747
		if (! validateUiRules())
			return false;
		
		//Patient Assessment
		//WDEV-2990 
		SpecimenWorkListItemListVo previousWorkListItemVo = (SpecimenWorkListItemListVo)form.getGlobalContext().OCRR.getSpecimenWorkListItemList().clone();
		previousWorkListItemVo.setCollectionStatus(SpecimenCollectionStatus.MOVEDTOPHLEBOTOMY);
		
		//Newly created Patient Assessment
		SpecimenWorkListItemListVo voItem = new SpecimenWorkListItemListVo();
		//Common info
		voItem.setSpecimen(previousWorkListItemVo.getSpecimen());
		//Update the comment - !!! Any change to the Specimen should be done also in the impl!!!!
		String commentCollected = "Moved to Phlebotomy";
		commentCollected = getPhlebotomistComment(voItem.getSpecimen().getCollectorComment(), engine.getLoggedInUser().getUserRealName(), new DateTime(), commentCollected);
		voItem.getSpecimen().setCollectorComment(commentCollected);
		//------------------
		voItem.setListType(colMethod);
		voItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
		
		if(colMethod.equals(SpecimenCollectionMethod.INPATIENT))
		{
			voItem.setDateToCollect(form.dteDate().getValue());
			voItem.setRoundToCollect(form.cmbRound().getValue());
			updateRequiredByDateField(previousWorkListItemVo, form.dteDate().getValue());//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
		else if(colMethod.equals(SpecimenCollectionMethod.OUTPATIENT))
		{
			Date outpatientDate = calculateOutpatientDate();
			voItem.setDateToCollect(outpatientDate);
			updateRequiredByDateField(previousWorkListItemVo, outpatientDate);//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
	}
	else
	{
		engine.showMessage("Please select a Collection");
		form.cmbCollection().setFocus();
		return false;
	}
	
	return true;
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem(SpecimenWorkListItemListVo specimenWorkListItem)
{
	specimenWorkListItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
	specimenWorkListItem.setListType(SpecimenCollectionMethod.WARDCOLLECTION);
	specimenWorkListItem.setDateToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getDate() : null);
	specimenWorkListItem.setTimeToCollect(form.dtimCollection().getValue() != null ? form.dtimCollection().getValue().getTime() : null);
	specimenWorkListItem.setRoundToCollect(null);
	
	OrderSpecimenListVo item = specimenWorkListItem.getSpecimen(); //WDEV-16898

	for (int j = 0; item.getInvestigationsIsNotNull() && j < item.getInvestigations().size(); j++)
	{
		// cancelled investigations will not be modified
		if (item.getInvestigations().get(j).getInvestigationIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatusIsNotNull() && item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatusIsNotNull() && (!item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCEL_REQUEST) && !item.getInvestigations().get(j).getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCELLED)))
		{
			item.getInvestigations().get(j).setRequiredByDate(form.dtimCollection().getValue());
		}
	}

	String[] errors = specimenWorkListItem.validate(validateUIRules());
	if (errors != null)
	{
		engine.showErrors(errors);
		return false;
	}

	try
	{
		domain.saveWorkListItem(specimenWorkListItem);
	}
	catch (StaleObjectException e)
	{
		if (domain.getSpecimenWorklistItem(form.getLocalContext().getSpecimenWorkListItem().getID_SpecimenWorkListItem()).getWard() != null)
		{
			form.getGlobalContext().OCRR.getMoveToWardDetails().setIsRoundClosed(Boolean.TRUE);
			engine.showMessage("Round was closed by another user. Screen will be refreshed.");
		}
		else
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		
		return true;
	}

	return true;
}
 
Example 8
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 4 votes
private boolean saveWorkListItem()
{
	SpecimenCollectionMethod  colMethod = form.cmbCollection().getValue();
	if(colMethod != null)
	{
		//WDEV-16747
		if (! validateUiRules())
			return false;
		
		//Patient Assessment
		//WDEV-2990 
		SpecimenWorkListItemListVo previousWorkListItemVo = (SpecimenWorkListItemListVo)form.getGlobalContext().OCRR.getSpecimenWorkListItemList().clone();
		previousWorkListItemVo.setCollectionStatus(SpecimenCollectionStatus.MOVEDTOPHLEBOTOMY);
		
		//Newly created Patient Assessment
		SpecimenWorkListItemListVo voItem = new SpecimenWorkListItemListVo();
		//Common info
		voItem.setSpecimen(previousWorkListItemVo.getSpecimen());
		//Update the comment - !!! Any change to the Specimen should be done also in the impl!!!!
		String commentCollected = "Moved to Phlebotomy";
		commentCollected = getPhlebotomistComment(voItem.getSpecimen().getCollectorComment(), engine.getLoggedInUser().getUserRealName(), new DateTime(), commentCollected);
		voItem.getSpecimen().setCollectorComment(commentCollected);
		//------------------
		voItem.setListType(colMethod);
		voItem.setCollectionStatus(SpecimenCollectionStatus.FORCOLLECTION);
		
		if(colMethod.equals(SpecimenCollectionMethod.INPATIENT))
		{
			voItem.setDateToCollect(form.dteDate().getValue());
			voItem.setRoundToCollect(form.cmbRound().getValue());
			updateRequiredByDateField(previousWorkListItemVo, form.dteDate().getValue());//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
		else if(colMethod.equals(SpecimenCollectionMethod.OUTPATIENT))
		{
			Date outpatientDate = calculateOutpatientDate();
			voItem.setDateToCollect(outpatientDate);
			updateRequiredByDateField(previousWorkListItemVo, outpatientDate);//WDEV-16898
			
			return saveVos(voItem, previousWorkListItemVo);
		}
	}
	else
	{
		engine.showMessage("Please select a Collection");
		form.cmbCollection().setFocus();
		return false;
	}
	
	return true;
}