/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/RefMan/vo/PatientElectiveListDetailsToSaveVo.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.PatientElectiveList business object (ID: 1014100020).
 */
public class PatientElectiveListDetailsToSaveVo extends ims.RefMan.vo.PatientElectiveListRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public PatientElectiveListDetailsToSaveVo()
	{
	}
	public PatientElectiveListDetailsToSaveVo(Integer id, int version)
	{
		super(id, version);
	}
	public PatientElectiveListDetailsToSaveVo(ims.RefMan.vo.beans.PatientElectiveListDetailsToSaveVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.electivelist = bean.getElectiveList() == null ? null : bean.getElectiveList().buildVo();
		this.electiveliststatus = bean.getElectiveListStatus() == null ? null : bean.getElectiveListStatus().buildVo();
		this.electiveliststatushistory = ims.RefMan.vo.ElectiveListStatusVoCollection.buildFromBeanCollection(bean.getElectiveListStatusHistory());
		this.patient = bean.getPatient() == null ? null : new ims.core.patient.vo.PatientRefVo(new Integer(bean.getPatient().getId()), bean.getPatient().getVersion());
		this.referral = bean.getReferral() == null ? null : new ims.RefMan.vo.CatsReferralRefVo(new Integer(bean.getReferral().getId()), bean.getReferral().getVersion());
		this.episodeofcare = bean.getEpisodeOfCare() == null ? null : new ims.core.admin.vo.EpisodeOfCareRefVo(new Integer(bean.getEpisodeOfCare().getId()), bean.getEpisodeOfCare().getVersion());
		this.bed = bean.getBed();
		this.consultant = bean.getConsultant() == null ? null : bean.getConsultant().buildVo();
		this.dateonlist = bean.getDateOnList() == null ? null : bean.getDateOnList().buildDate();
		this.originaldecisiondate = bean.getOriginalDecisionDate() == null ? null : bean.getOriginalDecisionDate().buildDate();
		this.electivelistreason = bean.getElectiveListReason() == null ? null : ims.emergency.vo.lookups.ElectiveListReason.buildLookup(bean.getElectiveListReason());
		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.availableatshortnotice = bean.getAvailableAtShortNotice();
		this.availableatshortnoticeperiod = bean.getAvailableAtShortNoticePeriod();
		this.priority = bean.getPriority() == null ? null : ims.RefMan.vo.lookups.ReferralUrgency.buildLookup(bean.getPriority());
		if(bean.getSuspensions() != null)
		{
			this.suspensions = new ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVoCollection();
			for(int suspensions_i = 0; suspensions_i < bean.getSuspensions().length; suspensions_i++)
			{
				this.suspensions.add(new ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVo(new Integer(bean.getSuspensions()[suspensions_i].getId()), bean.getSuspensions()[suspensions_i].getVersion()));
			}
		}
		this.operativeprocedurestatus = bean.getOperativeProcedureStatus();
		this.primaryprocedure = bean.getPrimaryProcedure() == null ? null : bean.getPrimaryProcedure().buildVo();
		this.proceduredescription = bean.getProcedureDescription();
		if(bean.getOtherProcedures() != null)
		{
			this.otherprocedures = new ims.core.clinical.vo.ProcedureRefVoCollection();
			for(int otherprocedures_i = 0; otherprocedures_i < bean.getOtherProcedures().length; otherprocedures_i++)
			{
				this.otherprocedures.add(new ims.core.clinical.vo.ProcedureRefVo(new Integer(bean.getOtherProcedures()[otherprocedures_i].getId()), bean.getOtherProcedures()[otherprocedures_i].getVersion()));
			}
		}
		this.tcidetails = bean.getTCIDetails() == null ? null : bean.getTCIDetails().buildVo();
		this.tcihistory = ims.RefMan.vo.PatientElectiveListTCIVoCollection.buildFromBeanCollection(bean.getTCIHistory());
		this.interpretatorrequired = bean.getInterpretatorRequired();
		this.language = bean.getLanguage() == null ? null : ims.core.vo.lookups.Language.buildLookup(bean.getLanguage());
		this.transportrequired = bean.getTransportRequired();
		this.transport = bean.getTransport() == null ? null : ims.scheduling.vo.lookups.ApptTransportType.buildLookup(bean.getTransport());
		this.specialrequirements = bean.getSpecialRequirements();
		this.specialrequirementsdetails = bean.getSpecialRequirementsDetails();
		this.notes = ims.RefMan.vo.PatientElectiveListNotesVoCollection.buildFromBeanCollection(bean.getNotes());
		this.erod = bean.getEROD() == null ? null : bean.getEROD().buildVo();
		if(bean.getERODHistory() != null)
		{
			this.erodhistory = new ims.RefMan.vo.ReferralERODRefVoCollection();
			for(int erodhistory_i = 0; erodhistory_i < bean.getERODHistory().length; erodhistory_i++)
			{
				this.erodhistory.add(new ims.RefMan.vo.ReferralERODRefVo(new Integer(bean.getERODHistory()[erodhistory_i].getId()), bean.getERODHistory()[erodhistory_i].getVersion()));
			}
		}
		this.pathwayclock = bean.getPathwayClock() == null ? null : new ims.pathways.vo.PathwayClockRefVo(new Integer(bean.getPathwayClock().getId()), bean.getPathwayClock().getVersion());
		this.tcicancelledbyprovider = bean.getTCICancelledByProvider();
		this.reviews = ims.RefMan.vo.ReviewPatientElectiveListVoCollection.buildFromBeanCollection(bean.getReviews());
		this.currentsuspensionenddate = bean.getCurrentSuspensionEndDate() == null ? null : bean.getCurrentSuspensionEndDate().buildDateTime();
		this.patientstatus = bean.getPatientStatus() == null ? null : ims.RefMan.vo.lookups.CatsReferralCategory.buildLookup(bean.getPatientStatus());
		this.proclaterality = bean.getProcLaterality() == null ? null : ims.core.vo.lookups.LateralityLRB.buildLookup(bean.getProcLaterality());
		this.isconsultantperformingprocedure = bean.getIsConsultantPerformingProcedure();
		this.creatingappointment = bean.getCreatingAppointment() == null ? null : new ims.scheduling.vo.Booking_AppointmentRefVo(new Integer(bean.getCreatingAppointment().getId()), bean.getCreatingAppointment().getVersion());
		this.appointmentoutcomeaction = bean.getAppointmentOutcomeAction() == null ? null : new ims.scheduling.vo.AppointmentOutcomeActionRefVo(new Integer(bean.getAppointmentOutcomeAction().getId()), bean.getAppointmentOutcomeAction().getVersion());
		this.numberofprovidertcicancellations = bean.getNumberOfProviderTCICancellations();
		this.was28dayruleapplied = bean.getWas28DayRuleApplied();
		this.preoperativeovernightstayrequired = bean.getPreOperativeOvernightStayRequired();
		this.wlpreoperativeovernightstayrequired = bean.getWLPreOperativeOvernightStayRequired();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.RefMan.vo.beans.PatientElectiveListDetailsToSaveVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.electivelist = bean.getElectiveList() == null ? null : bean.getElectiveList().buildVo(map);
		this.electiveliststatus = bean.getElectiveListStatus() == null ? null : bean.getElectiveListStatus().buildVo(map);
		this.electiveliststatushistory = ims.RefMan.vo.ElectiveListStatusVoCollection.buildFromBeanCollection(bean.getElectiveListStatusHistory());
		this.patient = bean.getPatient() == null ? null : new ims.core.patient.vo.PatientRefVo(new Integer(bean.getPatient().getId()), bean.getPatient().getVersion());
		this.referral = bean.getReferral() == null ? null : new ims.RefMan.vo.CatsReferralRefVo(new Integer(bean.getReferral().getId()), bean.getReferral().getVersion());
		this.episodeofcare = bean.getEpisodeOfCare() == null ? null : new ims.core.admin.vo.EpisodeOfCareRefVo(new Integer(bean.getEpisodeOfCare().getId()), bean.getEpisodeOfCare().getVersion());
		this.bed = bean.getBed();
		this.consultant = bean.getConsultant() == null ? null : bean.getConsultant().buildVo(map);
		this.dateonlist = bean.getDateOnList() == null ? null : bean.getDateOnList().buildDate();
		this.originaldecisiondate = bean.getOriginalDecisionDate() == null ? null : bean.getOriginalDecisionDate().buildDate();
		this.electivelistreason = bean.getElectiveListReason() == null ? null : ims.emergency.vo.lookups.ElectiveListReason.buildLookup(bean.getElectiveListReason());
		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.availableatshortnotice = bean.getAvailableAtShortNotice();
		this.availableatshortnoticeperiod = bean.getAvailableAtShortNoticePeriod();
		this.priority = bean.getPriority() == null ? null : ims.RefMan.vo.lookups.ReferralUrgency.buildLookup(bean.getPriority());
		if(bean.getSuspensions() != null)
		{
			this.suspensions = new ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVoCollection();
			for(int suspensions_i = 0; suspensions_i < bean.getSuspensions().length; suspensions_i++)
			{
				this.suspensions.add(new ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVo(new Integer(bean.getSuspensions()[suspensions_i].getId()), bean.getSuspensions()[suspensions_i].getVersion()));
			}
		}
		this.operativeprocedurestatus = bean.getOperativeProcedureStatus();
		this.primaryprocedure = bean.getPrimaryProcedure() == null ? null : bean.getPrimaryProcedure().buildVo(map);
		this.proceduredescription = bean.getProcedureDescription();
		if(bean.getOtherProcedures() != null)
		{
			this.otherprocedures = new ims.core.clinical.vo.ProcedureRefVoCollection();
			for(int otherprocedures_i = 0; otherprocedures_i < bean.getOtherProcedures().length; otherprocedures_i++)
			{
				this.otherprocedures.add(new ims.core.clinical.vo.ProcedureRefVo(new Integer(bean.getOtherProcedures()[otherprocedures_i].getId()), bean.getOtherProcedures()[otherprocedures_i].getVersion()));
			}
		}
		this.tcidetails = bean.getTCIDetails() == null ? null : bean.getTCIDetails().buildVo(map);
		this.tcihistory = ims.RefMan.vo.PatientElectiveListTCIVoCollection.buildFromBeanCollection(bean.getTCIHistory());
		this.interpretatorrequired = bean.getInterpretatorRequired();
		this.language = bean.getLanguage() == null ? null : ims.core.vo.lookups.Language.buildLookup(bean.getLanguage());
		this.transportrequired = bean.getTransportRequired();
		this.transport = bean.getTransport() == null ? null : ims.scheduling.vo.lookups.ApptTransportType.buildLookup(bean.getTransport());
		this.specialrequirements = bean.getSpecialRequirements();
		this.specialrequirementsdetails = bean.getSpecialRequirementsDetails();
		this.notes = ims.RefMan.vo.PatientElectiveListNotesVoCollection.buildFromBeanCollection(bean.getNotes());
		this.erod = bean.getEROD() == null ? null : bean.getEROD().buildVo(map);
		if(bean.getERODHistory() != null)
		{
			this.erodhistory = new ims.RefMan.vo.ReferralERODRefVoCollection();
			for(int erodhistory_i = 0; erodhistory_i < bean.getERODHistory().length; erodhistory_i++)
			{
				this.erodhistory.add(new ims.RefMan.vo.ReferralERODRefVo(new Integer(bean.getERODHistory()[erodhistory_i].getId()), bean.getERODHistory()[erodhistory_i].getVersion()));
			}
		}
		this.pathwayclock = bean.getPathwayClock() == null ? null : new ims.pathways.vo.PathwayClockRefVo(new Integer(bean.getPathwayClock().getId()), bean.getPathwayClock().getVersion());
		this.tcicancelledbyprovider = bean.getTCICancelledByProvider();
		this.reviews = ims.RefMan.vo.ReviewPatientElectiveListVoCollection.buildFromBeanCollection(bean.getReviews());
		this.currentsuspensionenddate = bean.getCurrentSuspensionEndDate() == null ? null : bean.getCurrentSuspensionEndDate().buildDateTime();
		this.patientstatus = bean.getPatientStatus() == null ? null : ims.RefMan.vo.lookups.CatsReferralCategory.buildLookup(bean.getPatientStatus());
		this.proclaterality = bean.getProcLaterality() == null ? null : ims.core.vo.lookups.LateralityLRB.buildLookup(bean.getProcLaterality());
		this.isconsultantperformingprocedure = bean.getIsConsultantPerformingProcedure();
		this.creatingappointment = bean.getCreatingAppointment() == null ? null : new ims.scheduling.vo.Booking_AppointmentRefVo(new Integer(bean.getCreatingAppointment().getId()), bean.getCreatingAppointment().getVersion());
		this.appointmentoutcomeaction = bean.getAppointmentOutcomeAction() == null ? null : new ims.scheduling.vo.AppointmentOutcomeActionRefVo(new Integer(bean.getAppointmentOutcomeAction().getId()), bean.getAppointmentOutcomeAction().getVersion());
		this.numberofprovidertcicancellations = bean.getNumberOfProviderTCICancellations();
		this.was28dayruleapplied = bean.getWas28DayRuleApplied();
		this.preoperativeovernightstayrequired = bean.getPreOperativeOvernightStayRequired();
		this.wlpreoperativeovernightstayrequired = bean.getWLPreOperativeOvernightStayRequired();
	}
	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.PatientElectiveListDetailsToSaveVoBean bean = null;
		if(map != null)
			bean = (ims.RefMan.vo.beans.PatientElectiveListDetailsToSaveVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.RefMan.vo.beans.PatientElectiveListDetailsToSaveVoBean();
			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("ELECTIVELIST"))
			return getElectiveList();
		if(fieldName.equals("ELECTIVELISTSTATUS"))
			return getElectiveListStatus();
		if(fieldName.equals("ELECTIVELISTSTATUSHISTORY"))
			return getElectiveListStatusHistory();
		if(fieldName.equals("PATIENT"))
			return getPatient();
		if(fieldName.equals("REFERRAL"))
			return getReferral();
		if(fieldName.equals("EPISODEOFCARE"))
			return getEpisodeOfCare();
		if(fieldName.equals("BED"))
			return getBed();
		if(fieldName.equals("CONSULTANT"))
			return getConsultant();
		if(fieldName.equals("DATEONLIST"))
			return getDateOnList();
		if(fieldName.equals("ORIGINALDECISIONDATE"))
			return getOriginalDecisionDate();
		if(fieldName.equals("ELECTIVELISTREASON"))
			return getElectiveListReason();
		if(fieldName.equals("ELECTIVEADMISSIONTYPE"))
			return getElectiveAdmissionType();
		if(fieldName.equals("INTENDEDMANAGEMENT"))
			return getIntendedManagement();
		if(fieldName.equals("ANTICIPATEDSTAY"))
			return getAnticipatedStay();
		if(fieldName.equals("AVAILABLEATSHORTNOTICE"))
			return getAvailableAtShortNotice();
		if(fieldName.equals("AVAILABLEATSHORTNOTICEPERIOD"))
			return getAvailableAtShortNoticePeriod();
		if(fieldName.equals("PRIORITY"))
			return getPriority();
		if(fieldName.equals("SUSPENSIONS"))
			return getSuspensions();
		if(fieldName.equals("OPERATIVEPROCEDURESTATUS"))
			return getOperativeProcedureStatus();
		if(fieldName.equals("PRIMARYPROCEDURE"))
			return getPrimaryProcedure();
		if(fieldName.equals("PROCEDUREDESCRIPTION"))
			return getProcedureDescription();
		if(fieldName.equals("OTHERPROCEDURES"))
			return getOtherProcedures();
		if(fieldName.equals("TCIDETAILS"))
			return getTCIDetails();
		if(fieldName.equals("TCIHISTORY"))
			return getTCIHistory();
		if(fieldName.equals("INTERPRETATORREQUIRED"))
			return getInterpretatorRequired();
		if(fieldName.equals("LANGUAGE"))
			return getLanguage();
		if(fieldName.equals("TRANSPORTREQUIRED"))
			return getTransportRequired();
		if(fieldName.equals("TRANSPORT"))
			return getTransport();
		if(fieldName.equals("SPECIALREQUIREMENTS"))
			return getSpecialRequirements();
		if(fieldName.equals("SPECIALREQUIREMENTSDETAILS"))
			return getSpecialRequirementsDetails();
		if(fieldName.equals("NOTES"))
			return getNotes();
		if(fieldName.equals("EROD"))
			return getEROD();
		if(fieldName.equals("ERODHISTORY"))
			return getERODHistory();
		if(fieldName.equals("PATHWAYCLOCK"))
			return getPathwayClock();
		if(fieldName.equals("TCICANCELLEDBYPROVIDER"))
			return getTCICancelledByProvider();
		if(fieldName.equals("REVIEWS"))
			return getReviews();
		if(fieldName.equals("CURRENTSUSPENSIONENDDATE"))
			return getCurrentSuspensionEndDate();
		if(fieldName.equals("PATIENTSTATUS"))
			return getPatientStatus();
		if(fieldName.equals("PROCLATERALITY"))
			return getProcLaterality();
		if(fieldName.equals("ISCONSULTANTPERFORMINGPROCEDURE"))
			return getIsConsultantPerformingProcedure();
		if(fieldName.equals("CREATINGAPPOINTMENT"))
			return getCreatingAppointment();
		if(fieldName.equals("APPOINTMENTOUTCOMEACTION"))
			return getAppointmentOutcomeAction();
		if(fieldName.equals("NUMBEROFPROVIDERTCICANCELLATIONS"))
			return getNumberOfProviderTCICancellations();
		if(fieldName.equals("WAS28DAYRULEAPPLIED"))
			return getWas28DayRuleApplied();
		if(fieldName.equals("PREOPERATIVEOVERNIGHTSTAYREQUIRED"))
			return getPreOperativeOvernightStayRequired();
		if(fieldName.equals("WLPREOPERATIVEOVERNIGHTSTAYREQUIRED"))
			return getWLPreOperativeOvernightStayRequired();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getElectiveListIsNotNull()
	{
		return this.electivelist != null;
	}
	public ims.admin.vo.ElectiveListConfigurationVo getElectiveList()
	{
		return this.electivelist;
	}
	public void setElectiveList(ims.admin.vo.ElectiveListConfigurationVo value)
	{
		this.isValidated = false;
		this.electivelist = value;
	}
	public boolean getElectiveListStatusIsNotNull()
	{
		return this.electiveliststatus != null;
	}
	public ims.RefMan.vo.ElectiveListStatusVo getElectiveListStatus()
	{
		return this.electiveliststatus;
	}
	public void setElectiveListStatus(ims.RefMan.vo.ElectiveListStatusVo value)
	{
		this.isValidated = false;
		this.electiveliststatus = value;
	}
	public boolean getElectiveListStatusHistoryIsNotNull()
	{
		return this.electiveliststatushistory != null;
	}
	public ims.RefMan.vo.ElectiveListStatusVoCollection getElectiveListStatusHistory()
	{
		return this.electiveliststatushistory;
	}
	public void setElectiveListStatusHistory(ims.RefMan.vo.ElectiveListStatusVoCollection value)
	{
		this.isValidated = false;
		this.electiveliststatushistory = value;
	}
	public boolean getPatientIsNotNull()
	{
		return this.patient != null;
	}
	public ims.core.patient.vo.PatientRefVo getPatient()
	{
		return this.patient;
	}
	public void setPatient(ims.core.patient.vo.PatientRefVo value)
	{
		this.isValidated = false;
		this.patient = value;
	}
	public boolean getReferralIsNotNull()
	{
		return this.referral != null;
	}
	public ims.RefMan.vo.CatsReferralRefVo getReferral()
	{
		return this.referral;
	}
	public void setReferral(ims.RefMan.vo.CatsReferralRefVo value)
	{
		this.isValidated = false;
		this.referral = value;
	}
	public boolean getEpisodeOfCareIsNotNull()
	{
		return this.episodeofcare != null;
	}
	public ims.core.admin.vo.EpisodeOfCareRefVo getEpisodeOfCare()
	{
		return this.episodeofcare;
	}
	public void setEpisodeOfCare(ims.core.admin.vo.EpisodeOfCareRefVo value)
	{
		this.isValidated = false;
		this.episodeofcare = value;
	}
	public boolean getBedIsNotNull()
	{
		return this.bed != null;
	}
	public String getBed()
	{
		return this.bed;
	}
	public static int getBedMaxLength()
	{
		return 50;
	}
	public void setBed(String value)
	{
		this.isValidated = false;
		this.bed = value;
	}
	public boolean getConsultantIsNotNull()
	{
		return this.consultant != null;
	}
	public ims.core.vo.HcpLiteVo getConsultant()
	{
		return this.consultant;
	}
	public void setConsultant(ims.core.vo.HcpLiteVo value)
	{
		this.isValidated = false;
		this.consultant = value;
	}
	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 getOriginalDecisionDateIsNotNull()
	{
		return this.originaldecisiondate != null;
	}
	public ims.framework.utils.Date getOriginalDecisionDate()
	{
		return this.originaldecisiondate;
	}
	public void setOriginalDecisionDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.originaldecisiondate = value;
	}
	public boolean getElectiveListReasonIsNotNull()
	{
		return this.electivelistreason != null;
	}
	public ims.emergency.vo.lookups.ElectiveListReason getElectiveListReason()
	{
		return this.electivelistreason;
	}
	public void setElectiveListReason(ims.emergency.vo.lookups.ElectiveListReason value)
	{
		this.isValidated = false;
		this.electivelistreason = 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 getAvailableAtShortNoticeIsNotNull()
	{
		return this.availableatshortnotice != null;
	}
	public Boolean getAvailableAtShortNotice()
	{
		return this.availableatshortnotice;
	}
	public void setAvailableAtShortNotice(Boolean value)
	{
		this.isValidated = false;
		this.availableatshortnotice = value;
	}
	public boolean getAvailableAtShortNoticePeriodIsNotNull()
	{
		return this.availableatshortnoticeperiod != null;
	}
	public Integer getAvailableAtShortNoticePeriod()
	{
		return this.availableatshortnoticeperiod;
	}
	public void setAvailableAtShortNoticePeriod(Integer value)
	{
		this.isValidated = false;
		this.availableatshortnoticeperiod = value;
	}
	public boolean getPriorityIsNotNull()
	{
		return this.priority != null;
	}
	public ims.RefMan.vo.lookups.ReferralUrgency getPriority()
	{
		return this.priority;
	}
	public void setPriority(ims.RefMan.vo.lookups.ReferralUrgency value)
	{
		this.isValidated = false;
		this.priority = value;
	}
	public boolean getSuspensionsIsNotNull()
	{
		return this.suspensions != null;
	}
	public ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVoCollection getSuspensions()
	{
		return this.suspensions;
	}
	public void setSuspensions(ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVoCollection value)
	{
		this.isValidated = false;
		this.suspensions = value;
	}
	public boolean getOperativeProcedureStatusIsNotNull()
	{
		return this.operativeprocedurestatus != null;
	}
	public Boolean getOperativeProcedureStatus()
	{
		return this.operativeprocedurestatus;
	}
	public void setOperativeProcedureStatus(Boolean value)
	{
		this.isValidated = false;
		this.operativeprocedurestatus = value;
	}
	public boolean getPrimaryProcedureIsNotNull()
	{
		return this.primaryprocedure != null;
	}
	public ims.core.vo.ProcedureLiteVo getPrimaryProcedure()
	{
		return this.primaryprocedure;
	}
	public void setPrimaryProcedure(ims.core.vo.ProcedureLiteVo value)
	{
		this.isValidated = false;
		this.primaryprocedure = value;
	}
	public boolean getProcedureDescriptionIsNotNull()
	{
		return this.proceduredescription != null;
	}
	public String getProcedureDescription()
	{
		return this.proceduredescription;
	}
	public static int getProcedureDescriptionMaxLength()
	{
		return 255;
	}
	public void setProcedureDescription(String value)
	{
		this.isValidated = false;
		this.proceduredescription = value;
	}
	public boolean getOtherProceduresIsNotNull()
	{
		return this.otherprocedures != null;
	}
	public ims.core.clinical.vo.ProcedureRefVoCollection getOtherProcedures()
	{
		return this.otherprocedures;
	}
	public void setOtherProcedures(ims.core.clinical.vo.ProcedureRefVoCollection value)
	{
		this.isValidated = false;
		this.otherprocedures = value;
	}
	public boolean getTCIDetailsIsNotNull()
	{
		return this.tcidetails != null;
	}
	public ims.RefMan.vo.PatientElectiveListTCIVo getTCIDetails()
	{
		return this.tcidetails;
	}
	public void setTCIDetails(ims.RefMan.vo.PatientElectiveListTCIVo value)
	{
		this.isValidated = false;
		this.tcidetails = value;
	}
	public boolean getTCIHistoryIsNotNull()
	{
		return this.tcihistory != null;
	}
	public ims.RefMan.vo.PatientElectiveListTCIVoCollection getTCIHistory()
	{
		return this.tcihistory;
	}
	public void setTCIHistory(ims.RefMan.vo.PatientElectiveListTCIVoCollection value)
	{
		this.isValidated = false;
		this.tcihistory = value;
	}
	public boolean getInterpretatorRequiredIsNotNull()
	{
		return this.interpretatorrequired != null;
	}
	public Boolean getInterpretatorRequired()
	{
		return this.interpretatorrequired;
	}
	public void setInterpretatorRequired(Boolean value)
	{
		this.isValidated = false;
		this.interpretatorrequired = value;
	}
	public boolean getLanguageIsNotNull()
	{
		return this.language != null;
	}
	public ims.core.vo.lookups.Language getLanguage()
	{
		return this.language;
	}
	public void setLanguage(ims.core.vo.lookups.Language value)
	{
		this.isValidated = false;
		this.language = value;
	}
	public boolean getTransportRequiredIsNotNull()
	{
		return this.transportrequired != null;
	}
	public Boolean getTransportRequired()
	{
		return this.transportrequired;
	}
	public void setTransportRequired(Boolean value)
	{
		this.isValidated = false;
		this.transportrequired = value;
	}
	public boolean getTransportIsNotNull()
	{
		return this.transport != null;
	}
	public ims.scheduling.vo.lookups.ApptTransportType getTransport()
	{
		return this.transport;
	}
	public void setTransport(ims.scheduling.vo.lookups.ApptTransportType value)
	{
		this.isValidated = false;
		this.transport = value;
	}
	public boolean getSpecialRequirementsIsNotNull()
	{
		return this.specialrequirements != null;
	}
	public Boolean getSpecialRequirements()
	{
		return this.specialrequirements;
	}
	public void setSpecialRequirements(Boolean value)
	{
		this.isValidated = false;
		this.specialrequirements = value;
	}
	public boolean getSpecialRequirementsDetailsIsNotNull()
	{
		return this.specialrequirementsdetails != null;
	}
	public String getSpecialRequirementsDetails()
	{
		return this.specialrequirementsdetails;
	}
	public static int getSpecialRequirementsDetailsMaxLength()
	{
		return 1000;
	}
	public void setSpecialRequirementsDetails(String value)
	{
		this.isValidated = false;
		this.specialrequirementsdetails = value;
	}
	public boolean getNotesIsNotNull()
	{
		return this.notes != null;
	}
	public ims.RefMan.vo.PatientElectiveListNotesVoCollection getNotes()
	{
		return this.notes;
	}
	public void setNotes(ims.RefMan.vo.PatientElectiveListNotesVoCollection value)
	{
		this.isValidated = false;
		this.notes = value;
	}
	public boolean getERODIsNotNull()
	{
		return this.erod != null;
	}
	public ims.RefMan.vo.ReferralERODVo getEROD()
	{
		return this.erod;
	}
	public void setEROD(ims.RefMan.vo.ReferralERODVo value)
	{
		this.isValidated = false;
		this.erod = value;
	}
	public boolean getERODHistoryIsNotNull()
	{
		return this.erodhistory != null;
	}
	public ims.RefMan.vo.ReferralERODRefVoCollection getERODHistory()
	{
		return this.erodhistory;
	}
	public void setERODHistory(ims.RefMan.vo.ReferralERODRefVoCollection value)
	{
		this.isValidated = false;
		this.erodhistory = value;
	}
	public boolean getPathwayClockIsNotNull()
	{
		return this.pathwayclock != null;
	}
	public ims.pathways.vo.PathwayClockRefVo getPathwayClock()
	{
		return this.pathwayclock;
	}
	public void setPathwayClock(ims.pathways.vo.PathwayClockRefVo value)
	{
		this.isValidated = false;
		this.pathwayclock = value;
	}
	public boolean getTCICancelledByProviderIsNotNull()
	{
		return this.tcicancelledbyprovider != null;
	}
	public Boolean getTCICancelledByProvider()
	{
		return this.tcicancelledbyprovider;
	}
	public void setTCICancelledByProvider(Boolean value)
	{
		this.isValidated = false;
		this.tcicancelledbyprovider = value;
	}
	public boolean getReviewsIsNotNull()
	{
		return this.reviews != null;
	}
	public ims.RefMan.vo.ReviewPatientElectiveListVoCollection getReviews()
	{
		return this.reviews;
	}
	public void setReviews(ims.RefMan.vo.ReviewPatientElectiveListVoCollection value)
	{
		this.isValidated = false;
		this.reviews = value;
	}
	public boolean getCurrentSuspensionEndDateIsNotNull()
	{
		return this.currentsuspensionenddate != null;
	}
	public ims.framework.utils.DateTime getCurrentSuspensionEndDate()
	{
		return this.currentsuspensionenddate;
	}
	public void setCurrentSuspensionEndDate(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.currentsuspensionenddate = 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 getProcLateralityIsNotNull()
	{
		return this.proclaterality != null;
	}
	public ims.core.vo.lookups.LateralityLRB getProcLaterality()
	{
		return this.proclaterality;
	}
	public void setProcLaterality(ims.core.vo.lookups.LateralityLRB value)
	{
		this.isValidated = false;
		this.proclaterality = value;
	}
	public boolean getIsConsultantPerformingProcedureIsNotNull()
	{
		return this.isconsultantperformingprocedure != null;
	}
	public Boolean getIsConsultantPerformingProcedure()
	{
		return this.isconsultantperformingprocedure;
	}
	public void setIsConsultantPerformingProcedure(Boolean value)
	{
		this.isValidated = false;
		this.isconsultantperformingprocedure = value;
	}
	public boolean getCreatingAppointmentIsNotNull()
	{
		return this.creatingappointment != null;
	}
	public ims.scheduling.vo.Booking_AppointmentRefVo getCreatingAppointment()
	{
		return this.creatingappointment;
	}
	public void setCreatingAppointment(ims.scheduling.vo.Booking_AppointmentRefVo value)
	{
		this.isValidated = false;
		this.creatingappointment = value;
	}
	public boolean getAppointmentOutcomeActionIsNotNull()
	{
		return this.appointmentoutcomeaction != null;
	}
	public ims.scheduling.vo.AppointmentOutcomeActionRefVo getAppointmentOutcomeAction()
	{
		return this.appointmentoutcomeaction;
	}
	public void setAppointmentOutcomeAction(ims.scheduling.vo.AppointmentOutcomeActionRefVo value)
	{
		this.isValidated = false;
		this.appointmentoutcomeaction = value;
	}
	public boolean getNumberOfProviderTCICancellationsIsNotNull()
	{
		return this.numberofprovidertcicancellations != null;
	}
	public Integer getNumberOfProviderTCICancellations()
	{
		return this.numberofprovidertcicancellations;
	}
	public void setNumberOfProviderTCICancellations(Integer value)
	{
		this.isValidated = false;
		this.numberofprovidertcicancellations = value;
	}
	public boolean getWas28DayRuleAppliedIsNotNull()
	{
		return this.was28dayruleapplied != null;
	}
	public Boolean getWas28DayRuleApplied()
	{
		return this.was28dayruleapplied;
	}
	public void setWas28DayRuleApplied(Boolean value)
	{
		this.isValidated = false;
		this.was28dayruleapplied = value;
	}
	public boolean getPreOperativeOvernightStayRequiredIsNotNull()
	{
		return this.preoperativeovernightstayrequired != null;
	}
	public Boolean getPreOperativeOvernightStayRequired()
	{
		return this.preoperativeovernightstayrequired;
	}
	public void setPreOperativeOvernightStayRequired(Boolean value)
	{
		this.isValidated = false;
		this.preoperativeovernightstayrequired = value;
	}
	public boolean getWLPreOperativeOvernightStayRequiredIsNotNull()
	{
		return this.wlpreoperativeovernightstayrequired != null;
	}
	public Boolean getWLPreOperativeOvernightStayRequired()
	{
		return this.wlpreoperativeovernightstayrequired;
	}
	public void setWLPreOperativeOvernightStayRequired(Boolean value)
	{
		this.isValidated = false;
		this.wlpreoperativeovernightstayrequired = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.electiveliststatus != null)
		{
			if(!this.electiveliststatus.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.electiveliststatushistory != null)
		{
			if(!this.electiveliststatushistory.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.tcidetails != null)
		{
			if(!this.tcidetails.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.tcihistory != null)
		{
			if(!this.tcihistory.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.notes != null)
		{
			if(!this.notes.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.erod != null)
		{
			if(!this.erod.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.reviews != null)
		{
			if(!this.reviews.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.electiveliststatus == null)
			listOfErrors.add("ElectiveListStatus is mandatory");
		if(this.electiveliststatus != null)
		{
			String[] listOfOtherErrors = this.electiveliststatus.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.electiveliststatushistory != null)
		{
			String[] listOfOtherErrors = this.electiveliststatushistory.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.patient == null)
			listOfErrors.add("Patient is mandatory");
		if(this.referral == null)
			listOfErrors.add("Referral is mandatory");
		if(this.bed != null)
			if(this.bed.length() > 50)
				listOfErrors.add("The length of the field [bed] in the value object [ims.RefMan.vo.PatientElectiveListDetailsToSaveVo] is too big. It should be less or equal to 50");
		if(this.dateonlist == null)
			listOfErrors.add("Date on List is mandatory");
		if(this.electivelistreason == null)
			listOfErrors.add("ElectiveListReason is mandatory");
		if(this.electiveadmissiontype == null)
			listOfErrors.add("ElectiveAdmissionType is mandatory");
		if(this.operativeprocedurestatus == null)
			listOfErrors.add("OperativeProcedureStatus is mandatory");
		if(this.proceduredescription != null)
			if(this.proceduredescription.length() > 255)
				listOfErrors.add("The length of the field [proceduredescription] in the value object [ims.RefMan.vo.PatientElectiveListDetailsToSaveVo] is too big. It should be less or equal to 255");
		if(this.tcidetails != null)
		{
			String[] listOfOtherErrors = this.tcidetails.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.tcihistory != null)
		{
			String[] listOfOtherErrors = this.tcihistory.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.specialrequirementsdetails != null)
			if(this.specialrequirementsdetails.length() > 1000)
				listOfErrors.add("The length of the field [specialrequirementsdetails] in the value object [ims.RefMan.vo.PatientElectiveListDetailsToSaveVo] is too big. It should be less or equal to 1000");
		if(this.notes != null)
		{
			String[] listOfOtherErrors = this.notes.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.erod != null)
		{
			String[] listOfOtherErrors = this.erod.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.reviews != null)
		{
			String[] listOfOtherErrors = this.reviews.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[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 void clearIDAndVersion()
	{
		this.id = null;
		this.version = 0;
	}
	public Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		PatientElectiveListDetailsToSaveVo clone = new PatientElectiveListDetailsToSaveVo(this.id, this.version);
		
		if(this.electivelist == null)
			clone.electivelist = null;
		else
			clone.electivelist = (ims.admin.vo.ElectiveListConfigurationVo)this.electivelist.clone();
		if(this.electiveliststatus == null)
			clone.electiveliststatus = null;
		else
			clone.electiveliststatus = (ims.RefMan.vo.ElectiveListStatusVo)this.electiveliststatus.clone();
		if(this.electiveliststatushistory == null)
			clone.electiveliststatushistory = null;
		else
			clone.electiveliststatushistory = (ims.RefMan.vo.ElectiveListStatusVoCollection)this.electiveliststatushistory.clone();
		clone.patient = this.patient;
		clone.referral = this.referral;
		clone.episodeofcare = this.episodeofcare;
		clone.bed = this.bed;
		if(this.consultant == null)
			clone.consultant = null;
		else
			clone.consultant = (ims.core.vo.HcpLiteVo)this.consultant.clone();
		if(this.dateonlist == null)
			clone.dateonlist = null;
		else
			clone.dateonlist = (ims.framework.utils.Date)this.dateonlist.clone();
		if(this.originaldecisiondate == null)
			clone.originaldecisiondate = null;
		else
			clone.originaldecisiondate = (ims.framework.utils.Date)this.originaldecisiondate.clone();
		if(this.electivelistreason == null)
			clone.electivelistreason = null;
		else
			clone.electivelistreason = (ims.emergency.vo.lookups.ElectiveListReason)this.electivelistreason.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;
		clone.availableatshortnotice = this.availableatshortnotice;
		clone.availableatshortnoticeperiod = this.availableatshortnoticeperiod;
		if(this.priority == null)
			clone.priority = null;
		else
			clone.priority = (ims.RefMan.vo.lookups.ReferralUrgency)this.priority.clone();
		clone.suspensions = this.suspensions;
		clone.operativeprocedurestatus = this.operativeprocedurestatus;
		if(this.primaryprocedure == null)
			clone.primaryprocedure = null;
		else
			clone.primaryprocedure = (ims.core.vo.ProcedureLiteVo)this.primaryprocedure.clone();
		clone.proceduredescription = this.proceduredescription;
		clone.otherprocedures = this.otherprocedures;
		if(this.tcidetails == null)
			clone.tcidetails = null;
		else
			clone.tcidetails = (ims.RefMan.vo.PatientElectiveListTCIVo)this.tcidetails.clone();
		if(this.tcihistory == null)
			clone.tcihistory = null;
		else
			clone.tcihistory = (ims.RefMan.vo.PatientElectiveListTCIVoCollection)this.tcihistory.clone();
		clone.interpretatorrequired = this.interpretatorrequired;
		if(this.language == null)
			clone.language = null;
		else
			clone.language = (ims.core.vo.lookups.Language)this.language.clone();
		clone.transportrequired = this.transportrequired;
		if(this.transport == null)
			clone.transport = null;
		else
			clone.transport = (ims.scheduling.vo.lookups.ApptTransportType)this.transport.clone();
		clone.specialrequirements = this.specialrequirements;
		clone.specialrequirementsdetails = this.specialrequirementsdetails;
		if(this.notes == null)
			clone.notes = null;
		else
			clone.notes = (ims.RefMan.vo.PatientElectiveListNotesVoCollection)this.notes.clone();
		if(this.erod == null)
			clone.erod = null;
		else
			clone.erod = (ims.RefMan.vo.ReferralERODVo)this.erod.clone();
		clone.erodhistory = this.erodhistory;
		clone.pathwayclock = this.pathwayclock;
		clone.tcicancelledbyprovider = this.tcicancelledbyprovider;
		if(this.reviews == null)
			clone.reviews = null;
		else
			clone.reviews = (ims.RefMan.vo.ReviewPatientElectiveListVoCollection)this.reviews.clone();
		if(this.currentsuspensionenddate == null)
			clone.currentsuspensionenddate = null;
		else
			clone.currentsuspensionenddate = (ims.framework.utils.DateTime)this.currentsuspensionenddate.clone();
		if(this.patientstatus == null)
			clone.patientstatus = null;
		else
			clone.patientstatus = (ims.RefMan.vo.lookups.CatsReferralCategory)this.patientstatus.clone();
		if(this.proclaterality == null)
			clone.proclaterality = null;
		else
			clone.proclaterality = (ims.core.vo.lookups.LateralityLRB)this.proclaterality.clone();
		clone.isconsultantperformingprocedure = this.isconsultantperformingprocedure;
		clone.creatingappointment = this.creatingappointment;
		clone.appointmentoutcomeaction = this.appointmentoutcomeaction;
		clone.numberofprovidertcicancellations = this.numberofprovidertcicancellations;
		clone.was28dayruleapplied = this.was28dayruleapplied;
		clone.preoperativeovernightstayrequired = this.preoperativeovernightstayrequired;
		clone.wlpreoperativeovernightstayrequired = this.wlpreoperativeovernightstayrequired;
		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 (!(PatientElectiveListDetailsToSaveVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A PatientElectiveListDetailsToSaveVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((PatientElectiveListDetailsToSaveVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((PatientElectiveListDetailsToSaveVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.electivelist != null)
			count++;
		if(this.electiveliststatus != null)
			count++;
		if(this.electiveliststatushistory != null)
			count++;
		if(this.patient != null)
			count++;
		if(this.referral != null)
			count++;
		if(this.episodeofcare != null)
			count++;
		if(this.bed != null)
			count++;
		if(this.consultant != null)
			count++;
		if(this.dateonlist != null)
			count++;
		if(this.originaldecisiondate != null)
			count++;
		if(this.electivelistreason != null)
			count++;
		if(this.electiveadmissiontype != null)
			count++;
		if(this.intendedmanagement != null)
			count++;
		if(this.anticipatedstay != null)
			count++;
		if(this.availableatshortnotice != null)
			count++;
		if(this.availableatshortnoticeperiod != null)
			count++;
		if(this.priority != null)
			count++;
		if(this.suspensions != null)
			count++;
		if(this.operativeprocedurestatus != null)
			count++;
		if(this.primaryprocedure != null)
			count++;
		if(this.proceduredescription != null)
			count++;
		if(this.otherprocedures != null)
			count++;
		if(this.tcidetails != null)
			count++;
		if(this.tcihistory != null)
			count++;
		if(this.interpretatorrequired != null)
			count++;
		if(this.language != null)
			count++;
		if(this.transportrequired != null)
			count++;
		if(this.transport != null)
			count++;
		if(this.specialrequirements != null)
			count++;
		if(this.specialrequirementsdetails != null)
			count++;
		if(this.notes != null)
			count++;
		if(this.erod != null)
			count++;
		if(this.erodhistory != null)
			count++;
		if(this.pathwayclock != null)
			count++;
		if(this.tcicancelledbyprovider != null)
			count++;
		if(this.reviews != null)
			count++;
		if(this.currentsuspensionenddate != null)
			count++;
		if(this.patientstatus != null)
			count++;
		if(this.proclaterality != null)
			count++;
		if(this.isconsultantperformingprocedure != null)
			count++;
		if(this.creatingappointment != null)
			count++;
		if(this.appointmentoutcomeaction != null)
			count++;
		if(this.numberofprovidertcicancellations != null)
			count++;
		if(this.was28dayruleapplied != null)
			count++;
		if(this.preoperativeovernightstayrequired != null)
			count++;
		if(this.wlpreoperativeovernightstayrequired != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 46;
	}
	protected ims.admin.vo.ElectiveListConfigurationVo electivelist;
	protected ims.RefMan.vo.ElectiveListStatusVo electiveliststatus;
	protected ims.RefMan.vo.ElectiveListStatusVoCollection electiveliststatushistory;
	protected ims.core.patient.vo.PatientRefVo patient;
	protected ims.RefMan.vo.CatsReferralRefVo referral;
	protected ims.core.admin.vo.EpisodeOfCareRefVo episodeofcare;
	protected String bed;
	protected ims.core.vo.HcpLiteVo consultant;
	protected ims.framework.utils.Date dateonlist;
	protected ims.framework.utils.Date originaldecisiondate;
	protected ims.emergency.vo.lookups.ElectiveListReason electivelistreason;
	protected ims.RefMan.vo.lookups.ElectiveAdmissionType electiveadmissiontype;
	protected ims.core.vo.lookups.ManagementIntention intendedmanagement;
	protected Integer anticipatedstay;
	protected Boolean availableatshortnotice;
	protected Integer availableatshortnoticeperiod;
	protected ims.RefMan.vo.lookups.ReferralUrgency priority;
	protected ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVoCollection suspensions;
	protected Boolean operativeprocedurestatus;
	protected ims.core.vo.ProcedureLiteVo primaryprocedure;
	protected String proceduredescription;
	protected ims.core.clinical.vo.ProcedureRefVoCollection otherprocedures;
	protected ims.RefMan.vo.PatientElectiveListTCIVo tcidetails;
	protected ims.RefMan.vo.PatientElectiveListTCIVoCollection tcihistory;
	protected Boolean interpretatorrequired;
	protected ims.core.vo.lookups.Language language;
	protected Boolean transportrequired;
	protected ims.scheduling.vo.lookups.ApptTransportType transport;
	protected Boolean specialrequirements;
	protected String specialrequirementsdetails;
	protected ims.RefMan.vo.PatientElectiveListNotesVoCollection notes;
	protected ims.RefMan.vo.ReferralERODVo erod;
	protected ims.RefMan.vo.ReferralERODRefVoCollection erodhistory;
	protected ims.pathways.vo.PathwayClockRefVo pathwayclock;
	protected Boolean tcicancelledbyprovider;
	protected ims.RefMan.vo.ReviewPatientElectiveListVoCollection reviews;
	protected ims.framework.utils.DateTime currentsuspensionenddate;
	protected ims.RefMan.vo.lookups.CatsReferralCategory patientstatus;
	protected ims.core.vo.lookups.LateralityLRB proclaterality;
	protected Boolean isconsultantperformingprocedure;
	protected ims.scheduling.vo.Booking_AppointmentRefVo creatingappointment;
	protected ims.scheduling.vo.AppointmentOutcomeActionRefVo appointmentoutcomeaction;
	protected Integer numberofprovidertcicancellations;
	protected Boolean was28dayruleapplied;
	protected Boolean preoperativeovernightstayrequired;
	protected Boolean wlpreoperativeovernightstayrequired;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
