/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/hl7/vo/ifElectiveListMessageQueueVo.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.hl7.vo;

/**
 * Linked to RefMan.PatientElectiveList business object (ID: 1014100020).
 */
public class ifElectiveListMessageQueueVo extends ims.RefMan.vo.PatientElectiveListRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public ifElectiveListMessageQueueVo()
	{
	}
	public ifElectiveListMessageQueueVo(Integer id, int version)
	{
		super(id, version);
	}
	public ifElectiveListMessageQueueVo(ims.hl7.vo.beans.ifElectiveListMessageQueueVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.dateonlist = bean.getDateOnList() == null ? null : bean.getDateOnList().buildDate();
		this.patientstatus = bean.getPatientStatus() == null ? null : ims.RefMan.vo.lookups.CatsReferralCategory.buildLookup(bean.getPatientStatus());
		this.electiveadmissiontype = bean.getElectiveAdmissionType() == null ? null : ims.RefMan.vo.lookups.ElectiveAdmissionType.buildLookup(bean.getElectiveAdmissionType());
		this.intendedmanagement = bean.getIntendedManagement() == null ? null : ims.core.vo.lookups.ManagementIntention.buildLookup(bean.getIntendedManagement());
		this.anticipatedstay = bean.getAnticipatedStay();
		this.referringgp = bean.getReferringGP() == null ? null : bean.getReferringGP().buildVo();
		this.referringconsultant = bean.getReferringConsultant() == null ? null : bean.getReferringConsultant().buildVo();
		this.consultingdoctor = bean.getConsultingDoctor() == null ? null : bean.getConsultingDoctor().buildVo();
		this.specialty = bean.getSpecialty() == null ? null : ims.core.vo.lookups.Specialty.buildLookup(bean.getSpecialty());
		this.tciward = bean.getTCIWard() == null ? null : bean.getTCIWard().buildVo();
		this.tcidate = bean.getTCIDate() == null ? null : bean.getTCIDate().buildDate();
		this.alliedhealthprofessional = bean.getAlliedHealthProfessional();
		this.referringpractice = bean.getReferringPractice() == null ? null : bean.getReferringPractice().buildVo();
		this.patient = bean.getPatient() == null ? null : bean.getPatient().buildVo();
		this.attendingdoctor = bean.getAttendingDoctor() == null ? null : bean.getAttendingDoctor().buildVo();
		this.tcihospital = bean.getTCIHospital() == null ? null : bean.getTCIHospital().buildVo();
		this.tcibed = bean.getTCIBed();
		this.preadmissionnumber = bean.getPreadmissionNumber();
		this.tcitime = bean.getTCITime() == null ? null : bean.getTCITime().buildTime();
		this.referrertype = bean.getReferrerType() == null ? null : ims.core.vo.lookups.SourceOfReferral.buildLookup(bean.getReferrerType());
		this.patientsuspensionstatus = bean.getPatientSuspensionStatus();
		this.cancertype = bean.getCancerType() == null ? null : ims.RefMan.vo.lookups.CancerType.buildLookup(bean.getCancerType());
		this.referralurgency = bean.getReferralUrgency() == null ? null : ims.RefMan.vo.lookups.ReferralUrgency.buildLookup(bean.getReferralUrgency());
		this.datereferralreceived = bean.getDateReferralReceived() == null ? null : bean.getDateReferralReceived().buildDate();
		this.rttstatusnationalcode = bean.getRTTStatusNationalCode();
		this.referringpracticeccgcode = bean.getReferringPracticeCCGCode();
		this.systeminfo = bean.getSystemInfo() == null ? null : bean.getSystemInfo().buildSystemInformation();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.hl7.vo.beans.ifElectiveListMessageQueueVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.dateonlist = bean.getDateOnList() == null ? null : bean.getDateOnList().buildDate();
		this.patientstatus = bean.getPatientStatus() == null ? null : ims.RefMan.vo.lookups.CatsReferralCategory.buildLookup(bean.getPatientStatus());
		this.electiveadmissiontype = bean.getElectiveAdmissionType() == null ? null : ims.RefMan.vo.lookups.ElectiveAdmissionType.buildLookup(bean.getElectiveAdmissionType());
		this.intendedmanagement = bean.getIntendedManagement() == null ? null : ims.core.vo.lookups.ManagementIntention.buildLookup(bean.getIntendedManagement());
		this.anticipatedstay = bean.getAnticipatedStay();
		this.referringgp = bean.getReferringGP() == null ? null : bean.getReferringGP().buildVo(map);
		this.referringconsultant = bean.getReferringConsultant() == null ? null : bean.getReferringConsultant().buildVo(map);
		this.consultingdoctor = bean.getConsultingDoctor() == null ? null : bean.getConsultingDoctor().buildVo(map);
		this.specialty = bean.getSpecialty() == null ? null : ims.core.vo.lookups.Specialty.buildLookup(bean.getSpecialty());
		this.tciward = bean.getTCIWard() == null ? null : bean.getTCIWard().buildVo(map);
		this.tcidate = bean.getTCIDate() == null ? null : bean.getTCIDate().buildDate();
		this.alliedhealthprofessional = bean.getAlliedHealthProfessional();
		this.referringpractice = bean.getReferringPractice() == null ? null : bean.getReferringPractice().buildVo(map);
		this.patient = bean.getPatient() == null ? null : bean.getPatient().buildVo(map);
		this.attendingdoctor = bean.getAttendingDoctor() == null ? null : bean.getAttendingDoctor().buildVo(map);
		this.tcihospital = bean.getTCIHospital() == null ? null : bean.getTCIHospital().buildVo(map);
		this.tcibed = bean.getTCIBed();
		this.preadmissionnumber = bean.getPreadmissionNumber();
		this.tcitime = bean.getTCITime() == null ? null : bean.getTCITime().buildTime();
		this.referrertype = bean.getReferrerType() == null ? null : ims.core.vo.lookups.SourceOfReferral.buildLookup(bean.getReferrerType());
		this.patientsuspensionstatus = bean.getPatientSuspensionStatus();
		this.cancertype = bean.getCancerType() == null ? null : ims.RefMan.vo.lookups.CancerType.buildLookup(bean.getCancerType());
		this.referralurgency = bean.getReferralUrgency() == null ? null : ims.RefMan.vo.lookups.ReferralUrgency.buildLookup(bean.getReferralUrgency());
		this.datereferralreceived = bean.getDateReferralReceived() == null ? null : bean.getDateReferralReceived().buildDate();
		this.rttstatusnationalcode = bean.getRTTStatusNationalCode();
		this.referringpracticeccgcode = bean.getReferringPracticeCCGCode();
		this.systeminfo = bean.getSystemInfo() == null ? null : bean.getSystemInfo().buildSystemInformation();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.hl7.vo.beans.ifElectiveListMessageQueueVoBean bean = null;
		if(map != null)
			bean = (ims.hl7.vo.beans.ifElectiveListMessageQueueVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.hl7.vo.beans.ifElectiveListMessageQueueVoBean();
			map.addValueObjectBean(this, bean);
			bean.populate(map, this);
		}
		return bean;
	}
	public Object getFieldValueByFieldName(String fieldName)
	{
		if(fieldName == null)
			throw new ims.framework.exceptions.CodingRuntimeException("Invalid field name");
		fieldName = fieldName.toUpperCase();
		if(fieldName.equals("DATEONLIST"))
			return getDateOnList();
		if(fieldName.equals("PATIENTSTATUS"))
			return getPatientStatus();
		if(fieldName.equals("ELECTIVEADMISSIONTYPE"))
			return getElectiveAdmissionType();
		if(fieldName.equals("INTENDEDMANAGEMENT"))
			return getIntendedManagement();
		if(fieldName.equals("ANTICIPATEDSTAY"))
			return getAnticipatedStay();
		if(fieldName.equals("REFERRINGGP"))
			return getReferringGP();
		if(fieldName.equals("REFERRINGCONSULTANT"))
			return getReferringConsultant();
		if(fieldName.equals("CONSULTINGDOCTOR"))
			return getConsultingDoctor();
		if(fieldName.equals("SPECIALTY"))
			return getSpecialty();
		if(fieldName.equals("TCIWARD"))
			return getTCIWard();
		if(fieldName.equals("TCIDATE"))
			return getTCIDate();
		if(fieldName.equals("ALLIEDHEALTHPROFESSIONAL"))
			return getAlliedHealthProfessional();
		if(fieldName.equals("REFERRINGPRACTICE"))
			return getReferringPractice();
		if(fieldName.equals("PATIENT"))
			return getPatient();
		if(fieldName.equals("ATTENDINGDOCTOR"))
			return getAttendingDoctor();
		if(fieldName.equals("TCIHOSPITAL"))
			return getTCIHospital();
		if(fieldName.equals("TCIBED"))
			return getTCIBed();
		if(fieldName.equals("PREADMISSIONNUMBER"))
			return getPreadmissionNumber();
		if(fieldName.equals("TCITIME"))
			return getTCITime();
		if(fieldName.equals("REFERRERTYPE"))
			return getReferrerType();
		if(fieldName.equals("PATIENTSUSPENSIONSTATUS"))
			return getPatientSuspensionStatus();
		if(fieldName.equals("CANCERTYPE"))
			return getCancerType();
		if(fieldName.equals("REFERRALURGENCY"))
			return getReferralUrgency();
		if(fieldName.equals("DATEREFERRALRECEIVED"))
			return getDateReferralReceived();
		if(fieldName.equals("RTTSTATUSNATIONALCODE"))
			return getRTTStatusNationalCode();
		if(fieldName.equals("REFERRINGPRACTICECCGCODE"))
			return getReferringPracticeCCGCode();
		if(fieldName.equals("SYSTEMINFO"))
			return getSystemInfo();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getDateOnListIsNotNull()
	{
		return this.dateonlist != null;
	}
	public ims.framework.utils.Date getDateOnList()
	{
		return this.dateonlist;
	}
	public void setDateOnList(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.dateonlist = value;
	}
	public boolean getPatientStatusIsNotNull()
	{
		return this.patientstatus != null;
	}
	public ims.RefMan.vo.lookups.CatsReferralCategory getPatientStatus()
	{
		return this.patientstatus;
	}
	public void setPatientStatus(ims.RefMan.vo.lookups.CatsReferralCategory value)
	{
		this.isValidated = false;
		this.patientstatus = value;
	}
	public boolean getElectiveAdmissionTypeIsNotNull()
	{
		return this.electiveadmissiontype != null;
	}
	public ims.RefMan.vo.lookups.ElectiveAdmissionType getElectiveAdmissionType()
	{
		return this.electiveadmissiontype;
	}
	public void setElectiveAdmissionType(ims.RefMan.vo.lookups.ElectiveAdmissionType value)
	{
		this.isValidated = false;
		this.electiveadmissiontype = value;
	}
	public boolean getIntendedManagementIsNotNull()
	{
		return this.intendedmanagement != null;
	}
	public ims.core.vo.lookups.ManagementIntention getIntendedManagement()
	{
		return this.intendedmanagement;
	}
	public void setIntendedManagement(ims.core.vo.lookups.ManagementIntention value)
	{
		this.isValidated = false;
		this.intendedmanagement = value;
	}
	public boolean getAnticipatedStayIsNotNull()
	{
		return this.anticipatedstay != null;
	}
	public Integer getAnticipatedStay()
	{
		return this.anticipatedstay;
	}
	public void setAnticipatedStay(Integer value)
	{
		this.isValidated = false;
		this.anticipatedstay = value;
	}
	public boolean getReferringGPIsNotNull()
	{
		return this.referringgp != null;
	}
	public ims.core.vo.GpLiteVo getReferringGP()
	{
		return this.referringgp;
	}
	public void setReferringGP(ims.core.vo.GpLiteVo value)
	{
		this.isValidated = false;
		this.referringgp = value;
	}
	public boolean getReferringConsultantIsNotNull()
	{
		return this.referringconsultant != null;
	}
	public ims.core.vo.MemberOfStaffShortVo getReferringConsultant()
	{
		return this.referringconsultant;
	}
	public void setReferringConsultant(ims.core.vo.MemberOfStaffShortVo value)
	{
		this.isValidated = false;
		this.referringconsultant = value;
	}
	public boolean getConsultingDoctorIsNotNull()
	{
		return this.consultingdoctor != null;
	}
	public ims.core.vo.MemberOfStaffShortVo getConsultingDoctor()
	{
		return this.consultingdoctor;
	}
	public void setConsultingDoctor(ims.core.vo.MemberOfStaffShortVo value)
	{
		this.isValidated = false;
		this.consultingdoctor = 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 getTCIWardIsNotNull()
	{
		return this.tciward != null;
	}
	public ims.core.vo.LocMostVo getTCIWard()
	{
		return this.tciward;
	}
	public void setTCIWard(ims.core.vo.LocMostVo value)
	{
		this.isValidated = false;
		this.tciward = value;
	}
	public boolean getTCIDateIsNotNull()
	{
		return this.tcidate != null;
	}
	public ims.framework.utils.Date getTCIDate()
	{
		return this.tcidate;
	}
	public void setTCIDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.tcidate = value;
	}
	public boolean getAlliedHealthProfessionalIsNotNull()
	{
		return this.alliedhealthprofessional != null;
	}
	public String getAlliedHealthProfessional()
	{
		return this.alliedhealthprofessional;
	}
	public static int getAlliedHealthProfessionalMaxLength()
	{
		return 255;
	}
	public void setAlliedHealthProfessional(String value)
	{
		this.isValidated = false;
		this.alliedhealthprofessional = value;
	}
	public boolean getReferringPracticeIsNotNull()
	{
		return this.referringpractice != null;
	}
	public ims.core.vo.OrgShortVo getReferringPractice()
	{
		return this.referringpractice;
	}
	public void setReferringPractice(ims.core.vo.OrgShortVo value)
	{
		this.isValidated = false;
		this.referringpractice = value;
	}
	public boolean getPatientIsNotNull()
	{
		return this.patient != null;
	}
	public ims.core.vo.Patient getPatient()
	{
		return this.patient;
	}
	public void setPatient(ims.core.vo.Patient value)
	{
		this.isValidated = false;
		this.patient = value;
	}
	public boolean getAttendingDoctorIsNotNull()
	{
		return this.attendingdoctor != null;
	}
	public ims.core.vo.MemberOfStaffShortVo getAttendingDoctor()
	{
		return this.attendingdoctor;
	}
	public void setAttendingDoctor(ims.core.vo.MemberOfStaffShortVo value)
	{
		this.isValidated = false;
		this.attendingdoctor = value;
	}
	public boolean getTCIHospitalIsNotNull()
	{
		return this.tcihospital != null;
	}
	public ims.core.vo.LocMostVo getTCIHospital()
	{
		return this.tcihospital;
	}
	public void setTCIHospital(ims.core.vo.LocMostVo value)
	{
		this.isValidated = false;
		this.tcihospital = value;
	}
	public boolean getTCIBedIsNotNull()
	{
		return this.tcibed != null;
	}
	public String getTCIBed()
	{
		return this.tcibed;
	}
	public static int getTCIBedMaxLength()
	{
		return 255;
	}
	public void setTCIBed(String value)
	{
		this.isValidated = false;
		this.tcibed = value;
	}
	public boolean getPreadmissionNumberIsNotNull()
	{
		return this.preadmissionnumber != null;
	}
	public String getPreadmissionNumber()
	{
		return this.preadmissionnumber;
	}
	public static int getPreadmissionNumberMaxLength()
	{
		return 255;
	}
	public void setPreadmissionNumber(String value)
	{
		this.isValidated = false;
		this.preadmissionnumber = value;
	}
	public boolean getTCITimeIsNotNull()
	{
		return this.tcitime != null;
	}
	public ims.framework.utils.Time getTCITime()
	{
		return this.tcitime;
	}
	public void setTCITime(ims.framework.utils.Time value)
	{
		this.isValidated = false;
		this.tcitime = value;
	}
	public boolean getReferrerTypeIsNotNull()
	{
		return this.referrertype != null;
	}
	public ims.core.vo.lookups.SourceOfReferral getReferrerType()
	{
		return this.referrertype;
	}
	public void setReferrerType(ims.core.vo.lookups.SourceOfReferral value)
	{
		this.isValidated = false;
		this.referrertype = value;
	}
	public boolean getPatientSuspensionStatusIsNotNull()
	{
		return this.patientsuspensionstatus != null;
	}
	public String getPatientSuspensionStatus()
	{
		return this.patientsuspensionstatus;
	}
	public static int getPatientSuspensionStatusMaxLength()
	{
		return 255;
	}
	public void setPatientSuspensionStatus(String value)
	{
		this.isValidated = false;
		this.patientsuspensionstatus = value;
	}
	public boolean getCancerTypeIsNotNull()
	{
		return this.cancertype != null;
	}
	public ims.RefMan.vo.lookups.CancerType getCancerType()
	{
		return this.cancertype;
	}
	public void setCancerType(ims.RefMan.vo.lookups.CancerType value)
	{
		this.isValidated = false;
		this.cancertype = value;
	}
	public boolean getReferralUrgencyIsNotNull()
	{
		return this.referralurgency != null;
	}
	public ims.RefMan.vo.lookups.ReferralUrgency getReferralUrgency()
	{
		return this.referralurgency;
	}
	public void setReferralUrgency(ims.RefMan.vo.lookups.ReferralUrgency value)
	{
		this.isValidated = false;
		this.referralurgency = value;
	}
	public boolean getDateReferralReceivedIsNotNull()
	{
		return this.datereferralreceived != null;
	}
	public ims.framework.utils.Date getDateReferralReceived()
	{
		return this.datereferralreceived;
	}
	public void setDateReferralReceived(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.datereferralreceived = value;
	}
	public boolean getRTTStatusNationalCodeIsNotNull()
	{
		return this.rttstatusnationalcode != null;
	}
	public String getRTTStatusNationalCode()
	{
		return this.rttstatusnationalcode;
	}
	public static int getRTTStatusNationalCodeMaxLength()
	{
		return 255;
	}
	public void setRTTStatusNationalCode(String value)
	{
		this.isValidated = false;
		this.rttstatusnationalcode = value;
	}
	public boolean getReferringPracticeCCGCodeIsNotNull()
	{
		return this.referringpracticeccgcode != null;
	}
	public String getReferringPracticeCCGCode()
	{
		return this.referringpracticeccgcode;
	}
	public static int getReferringPracticeCCGCodeMaxLength()
	{
		return 255;
	}
	public void setReferringPracticeCCGCode(String value)
	{
		this.isValidated = false;
		this.referringpracticeccgcode = value;
	}
	public boolean getSystemInfoIsNotNull()
	{
		return this.systeminfo != null;
	}
	public ims.vo.SystemInformation getSystemInfo()
	{
		return this.systeminfo;
	}
	public void setSystemInfo(ims.vo.SystemInformation value)
	{
		this.isValidated = false;
		this.systeminfo = value;
	}
	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]);
			}
		}
		if(this.dateonlist == null)
			listOfErrors.add("dateOnList is mandatory");
		if(this.electiveadmissiontype == null)
			listOfErrors.add("electiveAdmissionType is mandatory");
		if(this.patient == null)
			listOfErrors.add("Patient is mandatory");
		if(this.referralurgency == null)
			listOfErrors.add("referralUrgency is mandatory");
		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 void clearIDAndVersion()
	{
		this.id = null;
		this.version = 0;
	}
	public Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		ifElectiveListMessageQueueVo clone = new ifElectiveListMessageQueueVo(this.id, this.version);
		
		if(this.dateonlist == null)
			clone.dateonlist = null;
		else
			clone.dateonlist = (ims.framework.utils.Date)this.dateonlist.clone();
		if(this.patientstatus == null)
			clone.patientstatus = null;
		else
			clone.patientstatus = (ims.RefMan.vo.lookups.CatsReferralCategory)this.patientstatus.clone();
		if(this.electiveadmissiontype == null)
			clone.electiveadmissiontype = null;
		else
			clone.electiveadmissiontype = (ims.RefMan.vo.lookups.ElectiveAdmissionType)this.electiveadmissiontype.clone();
		if(this.intendedmanagement == null)
			clone.intendedmanagement = null;
		else
			clone.intendedmanagement = (ims.core.vo.lookups.ManagementIntention)this.intendedmanagement.clone();
		clone.anticipatedstay = this.anticipatedstay;
		if(this.referringgp == null)
			clone.referringgp = null;
		else
			clone.referringgp = (ims.core.vo.GpLiteVo)this.referringgp.clone();
		if(this.referringconsultant == null)
			clone.referringconsultant = null;
		else
			clone.referringconsultant = (ims.core.vo.MemberOfStaffShortVo)this.referringconsultant.clone();
		if(this.consultingdoctor == null)
			clone.consultingdoctor = null;
		else
			clone.consultingdoctor = (ims.core.vo.MemberOfStaffShortVo)this.consultingdoctor.clone();
		if(this.specialty == null)
			clone.specialty = null;
		else
			clone.specialty = (ims.core.vo.lookups.Specialty)this.specialty.clone();
		if(this.tciward == null)
			clone.tciward = null;
		else
			clone.tciward = (ims.core.vo.LocMostVo)this.tciward.clone();
		if(this.tcidate == null)
			clone.tcidate = null;
		else
			clone.tcidate = (ims.framework.utils.Date)this.tcidate.clone();
		clone.alliedhealthprofessional = this.alliedhealthprofessional;
		if(this.referringpractice == null)
			clone.referringpractice = null;
		else
			clone.referringpractice = (ims.core.vo.OrgShortVo)this.referringpractice.clone();
		if(this.patient == null)
			clone.patient = null;
		else
			clone.patient = (ims.core.vo.Patient)this.patient.clone();
		if(this.attendingdoctor == null)
			clone.attendingdoctor = null;
		else
			clone.attendingdoctor = (ims.core.vo.MemberOfStaffShortVo)this.attendingdoctor.clone();
		if(this.tcihospital == null)
			clone.tcihospital = null;
		else
			clone.tcihospital = (ims.core.vo.LocMostVo)this.tcihospital.clone();
		clone.tcibed = this.tcibed;
		clone.preadmissionnumber = this.preadmissionnumber;
		if(this.tcitime == null)
			clone.tcitime = null;
		else
			clone.tcitime = (ims.framework.utils.Time)this.tcitime.clone();
		if(this.referrertype == null)
			clone.referrertype = null;
		else
			clone.referrertype = (ims.core.vo.lookups.SourceOfReferral)this.referrertype.clone();
		clone.patientsuspensionstatus = this.patientsuspensionstatus;
		if(this.cancertype == null)
			clone.cancertype = null;
		else
			clone.cancertype = (ims.RefMan.vo.lookups.CancerType)this.cancertype.clone();
		if(this.referralurgency == null)
			clone.referralurgency = null;
		else
			clone.referralurgency = (ims.RefMan.vo.lookups.ReferralUrgency)this.referralurgency.clone();
		if(this.datereferralreceived == null)
			clone.datereferralreceived = null;
		else
			clone.datereferralreceived = (ims.framework.utils.Date)this.datereferralreceived.clone();
		clone.rttstatusnationalcode = this.rttstatusnationalcode;
		clone.referringpracticeccgcode = this.referringpracticeccgcode;
		if(this.systeminfo == null)
			clone.systeminfo = null;
		else
			clone.systeminfo = (ims.vo.SystemInformation)this.systeminfo.clone();
		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 (!(ifElectiveListMessageQueueVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A ifElectiveListMessageQueueVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((ifElectiveListMessageQueueVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((ifElectiveListMessageQueueVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.dateonlist != null)
			count++;
		if(this.patientstatus != null)
			count++;
		if(this.electiveadmissiontype != null)
			count++;
		if(this.intendedmanagement != null)
			count++;
		if(this.anticipatedstay != null)
			count++;
		if(this.referringgp != null)
			count++;
		if(this.referringconsultant != null)
			count++;
		if(this.consultingdoctor != null)
			count++;
		if(this.specialty != null)
			count++;
		if(this.tciward != null)
			count++;
		if(this.tcidate != null)
			count++;
		if(this.alliedhealthprofessional != null)
			count++;
		if(this.referringpractice != null)
			count++;
		if(this.patient != null)
			count++;
		if(this.attendingdoctor != null)
			count++;
		if(this.tcihospital != null)
			count++;
		if(this.tcibed != null)
			count++;
		if(this.preadmissionnumber != null)
			count++;
		if(this.tcitime != null)
			count++;
		if(this.referrertype != null)
			count++;
		if(this.patientsuspensionstatus != null)
			count++;
		if(this.cancertype != null)
			count++;
		if(this.referralurgency != null)
			count++;
		if(this.datereferralreceived != null)
			count++;
		if(this.rttstatusnationalcode != null)
			count++;
		if(this.referringpracticeccgcode != null)
			count++;
		if(this.systeminfo != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 27;
	}
	protected ims.framework.utils.Date dateonlist;
	protected ims.RefMan.vo.lookups.CatsReferralCategory patientstatus;
	protected ims.RefMan.vo.lookups.ElectiveAdmissionType electiveadmissiontype;
	protected ims.core.vo.lookups.ManagementIntention intendedmanagement;
	protected Integer anticipatedstay;
	protected ims.core.vo.GpLiteVo referringgp;
	protected ims.core.vo.MemberOfStaffShortVo referringconsultant;
	protected ims.core.vo.MemberOfStaffShortVo consultingdoctor;
	protected ims.core.vo.lookups.Specialty specialty;
	protected ims.core.vo.LocMostVo tciward;
	protected ims.framework.utils.Date tcidate;
	protected String alliedhealthprofessional;
	protected ims.core.vo.OrgShortVo referringpractice;
	protected ims.core.vo.Patient patient;
	protected ims.core.vo.MemberOfStaffShortVo attendingdoctor;
	protected ims.core.vo.LocMostVo tcihospital;
	protected String tcibed;
	protected String preadmissionnumber;
	protected ims.framework.utils.Time tcitime;
	protected ims.core.vo.lookups.SourceOfReferral referrertype;
	protected String patientsuspensionstatus;
	protected ims.RefMan.vo.lookups.CancerType cancertype;
	protected ims.RefMan.vo.lookups.ReferralUrgency referralurgency;
	protected ims.framework.utils.Date datereferralreceived;
	protected String rttstatusnationalcode;
	protected String referringpracticeccgcode;
	protected ims.vo.SystemInformation systeminfo;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
