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

package ims.clinical.vo;

/**
 * Linked to clinical.IntraOpCaseStaffDetails business object (ID: 1072100132).
 */
public class IntraOpCaseStaffDetailsVo extends ims.clinical.vo.IntraOpCaseStaffDetailsRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public IntraOpCaseStaffDetailsVo()
	{
	}
	public IntraOpCaseStaffDetailsVo(Integer id, int version)
	{
		super(id, version);
	}
	public IntraOpCaseStaffDetailsVo(ims.clinical.vo.beans.IntraOpCaseStaffDetailsVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.theatreappointment = bean.getTheatreAppointment() == null ? null : new ims.scheduling.vo.Booking_AppointmentRefVo(new Integer(bean.getTheatreAppointment().getId()), bean.getTheatreAppointment().getVersion());
		this.anaesthetictype = bean.getAnaestheticType() == null ? null : ims.clinical.vo.lookups.AnaestheticType.buildLookup(bean.getAnaestheticType());
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		this.assistingsurgeons = ims.core.vo.MedicLiteVoCollection.buildFromBeanCollection(bean.getAssistingSurgeons());
		this.scrubpractitioner1 = bean.getScrubPractitioner1() == null ? null : bean.getScrubPractitioner1().buildVo();
		this.scrubpractitioner2 = bean.getScrubPractitioner2() == null ? null : bean.getScrubPractitioner2().buildVo();
		this.other = bean.getOther();
		this.circulatorscrubnurseroles = ims.clinical.vo.CirculatorScrubNurseRoleVoCollection.buildFromBeanCollection(bean.getCirculatorScrubNurseRoles());
		this.displaydiathermyandlaser = bean.getDisplayDiathermyandLaser();
		this.displayirrigationcathetersdrainstubes = bean.getDisplayIrrigationCathetersDrainsTubes();
		this.displayspecimenswoundpackingskinclosure = bean.getDisplaySpecimensWoundPackingSkinClosure();
		this.displayimplantsarterialclampsotherequipment = bean.getDisplayImplantsArterialClampsOtherEquipment();
		this.displaytourniquet = bean.getDisplayTourniquet();
		this.displayrecoverydetails = bean.getDisplayRecoveryDetails();
		this.isrecoveryintheatre = bean.getIsRecoveryInTheatre();
		this.patientassessment = bean.getPatientAssessment() == null ? null : bean.getPatientAssessment().buildVo();
		this.caseservice = bean.getCaseService() == null ? null : new ims.core.clinical.vo.ServiceRefVo(new Integer(bean.getCaseService().getId()), bean.getCaseService().getVersion());
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.clinical.vo.beans.IntraOpCaseStaffDetailsVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.theatreappointment = bean.getTheatreAppointment() == null ? null : new ims.scheduling.vo.Booking_AppointmentRefVo(new Integer(bean.getTheatreAppointment().getId()), bean.getTheatreAppointment().getVersion());
		this.anaesthetictype = bean.getAnaestheticType() == null ? null : ims.clinical.vo.lookups.AnaestheticType.buildLookup(bean.getAnaestheticType());
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		// Interface field type not supported.
		this.assistingsurgeons = ims.core.vo.MedicLiteVoCollection.buildFromBeanCollection(bean.getAssistingSurgeons());
		this.scrubpractitioner1 = bean.getScrubPractitioner1() == null ? null : bean.getScrubPractitioner1().buildVo(map);
		this.scrubpractitioner2 = bean.getScrubPractitioner2() == null ? null : bean.getScrubPractitioner2().buildVo(map);
		this.other = bean.getOther();
		this.circulatorscrubnurseroles = ims.clinical.vo.CirculatorScrubNurseRoleVoCollection.buildFromBeanCollection(bean.getCirculatorScrubNurseRoles());
		this.displaydiathermyandlaser = bean.getDisplayDiathermyandLaser();
		this.displayirrigationcathetersdrainstubes = bean.getDisplayIrrigationCathetersDrainsTubes();
		this.displayspecimenswoundpackingskinclosure = bean.getDisplaySpecimensWoundPackingSkinClosure();
		this.displayimplantsarterialclampsotherequipment = bean.getDisplayImplantsArterialClampsOtherEquipment();
		this.displaytourniquet = bean.getDisplayTourniquet();
		this.displayrecoverydetails = bean.getDisplayRecoveryDetails();
		this.isrecoveryintheatre = bean.getIsRecoveryInTheatre();
		this.patientassessment = bean.getPatientAssessment() == null ? null : bean.getPatientAssessment().buildVo(map);
		this.caseservice = bean.getCaseService() == null ? null : new ims.core.clinical.vo.ServiceRefVo(new Integer(bean.getCaseService().getId()), bean.getCaseService().getVersion());
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.clinical.vo.beans.IntraOpCaseStaffDetailsVoBean bean = null;
		if(map != null)
			bean = (ims.clinical.vo.beans.IntraOpCaseStaffDetailsVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.clinical.vo.beans.IntraOpCaseStaffDetailsVoBean();
			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("THEATREAPPOINTMENT"))
			return getTheatreAppointment();
		if(fieldName.equals("ANAESTHETICTYPE"))
			return getAnaestheticType();
		if(fieldName.equals("ANAESTHETIST"))
			return getAnaesthetist();
		if(fieldName.equals("ASSISTINGANAESTHETIST"))
			return getAssistingAnaesthetist();
		if(fieldName.equals("SUPERVISINGANAESTHETIST"))
			return getSupervisingAnaesthetist();
		if(fieldName.equals("ANAESTHETICPRACTIONER"))
			return getAnaestheticPractioner();
		if(fieldName.equals("RESPONSIBLEHCP"))
			return getResponsibleHCP();
		if(fieldName.equals("OPERATINGSURGEON"))
			return getOperatingSurgeon();
		if(fieldName.equals("SUPERVISINGSURGEON"))
			return getSupervisingSurgeon();
		if(fieldName.equals("ASSISTINGSURGEONS"))
			return getAssistingSurgeons();
		if(fieldName.equals("SCRUBPRACTITIONER1"))
			return getScrubPractitioner1();
		if(fieldName.equals("SCRUBPRACTITIONER2"))
			return getScrubPractitioner2();
		if(fieldName.equals("OTHER"))
			return getOther();
		if(fieldName.equals("CIRCULATORSCRUBNURSEROLES"))
			return getCirculatorScrubNurseRoles();
		if(fieldName.equals("DISPLAYDIATHERMYANDLASER"))
			return getDisplayDiathermyandLaser();
		if(fieldName.equals("DISPLAYIRRIGATIONCATHETERSDRAINSTUBES"))
			return getDisplayIrrigationCathetersDrainsTubes();
		if(fieldName.equals("DISPLAYSPECIMENSWOUNDPACKINGSKINCLOSURE"))
			return getDisplaySpecimensWoundPackingSkinClosure();
		if(fieldName.equals("DISPLAYIMPLANTSARTERIALCLAMPSOTHEREQUIPMENT"))
			return getDisplayImplantsArterialClampsOtherEquipment();
		if(fieldName.equals("DISPLAYTOURNIQUET"))
			return getDisplayTourniquet();
		if(fieldName.equals("DISPLAYRECOVERYDETAILS"))
			return getDisplayRecoveryDetails();
		if(fieldName.equals("ISRECOVERYINTHEATRE"))
			return getIsRecoveryInTheatre();
		if(fieldName.equals("PATIENTASSESSMENT"))
			return getPatientAssessment();
		if(fieldName.equals("CASESERVICE"))
			return getCaseService();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getTheatreAppointmentIsNotNull()
	{
		return this.theatreappointment != null;
	}
	public ims.scheduling.vo.Booking_AppointmentRefVo getTheatreAppointment()
	{
		return this.theatreappointment;
	}
	public void setTheatreAppointment(ims.scheduling.vo.Booking_AppointmentRefVo value)
	{
		this.isValidated = false;
		this.theatreappointment = value;
	}
	public boolean getAnaestheticTypeIsNotNull()
	{
		return this.anaesthetictype != null;
	}
	public ims.clinical.vo.lookups.AnaestheticType getAnaestheticType()
	{
		return this.anaesthetictype;
	}
	public void setAnaestheticType(ims.clinical.vo.lookups.AnaestheticType value)
	{
		this.isValidated = false;
		this.anaesthetictype = value;
	}
	public boolean getAnaesthetistIsNotNull()
	{
		return this.anaesthetist != null;
	}
	public ims.vo.interfaces.IMos getAnaesthetist()
	{
		return this.anaesthetist;
	}
	public void setAnaesthetist(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.anaesthetist = (ims.core.vo.MedicLiteVo)value;
	}
	public boolean getAssistingAnaesthetistIsNotNull()
	{
		return this.assistinganaesthetist != null;
	}
	public ims.vo.interfaces.IMos getAssistingAnaesthetist()
	{
		return this.assistinganaesthetist;
	}
	public void setAssistingAnaesthetist(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.assistinganaesthetist = (ims.core.vo.MedicLiteVo)value;
	}
	public boolean getSupervisingAnaesthetistIsNotNull()
	{
		return this.supervisinganaesthetist != null;
	}
	public ims.vo.interfaces.IMos getSupervisingAnaesthetist()
	{
		return this.supervisinganaesthetist;
	}
	public void setSupervisingAnaesthetist(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.supervisinganaesthetist = (ims.core.vo.MedicLiteVo)value;
	}
	public boolean getAnaestheticPractionerIsNotNull()
	{
		return this.anaestheticpractioner != null;
	}
	public ims.vo.interfaces.IMos getAnaestheticPractioner()
	{
		return this.anaestheticpractioner;
	}
	public void setAnaestheticPractioner(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.anaestheticpractioner = (ims.core.vo.MedicVo)value;
	}
	public boolean getResponsibleHCPIsNotNull()
	{
		return this.responsiblehcp != null;
	}
	public ims.vo.interfaces.IMos getResponsibleHCP()
	{
		return this.responsiblehcp;
	}
	public void setResponsibleHCP(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.responsiblehcp = (ims.core.vo.MedicVo)value;
	}
	public boolean getOperatingSurgeonIsNotNull()
	{
		return this.operatingsurgeon != null;
	}
	public ims.vo.interfaces.IMos getOperatingSurgeon()
	{
		return this.operatingsurgeon;
	}
	public void setOperatingSurgeon(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.operatingsurgeon = (ims.core.vo.MedicVo)value;
	}
	public boolean getSupervisingSurgeonIsNotNull()
	{
		return this.supervisingsurgeon != null;
	}
	public ims.vo.interfaces.IMos getSupervisingSurgeon()
	{
		return this.supervisingsurgeon;
	}
	public void setSupervisingSurgeon(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.supervisingsurgeon = (ims.core.vo.MedicVo)value;
	}
	public boolean getAssistingSurgeonsIsNotNull()
	{
		return this.assistingsurgeons != null;
	}
	public ims.core.vo.MedicLiteVoCollection getAssistingSurgeons()
	{
		return this.assistingsurgeons;
	}
	public void setAssistingSurgeons(ims.core.vo.MedicLiteVoCollection value)
	{
		this.isValidated = false;
		this.assistingsurgeons = value;
	}
	public boolean getScrubPractitioner1IsNotNull()
	{
		return this.scrubpractitioner1 != null;
	}
	public ims.core.vo.NurseLiteVo getScrubPractitioner1()
	{
		return this.scrubpractitioner1;
	}
	public void setScrubPractitioner1(ims.core.vo.NurseLiteVo value)
	{
		this.isValidated = false;
		this.scrubpractitioner1 = value;
	}
	public boolean getScrubPractitioner2IsNotNull()
	{
		return this.scrubpractitioner2 != null;
	}
	public ims.core.vo.NurseLiteVo getScrubPractitioner2()
	{
		return this.scrubpractitioner2;
	}
	public void setScrubPractitioner2(ims.core.vo.NurseLiteVo value)
	{
		this.isValidated = false;
		this.scrubpractitioner2 = value;
	}
	public boolean getOtherIsNotNull()
	{
		return this.other != null;
	}
	public String getOther()
	{
		return this.other;
	}
	public static int getOtherMaxLength()
	{
		return 1000;
	}
	public void setOther(String value)
	{
		this.isValidated = false;
		this.other = value;
	}
	public boolean getCirculatorScrubNurseRolesIsNotNull()
	{
		return this.circulatorscrubnurseroles != null;
	}
	public ims.clinical.vo.CirculatorScrubNurseRoleVoCollection getCirculatorScrubNurseRoles()
	{
		return this.circulatorscrubnurseroles;
	}
	public void setCirculatorScrubNurseRoles(ims.clinical.vo.CirculatorScrubNurseRoleVoCollection value)
	{
		this.isValidated = false;
		this.circulatorscrubnurseroles = value;
	}
	public boolean getDisplayDiathermyandLaserIsNotNull()
	{
		return this.displaydiathermyandlaser != null;
	}
	public Boolean getDisplayDiathermyandLaser()
	{
		return this.displaydiathermyandlaser;
	}
	public void setDisplayDiathermyandLaser(Boolean value)
	{
		this.isValidated = false;
		this.displaydiathermyandlaser = value;
	}
	public boolean getDisplayIrrigationCathetersDrainsTubesIsNotNull()
	{
		return this.displayirrigationcathetersdrainstubes != null;
	}
	public Boolean getDisplayIrrigationCathetersDrainsTubes()
	{
		return this.displayirrigationcathetersdrainstubes;
	}
	public void setDisplayIrrigationCathetersDrainsTubes(Boolean value)
	{
		this.isValidated = false;
		this.displayirrigationcathetersdrainstubes = value;
	}
	public boolean getDisplaySpecimensWoundPackingSkinClosureIsNotNull()
	{
		return this.displayspecimenswoundpackingskinclosure != null;
	}
	public Boolean getDisplaySpecimensWoundPackingSkinClosure()
	{
		return this.displayspecimenswoundpackingskinclosure;
	}
	public void setDisplaySpecimensWoundPackingSkinClosure(Boolean value)
	{
		this.isValidated = false;
		this.displayspecimenswoundpackingskinclosure = value;
	}
	public boolean getDisplayImplantsArterialClampsOtherEquipmentIsNotNull()
	{
		return this.displayimplantsarterialclampsotherequipment != null;
	}
	public Boolean getDisplayImplantsArterialClampsOtherEquipment()
	{
		return this.displayimplantsarterialclampsotherequipment;
	}
	public void setDisplayImplantsArterialClampsOtherEquipment(Boolean value)
	{
		this.isValidated = false;
		this.displayimplantsarterialclampsotherequipment = value;
	}
	public boolean getDisplayTourniquetIsNotNull()
	{
		return this.displaytourniquet != null;
	}
	public Boolean getDisplayTourniquet()
	{
		return this.displaytourniquet;
	}
	public void setDisplayTourniquet(Boolean value)
	{
		this.isValidated = false;
		this.displaytourniquet = value;
	}
	public boolean getDisplayRecoveryDetailsIsNotNull()
	{
		return this.displayrecoverydetails != null;
	}
	public Boolean getDisplayRecoveryDetails()
	{
		return this.displayrecoverydetails;
	}
	public void setDisplayRecoveryDetails(Boolean value)
	{
		this.isValidated = false;
		this.displayrecoverydetails = value;
	}
	public boolean getIsRecoveryInTheatreIsNotNull()
	{
		return this.isrecoveryintheatre != null;
	}
	public Boolean getIsRecoveryInTheatre()
	{
		return this.isrecoveryintheatre;
	}
	public void setIsRecoveryInTheatre(Boolean value)
	{
		this.isValidated = false;
		this.isrecoveryintheatre = value;
	}
	public boolean getPatientAssessmentIsNotNull()
	{
		return this.patientassessment != null;
	}
	public ims.assessment.vo.Patient_AssessmentVo getPatientAssessment()
	{
		return this.patientassessment;
	}
	public void setPatientAssessment(ims.assessment.vo.Patient_AssessmentVo value)
	{
		this.isValidated = false;
		this.patientassessment = value;
	}
	public boolean getCaseServiceIsNotNull()
	{
		return this.caseservice != null;
	}
	public ims.core.clinical.vo.ServiceRefVo getCaseService()
	{
		return this.caseservice;
	}
	public void setCaseService(ims.core.clinical.vo.ServiceRefVo value)
	{
		this.isValidated = false;
		this.caseservice = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.assistingsurgeons != null)
		{
			if(!this.assistingsurgeons.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.scrubpractitioner1 != null)
		{
			if(!this.scrubpractitioner1.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.scrubpractitioner2 != null)
		{
			if(!this.scrubpractitioner2.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.circulatorscrubnurseroles != null)
		{
			if(!this.circulatorscrubnurseroles.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.patientassessment != null)
		{
			if(!this.patientassessment.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.theatreappointment == null)
			listOfErrors.add("TheatreAppointment is mandatory");
		if(this.assistingsurgeons != null)
		{
			String[] listOfOtherErrors = this.assistingsurgeons.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.scrubpractitioner1 != null)
		{
			String[] listOfOtherErrors = this.scrubpractitioner1.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.scrubpractitioner2 != null)
		{
			String[] listOfOtherErrors = this.scrubpractitioner2.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.other != null)
			if(this.other.length() > 1000)
				listOfErrors.add("The length of the field [other] in the value object [ims.clinical.vo.IntraOpCaseStaffDetailsVo] is too big. It should be less or equal to 1000");
		if(this.circulatorscrubnurseroles != null)
		{
			String[] listOfOtherErrors = this.circulatorscrubnurseroles.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.patientassessment != null)
		{
			String[] listOfOtherErrors = this.patientassessment.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.caseservice == null)
			listOfErrors.add("Case Service is mandatory");
		int errorCount = listOfErrors.size();
		if(errorCount == 0)
		{
			this.isBusy = false;
			this.isValidated = true;
			return null;
		}
		String[] result = new String[errorCount];
		for(int x = 0; x < errorCount; x++)
			result[x] = (String)listOfErrors.get(x);
		this.isBusy = false;
		this.isValidated = false;
		return result;
	}
	public void clearIDAndVersion()
	{
		this.id = null;
		this.version = 0;
	}
	public Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		IntraOpCaseStaffDetailsVo clone = new IntraOpCaseStaffDetailsVo(this.id, this.version);
		
		clone.theatreappointment = this.theatreappointment;
		if(this.anaesthetictype == null)
			clone.anaesthetictype = null;
		else
			clone.anaesthetictype = (ims.clinical.vo.lookups.AnaestheticType)this.anaesthetictype.clone();
		clone.anaesthetist = this.anaesthetist;
		clone.assistinganaesthetist = this.assistinganaesthetist;
		clone.supervisinganaesthetist = this.supervisinganaesthetist;
		clone.anaestheticpractioner = this.anaestheticpractioner;
		clone.responsiblehcp = this.responsiblehcp;
		clone.operatingsurgeon = this.operatingsurgeon;
		clone.supervisingsurgeon = this.supervisingsurgeon;
		if(this.assistingsurgeons == null)
			clone.assistingsurgeons = null;
		else
			clone.assistingsurgeons = (ims.core.vo.MedicLiteVoCollection)this.assistingsurgeons.clone();
		if(this.scrubpractitioner1 == null)
			clone.scrubpractitioner1 = null;
		else
			clone.scrubpractitioner1 = (ims.core.vo.NurseLiteVo)this.scrubpractitioner1.clone();
		if(this.scrubpractitioner2 == null)
			clone.scrubpractitioner2 = null;
		else
			clone.scrubpractitioner2 = (ims.core.vo.NurseLiteVo)this.scrubpractitioner2.clone();
		clone.other = this.other;
		if(this.circulatorscrubnurseroles == null)
			clone.circulatorscrubnurseroles = null;
		else
			clone.circulatorscrubnurseroles = (ims.clinical.vo.CirculatorScrubNurseRoleVoCollection)this.circulatorscrubnurseroles.clone();
		clone.displaydiathermyandlaser = this.displaydiathermyandlaser;
		clone.displayirrigationcathetersdrainstubes = this.displayirrigationcathetersdrainstubes;
		clone.displayspecimenswoundpackingskinclosure = this.displayspecimenswoundpackingskinclosure;
		clone.displayimplantsarterialclampsotherequipment = this.displayimplantsarterialclampsotherequipment;
		clone.displaytourniquet = this.displaytourniquet;
		clone.displayrecoverydetails = this.displayrecoverydetails;
		clone.isrecoveryintheatre = this.isrecoveryintheatre;
		if(this.patientassessment == null)
			clone.patientassessment = null;
		else
			clone.patientassessment = (ims.assessment.vo.Patient_AssessmentVo)this.patientassessment.clone();
		clone.caseservice = this.caseservice;
		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 (!(IntraOpCaseStaffDetailsVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A IntraOpCaseStaffDetailsVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((IntraOpCaseStaffDetailsVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((IntraOpCaseStaffDetailsVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.theatreappointment != null)
			count++;
		if(this.anaesthetictype != null)
			count++;
		if(this.anaesthetist != null)
			count++;
		if(this.assistinganaesthetist != null)
			count++;
		if(this.supervisinganaesthetist != null)
			count++;
		if(this.anaestheticpractioner != null)
			count++;
		if(this.responsiblehcp != null)
			count++;
		if(this.operatingsurgeon != null)
			count++;
		if(this.supervisingsurgeon != null)
			count++;
		if(this.assistingsurgeons != null)
			count++;
		if(this.scrubpractitioner1 != null)
			count++;
		if(this.scrubpractitioner2 != null)
			count++;
		if(this.other != null)
			count++;
		if(this.circulatorscrubnurseroles != null)
			count++;
		if(this.displaydiathermyandlaser != null)
			count++;
		if(this.displayirrigationcathetersdrainstubes != null)
			count++;
		if(this.displayspecimenswoundpackingskinclosure != null)
			count++;
		if(this.displayimplantsarterialclampsotherequipment != null)
			count++;
		if(this.displaytourniquet != null)
			count++;
		if(this.displayrecoverydetails != null)
			count++;
		if(this.isrecoveryintheatre != null)
			count++;
		if(this.patientassessment != null)
			count++;
		if(this.caseservice != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 23;
	}
	protected ims.scheduling.vo.Booking_AppointmentRefVo theatreappointment;
	protected ims.clinical.vo.lookups.AnaestheticType anaesthetictype;
	protected ims.core.vo.MedicLiteVo anaesthetist;
	protected ims.core.vo.MedicLiteVo assistinganaesthetist;
	protected ims.core.vo.MedicLiteVo supervisinganaesthetist;
	protected ims.core.vo.MedicVo anaestheticpractioner;
	protected ims.core.vo.MedicVo responsiblehcp;
	protected ims.core.vo.MedicVo operatingsurgeon;
	protected ims.core.vo.MedicVo supervisingsurgeon;
	protected ims.core.vo.MedicLiteVoCollection assistingsurgeons;
	protected ims.core.vo.NurseLiteVo scrubpractitioner1;
	protected ims.core.vo.NurseLiteVo scrubpractitioner2;
	protected String other;
	protected ims.clinical.vo.CirculatorScrubNurseRoleVoCollection circulatorscrubnurseroles;
	protected Boolean displaydiathermyandlaser;
	protected Boolean displayirrigationcathetersdrainstubes;
	protected Boolean displayspecimenswoundpackingskinclosure;
	protected Boolean displayimplantsarterialclampsotherequipment;
	protected Boolean displaytourniquet;
	protected Boolean displayrecoverydetails;
	protected Boolean isrecoveryintheatre;
	protected ims.assessment.vo.Patient_AssessmentVo patientassessment;
	protected ims.core.clinical.vo.ServiceRefVo caseservice;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
