/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/RefMan/vo/PatientElectiveListForTCIDetailsDialogVo.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 PatientElectiveListForTCIDetailsDialogVo extends ims.RefMan.vo.PatientElectiveListRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public PatientElectiveListForTCIDetailsDialogVo()
	{
	}
	public PatientElectiveListForTCIDetailsDialogVo(Integer id, int version)
	{
		super(id, version);
	}
	public PatientElectiveListForTCIDetailsDialogVo(ims.RefMan.vo.beans.PatientElectiveListForTCIDetailsDialogVoBean 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.consultant = bean.getConsultant() == null ? null : new ims.core.resource.people.vo.HcpRefVo(new Integer(bean.getConsultant().getId()), bean.getConsultant().getVersion());
		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.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 : new ims.core.clinical.vo.ProcedureRefVo(new Integer(bean.getPrimaryProcedure().getId()), bean.getPrimaryProcedure().getVersion());
		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.transport = bean.getTransport() == null ? null : ims.scheduling.vo.lookups.ApptTransportType.buildLookup(bean.getTransport());
		if(bean.getNotes() != null)
		{
			this.notes = new ims.RefMan.vo.NotesForPatientElectiveListRefVoCollection();
			for(int notes_i = 0; notes_i < bean.getNotes().length; notes_i++)
			{
				this.notes.add(new ims.RefMan.vo.NotesForPatientElectiveListRefVo(new Integer(bean.getNotes()[notes_i].getId()), bean.getNotes()[notes_i].getVersion()));
			}
		}
		this.erod = bean.getEROD() == null ? null : bean.getEROD().buildVo();
		this.erodhistory = ims.RefMan.vo.ReferralERODVoCollection.buildFromBeanCollection(bean.getERODHistory());
		this.pathwayclock = bean.getPathwayClock() == null ? null : new ims.pathways.vo.PathwayClockRefVo(new Integer(bean.getPathwayClock().getId()), bean.getPathwayClock().getVersion());
		this.patientstatus = bean.getPatientStatus() == null ? null : ims.RefMan.vo.lookups.CatsReferralCategory.buildLookup(bean.getPatientStatus());
		this.theatreappointment = bean.getTheatreAppointment() == null ? null : bean.getTheatreAppointment().buildVo();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.RefMan.vo.beans.PatientElectiveListForTCIDetailsDialogVoBean 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.consultant = bean.getConsultant() == null ? null : new ims.core.resource.people.vo.HcpRefVo(new Integer(bean.getConsultant().getId()), bean.getConsultant().getVersion());
		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.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 : new ims.core.clinical.vo.ProcedureRefVo(new Integer(bean.getPrimaryProcedure().getId()), bean.getPrimaryProcedure().getVersion());
		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.transport = bean.getTransport() == null ? null : ims.scheduling.vo.lookups.ApptTransportType.buildLookup(bean.getTransport());
		if(bean.getNotes() != null)
		{
			this.notes = new ims.RefMan.vo.NotesForPatientElectiveListRefVoCollection();
			for(int notes_i = 0; notes_i < bean.getNotes().length; notes_i++)
			{
				this.notes.add(new ims.RefMan.vo.NotesForPatientElectiveListRefVo(new Integer(bean.getNotes()[notes_i].getId()), bean.getNotes()[notes_i].getVersion()));
			}
		}
		this.erod = bean.getEROD() == null ? null : bean.getEROD().buildVo(map);
		this.erodhistory = ims.RefMan.vo.ReferralERODVoCollection.buildFromBeanCollection(bean.getERODHistory());
		this.pathwayclock = bean.getPathwayClock() == null ? null : new ims.pathways.vo.PathwayClockRefVo(new Integer(bean.getPathwayClock().getId()), bean.getPathwayClock().getVersion());
		this.patientstatus = bean.getPatientStatus() == null ? null : ims.RefMan.vo.lookups.CatsReferralCategory.buildLookup(bean.getPatientStatus());
		this.theatreappointment = bean.getTheatreAppointment() == null ? null : bean.getTheatreAppointment().buildVo(map);
	}
	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.PatientElectiveListForTCIDetailsDialogVoBean bean = null;
		if(map != null)
			bean = (ims.RefMan.vo.beans.PatientElectiveListForTCIDetailsDialogVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.RefMan.vo.beans.PatientElectiveListForTCIDetailsDialogVoBean();
			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("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("PRIORITY"))
			return getPriority();
		if(fieldName.equals("SUSPENSIONS"))
			return getSuspensions();
		if(fieldName.equals("OPERATIVEPROCEDURESTATUS"))
			return getOperativeProcedureStatus();
		if(fieldName.equals("PRIMARYPROCEDURE"))
			return getPrimaryProcedure();
		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("TRANSPORT"))
			return getTransport();
		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("PATIENTSTATUS"))
			return getPatientStatus();
		if(fieldName.equals("THEATREAPPOINTMENT"))
			return getTheatreAppointment();
		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 getConsultantIsNotNull()
	{
		return this.consultant != null;
	}
	public ims.core.resource.people.vo.HcpRefVo getConsultant()
	{
		return this.consultant;
	}
	public void setConsultant(ims.core.resource.people.vo.HcpRefVo 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 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.clinical.vo.ProcedureRefVo getPrimaryProcedure()
	{
		return this.primaryprocedure;
	}
	public void setPrimaryProcedure(ims.core.clinical.vo.ProcedureRefVo value)
	{
		this.isValidated = false;
		this.primaryprocedure = 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 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 getNotesIsNotNull()
	{
		return this.notes != null;
	}
	public ims.RefMan.vo.NotesForPatientElectiveListRefVoCollection getNotes()
	{
		return this.notes;
	}
	public void setNotes(ims.RefMan.vo.NotesForPatientElectiveListRefVoCollection 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.ReferralERODVoCollection getERODHistory()
	{
		return this.erodhistory;
	}
	public void setERODHistory(ims.RefMan.vo.ReferralERODVoCollection 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 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 getTheatreAppointmentIsNotNull()
	{
		return this.theatreappointment != null;
	}
	public ims.scheduling.vo.Booking_AppointmentLiteVo getTheatreAppointment()
	{
		return this.theatreappointment;
	}
	public void setTheatreAppointment(ims.scheduling.vo.Booking_AppointmentLiteVo value)
	{
		this.isValidated = false;
		this.theatreappointment = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.electivelist != null)
		{
			if(!this.electivelist.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.erod != null)
		{
			if(!this.erod.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.erodhistory != null)
		{
			if(!this.erodhistory.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.theatreappointment != null)
		{
			if(!this.theatreappointment.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.electivelist != null)
		{
			String[] listOfOtherErrors = this.electivelist.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[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.dateonlist == null)
			listOfErrors.add("DateOnList 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.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.erod != null)
		{
			String[] listOfOtherErrors = this.erod.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.erodhistory != null)
		{
			String[] listOfOtherErrors = this.erodhistory.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.theatreappointment != null)
		{
			String[] listOfOtherErrors = this.theatreappointment.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;
	
		PatientElectiveListForTCIDetailsDialogVo clone = new PatientElectiveListForTCIDetailsDialogVo(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.consultant = this.consultant;
		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;
		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;
		clone.primaryprocedure = this.primaryprocedure;
		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.transport == null)
			clone.transport = null;
		else
			clone.transport = (ims.scheduling.vo.lookups.ApptTransportType)this.transport.clone();
		clone.notes = this.notes;
		if(this.erod == null)
			clone.erod = null;
		else
			clone.erod = (ims.RefMan.vo.ReferralERODVo)this.erod.clone();
		if(this.erodhistory == null)
			clone.erodhistory = null;
		else
			clone.erodhistory = (ims.RefMan.vo.ReferralERODVoCollection)this.erodhistory.clone();
		clone.pathwayclock = this.pathwayclock;
		if(this.patientstatus == null)
			clone.patientstatus = null;
		else
			clone.patientstatus = (ims.RefMan.vo.lookups.CatsReferralCategory)this.patientstatus.clone();
		if(this.theatreappointment == null)
			clone.theatreappointment = null;
		else
			clone.theatreappointment = (ims.scheduling.vo.Booking_AppointmentLiteVo)this.theatreappointment.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 (!(PatientElectiveListForTCIDetailsDialogVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A PatientElectiveListForTCIDetailsDialogVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((PatientElectiveListForTCIDetailsDialogVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((PatientElectiveListForTCIDetailsDialogVo)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.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.priority != null)
			count++;
		if(this.suspensions != null)
			count++;
		if(this.operativeprocedurestatus != null)
			count++;
		if(this.primaryprocedure != null)
			count++;
		if(this.otherprocedures != null)
			count++;
		if(this.tcidetails != null)
			count++;
		if(this.tcihistory != null)
			count++;
		if(this.interpretatorrequired != null)
			count++;
		if(this.transport != null)
			count++;
		if(this.notes != null)
			count++;
		if(this.erod != null)
			count++;
		if(this.erodhistory != null)
			count++;
		if(this.pathwayclock != null)
			count++;
		if(this.patientstatus != null)
			count++;
		if(this.theatreappointment != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 28;
	}
	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 ims.core.resource.people.vo.HcpRefVo 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 ims.RefMan.vo.lookups.ReferralUrgency priority;
	protected ims.RefMan.vo.SuspensionDetailsForPatientElectiveListRefVoCollection suspensions;
	protected Boolean operativeprocedurestatus;
	protected ims.core.clinical.vo.ProcedureRefVo primaryprocedure;
	protected ims.core.clinical.vo.ProcedureRefVoCollection otherprocedures;
	protected ims.RefMan.vo.PatientElectiveListTCIVo tcidetails;
	protected ims.RefMan.vo.PatientElectiveListTCIVoCollection tcihistory;
	protected Boolean interpretatorrequired;
	protected ims.scheduling.vo.lookups.ApptTransportType transport;
	protected ims.RefMan.vo.NotesForPatientElectiveListRefVoCollection notes;
	protected ims.RefMan.vo.ReferralERODVo erod;
	protected ims.RefMan.vo.ReferralERODVoCollection erodhistory;
	protected ims.pathways.vo.PathwayClockRefVo pathwayclock;
	protected ims.RefMan.vo.lookups.CatsReferralCategory patientstatus;
	protected ims.scheduling.vo.Booking_AppointmentLiteVo theatreappointment;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
