gt: 		for(int x = 0; x < errorCount; x++)
context: //#############################################################################
  //#                                                                           #
  //#  Copyright (C) <2014>  <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/>.    #
  //#                                                                           #
  //#############################################################################
  //#EOH
  // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5007.25751)
  // Copyright (C) 1995-2014 IMS MAXIMS. All rights reserved.
  // WARNING: DO NOT MODIFY the content of this file
  
  package ims.emergency.vo;
  
  /**
   * Linked to core.admin.EmergencyAttendance business object (ID: 1004100025).
   */
  public class AttendanceDetailsVo extends ims.core.admin.vo.EmergencyAttendanceRefVo implements ims.vo.ImsCloneable, Comparable
  {
  	private static final long serialVersionUID = 1L;
  
  	public AttendanceDetailsVo()
  	{
  	}
  	public AttendanceDetailsVo(Integer id, int version)
  	{
  		super(id, version);
  	}
  	public AttendanceDetailsVo(ims.emergency.vo.beans.AttendanceDetailsVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.arrivaldatetime = bean.getArrivalDateTime() == null ? null : bean.getArrivalDateTime().buildDateTime();
  		this.registrationdatetime = bean.getRegistrationDateTime() == null ? null : bean.getRegistrationDateTime().buildDateTime();
  		this.dischargedatetime = bean.getDischargeDateTime() == null ? null : bean.getDischargeDateTime().buildDateTime();
  		this.attendancetype = bean.getAttendanceType() == null ? null : ims.emergency.vo.lookups.AttendanceType.buildLookup(bean.getAttendanceType());
  		this.emergencydepttype = bean.getEmergencyDeptType() == null ? null : ims.emergency.vo.lookups.EmergencyDeptType.buildLookup(bean.getEmergencyDeptType());
  		this.modeofarrival = bean.getModeOfArrival() == null ? null : ims.emergency.vo.lookups.ModeOfArrival.buildLookup(bean.getModeOfArrival());
  		this.accompaniedby = bean.getAccompaniedBy() == null ? null : ims.emergency.vo.lookups.AccompaniedBy.buildLookup(bean.getAccompaniedBy());
  		this.registrationlocation = bean.getRegistrationLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getRegistrationLocation().getId()), bean.getRegistrationLocation().getVersion());
  		this.carecontext = bean.getCareContext() == null ? null : bean.getCareContext().buildVo();
  		this.emergencyepisode = bean.getEmergencyEpisode() == null ? null : new ims.core.admin.vo.EmergencyEpisodeRefVo(new Integer(bean.getEmergencyEpisode().getId()), bean.getEmergencyEpisode().getVersion());
  		this.outcome = bean.getOutcome() == null ? null : ims.emergency.vo.lookups.AttendanceOutcome.buildLookup(bean.getOutcome());
  		this.destination = bean.getDestination();
  		this.patient = bean.getPatient() == null ? null : new ims.core.patient.vo.PatientRefVo(new Integer(bean.getPatient().getId()), bean.getPatient().getVersion());
  		this.episode = bean.getEpisode() == null ? null : new ims.core.admin.vo.EmergencyEpisodeRefVo(new Integer(bean.getEpisode().getId()), bean.getEpisode().getVersion());
  		this.ambulancearrivaldatetime = bean.getAmbulanceArrivalDateTime() == null ? null : bean.getAmbulanceArrivalDateTime().buildDateTime();
  		this.ambulancejobno = bean.getAmbulanceJobNo();
  		this.ageatattendance = bean.getAgeAtAttendance();
  		this.urgencylevel = bean.getUrgencyLevel() == null ? null : ims.emergency.vo.lookups.UrgencyLevel.buildLookup(bean.getUrgencyLevel());
  		this.visittype = bean.getVisitType() == null ? null : ims.emergency.vo.lookups.EDVisitType.buildLookup(bean.getVisitType());
  		this.edconsultant = bean.getEDConsultant() == null ? null : ims.emergency.vo.lookups.EDConsultant.buildLookup(bean.getEDConsultant());
  		this.registeringmos = bean.getRegisteringMOS() == null ? null : bean.getRegisteringMOS().buildVo();
  		this.updatingmos = bean.getUpdatingMOS() == null ? null : bean.getUpdatingMOS().buildVo();
  		this.comments = bean.getComments();
  		this.preferedlanguage = bean.getPreferedLanguage() == null ? null : ims.core.vo.lookups.Language.buildLookup(bean.getPreferedLanguage());
  		this.intrepreterrequired = bean.getIntrepreterRequired() == null ? null : ims.core.vo.lookups.YesNo.buildLookup(bean.getIntrepreterRequired());
  		this.depttype = bean.getDeptType() == null ? null : ims.emergency.vo.lookups.EmergencyDeptType.buildLookup(bean.getDeptType());
  		this.isexpectedarrival = bean.getIsExpectedArrival();
  		this.isprimarycare = bean.getIsPrimaryCare();
  	}
  	public void populate(ims.vo.ValueObjectBeanMap map, ims.emergency.vo.beans.AttendanceDetailsVoBean bean)
  	{
  		this.id = bean.getId();
  		this.version = bean.getVersion();
  		this.arrivaldatetime = bean.getArrivalDateTime() == null ? null : bean.getArrivalDateTime().buildDateTime();
  		this.registrationdatetime = bean.getRegistrationDateTime() == null ? null : bean.getRegistrationDateTime().buildDateTime();
  		this.dischargedatetime = bean.getDischargeDateTime() == null ? null : bean.getDischargeDateTime().buildDateTime();
  		this.attendancetype = bean.getAttendanceType() == null ? null : ims.emergency.vo.lookups.AttendanceType.buildLookup(bean.getAttendanceType());
  		this.emergencydepttype = bean.getEmergencyDeptType() == null ? null : ims.emergency.vo.lookups.EmergencyDeptType.buildLookup(bean.getEmergencyDeptType());
  		this.modeofarrival = bean.getModeOfArrival() == null ? null : ims.emergency.vo.lookups.ModeOfArrival.buildLookup(bean.getModeOfArrival());
  		this.accompaniedby = bean.getAccompaniedBy() == null ? null : ims.emergency.vo.lookups.AccompaniedBy.buildLookup(bean.getAccompaniedBy());
  		this.registrationlocation = bean.getRegistrationLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getRegistrationLocation().getId()), bean.getRegistrationLocation().getVersion());
  		this.carecontext = bean.getCareContext() == null ? null : bean.getCareContext().buildVo(map);
  		this.emergencyepisode = bean.getEmergencyEpisode() == null ? null : new ims.core.admin.vo.EmergencyEpisodeRefVo(new Integer(bean.getEmergencyEpisode().getId()), bean.getEmergencyEpisode().getVersion());
  		this.outcome = bean.getOutcome() == null ? null : ims.emergency.vo.lookups.AttendanceOutcome.buildLookup(bean.getOutcome());
  		this.destination = bean.getDestination();
  		this.patient = bean.getPatient() == null ? null : new ims.core.patient.vo.PatientRefVo(new Integer(bean.getPatient().getId()), bean.getPatient().getVersion());
  		this.episode = bean.getEpisode() == null ? null : new ims.core.admin.vo.EmergencyEpisodeRefVo(new Integer(bean.getEpisode().getId()), bean.getEpisode().getVersion());
  		this.ambulancearrivaldatetime = bean.getAmbulanceArrivalDateTime() == null ? null : bean.getAmbulanceArrivalDateTime().buildDateTime();
  		this.ambulancejobno = bean.getAmbulanceJobNo();
  		this.ageatattendance = bean.getAgeAtAttendance();
  		this.urgencylevel = bean.getUrgencyLevel() == null ? null : ims.emergency.vo.lookups.UrgencyLevel.buildLookup(bean.getUrgencyLevel());
  		this.visittype = bean.getVisitType() == null ? null : ims.emergency.vo.lookups.EDVisitType.buildLookup(bean.getVisitType());
  		this.edconsultant = bean.getEDConsultant() == null ? null : ims.emergency.vo.lookups.EDConsultant.buildLookup(bean.getEDConsultant());
  		this.registeringmos = bean.getRegisteringMOS() == null ? null : bean.getRegisteringMOS().buildVo(map);
  		this.updatingmos = bean.getUpdatingMOS() == null ? null : bean.getUpdatingMOS().buildVo(map);
  		this.comments = bean.getComments();
  		this.preferedlanguage = bean.getPreferedLanguage() == null ? null : ims.core.vo.lookups.Language.buildLookup(bean.getPreferedLanguage());
  		this.intrepreterrequired = bean.getIntrepreterRequired() == null ? null : ims.core.vo.lookups.YesNo.buildLookup(bean.getIntrepreterRequired());
  		this.depttype = bean.getDeptType() == null ? null : ims.emergency.vo.lookups.EmergencyDeptType.buildLookup(bean.getDeptType());
  		this.isexpectedarrival = bean.getIsExpectedArrival();
  		this.isprimarycare = bean.getIsPrimaryCare();
  	}
  	public ims.vo.ValueObjectBean getBean()
  	{
  		return this.getBean(new ims.vo.ValueObjectBeanMap());
  	}
  	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
  	{
  		ims.emergency.vo.beans.AttendanceDetailsVoBean bean = null;
  		if(map != null)
  			bean = (ims.emergency.vo.beans.AttendanceDetailsVoBean)map.getValueObjectBean(this);
  		if (bean == null)
  		{
  			bean = new ims.emergency.vo.beans.AttendanceDetailsVoBean();
  			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("ARRIVALDATETIME"))
  			return getArrivalDateTime();
  		if(fieldName.equals("REGISTRATIONDATETIME"))
  			return getRegistrationDateTime();
  		if(fieldName.equals("DISCHARGEDATETIME"))
  			return getDischargeDateTime();
  		if(fieldName.equals("ATTENDANCETYPE"))
  			return getAttendanceType();
  		if(fieldName.equals("EMERGENCYDEPTTYPE"))
  			return getEmergencyDeptType();
  		if(fieldName.equals("MODEOFARRIVAL"))
  			return getModeOfArrival();
  		if(fieldName.equals("ACCOMPANIEDBY"))
  			return getAccompaniedBy();
  		if(fieldName.equals("REGISTRATIONLOCATION"))
  			return getRegistrationLocation();
  		if(fieldName.equals("CARECONTEXT"))
  			return getCareContext();
  		if(fieldName.equals("EMERGENCYEPISODE"))
  			return getEmergencyEpisode();
  		if(fieldName.equals("OUTCOME"))
  			return getOutcome();
  		if(fieldName.equals("DESTINATION"))
  			return getDestination();
  		if(fieldName.equals("PATIENT"))
  			return getPatient();
  		if(fieldName.equals("EPISODE"))
  			return getEpisode();
  		if(fieldName.equals("AMBULANCEARRIVALDATETIME"))
  			return getAmbulanceArrivalDateTime();
  		if(fieldName.equals("AMBULANCEJOBNO"))
  			return getAmbulanceJobNo();
  		if(fieldName.equals("AGEATATTENDANCE"))
  			return getAgeAtAttendance();
  		if(fieldName.equals("URGENCYLEVEL"))
  			return getUrgencyLevel();
  		if(fieldName.equals("VISITTYPE"))
  			return getVisitType();
  		if(fieldName.equals("EDCONSULTANT"))
  			return getEDConsultant();
  		if(fieldName.equals("REGISTERINGMOS"))
  			return getRegisteringMOS();
  		if(fieldName.equals("UPDATINGMOS"))
  			return getUpdatingMOS();
  		if(fieldName.equals("COMMENTS"))
  			return getComments();
  		if(fieldName.equals("PREFEREDLANGUAGE"))
  			return getPreferedLanguage();
  		if(fieldName.equals("INTREPRETERREQUIRED"))
  			return getIntrepreterRequired();
  		if(fieldName.equals("DEPTTYPE"))
  			return getDeptType();
  		if(fieldName.equals("ISEXPECTEDARRIVAL"))
  			return getIsExpectedArrival();
  		if(fieldName.equals("ISPRIMARYCARE"))
  			return getIsPrimaryCare();
  		return super.getFieldValueByFieldName(fieldName);
  	}
  	public boolean getArrivalDateTimeIsNotNull()
  	{
  		return this.arrivaldatetime != null;
  	}
  	public ims.framework.utils.DateTime getArrivalDateTime()
  	{
  		return this.arrivaldatetime;
  	}
  	public void setArrivalDateTime(ims.framework.utils.DateTime value)
  	{
  		this.isValidated = false;
  		this.arrivaldatetime = value;
  	}
  	public boolean getRegistrationDateTimeIsNotNull()
  	{
  		return this.registrationdatetime != null;
  	}
  	public ims.framework.utils.DateTime getRegistrationDateTime()
  	{
  		return this.registrationdatetime;
  	}
  	public void setRegistrationDateTime(ims.framework.utils.DateTime value)
  	{
  		this.isValidated = false;
  		this.registrationdatetime = value;
  	}
  	public boolean getDischargeDateTimeIsNotNull()
  	{
  		return this.dischargedatetime != null;
  	}
  	public ims.framework.utils.DateTime getDischargeDateTime()
  	{
  		return this.dischargedatetime;
  	}
  	public void setDischargeDateTime(ims.framework.utils.DateTime value)
  	{
  		this.isValidated = false;
  		this.dischargedatetime = value;
  	}
  	public boolean getAttendanceTypeIsNotNull()
  	{
  		return this.attendancetype != null;
  	}
  	public ims.emergency.vo.lookups.AttendanceType getAttendanceType()
  	{
  		return this.attendancetype;
  	}
  	public void setAttendanceType(ims.emergency.vo.lookups.AttendanceType value)
  	{
  		this.isValidated = false;
  		this.attendancetype = value;
  	}
  	public boolean getEmergencyDeptTypeIsNotNull()
  	{
  		return this.emergencydepttype != null;
  	}
  	public ims.emergency.vo.lookups.EmergencyDeptType getEmergencyDeptType()
  	{
  		return this.emergencydepttype;
  	}
  	public void setEmergencyDeptType(ims.emergency.vo.lookups.EmergencyDeptType value)
  	{
  		this.isValidated = false;
  		this.emergencydepttype = value;
  	}
  	public boolean getModeOfArrivalIsNotNull()
  	{
  		return this.modeofarrival != null;
  	}
  	public ims.emergency.vo.lookups.ModeOfArrival getModeOfArrival()
  	{
  		return this.modeofarrival;
  	}
  	public void setModeOfArrival(ims.emergency.vo.lookups.ModeOfArrival value)
  	{
  		this.isValidated = false;
  		this.modeofarrival = value;
  	}
  	public boolean getAccompaniedByIsNotNull()
  	{
  		return this.accompaniedby != null;
  	}
  	public ims.emergency.vo.lookups.AccompaniedBy getAccompaniedBy()
  	{
  		return this.accompaniedby;
  	}
  	public void setAccompaniedBy(ims.emergency.vo.lookups.AccompaniedBy value)
  	{
  		this.isValidated = false;
  		this.accompaniedby = value;
  	}
  	public boolean getRegistrationLocationIsNotNull()
  	{
  		return this.registrationlocation != null;
  	}
  	public ims.core.resource.place.vo.LocationRefVo getRegistrationLocation()
  	{
  		return this.registrationlocation;
  	}
  	public void setRegistrationLocation(ims.core.resource.place.vo.LocationRefVo value)
  	{
  		this.isValidated = false;
  		this.registrationlocation = value;
  	}
  	public boolean getCareContextIsNotNull()
  	{
  		return this.carecontext != null;
  	}
  	public ims.core.vo.CareContextShortVo getCareContext()
  	{
  		return this.carecontext;
  	}
  	public void setCareContext(ims.core.vo.CareContextShortVo value)
  	{
  		this.isValidated = false;
  		this.carecontext = value;
  	}
  	public boolean getEmergencyEpisodeIsNotNull()
  	{
  		return this.emergencyepisode != null;
  	}
  	public ims.core.admin.vo.EmergencyEpisodeRefVo getEmergencyEpisode()
  	{
  		return this.emergencyepisode;
  	}
  	public void setEmergencyEpisode(ims.core.admin.vo.EmergencyEpisodeRefVo value)
  	{
  		this.isValidated = false;
  		this.emergencyepisode = value;
  	}
  	public boolean getOutcomeIsNotNull()
  	{
  		return this.outcome != null;
  	}
  	public ims.emergency.vo.lookups.AttendanceOutcome getOutcome()
  	{
  		return this.outcome;
  	}
  	public void setOutcome(ims.emergency.vo.lookups.AttendanceOutcome value)
  	{
  		this.isValidated = false;
  		this.outcome = value;
  	}
  	public boolean getDestinationIsNotNull()
  	{
  		return this.destination != null;
  	}
  	public String getDestination()
  	{
  		return this.destination;
  	}
  	public static int getDestinationMaxLength()
  	{
  		return 120;
  	}
  	public void setDestination(String value)
  	{
  		this.isValidated = false;
  		this.destination = 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 getEpisodeIsNotNull()
  	{
  		return this.episode != null;
  	}
  	public ims.core.admin.vo.EmergencyEpisodeRefVo getEpisode()
  	{
  		return this.episode;
  	}
  	public void setEpisode(ims.core.admin.vo.EmergencyEpisodeRefVo value)
  	{
  		this.isValidated = false;
  		this.episode = value;
  	}
  	public boolean getAmbulanceArrivalDateTimeIsNotNull()
  	{
  		return this.ambulancearrivaldatetime != null;
  	}
  	public ims.framework.utils.DateTime getAmbulanceArrivalDateTime()
  	{
  		return this.ambulancearrivaldatetime;
  	}
  	public void setAmbulanceArrivalDateTime(ims.framework.utils.DateTime value)
  	{
  		this.isValidated = false;
  		this.ambulancearrivaldatetime = value;
  	}
  	public boolean getAmbulanceJobNoIsNotNull()
  	{
  		return this.ambulancejobno != null;
  	}
  	public String getAmbulanceJobNo()
  	{
  		return this.ambulancejobno;
  	}
  	public static int getAmbulanceJobNoMaxLength()
  	{
  		return 25;
  	}
  	public void setAmbulanceJobNo(String value)
  	{
  		this.isValidated = false;
  		this.ambulancejobno = value;
  	}
  	public boolean getAgeAtAttendanceIsNotNull()
  	{
  		return this.ageatattendance != null;
  	}
  	public Integer getAgeAtAttendance()
  	{
  		return this.ageatattendance;
  	}
  	public void setAgeAtAttendance(Integer value)
  	{
  		this.isValidated = false;
  		this.ageatattendance = value;
  	}
  	public boolean getUrgencyLevelIsNotNull()
  	{
  		return this.urgencylevel != null;
  	}
  	public ims.emergency.vo.lookups.UrgencyLevel getUrgencyLevel()
  	{
  		return this.urgencylevel;
  	}
  	public void setUrgencyLevel(ims.emergency.vo.lookups.UrgencyLevel value)
  	{
  		this.isValidated = false;
  		this.urgencylevel = value;
  	}
  	public boolean getVisitTypeIsNotNull()
  	{
  		return this.visittype != null;
  	}
  	public ims.emergency.vo.lookups.EDVisitType getVisitType()
  	{
  		return this.visittype;
  	}
  	public void setVisitType(ims.emergency.vo.lookups.EDVisitType value)
  	{
  		this.isValidated = false;
  		this.visittype = value;
  	}
  	public boolean getEDConsultantIsNotNull()
  	{
  		return this.edconsultant != null;
  	}
  	public ims.emergency.vo.lookups.EDConsultant getEDConsultant()
  	{
  		return this.edconsultant;
  	}
  	public void setEDConsultant(ims.emergency.vo.lookups.EDConsultant value)
  	{
  		this.isValidated = false;
  		this.edconsultant = value;
  	}
  	public boolean getRegisteringMOSIsNotNull()
  	{
  		return this.registeringmos != null;
  	}
  	public ims.core.vo.MemberOfStaffLiteVo getRegisteringMOS()
  	{
  		return this.registeringmos;
  	}
  	public void setRegisteringMOS(ims.core.vo.MemberOfStaffLiteVo value)
  	{
  		this.isValidated = false;
  		this.registeringmos = value;
  	}
  	public boolean getUpdatingMOSIsNotNull()
  	{
  		return this.updatingmos != null;
  	}
  	public ims.core.vo.MemberOfStaffLiteVo getUpdatingMOS()
  	{
  		return this.updatingmos;
  	}
  	public void setUpdatingMOS(ims.core.vo.MemberOfStaffLiteVo value)
  	{
  		this.isValidated = false;
  		this.updatingmos = value;
  	}
  	public boolean getCommentsIsNotNull()
  	{
  		return this.comments != null;
  	}
  	public String getComments()
  	{
  		return this.comments;
  	}
  	public static int getCommentsMaxLength()
  	{
  		return 500;
  	}
  	public void setComments(String value)
  	{
  		this.isValidated = false;
  		this.comments = value;
  	}
  	public boolean getPreferedLanguageIsNotNull()
  	{
  		return this.preferedlanguage != null;
  	}
  	public ims.core.vo.lookups.Language getPreferedLanguage()
  	{
  		return this.preferedlanguage;
  	}
  	public void setPreferedLanguage(ims.core.vo.lookups.Language value)
  	{
  		this.isValidated = false;
  		this.preferedlanguage = value;
  	}
  	public boolean getIntrepreterRequiredIsNotNull()
  	{
  		return this.intrepreterrequired != null;
  	}
  	public ims.core.vo.lookups.YesNo getIntrepreterRequired()
  	{
  		return this.intrepreterrequired;
  	}
  	public void setIntrepreterRequired(ims.core.vo.lookups.YesNo value)
  	{
  		this.isValidated = false;
  		this.intrepreterrequired = value;
  	}
  	public boolean getDeptTypeIsNotNull()
  	{
  		return this.depttype != null;
  	}
  	public ims.emergency.vo.lookups.EmergencyDeptType getDeptType()
  	{
  		return this.depttype;
  	}
  	public void setDeptType(ims.emergency.vo.lookups.EmergencyDeptType value)
  	{
  		this.isValidated = false;
  		this.depttype = value;
  	}
  	public boolean getIsExpectedArrivalIsNotNull()
  	{
  		return this.isexpectedarrival != null;
  	}
  	public Boolean getIsExpectedArrival()
  	{
  		return this.isexpectedarrival;
  	}
  	public void setIsExpectedArrival(Boolean value)
  	{
  		this.isValidated = false;
  		this.isexpectedarrival = value;
  	}
  	public boolean getIsPrimaryCareIsNotNull()
  	{
  		return this.isprimarycare != null;
  	}
  	public Boolean getIsPrimaryCare()
  	{
  		return this.isprimarycare;
  	}
  	public void setIsPrimaryCare(Boolean value)
  	{
  		this.isValidated = false;
  		this.isprimarycare = value;
  	}
  	public boolean isValidated()
  	{
  		if(this.isBusy)
  			return true;
  		this.isBusy = true;
  	
  		if(!this.isValidated)
  		{
  			this.isBusy = false;
  			return false;
  		}
  		if(this.carecontext != null)
  		{
  			if(!this.carecontext.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.arrivaldatetime == null)
  			listOfErrors.add("Arrival Date Time is mandatory!");
  		if(this.registrationdatetime == null)
  			listOfErrors.add("Registration Date Time is mandatory!");
  		if(this.carecontext == null)
  			listOfErrors.add("Care Context is mandatory!");
  		if(this.carecontext != null)
  		{
  			String[] listOfOtherErrors = this.carecontext.validate();
  			if(listOfOtherErrors != null)
  			{
  				for(int x = 0; x < listOfOtherErrors.length; x++)
  				{
  					listOfErrors.add(listOfOtherErrors[x]);
  				}
  			}
  		}
  		if(this.emergencyepisode == null)
  			listOfErrors.add("Emergency Episode is mandatory!");
  		if(this.destination != null)
  			if(this.destination.length() > 120)
  				listOfErrors.add("The length of the field [destination] in the value object [ims.emergency.vo.AttendanceDetailsVo] is too big. It should be less or equal to 120");
  		if(this.patient == null)
  			listOfErrors.add("Patient is mandatory");
  		if(this.episode == null)
  			listOfErrors.add("Episode is mandatory");
  		if(this.ambulancejobno != null)
  			if(this.ambulancejobno.length() > 25)
  				listOfErrors.add("The length of the field [ambulancejobno] in the value object [ims.emergency.vo.AttendanceDetailsVo] is too big. It should be less or equal to 25");
  		if(this.registeringmos == null)
  			listOfErrors.add("Registering MOS is mandatory!");
  		if(this.comments != null)
  			if(this.comments.length() > 500)
  				listOfErrors.add("The length of the field [comments] in the value object [ims.emergency.vo.AttendanceDetailsVo] is too big. It should be less or equal to 500");
  		int errorCount = listOfErrors.size();
  		if(errorCount == 0)
  		{
  			this.isBusy = false;
  			this.isValidated = true;
  			return null;
  		}
  		String[] result = new String[errorCount];
  