Java Code Examples for ims.core.vo.lookups.MRNStatus

The following are top voted examples for showing how to use ims.core.vo.lookups.MRNStatus. 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: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean isNotValidMRN(TrackingVo trackingPatient, PatIdType identifierType)
{
	if( trackingPatient == null || identifierType == null)
		return false;
	
	if(trackingPatient.getPatient() != null && (MRNStatus.NONE.equals(trackingPatient.getPatient().getMRNStatus()) || MRNStatus.WAITING.equals(trackingPatient.getPatient().getMRNStatus())))
		return true;
	
	String mrNumber = null;
	
	if(trackingPatient.getPatientIsNotNull() && trackingPatient.getPatient().getIdentifiersIsNotNull())
	{
		for(int j=0; j<trackingPatient.getPatient().getIdentifiers().size(); j++)
		{
			if(identifierType.equals(trackingPatient.getPatient().getIdentifiers().get(j).getType()))
			{
				mrNumber = trackingPatient.getPatient().getIdentifiers().get(j).getValue();
			}
		}
	}
	
	if( mrNumber != null && mrNumber.length() > 0)
	{
		mrNumber  = mrNumber.trim();
		if(mrNumber.length() > 0 && mrNumber.charAt(0) == '9')
			return true;
	}
	
	return false;
}
 
Example 2
Project: openMAXIMS   File: TrackingImpl.java   View source code 4 votes vote down vote up
private MRNStatus assembleMRNStatusLookupItem(LookupInstance mrnstatus) 
{
	if( mrnstatus == null)
		return null;
	
	ims.framework.utils.ImagePath img = null;
	ims.framework.utils.Color color = null;		
	img = null;
	
	if (mrnstatus.getImage() != null) 
	{
		img = new ims.framework.utils.ImagePath(mrnstatus.getImage().getImageId(), mrnstatus.getImage().getImagePath());
	}
	color = mrnstatus.getColor();
	
	if (color != null) 
		color.getValue();

	ims.core.vo.lookups.MRNStatus voLookup = new ims.core.vo.lookups.MRNStatus(mrnstatus.getId(),mrnstatus.getText(), mrnstatus.isActive(), null, img, color);
	ims.core.vo.lookups.MRNStatus parentVoLookup = voLookup;
	ims.domain.lookups.LookupInstance parent = mrnstatus.getParent();
	
	while (parent != null)
	{
		if (parent.getImage() != null) 
		{
			img = new ims.framework.utils.ImagePath(parent.getImage().getImageId(), parent.getImage().getImagePath() );
		}
		else 
		{
			img = null;
		}
		
		color = parent.getColor();
		
		if (color != null) 
			color.getValue();
		
		parentVoLookup.setParent(new ims.core.vo.lookups.MRNStatus(parent.getId(),parent.getText(), parent.isActive(), null, img, color));
		parentVoLookup = parentVoLookup.getParent();
		parent = parent.getParent();
	}			
	
	return voLookup;
}