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

/**
 * Linked to RefMan.TCIForPatientElectiveList business object (ID: 1096100064).
 */
public class PatientElectiveListTCIVo extends ims.RefMan.vo.TCIForPatientElectiveListRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public PatientElectiveListTCIVo()
	{
	}
	public PatientElectiveListTCIVo(Integer id, int version)
	{
		super(id, version);
	}
	public PatientElectiveListTCIVo(ims.RefMan.vo.beans.PatientElectiveListTCIVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.tcidate = bean.getTCIDate() == null ? null : bean.getTCIDate().buildDate();
		this.tcitime = bean.getTCITime() == null ? null : bean.getTCITime().buildTime();
		this.tcioffermethod = bean.getTCIOfferMethod() == null ? null : ims.core.vo.lookups.TCIOfferMethod.buildLookup(bean.getTCIOfferMethod());
		this.datetciaccepted = bean.getDateTCIAccepted() == null ? null : bean.getDateTCIAccepted().buildDate();
		this.appointment = bean.getAppointment() == null ? null : bean.getAppointment().buildVo();
		this.session = bean.getSession() == null ? null : new ims.scheduling.vo.Sch_SessionRefVo(new Integer(bean.getSession().getId()), bean.getSession().getVersion());
		this.comments = bean.getComments();
		this.planningelective = bean.getPlanningElective() == null ? null : ims.RefMan.vo.lookups.PlanningElective.buildLookup(bean.getPlanningElective());
		this.tciward = bean.getTCIWard() == null ? null : bean.getTCIWard().buildVo();
		this.tcibed = bean.getTCIBed();
		this.tciconsultant = bean.getTCIConsultant() == null ? null : bean.getTCIConsultant().buildVo();
		this.datetcioffered = bean.getDateTCIOffered() == null ? null : bean.getDateTCIOffered().buildDate();
		this.currentoutcome = bean.getCurrentOutcome() == null ? null : bean.getCurrentOutcome().buildVo();
		this.outcomehistory = ims.RefMan.vo.TCIOutcomeForPatientElectiveListVoCollection.buildFromBeanCollection(bean.getOutcomeHistory());
		this.isactive = bean.getIsActive();
		this.tcihospital = bean.getTCIHospital() == null ? null : bean.getTCIHospital().buildVo();
		this.rttbreachcomment = bean.getRTTBreachComment();
		this.plannedtcidate = bean.getPlannedTCIDate() == null ? null : bean.getPlannedTCIDate().buildDate();
		this.day28breachreason = bean.getDay28BreachReason() == null ? null : ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason.buildLookup(bean.getDay28BreachReason());
		this.day28breachcomment = bean.getDay28BreachComment();
		this.rttbreachreason = bean.getRTTBreachReason() == null ? null : ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason.buildLookup(bean.getRTTBreachReason());
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.RefMan.vo.beans.PatientElectiveListTCIVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.tcidate = bean.getTCIDate() == null ? null : bean.getTCIDate().buildDate();
		this.tcitime = bean.getTCITime() == null ? null : bean.getTCITime().buildTime();
		this.tcioffermethod = bean.getTCIOfferMethod() == null ? null : ims.core.vo.lookups.TCIOfferMethod.buildLookup(bean.getTCIOfferMethod());
		this.datetciaccepted = bean.getDateTCIAccepted() == null ? null : bean.getDateTCIAccepted().buildDate();
		this.appointment = bean.getAppointment() == null ? null : bean.getAppointment().buildVo(map);
		this.session = bean.getSession() == null ? null : new ims.scheduling.vo.Sch_SessionRefVo(new Integer(bean.getSession().getId()), bean.getSession().getVersion());
		this.comments = bean.getComments();
		this.planningelective = bean.getPlanningElective() == null ? null : ims.RefMan.vo.lookups.PlanningElective.buildLookup(bean.getPlanningElective());
		this.tciward = bean.getTCIWard() == null ? null : bean.getTCIWard().buildVo(map);
		this.tcibed = bean.getTCIBed();
		this.tciconsultant = bean.getTCIConsultant() == null ? null : bean.getTCIConsultant().buildVo(map);
		this.datetcioffered = bean.getDateTCIOffered() == null ? null : bean.getDateTCIOffered().buildDate();
		this.currentoutcome = bean.getCurrentOutcome() == null ? null : bean.getCurrentOutcome().buildVo(map);
		this.outcomehistory = ims.RefMan.vo.TCIOutcomeForPatientElectiveListVoCollection.buildFromBeanCollection(bean.getOutcomeHistory());
		this.isactive = bean.getIsActive();
		this.tcihospital = bean.getTCIHospital() == null ? null : bean.getTCIHospital().buildVo(map);
		this.rttbreachcomment = bean.getRTTBreachComment();
		this.plannedtcidate = bean.getPlannedTCIDate() == null ? null : bean.getPlannedTCIDate().buildDate();
		this.day28breachreason = bean.getDay28BreachReason() == null ? null : ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason.buildLookup(bean.getDay28BreachReason());
		this.day28breachcomment = bean.getDay28BreachComment();
		this.rttbreachreason = bean.getRTTBreachReason() == null ? null : ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason.buildLookup(bean.getRTTBreachReason());
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.RefMan.vo.beans.PatientElectiveListTCIVoBean bean = null;
		if(map != null)
			bean = (ims.RefMan.vo.beans.PatientElectiveListTCIVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.RefMan.vo.beans.PatientElectiveListTCIVoBean();
			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("TCIDATE"))
			return getTCIDate();
		if(fieldName.equals("TCITIME"))
			return getTCITime();
		if(fieldName.equals("TCIOFFERMETHOD"))
			return getTCIOfferMethod();
		if(fieldName.equals("DATETCIACCEPTED"))
			return getDateTCIAccepted();
		if(fieldName.equals("APPOINTMENT"))
			return getAppointment();
		if(fieldName.equals("SESSION"))
			return getSession();
		if(fieldName.equals("COMMENTS"))
			return getComments();
		if(fieldName.equals("PLANNINGELECTIVE"))
			return getPlanningElective();
		if(fieldName.equals("TCIWARD"))
			return getTCIWard();
		if(fieldName.equals("TCIBED"))
			return getTCIBed();
		if(fieldName.equals("TCICONSULTANT"))
			return getTCIConsultant();
		if(fieldName.equals("DATETCIOFFERED"))
			return getDateTCIOffered();
		if(fieldName.equals("CURRENTOUTCOME"))
			return getCurrentOutcome();
		if(fieldName.equals("OUTCOMEHISTORY"))
			return getOutcomeHistory();
		if(fieldName.equals("ISACTIVE"))
			return getIsActive();
		if(fieldName.equals("TCIHOSPITAL"))
			return getTCIHospital();
		if(fieldName.equals("RTTBREACHCOMMENT"))
			return getRTTBreachComment();
		if(fieldName.equals("PLANNEDTCIDATE"))
			return getPlannedTCIDate();
		if(fieldName.equals("DAY28BREACHREASON"))
			return getDay28BreachReason();
		if(fieldName.equals("DAY28BREACHCOMMENT"))
			return getDay28BreachComment();
		if(fieldName.equals("RTTBREACHREASON"))
			return getRTTBreachReason();
		return super.getFieldValueByFieldName(fieldName);
	}
	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 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 getTCIOfferMethodIsNotNull()
	{
		return this.tcioffermethod != null;
	}
	public ims.core.vo.lookups.TCIOfferMethod getTCIOfferMethod()
	{
		return this.tcioffermethod;
	}
	public void setTCIOfferMethod(ims.core.vo.lookups.TCIOfferMethod value)
	{
		this.isValidated = false;
		this.tcioffermethod = value;
	}
	public boolean getDateTCIAcceptedIsNotNull()
	{
		return this.datetciaccepted != null;
	}
	public ims.framework.utils.Date getDateTCIAccepted()
	{
		return this.datetciaccepted;
	}
	public void setDateTCIAccepted(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.datetciaccepted = value;
	}
	public boolean getAppointmentIsNotNull()
	{
		return this.appointment != null;
	}
	public ims.RefMan.vo.Booking_AppointmentElectiveListVo getAppointment()
	{
		return this.appointment;
	}
	public void setAppointment(ims.RefMan.vo.Booking_AppointmentElectiveListVo value)
	{
		this.isValidated = false;
		this.appointment = value;
	}
	public boolean getSessionIsNotNull()
	{
		return this.session != null;
	}
	public ims.scheduling.vo.Sch_SessionRefVo getSession()
	{
		return this.session;
	}
	public void setSession(ims.scheduling.vo.Sch_SessionRefVo value)
	{
		this.isValidated = false;
		this.session = value;
	}
	public boolean getCommentsIsNotNull()
	{
		return this.comments != null;
	}
	public String getComments()
	{
		return this.comments;
	}
	public static int getCommentsMaxLength()
	{
		return 1000;
	}
	public void setComments(String value)
	{
		this.isValidated = false;
		this.comments = value;
	}
	public boolean getPlanningElectiveIsNotNull()
	{
		return this.planningelective != null;
	}
	public ims.RefMan.vo.lookups.PlanningElective getPlanningElective()
	{
		return this.planningelective;
	}
	public void setPlanningElective(ims.RefMan.vo.lookups.PlanningElective value)
	{
		this.isValidated = false;
		this.planningelective = value;
	}
	public boolean getTCIWardIsNotNull()
	{
		return this.tciward != null;
	}
	public ims.core.vo.LocationLiteVo getTCIWard()
	{
		return this.tciward;
	}
	public void setTCIWard(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.tciward = 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 getTCIConsultantIsNotNull()
	{
		return this.tciconsultant != null;
	}
	public ims.core.vo.HcpLiteVo getTCIConsultant()
	{
		return this.tciconsultant;
	}
	public void setTCIConsultant(ims.core.vo.HcpLiteVo value)
	{
		this.isValidated = false;
		this.tciconsultant = value;
	}
	public boolean getDateTCIOfferedIsNotNull()
	{
		return this.datetcioffered != null;
	}
	public ims.framework.utils.Date getDateTCIOffered()
	{
		return this.datetcioffered;
	}
	public void setDateTCIOffered(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.datetcioffered = value;
	}
	public boolean getCurrentOutcomeIsNotNull()
	{
		return this.currentoutcome != null;
	}
	public ims.RefMan.vo.TCIOutcomeForPatientElectiveListVo getCurrentOutcome()
	{
		return this.currentoutcome;
	}
	public void setCurrentOutcome(ims.RefMan.vo.TCIOutcomeForPatientElectiveListVo value)
	{
		this.isValidated = false;
		this.currentoutcome = value;
	}
	public boolean getOutcomeHistoryIsNotNull()
	{
		return this.outcomehistory != null;
	}
	public ims.RefMan.vo.TCIOutcomeForPatientElectiveListVoCollection getOutcomeHistory()
	{
		return this.outcomehistory;
	}
	public void setOutcomeHistory(ims.RefMan.vo.TCIOutcomeForPatientElectiveListVoCollection value)
	{
		this.isValidated = false;
		this.outcomehistory = value;
	}
	public boolean getIsActiveIsNotNull()
	{
		return this.isactive != null;
	}
	public Boolean getIsActive()
	{
		return this.isactive;
	}
	public void setIsActive(Boolean value)
	{
		this.isValidated = false;
		this.isactive = value;
	}
	public boolean getTCIHospitalIsNotNull()
	{
		return this.tcihospital != null;
	}
	public ims.core.vo.LocationLiteVo getTCIHospital()
	{
		return this.tcihospital;
	}
	public void setTCIHospital(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.tcihospital = value;
	}
	public boolean getRTTBreachCommentIsNotNull()
	{
		return this.rttbreachcomment != null;
	}
	public String getRTTBreachComment()
	{
		return this.rttbreachcomment;
	}
	public static int getRTTBreachCommentMaxLength()
	{
		return 255;
	}
	public void setRTTBreachComment(String value)
	{
		this.isValidated = false;
		this.rttbreachcomment = value;
	}
	public boolean getPlannedTCIDateIsNotNull()
	{
		return this.plannedtcidate != null;
	}
	public ims.framework.utils.Date getPlannedTCIDate()
	{
		return this.plannedtcidate;
	}
	public void setPlannedTCIDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.plannedtcidate = value;
	}
	public boolean getDay28BreachReasonIsNotNull()
	{
		return this.day28breachreason != null;
	}
	public ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason getDay28BreachReason()
	{
		return this.day28breachreason;
	}
	public void setDay28BreachReason(ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason value)
	{
		this.isValidated = false;
		this.day28breachreason = value;
	}
	public boolean getDay28BreachCommentIsNotNull()
	{
		return this.day28breachcomment != null;
	}
	public String getDay28BreachComment()
	{
		return this.day28breachcomment;
	}
	public static int getDay28BreachCommentMaxLength()
	{
		return 255;
	}
	public void setDay28BreachComment(String value)
	{
		this.isValidated = false;
		this.day28breachcomment = value;
	}
	public boolean getRTTBreachReasonIsNotNull()
	{
		return this.rttbreachreason != null;
	}
	public ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason getRTTBreachReason()
	{
		return this.rttbreachreason;
	}
	public void setRTTBreachReason(ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason value)
	{
		this.isValidated = false;
		this.rttbreachreason = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.currentoutcome != null)
		{
			if(!this.currentoutcome.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.outcomehistory != null)
		{
			if(!this.outcomehistory.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.comments != null)
			if(this.comments.length() > 1000)
				listOfErrors.add("The length of the field [comments] in the value object [ims.RefMan.vo.PatientElectiveListTCIVo] is too big. It should be less or equal to 1000");
		if(this.tcibed != null)
			if(this.tcibed.length() > 255)
				listOfErrors.add("The length of the field [tcibed] in the value object [ims.RefMan.vo.PatientElectiveListTCIVo] is too big. It should be less or equal to 255");
		if(this.currentoutcome != null)
		{
			String[] listOfOtherErrors = this.currentoutcome.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.outcomehistory != null)
		{
			String[] listOfOtherErrors = this.outcomehistory.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.isactive == null)
			listOfErrors.add("IsActive is mandatory");
		if(this.rttbreachcomment != null)
			if(this.rttbreachcomment.length() > 255)
				listOfErrors.add("The length of the field [rttbreachcomment] in the value object [ims.RefMan.vo.PatientElectiveListTCIVo] is too big. It should be less or equal to 255");
		if(this.day28breachcomment != null)
			if(this.day28breachcomment.length() > 255)
				listOfErrors.add("The length of the field [day28breachcomment] in the value object [ims.RefMan.vo.PatientElectiveListTCIVo] is too big. It should be less or equal to 255");
		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;
	
		PatientElectiveListTCIVo clone = new PatientElectiveListTCIVo(this.id, this.version);
		
		if(this.tcidate == null)
			clone.tcidate = null;
		else
			clone.tcidate = (ims.framework.utils.Date)this.tcidate.clone();
		if(this.tcitime == null)
			clone.tcitime = null;
		else
			clone.tcitime = (ims.framework.utils.Time)this.tcitime.clone();
		if(this.tcioffermethod == null)
			clone.tcioffermethod = null;
		else
			clone.tcioffermethod = (ims.core.vo.lookups.TCIOfferMethod)this.tcioffermethod.clone();
		if(this.datetciaccepted == null)
			clone.datetciaccepted = null;
		else
			clone.datetciaccepted = (ims.framework.utils.Date)this.datetciaccepted.clone();
		if(this.appointment == null)
			clone.appointment = null;
		else
			clone.appointment = (ims.RefMan.vo.Booking_AppointmentElectiveListVo)this.appointment.clone();
		clone.session = this.session;
		clone.comments = this.comments;
		if(this.planningelective == null)
			clone.planningelective = null;
		else
			clone.planningelective = (ims.RefMan.vo.lookups.PlanningElective)this.planningelective.clone();
		if(this.tciward == null)
			clone.tciward = null;
		else
			clone.tciward = (ims.core.vo.LocationLiteVo)this.tciward.clone();
		clone.tcibed = this.tcibed;
		if(this.tciconsultant == null)
			clone.tciconsultant = null;
		else
			clone.tciconsultant = (ims.core.vo.HcpLiteVo)this.tciconsultant.clone();
		if(this.datetcioffered == null)
			clone.datetcioffered = null;
		else
			clone.datetcioffered = (ims.framework.utils.Date)this.datetcioffered.clone();
		if(this.currentoutcome == null)
			clone.currentoutcome = null;
		else
			clone.currentoutcome = (ims.RefMan.vo.TCIOutcomeForPatientElectiveListVo)this.currentoutcome.clone();
		if(this.outcomehistory == null)
			clone.outcomehistory = null;
		else
			clone.outcomehistory = (ims.RefMan.vo.TCIOutcomeForPatientElectiveListVoCollection)this.outcomehistory.clone();
		clone.isactive = this.isactive;
		if(this.tcihospital == null)
			clone.tcihospital = null;
		else
			clone.tcihospital = (ims.core.vo.LocationLiteVo)this.tcihospital.clone();
		clone.rttbreachcomment = this.rttbreachcomment;
		if(this.plannedtcidate == null)
			clone.plannedtcidate = null;
		else
			clone.plannedtcidate = (ims.framework.utils.Date)this.plannedtcidate.clone();
		if(this.day28breachreason == null)
			clone.day28breachreason = null;
		else
			clone.day28breachreason = (ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason)this.day28breachreason.clone();
		clone.day28breachcomment = this.day28breachcomment;
		if(this.rttbreachreason == null)
			clone.rttbreachreason = null;
		else
			clone.rttbreachreason = (ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason)this.rttbreachreason.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 (!(PatientElectiveListTCIVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A PatientElectiveListTCIVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((PatientElectiveListTCIVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((PatientElectiveListTCIVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.tcidate != null)
			count++;
		if(this.tcitime != null)
			count++;
		if(this.tcioffermethod != null)
			count++;
		if(this.datetciaccepted != null)
			count++;
		if(this.appointment != null)
			count++;
		if(this.session != null)
			count++;
		if(this.comments != null)
			count++;
		if(this.planningelective != null)
			count++;
		if(this.tciward != null)
			count++;
		if(this.tcibed != null)
			count++;
		if(this.tciconsultant != null)
			count++;
		if(this.datetcioffered != null)
			count++;
		if(this.currentoutcome != null)
			count++;
		if(this.outcomehistory != null)
			count++;
		if(this.isactive != null)
			count++;
		if(this.tcihospital != null)
			count++;
		if(this.rttbreachcomment != null)
			count++;
		if(this.plannedtcidate != null)
			count++;
		if(this.day28breachreason != null)
			count++;
		if(this.day28breachcomment != null)
			count++;
		if(this.rttbreachreason != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 21;
	}
	protected ims.framework.utils.Date tcidate;
	protected ims.framework.utils.Time tcitime;
	protected ims.core.vo.lookups.TCIOfferMethod tcioffermethod;
	protected ims.framework.utils.Date datetciaccepted;
	protected ims.RefMan.vo.Booking_AppointmentElectiveListVo appointment;
	protected ims.scheduling.vo.Sch_SessionRefVo session;
	protected String comments;
	protected ims.RefMan.vo.lookups.PlanningElective planningelective;
	protected ims.core.vo.LocationLiteVo tciward;
	protected String tcibed;
	protected ims.core.vo.HcpLiteVo tciconsultant;
	protected ims.framework.utils.Date datetcioffered;
	protected ims.RefMan.vo.TCIOutcomeForPatientElectiveListVo currentoutcome;
	protected ims.RefMan.vo.TCIOutcomeForPatientElectiveListVoCollection outcomehistory;
	protected Boolean isactive;
	protected ims.core.vo.LocationLiteVo tcihospital;
	protected String rttbreachcomment;
	protected ims.framework.utils.Date plannedtcidate;
	protected ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason day28breachreason;
	protected String day28breachcomment;
	protected ims.scheduling.vo.lookups.RTTWeekWaitOr28DayRuleBreachReason rttbreachreason;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
