/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/clinical/vo/VTERiskAssessmentWorklistCriteriaVo.java
//#############################################################################
//#                                                                           #
//#  Copyright (C) <2015>  <IMS MAXIMS>                                       #
//#                                                                           #
//#  This program is free software: you can redistribute it and/or modify     #
//#  it under the terms of the GNU Affero General Public License as           #
//#  published by the Free Software Foundation, either version 3 of the       #
//#  License, or (at your option) any later version.                          # 
//#                                                                           #
//#  This program is distributed in the hope that it will be useful,          #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of           #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
//#  GNU Affero General Public License for more details.                      #
//#                                                                           #
//#  You should have received a copy of the GNU Affero General Public License #
//#  along with this program.  If not, see <http://www.gnu.org/licenses/>.    #
//#                                                                           #
//#  IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of    #
//#  this program.  Users of this software do so entirely at their own risk.  #
//#  IMS MAXIMS only ensures the Clinical Safety of unaltered run-time        #
//#  software that it builds, deploys and maintains.                          #
//#                                                                           #
//#############################################################################
//#EOH
// This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
// Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
// WARNING: DO NOT MODIFY the content of this file

package ims.clinical.vo;


public class VTERiskAssessmentWorklistCriteriaVo extends ims.vo.ValueObject implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public VTERiskAssessmentWorklistCriteriaVo()
	{
	}
	public VTERiskAssessmentWorklistCriteriaVo(ims.clinical.vo.beans.VTERiskAssessmentWorklistCriteriaVoBean bean)
	{
		this.hospital = bean.getHospital() == null ? null : bean.getHospital().buildVo();
		this.ward = bean.getWard() == null ? null : bean.getWard().buildVo();
		this.admissiondatefrom = bean.getAdmissionDateFrom() == null ? null : bean.getAdmissionDateFrom().buildDateTime();
		this.admissiondateto = bean.getAdmissionDateTo() == null ? null : bean.getAdmissionDateTo().buildDateTime();
		// Interface field type not supported.
		this.specialty = bean.getSpecialty() == null ? null : ims.core.vo.lookups.Specialty.buildLookup(bean.getSpecialty());
		this.patidtype = bean.getPatIdType() == null ? null : ims.core.vo.lookups.PatIdType.buildLookup(bean.getPatIdType());
		this.patidvalue = bean.getPatIdValue();
		this.surname = bean.getSurname();
		this.forename = bean.getForename();
		this.dob = bean.getDOB() == null ? null : bean.getDOB().buildPartialDate();
		this.vtestatus = bean.getVTEStatus() == null ? null : ims.clinical.vo.lookups.VTEAsessmentStatus.buildLookup(bean.getVTEStatus());
		this.over24hours = bean.getOver24Hours();
		this.wastimeron = bean.getWasTimerOn();
		this.currentward = bean.getCurrentWard() == null ? null : bean.getCurrentWard().buildVo();
		this.currentinpatients = bean.getCurrentInpatients();
		this.dischargedpatients = bean.getDischargedPatients();
		this.tcifortoday = bean.getTciForToday();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.clinical.vo.beans.VTERiskAssessmentWorklistCriteriaVoBean bean)
	{
		this.hospital = bean.getHospital() == null ? null : bean.getHospital().buildVo(map);
		this.ward = bean.getWard() == null ? null : bean.getWard().buildVo(map);
		this.admissiondatefrom = bean.getAdmissionDateFrom() == null ? null : bean.getAdmissionDateFrom().buildDateTime();
		this.admissiondateto = bean.getAdmissionDateTo() == null ? null : bean.getAdmissionDateTo().buildDateTime();
		// Interface field type not supported.
		this.specialty = bean.getSpecialty() == null ? null : ims.core.vo.lookups.Specialty.buildLookup(bean.getSpecialty());
		this.patidtype = bean.getPatIdType() == null ? null : ims.core.vo.lookups.PatIdType.buildLookup(bean.getPatIdType());
		this.patidvalue = bean.getPatIdValue();
		this.surname = bean.getSurname();
		this.forename = bean.getForename();
		this.dob = bean.getDOB() == null ? null : bean.getDOB().buildPartialDate();
		this.vtestatus = bean.getVTEStatus() == null ? null : ims.clinical.vo.lookups.VTEAsessmentStatus.buildLookup(bean.getVTEStatus());
		this.over24hours = bean.getOver24Hours();
		this.wastimeron = bean.getWasTimerOn();
		this.currentward = bean.getCurrentWard() == null ? null : bean.getCurrentWard().buildVo(map);
		this.currentinpatients = bean.getCurrentInpatients();
		this.dischargedpatients = bean.getDischargedPatients();
		this.tcifortoday = bean.getTciForToday();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.clinical.vo.beans.VTERiskAssessmentWorklistCriteriaVoBean bean = null;
		if(map != null)
			bean = (ims.clinical.vo.beans.VTERiskAssessmentWorklistCriteriaVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.clinical.vo.beans.VTERiskAssessmentWorklistCriteriaVoBean();
			map.addValueObjectBean(this, bean);
			bean.populate(map, this);
		}
		return bean;
	}
	public boolean getHospitalIsNotNull()
	{
		return this.hospital != null;
	}
	public ims.core.vo.LocSiteLiteVo getHospital()
	{
		return this.hospital;
	}
	public void setHospital(ims.core.vo.LocSiteLiteVo value)
	{
		this.isValidated = false;
		this.hospital = value;
	}
	public boolean getWardIsNotNull()
	{
		return this.ward != null;
	}
	public ims.core.vo.LocationLiteVo getWard()
	{
		return this.ward;
	}
	public void setWard(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.ward = value;
	}
	public boolean getAdmissionDateFromIsNotNull()
	{
		return this.admissiondatefrom != null;
	}
	public ims.framework.utils.DateTime getAdmissionDateFrom()
	{
		return this.admissiondatefrom;
	}
	public void setAdmissionDateFrom(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.admissiondatefrom = value;
	}
	public boolean getAdmissionDateToIsNotNull()
	{
		return this.admissiondateto != null;
	}
	public ims.framework.utils.DateTime getAdmissionDateTo()
	{
		return this.admissiondateto;
	}
	public void setAdmissionDateTo(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.admissiondateto = value;
	}
	public boolean getConsultantIsNotNull()
	{
		return this.consultant != null;
	}
	public ims.vo.interfaces.IMos getConsultant()
	{
		return this.consultant;
	}
	public void setConsultant(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.consultant = value;
	}
	public boolean getSpecialtyIsNotNull()
	{
		return this.specialty != null;
	}
	public ims.core.vo.lookups.Specialty getSpecialty()
	{
		return this.specialty;
	}
	public void setSpecialty(ims.core.vo.lookups.Specialty value)
	{
		this.isValidated = false;
		this.specialty = value;
	}
	public boolean getPatIdTypeIsNotNull()
	{
		return this.patidtype != null;
	}
	public ims.core.vo.lookups.PatIdType getPatIdType()
	{
		return this.patidtype;
	}
	public void setPatIdType(ims.core.vo.lookups.PatIdType value)
	{
		this.isValidated = false;
		this.patidtype = value;
	}
	public boolean getPatIdValueIsNotNull()
	{
		return this.patidvalue != null;
	}
	public String getPatIdValue()
	{
		return this.patidvalue;
	}
	public static int getPatIdValueMaxLength()
	{
		return 255;
	}
	public void setPatIdValue(String value)
	{
		this.isValidated = false;
		this.patidvalue = value;
	}
	public boolean getSurnameIsNotNull()
	{
		return this.surname != null;
	}
	public String getSurname()
	{
		return this.surname;
	}
	public static int getSurnameMaxLength()
	{
		return 255;
	}
	public void setSurname(String value)
	{
		this.isValidated = false;
		this.surname = value;
	}
	public boolean getForenameIsNotNull()
	{
		return this.forename != null;
	}
	public String getForename()
	{
		return this.forename;
	}
	public static int getForenameMaxLength()
	{
		return 255;
	}
	public void setForename(String value)
	{
		this.isValidated = false;
		this.forename = value;
	}
	public boolean getDOBIsNotNull()
	{
		return this.dob != null;
	}
	public ims.framework.utils.PartialDate getDOB()
	{
		return this.dob;
	}
	public void setDOB(ims.framework.utils.PartialDate value)
	{
		this.isValidated = false;
		this.dob = value;
	}
	public boolean getVTEStatusIsNotNull()
	{
		return this.vtestatus != null;
	}
	public ims.clinical.vo.lookups.VTEAsessmentStatus getVTEStatus()
	{
		return this.vtestatus;
	}
	public void setVTEStatus(ims.clinical.vo.lookups.VTEAsessmentStatus value)
	{
		this.isValidated = false;
		this.vtestatus = value;
	}
	public boolean getOver24HoursIsNotNull()
	{
		return this.over24hours != null;
	}
	public Boolean getOver24Hours()
	{
		return this.over24hours;
	}
	public void setOver24Hours(Boolean value)
	{
		this.isValidated = false;
		this.over24hours = value;
	}
	public boolean getWasTimerOnIsNotNull()
	{
		return this.wastimeron != null;
	}
	public Boolean getWasTimerOn()
	{
		return this.wastimeron;
	}
	public void setWasTimerOn(Boolean value)
	{
		this.isValidated = false;
		this.wastimeron = value;
	}
	public boolean getCurrentWardIsNotNull()
	{
		return this.currentward != null;
	}
	public ims.core.vo.LocationLiteVo getCurrentWard()
	{
		return this.currentward;
	}
	public void setCurrentWard(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.currentward = value;
	}
	public boolean getCurrentInpatientsIsNotNull()
	{
		return this.currentinpatients != null;
	}
	public Boolean getCurrentInpatients()
	{
		return this.currentinpatients;
	}
	public void setCurrentInpatients(Boolean value)
	{
		this.isValidated = false;
		this.currentinpatients = value;
	}
	public boolean getDischargedPatientsIsNotNull()
	{
		return this.dischargedpatients != null;
	}
	public Boolean getDischargedPatients()
	{
		return this.dischargedpatients;
	}
	public void setDischargedPatients(Boolean value)
	{
		this.isValidated = false;
		this.dischargedpatients = value;
	}
	public boolean getTciForTodayIsNotNull()
	{
		return this.tcifortoday != null;
	}
	public Boolean getTciForToday()
	{
		return this.tcifortoday;
	}
	public void setTciForToday(Boolean value)
	{
		this.isValidated = false;
		this.tcifortoday = value;
	}
	public final String getIItemText()
	{
		return toString();
	}
	public final Integer getBoId() 
	{
		return null;
	}
	public final String getBoClassName()
	{
		return null;
	}
	public boolean equals(Object obj)
	{
		if(obj == null)
			return false;
		if(!(obj instanceof VTERiskAssessmentWorklistCriteriaVo))
			return false;
		VTERiskAssessmentWorklistCriteriaVo compareObj = (VTERiskAssessmentWorklistCriteriaVo)obj;
		if(this.getHospital() == null && compareObj.getHospital() != null)
			return false;
		if(this.getHospital() != null && compareObj.getHospital() == null)
			return false;
		if(this.getHospital() != null && compareObj.getHospital() != null)
			if(!this.getHospital().equals(compareObj.getHospital()))
				return false;
		if(this.getWard() == null && compareObj.getWard() != null)
			return false;
		if(this.getWard() != null && compareObj.getWard() == null)
			return false;
		if(this.getWard() != null && compareObj.getWard() != null)
			if(!this.getWard().equals(compareObj.getWard()))
				return false;
		if(this.getAdmissionDateFrom() == null && compareObj.getAdmissionDateFrom() != null)
			return false;
		if(this.getAdmissionDateFrom() != null && compareObj.getAdmissionDateFrom() == null)
			return false;
		if(this.getAdmissionDateFrom() != null && compareObj.getAdmissionDateFrom() != null)
			if(!this.getAdmissionDateFrom().equals(compareObj.getAdmissionDateFrom()))
				return false;
		if(this.getAdmissionDateTo() == null && compareObj.getAdmissionDateTo() != null)
			return false;
		if(this.getAdmissionDateTo() != null && compareObj.getAdmissionDateTo() == null)
			return false;
		if(this.getAdmissionDateTo() != null && compareObj.getAdmissionDateTo() != null)
			if(!this.getAdmissionDateTo().equals(compareObj.getAdmissionDateTo()))
				return false;
		if(this.getConsultant() == null && compareObj.getConsultant() != null)
			return false;
		if(this.getConsultant() != null && compareObj.getConsultant() == null)
			return false;
		if(this.getConsultant() != null && compareObj.getConsultant() != null)
			if(!this.getConsultant().equals(compareObj.getConsultant()))
				return false;
		if(this.getSpecialty() == null && compareObj.getSpecialty() != null)
			return false;
		if(this.getSpecialty() != null && compareObj.getSpecialty() == null)
			return false;
		if(this.getSpecialty() != null && compareObj.getSpecialty() != null)
			if(!this.getSpecialty().equals(compareObj.getSpecialty()))
				return false;
		if(this.getPatIdType() == null && compareObj.getPatIdType() != null)
			return false;
		if(this.getPatIdType() != null && compareObj.getPatIdType() == null)
			return false;
		if(this.getPatIdType() != null && compareObj.getPatIdType() != null)
			if(!this.getPatIdType().equals(compareObj.getPatIdType()))
				return false;
		if(this.getPatIdValue() == null && compareObj.getPatIdValue() != null)
			return false;
		if(this.getPatIdValue() != null && compareObj.getPatIdValue() == null)
			return false;
		if(this.getPatIdValue() != null && compareObj.getPatIdValue() != null)
			if(!this.getPatIdValue().equals(compareObj.getPatIdValue()))
				return false;
		if(this.getSurname() == null && compareObj.getSurname() != null)
			return false;
		if(this.getSurname() != null && compareObj.getSurname() == null)
			return false;
		if(this.getSurname() != null && compareObj.getSurname() != null)
			if(!this.getSurname().equals(compareObj.getSurname()))
				return false;
		if(this.getForename() == null && compareObj.getForename() != null)
			return false;
		if(this.getForename() != null && compareObj.getForename() == null)
			return false;
		if(this.getForename() != null && compareObj.getForename() != null)
			if(!this.getForename().equals(compareObj.getForename()))
				return false;
		if(this.getDOB() == null && compareObj.getDOB() != null)
			return false;
		if(this.getDOB() != null && compareObj.getDOB() == null)
			return false;
		if(this.getDOB() != null && compareObj.getDOB() != null)
			if(!this.getDOB().equals(compareObj.getDOB()))
				return false;
		if(this.getVTEStatus() == null && compareObj.getVTEStatus() != null)
			return false;
		if(this.getVTEStatus() != null && compareObj.getVTEStatus() == null)
			return false;
		if(this.getVTEStatus() != null && compareObj.getVTEStatus() != null)
			if(!this.getVTEStatus().equals(compareObj.getVTEStatus()))
				return false;
		if(this.getOver24Hours() == null && compareObj.getOver24Hours() != null)
			return false;
		if(this.getOver24Hours() != null && compareObj.getOver24Hours() == null)
			return false;
		if(this.getOver24Hours() != null && compareObj.getOver24Hours() != null)
			return this.getOver24Hours().equals(compareObj.getOver24Hours());
		return super.equals(obj);
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		this.isBusy = false;
		return true;
	}
	public String[] validate()
	{
		return validate(null);
	}
	public String[] validate(String[] existingErrors)
	{
		if(this.isBusy)
			return null;
		this.isBusy = true;
	
		java.util.ArrayList<String> listOfErrors = new java.util.ArrayList<String>();
		if(existingErrors != null)
		{
			for(int x = 0; x < existingErrors.length; x++)
			{
				listOfErrors.add(existingErrors[x]);
			}
		}
		int errorCount = listOfErrors.size();
		if(errorCount == 0)
		{
			this.isBusy = false;
			this.isValidated = true;
			return null;
		}
		String[] result = new String[errorCount];
		for(int x = 0; x < errorCount; x++)
			result[x] = (String)listOfErrors.get(x);
		this.isBusy = false;
		this.isValidated = false;
		return result;
	}
	public Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		VTERiskAssessmentWorklistCriteriaVo clone = new VTERiskAssessmentWorklistCriteriaVo();
		
		if(this.hospital == null)
			clone.hospital = null;
		else
			clone.hospital = (ims.core.vo.LocSiteLiteVo)this.hospital.clone();
		if(this.ward == null)
			clone.ward = null;
		else
			clone.ward = (ims.core.vo.LocationLiteVo)this.ward.clone();
		if(this.admissiondatefrom == null)
			clone.admissiondatefrom = null;
		else
			clone.admissiondatefrom = (ims.framework.utils.DateTime)this.admissiondatefrom.clone();
		if(this.admissiondateto == null)
			clone.admissiondateto = null;
		else
			clone.admissiondateto = (ims.framework.utils.DateTime)this.admissiondateto.clone();
		clone.consultant = this.consultant;
		if(this.specialty == null)
			clone.specialty = null;
		else
			clone.specialty = (ims.core.vo.lookups.Specialty)this.specialty.clone();
		if(this.patidtype == null)
			clone.patidtype = null;
		else
			clone.patidtype = (ims.core.vo.lookups.PatIdType)this.patidtype.clone();
		clone.patidvalue = this.patidvalue;
		clone.surname = this.surname;
		clone.forename = this.forename;
		if(this.dob == null)
			clone.dob = null;
		else
			clone.dob = (ims.framework.utils.PartialDate)this.dob.clone();
		if(this.vtestatus == null)
			clone.vtestatus = null;
		else
			clone.vtestatus = (ims.clinical.vo.lookups.VTEAsessmentStatus)this.vtestatus.clone();
		clone.over24hours = this.over24hours;
		clone.wastimeron = this.wastimeron;
		if(this.currentward == null)
			clone.currentward = null;
		else
			clone.currentward = (ims.core.vo.LocationLiteVo)this.currentward.clone();
		clone.currentinpatients = this.currentinpatients;
		clone.dischargedpatients = this.dischargedpatients;
		clone.tcifortoday = this.tcifortoday;
		clone.isValidated = this.isValidated;
		
		this.isBusy = false;
		return clone;
	}
	public int compareTo(Object obj)
	{
		return compareTo(obj, true);
	}
	public int compareTo(Object obj, boolean caseInsensitive)
	{
		if (obj == null)
		{
			return -1;
		}
		if(caseInsensitive); // this is to avoid eclipse warning only.
		if (!(VTERiskAssessmentWorklistCriteriaVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A VTERiskAssessmentWorklistCriteriaVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		VTERiskAssessmentWorklistCriteriaVo compareObj = (VTERiskAssessmentWorklistCriteriaVo)obj;
		int retVal = 0;
		if (retVal == 0)
		{
			if(this.getHospital() == null && compareObj.getHospital() != null)
				return -1;
			if(this.getHospital() != null && compareObj.getHospital() == null)
				return 1;
			if(this.getHospital() != null && compareObj.getHospital() != null)
				retVal = this.getHospital().compareTo(compareObj.getHospital());
		}
		if (retVal == 0)
		{
			if(this.getWard() == null && compareObj.getWard() != null)
				return -1;
			if(this.getWard() != null && compareObj.getWard() == null)
				return 1;
			if(this.getWard() != null && compareObj.getWard() != null)
				retVal = this.getWard().compareTo(compareObj.getWard());
		}
		if (retVal == 0)
		{
			if(this.getAdmissionDateFrom() == null && compareObj.getAdmissionDateFrom() != null)
				return -1;
			if(this.getAdmissionDateFrom() != null && compareObj.getAdmissionDateFrom() == null)
				return 1;
			if(this.getAdmissionDateFrom() != null && compareObj.getAdmissionDateFrom() != null)
				retVal = this.getAdmissionDateFrom().compareTo(compareObj.getAdmissionDateFrom());
		}
		if (retVal == 0)
		{
			if(this.getAdmissionDateTo() == null && compareObj.getAdmissionDateTo() != null)
				return -1;
			if(this.getAdmissionDateTo() != null && compareObj.getAdmissionDateTo() == null)
				return 1;
			if(this.getAdmissionDateTo() != null && compareObj.getAdmissionDateTo() != null)
				retVal = this.getAdmissionDateTo().compareTo(compareObj.getAdmissionDateTo());
		}
		if (retVal == 0)
		{
			if(this.getConsultant() == null && compareObj.getConsultant() != null)
				return -1;
			if(this.getConsultant() != null && compareObj.getConsultant() == null)
				return 1;
			if(this.getConsultant() != null && compareObj.getConsultant() != null)
				retVal = this.getConsultant().compareTo(compareObj.getConsultant());
		}
		if (retVal == 0)
		{
			if(this.getSpecialty() == null && compareObj.getSpecialty() != null)
				return -1;
			if(this.getSpecialty() != null && compareObj.getSpecialty() == null)
				return 1;
			if(this.getSpecialty() != null && compareObj.getSpecialty() != null)
				retVal = this.getSpecialty().compareTo(compareObj.getSpecialty());
		}
		if (retVal == 0)
		{
			if(this.getPatIdType() == null && compareObj.getPatIdType() != null)
				return -1;
			if(this.getPatIdType() != null && compareObj.getPatIdType() == null)
				return 1;
			if(this.getPatIdType() != null && compareObj.getPatIdType() != null)
				retVal = this.getPatIdType().compareTo(compareObj.getPatIdType());
		}
		if (retVal == 0)
		{
			if(this.getPatIdValue() == null && compareObj.getPatIdValue() != null)
				return -1;
			if(this.getPatIdValue() != null && compareObj.getPatIdValue() == null)
				return 1;
			if(this.getPatIdValue() != null && compareObj.getPatIdValue() != null)
			{
				if(caseInsensitive)
					retVal = this.getPatIdValue().toLowerCase().compareTo(compareObj.getPatIdValue().toLowerCase());
				else
					retVal = this.getPatIdValue().compareTo(compareObj.getPatIdValue());
			}
		}
		if (retVal == 0)
		{
			if(this.getSurname() == null && compareObj.getSurname() != null)
				return -1;
			if(this.getSurname() != null && compareObj.getSurname() == null)
				return 1;
			if(this.getSurname() != null && compareObj.getSurname() != null)
			{
				if(caseInsensitive)
					retVal = this.getSurname().toLowerCase().compareTo(compareObj.getSurname().toLowerCase());
				else
					retVal = this.getSurname().compareTo(compareObj.getSurname());
			}
		}
		if (retVal == 0)
		{
			if(this.getForename() == null && compareObj.getForename() != null)
				return -1;
			if(this.getForename() != null && compareObj.getForename() == null)
				return 1;
			if(this.getForename() != null && compareObj.getForename() != null)
			{
				if(caseInsensitive)
					retVal = this.getForename().toLowerCase().compareTo(compareObj.getForename().toLowerCase());
				else
					retVal = this.getForename().compareTo(compareObj.getForename());
			}
		}
		if (retVal == 0)
		{
			if(this.getDOB() == null && compareObj.getDOB() != null)
				return -1;
			if(this.getDOB() != null && compareObj.getDOB() == null)
				return 1;
			if(this.getDOB() != null && compareObj.getDOB() != null)
				retVal = this.getDOB().compareTo(compareObj.getDOB());
		}
		if (retVal == 0)
		{
			if(this.getVTEStatus() == null && compareObj.getVTEStatus() != null)
				return -1;
			if(this.getVTEStatus() != null && compareObj.getVTEStatus() == null)
				return 1;
			if(this.getVTEStatus() != null && compareObj.getVTEStatus() != null)
				retVal = this.getVTEStatus().compareTo(compareObj.getVTEStatus());
		}
		if (retVal == 0)
		{
			if(this.getOver24Hours() == null && compareObj.getOver24Hours() != null)
				return -1;
			if(this.getOver24Hours() != null && compareObj.getOver24Hours() == null)
				return 1;
			if(this.getOver24Hours() != null && compareObj.getOver24Hours() != null)
				retVal = this.getOver24Hours().compareTo(compareObj.getOver24Hours());
		}
		return retVal;
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.hospital != null)
			count++;
		if(this.ward != null)
			count++;
		if(this.admissiondatefrom != null)
			count++;
		if(this.admissiondateto != null)
			count++;
		if(this.consultant != null)
			count++;
		if(this.specialty != null)
			count++;
		if(this.patidtype != null)
			count++;
		if(this.patidvalue != null)
			count++;
		if(this.surname != null)
			count++;
		if(this.forename != null)
			count++;
		if(this.dob != null)
			count++;
		if(this.vtestatus != null)
			count++;
		if(this.over24hours != null)
			count++;
		if(this.wastimeron != null)
			count++;
		if(this.currentward != null)
			count++;
		if(this.currentinpatients != null)
			count++;
		if(this.dischargedpatients != null)
			count++;
		if(this.tcifortoday != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 18;
	}
	protected ims.core.vo.LocSiteLiteVo hospital;
	protected ims.core.vo.LocationLiteVo ward;
	protected ims.framework.utils.DateTime admissiondatefrom;
	protected ims.framework.utils.DateTime admissiondateto;
	protected ims.vo.interfaces.IMos consultant;
	protected ims.core.vo.lookups.Specialty specialty;
	protected ims.core.vo.lookups.PatIdType patidtype;
	protected String patidvalue;
	protected String surname;
	protected String forename;
	protected ims.framework.utils.PartialDate dob;
	protected ims.clinical.vo.lookups.VTEAsessmentStatus vtestatus;
	protected Boolean over24hours;
	protected Boolean wastimeron;
	protected ims.core.vo.LocationLiteVo currentward;
	protected Boolean currentinpatients;
	protected Boolean dischargedpatients;
	protected Boolean tcifortoday;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
