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

/**
 * Linked to OCRR.OrderingResults.OrderInvestigation business object (ID: 1070100002).
 */
public class OrderInvestigationWebServiceVo extends ims.ocrr.orderingresults.vo.OrderInvestigationRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public OrderInvestigationWebServiceVo()
	{
	}
	public OrderInvestigationWebServiceVo(Integer id, int version)
	{
		super(id, version);
	}
	public OrderInvestigationWebServiceVo(ims.ocrr.vo.beans.OrderInvestigationWebServiceVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.investigation = bean.getInvestigation() == null ? null : bean.getInvestigation().buildVo();
		if(bean.getSpecimen() != null)
		{
			this.specimen = new ims.ocrr.orderingresults.vo.OrderSpecimenRefVoCollection();
			for(int specimen_i = 0; specimen_i < bean.getSpecimen().length; specimen_i++)
			{
				this.specimen.add(new ims.ocrr.orderingresults.vo.OrderSpecimenRefVo(new Integer(bean.getSpecimen()[specimen_i].getId()), bean.getSpecimen()[specimen_i].getVersion()));
			}
		}
		this.responsibleclinician = bean.getResponsibleClinician() == null ? null : new ims.core.resource.people.vo.HcpRefVo(new Integer(bean.getResponsibleClinician().getId()), bean.getResponsibleClinician().getVersion());
		this.responsiblegp = bean.getResponsibleGp() == null ? null : new ims.core.resource.people.vo.GpRefVo(new Integer(bean.getResponsibleGp().getId()), bean.getResponsibleGp().getVersion());
		this.patientlocation = bean.getPatientLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getPatientLocation().getId()), bean.getPatientLocation().getVersion());
		this.patientclinic = bean.getPatientClinic() == null ? null : new ims.core.resource.place.vo.ClinicRefVo(new Integer(bean.getPatientClinic().getId()), bean.getPatientClinic().getVersion());
		this.orderpriority = bean.getOrderPriority() == null ? null : ims.ocrr.vo.lookups.OrderPriority.buildLookup(bean.getOrderPriority());
		this.repdatetime = bean.getRepDateTime() == null ? null : bean.getRepDateTime().buildDateTime();
		this.reptimesupplied = bean.getRepTimeSupplied();
		this.displaydatetime = bean.getDisplayDateTime() == null ? null : bean.getDisplayDateTime().buildDateTime();
		this.displaytimesupplied = bean.getDisplayTimeSupplied();
		this.displayflag = bean.getDisplayFlag() == null ? null : ims.ocrr.vo.lookups.OcsDisplayFlag.buildLookup(bean.getDisplayFlag());
		this.wasordered = bean.getWasOrdered();
		this.resultdemographics = bean.getResultDemographics() == null ? null : new ims.core.patient.vo.MinDemographicsRefVo(new Integer(bean.getResultDemographics().getId()), bean.getResultDemographics().getVersion());
		this.resultstatus = bean.getResultStatus() == null ? null : ims.ocrr.vo.lookups.ResultStatus.buildLookup(bean.getResultStatus());
		this.ordinvcurrentstatus = bean.getOrdInvCurrentStatus() == null ? null : bean.getOrdInvCurrentStatus().buildVo();
		if(bean.getOrdInvStatusHistory() != null)
		{
			this.ordinvstatushistory = new ims.ocrr.orderingresults.vo.OrderedInvestigationStatusRefVoCollection();
			for(int ordinvstatushistory_i = 0; ordinvstatushistory_i < bean.getOrdInvStatusHistory().length; ordinvstatushistory_i++)
			{
				this.ordinvstatushistory.add(new ims.ocrr.orderingresults.vo.OrderedInvestigationStatusRefVo(new Integer(bean.getOrdInvStatusHistory()[ordinvstatushistory_i].getId()), bean.getOrdInvStatusHistory()[ordinvstatushistory_i].getVersion()));
			}
		}
		this.fillerordnum = bean.getFillerOrdNum();
		this.radattendanceid = bean.getRadAttendanceId();
		this.appointmentdate = bean.getAppointmentDate() == null ? null : bean.getAppointmentDate().buildDateTime();
		this.reasonforstudy = bean.getReasonForStudy();
		this.ordinvseq = bean.getOrdInvSeq();
		this.examreqonafterdate = bean.getExamReqOnAfterDate() == null ? null : bean.getExamReqOnAfterDate().buildDate();
		this.requestedlocation = bean.getRequestedLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getRequestedLocation().getId()), bean.getRequestedLocation().getVersion());
		this.performedlocation = bean.getPerformedLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getPerformedLocation().getId()), bean.getPerformedLocation().getVersion());
		this.wasprocessed = bean.getWasProcessed();
		if(bean.getResultHistory() != null)
		{
			this.resulthistory = new ims.ocrr.orderingresults.vo.OrderResultHistoryRefVoCollection();
			for(int resulthistory_i = 0; resulthistory_i < bean.getResultHistory().length; resulthistory_i++)
			{
				this.resulthistory.add(new ims.ocrr.orderingresults.vo.OrderResultHistoryRefVo(new Integer(bean.getResultHistory()[resulthistory_i].getId()), bean.getResultHistory()[resulthistory_i].getVersion()));
			}
		}
		this.entertheatredate = bean.getEnterTheatreDate() == null ? null : bean.getEnterTheatreDate().buildDateTime();
		this.startproceduredate = bean.getStartProcedureDate() == null ? null : bean.getStartProcedureDate().buildDateTime();
		this.endproceduredate = bean.getEndProcedureDate() == null ? null : bean.getEndProcedureDate().buildDateTime();
		this.leaverecoverydate = bean.getLeaveRecoveryDate() == null ? null : bean.getLeaveRecoveryDate().buildDateTime();
		this.reporturl = bean.getReportUrl();
		this.reportdocumenturl = bean.getReportDocumentUrl();
		this.investigationdatetime = bean.getInvestigationDateTime() == null ? null : bean.getInvestigationDateTime().buildDateTime();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.ocrr.vo.beans.OrderInvestigationWebServiceVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.investigation = bean.getInvestigation() == null ? null : bean.getInvestigation().buildVo(map);
		if(bean.getSpecimen() != null)
		{
			this.specimen = new ims.ocrr.orderingresults.vo.OrderSpecimenRefVoCollection();
			for(int specimen_i = 0; specimen_i < bean.getSpecimen().length; specimen_i++)
			{
				this.specimen.add(new ims.ocrr.orderingresults.vo.OrderSpecimenRefVo(new Integer(bean.getSpecimen()[specimen_i].getId()), bean.getSpecimen()[specimen_i].getVersion()));
			}
		}
		this.responsibleclinician = bean.getResponsibleClinician() == null ? null : new ims.core.resource.people.vo.HcpRefVo(new Integer(bean.getResponsibleClinician().getId()), bean.getResponsibleClinician().getVersion());
		this.responsiblegp = bean.getResponsibleGp() == null ? null : new ims.core.resource.people.vo.GpRefVo(new Integer(bean.getResponsibleGp().getId()), bean.getResponsibleGp().getVersion());
		this.patientlocation = bean.getPatientLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getPatientLocation().getId()), bean.getPatientLocation().getVersion());
		this.patientclinic = bean.getPatientClinic() == null ? null : new ims.core.resource.place.vo.ClinicRefVo(new Integer(bean.getPatientClinic().getId()), bean.getPatientClinic().getVersion());
		this.orderpriority = bean.getOrderPriority() == null ? null : ims.ocrr.vo.lookups.OrderPriority.buildLookup(bean.getOrderPriority());
		this.repdatetime = bean.getRepDateTime() == null ? null : bean.getRepDateTime().buildDateTime();
		this.reptimesupplied = bean.getRepTimeSupplied();
		this.displaydatetime = bean.getDisplayDateTime() == null ? null : bean.getDisplayDateTime().buildDateTime();
		this.displaytimesupplied = bean.getDisplayTimeSupplied();
		this.displayflag = bean.getDisplayFlag() == null ? null : ims.ocrr.vo.lookups.OcsDisplayFlag.buildLookup(bean.getDisplayFlag());
		this.wasordered = bean.getWasOrdered();
		this.resultdemographics = bean.getResultDemographics() == null ? null : new ims.core.patient.vo.MinDemographicsRefVo(new Integer(bean.getResultDemographics().getId()), bean.getResultDemographics().getVersion());
		this.resultstatus = bean.getResultStatus() == null ? null : ims.ocrr.vo.lookups.ResultStatus.buildLookup(bean.getResultStatus());
		this.ordinvcurrentstatus = bean.getOrdInvCurrentStatus() == null ? null : bean.getOrdInvCurrentStatus().buildVo(map);
		if(bean.getOrdInvStatusHistory() != null)
		{
			this.ordinvstatushistory = new ims.ocrr.orderingresults.vo.OrderedInvestigationStatusRefVoCollection();
			for(int ordinvstatushistory_i = 0; ordinvstatushistory_i < bean.getOrdInvStatusHistory().length; ordinvstatushistory_i++)
			{
				this.ordinvstatushistory.add(new ims.ocrr.orderingresults.vo.OrderedInvestigationStatusRefVo(new Integer(bean.getOrdInvStatusHistory()[ordinvstatushistory_i].getId()), bean.getOrdInvStatusHistory()[ordinvstatushistory_i].getVersion()));
			}
		}
		this.fillerordnum = bean.getFillerOrdNum();
		this.radattendanceid = bean.getRadAttendanceId();
		this.appointmentdate = bean.getAppointmentDate() == null ? null : bean.getAppointmentDate().buildDateTime();
		this.reasonforstudy = bean.getReasonForStudy();
		this.ordinvseq = bean.getOrdInvSeq();
		this.examreqonafterdate = bean.getExamReqOnAfterDate() == null ? null : bean.getExamReqOnAfterDate().buildDate();
		this.requestedlocation = bean.getRequestedLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getRequestedLocation().getId()), bean.getRequestedLocation().getVersion());
		this.performedlocation = bean.getPerformedLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo(new Integer(bean.getPerformedLocation().getId()), bean.getPerformedLocation().getVersion());
		this.wasprocessed = bean.getWasProcessed();
		if(bean.getResultHistory() != null)
		{
			this.resulthistory = new ims.ocrr.orderingresults.vo.OrderResultHistoryRefVoCollection();
			for(int resulthistory_i = 0; resulthistory_i < bean.getResultHistory().length; resulthistory_i++)
			{
				this.resulthistory.add(new ims.ocrr.orderingresults.vo.OrderResultHistoryRefVo(new Integer(bean.getResultHistory()[resulthistory_i].getId()), bean.getResultHistory()[resulthistory_i].getVersion()));
			}
		}
		this.entertheatredate = bean.getEnterTheatreDate() == null ? null : bean.getEnterTheatreDate().buildDateTime();
		this.startproceduredate = bean.getStartProcedureDate() == null ? null : bean.getStartProcedureDate().buildDateTime();
		this.endproceduredate = bean.getEndProcedureDate() == null ? null : bean.getEndProcedureDate().buildDateTime();
		this.leaverecoverydate = bean.getLeaveRecoveryDate() == null ? null : bean.getLeaveRecoveryDate().buildDateTime();
		this.reporturl = bean.getReportUrl();
		this.reportdocumenturl = bean.getReportDocumentUrl();
		this.investigationdatetime = bean.getInvestigationDateTime() == null ? null : bean.getInvestigationDateTime().buildDateTime();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.ocrr.vo.beans.OrderInvestigationWebServiceVoBean bean = null;
		if(map != null)
			bean = (ims.ocrr.vo.beans.OrderInvestigationWebServiceVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.ocrr.vo.beans.OrderInvestigationWebServiceVoBean();
			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("INVESTIGATION"))
			return getInvestigation();
		if(fieldName.equals("SPECIMEN"))
			return getSpecimen();
		if(fieldName.equals("RESPONSIBLECLINICIAN"))
			return getResponsibleClinician();
		if(fieldName.equals("RESPONSIBLEGP"))
			return getResponsibleGp();
		if(fieldName.equals("PATIENTLOCATION"))
			return getPatientLocation();
		if(fieldName.equals("PATIENTCLINIC"))
			return getPatientClinic();
		if(fieldName.equals("ORDERPRIORITY"))
			return getOrderPriority();
		if(fieldName.equals("REPDATETIME"))
			return getRepDateTime();
		if(fieldName.equals("REPTIMESUPPLIED"))
			return getRepTimeSupplied();
		if(fieldName.equals("DISPLAYDATETIME"))
			return getDisplayDateTime();
		if(fieldName.equals("DISPLAYTIMESUPPLIED"))
			return getDisplayTimeSupplied();
		if(fieldName.equals("DISPLAYFLAG"))
			return getDisplayFlag();
		if(fieldName.equals("WASORDERED"))
			return getWasOrdered();
		if(fieldName.equals("RESULTDEMOGRAPHICS"))
			return getResultDemographics();
		if(fieldName.equals("RESULTSTATUS"))
			return getResultStatus();
		if(fieldName.equals("ORDINVCURRENTSTATUS"))
			return getOrdInvCurrentStatus();
		if(fieldName.equals("ORDINVSTATUSHISTORY"))
			return getOrdInvStatusHistory();
		if(fieldName.equals("FILLERORDNUM"))
			return getFillerOrdNum();
		if(fieldName.equals("RADATTENDANCEID"))
			return getRadAttendanceId();
		if(fieldName.equals("APPOINTMENTDATE"))
			return getAppointmentDate();
		if(fieldName.equals("REASONFORSTUDY"))
			return getReasonForStudy();
		if(fieldName.equals("ORDINVSEQ"))
			return getOrdInvSeq();
		if(fieldName.equals("EXAMREQONAFTERDATE"))
			return getExamReqOnAfterDate();
		if(fieldName.equals("REQUESTEDLOCATION"))
			return getRequestedLocation();
		if(fieldName.equals("PERFORMEDLOCATION"))
			return getPerformedLocation();
		if(fieldName.equals("WASPROCESSED"))
			return getWasProcessed();
		if(fieldName.equals("RESULTHISTORY"))
			return getResultHistory();
		if(fieldName.equals("ENTERTHEATREDATE"))
			return getEnterTheatreDate();
		if(fieldName.equals("STARTPROCEDUREDATE"))
			return getStartProcedureDate();
		if(fieldName.equals("ENDPROCEDUREDATE"))
			return getEndProcedureDate();
		if(fieldName.equals("LEAVERECOVERYDATE"))
			return getLeaveRecoveryDate();
		if(fieldName.equals("REPORTURL"))
			return getReportUrl();
		if(fieldName.equals("REPORTDOCUMENTURL"))
			return getReportDocumentUrl();
		if(fieldName.equals("INVESTIGATIONDATETIME"))
			return getInvestigationDateTime();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getInvestigationIsNotNull()
	{
		return this.investigation != null;
	}
	public ims.ocrr.vo.InvestigationUnderSpecimenVo getInvestigation()
	{
		return this.investigation;
	}
	public void setInvestigation(ims.ocrr.vo.InvestigationUnderSpecimenVo value)
	{
		this.isValidated = false;
		this.investigation = value;
	}
	public boolean getSpecimenIsNotNull()
	{
		return this.specimen != null;
	}
	public ims.ocrr.orderingresults.vo.OrderSpecimenRefVoCollection getSpecimen()
	{
		return this.specimen;
	}
	public void setSpecimen(ims.ocrr.orderingresults.vo.OrderSpecimenRefVoCollection value)
	{
		this.isValidated = false;
		this.specimen = value;
	}
	public boolean getResponsibleClinicianIsNotNull()
	{
		return this.responsibleclinician != null;
	}
	public ims.core.resource.people.vo.HcpRefVo getResponsibleClinician()
	{
		return this.responsibleclinician;
	}
	public void setResponsibleClinician(ims.core.resource.people.vo.HcpRefVo value)
	{
		this.isValidated = false;
		this.responsibleclinician = value;
	}
	public boolean getResponsibleGpIsNotNull()
	{
		return this.responsiblegp != null;
	}
	public ims.core.resource.people.vo.GpRefVo getResponsibleGp()
	{
		return this.responsiblegp;
	}
	public void setResponsibleGp(ims.core.resource.people.vo.GpRefVo value)
	{
		this.isValidated = false;
		this.responsiblegp = value;
	}
	public boolean getPatientLocationIsNotNull()
	{
		return this.patientlocation != null;
	}
	public ims.core.resource.place.vo.LocationRefVo getPatientLocation()
	{
		return this.patientlocation;
	}
	public void setPatientLocation(ims.core.resource.place.vo.LocationRefVo value)
	{
		this.isValidated = false;
		this.patientlocation = value;
	}
	public boolean getPatientClinicIsNotNull()
	{
		return this.patientclinic != null;
	}
	public ims.core.resource.place.vo.ClinicRefVo getPatientClinic()
	{
		return this.patientclinic;
	}
	public void setPatientClinic(ims.core.resource.place.vo.ClinicRefVo value)
	{
		this.isValidated = false;
		this.patientclinic = value;
	}
	public boolean getOrderPriorityIsNotNull()
	{
		return this.orderpriority != null;
	}
	public ims.ocrr.vo.lookups.OrderPriority getOrderPriority()
	{
		return this.orderpriority;
	}
	public void setOrderPriority(ims.ocrr.vo.lookups.OrderPriority value)
	{
		this.isValidated = false;
		this.orderpriority = value;
	}
	public boolean getRepDateTimeIsNotNull()
	{
		return this.repdatetime != null;
	}
	public ims.framework.utils.DateTime getRepDateTime()
	{
		return this.repdatetime;
	}
	public void setRepDateTime(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.repdatetime = value;
	}
	public boolean getRepTimeSuppliedIsNotNull()
	{
		return this.reptimesupplied != null;
	}
	public Boolean getRepTimeSupplied()
	{
		return this.reptimesupplied;
	}
	public void setRepTimeSupplied(Boolean value)
	{
		this.isValidated = false;
		this.reptimesupplied = value;
	}
	public boolean getDisplayDateTimeIsNotNull()
	{
		return this.displaydatetime != null;
	}
	public ims.framework.utils.DateTime getDisplayDateTime()
	{
		return this.displaydatetime;
	}
	public void setDisplayDateTime(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.displaydatetime = value;
	}
	public boolean getDisplayTimeSuppliedIsNotNull()
	{
		return this.displaytimesupplied != null;
	}
	public Boolean getDisplayTimeSupplied()
	{
		return this.displaytimesupplied;
	}
	public void setDisplayTimeSupplied(Boolean value)
	{
		this.isValidated = false;
		this.displaytimesupplied = value;
	}
	public boolean getDisplayFlagIsNotNull()
	{
		return this.displayflag != null;
	}
	public ims.ocrr.vo.lookups.OcsDisplayFlag getDisplayFlag()
	{
		return this.displayflag;
	}
	public void setDisplayFlag(ims.ocrr.vo.lookups.OcsDisplayFlag value)
	{
		this.isValidated = false;
		this.displayflag = value;
	}
	public boolean getWasOrderedIsNotNull()
	{
		return this.wasordered != null;
	}
	public Boolean getWasOrdered()
	{
		return this.wasordered;
	}
	public void setWasOrdered(Boolean value)
	{
		this.isValidated = false;
		this.wasordered = value;
	}
	public boolean getResultDemographicsIsNotNull()
	{
		return this.resultdemographics != null;
	}
	public ims.core.patient.vo.MinDemographicsRefVo getResultDemographics()
	{
		return this.resultdemographics;
	}
	public void setResultDemographics(ims.core.patient.vo.MinDemographicsRefVo value)
	{
		this.isValidated = false;
		this.resultdemographics = value;
	}
	public boolean getResultStatusIsNotNull()
	{
		return this.resultstatus != null;
	}
	public ims.ocrr.vo.lookups.ResultStatus getResultStatus()
	{
		return this.resultstatus;
	}
	public void setResultStatus(ims.ocrr.vo.lookups.ResultStatus value)
	{
		this.isValidated = false;
		this.resultstatus = value;
	}
	public boolean getOrdInvCurrentStatusIsNotNull()
	{
		return this.ordinvcurrentstatus != null;
	}
	public ims.ocrr.vo.OrderedInvestigationStatusVo getOrdInvCurrentStatus()
	{
		return this.ordinvcurrentstatus;
	}
	public void setOrdInvCurrentStatus(ims.ocrr.vo.OrderedInvestigationStatusVo value)
	{
		this.isValidated = false;
		this.ordinvcurrentstatus = value;
	}
	public boolean getOrdInvStatusHistoryIsNotNull()
	{
		return this.ordinvstatushistory != null;
	}
	public ims.ocrr.orderingresults.vo.OrderedInvestigationStatusRefVoCollection getOrdInvStatusHistory()
	{
		return this.ordinvstatushistory;
	}
	public void setOrdInvStatusHistory(ims.ocrr.orderingresults.vo.OrderedInvestigationStatusRefVoCollection value)
	{
		this.isValidated = false;
		this.ordinvstatushistory = value;
	}
	public boolean getFillerOrdNumIsNotNull()
	{
		return this.fillerordnum != null;
	}
	public String getFillerOrdNum()
	{
		return this.fillerordnum;
	}
	public static int getFillerOrdNumMaxLength()
	{
		return 20;
	}
	public void setFillerOrdNum(String value)
	{
		this.isValidated = false;
		this.fillerordnum = value;
	}
	public boolean getRadAttendanceIdIsNotNull()
	{
		return this.radattendanceid != null;
	}
	public String getRadAttendanceId()
	{
		return this.radattendanceid;
	}
	public static int getRadAttendanceIdMaxLength()
	{
		return 20;
	}
	public void setRadAttendanceId(String value)
	{
		this.isValidated = false;
		this.radattendanceid = value;
	}
	public boolean getAppointmentDateIsNotNull()
	{
		return this.appointmentdate != null;
	}
	public ims.framework.utils.DateTime getAppointmentDate()
	{
		return this.appointmentdate;
	}
	public void setAppointmentDate(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.appointmentdate = value;
	}
	public boolean getReasonForStudyIsNotNull()
	{
		return this.reasonforstudy != null;
	}
	public String getReasonForStudy()
	{
		return this.reasonforstudy;
	}
	public static int getReasonForStudyMaxLength()
	{
		return 150;
	}
	public void setReasonForStudy(String value)
	{
		this.isValidated = false;
		this.reasonforstudy = value;
	}
	public boolean getOrdInvSeqIsNotNull()
	{
		return this.ordinvseq != null;
	}
	public Integer getOrdInvSeq()
	{
		return this.ordinvseq;
	}
	public void setOrdInvSeq(Integer value)
	{
		this.isValidated = false;
		this.ordinvseq = value;
	}
	public boolean getExamReqOnAfterDateIsNotNull()
	{
		return this.examreqonafterdate != null;
	}
	public ims.framework.utils.Date getExamReqOnAfterDate()
	{
		return this.examreqonafterdate;
	}
	public void setExamReqOnAfterDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.examreqonafterdate = value;
	}
	public boolean getRequestedLocationIsNotNull()
	{
		return this.requestedlocation != null;
	}
	public ims.core.resource.place.vo.LocationRefVo getRequestedLocation()
	{
		return this.requestedlocation;
	}
	public void setRequestedLocation(ims.core.resource.place.vo.LocationRefVo value)
	{
		this.isValidated = false;
		this.requestedlocation = value;
	}
	public boolean getPerformedLocationIsNotNull()
	{
		return this.performedlocation != null;
	}
	public ims.core.resource.place.vo.LocationRefVo getPerformedLocation()
	{
		return this.performedlocation;
	}
	public void setPerformedLocation(ims.core.resource.place.vo.LocationRefVo value)
	{
		this.isValidated = false;
		this.performedlocation = value;
	}
	public boolean getWasProcessedIsNotNull()
	{
		return this.wasprocessed != null;
	}
	public Boolean getWasProcessed()
	{
		return this.wasprocessed;
	}
	public void setWasProcessed(Boolean value)
	{
		this.isValidated = false;
		this.wasprocessed = value;
	}
	public boolean getResultHistoryIsNotNull()
	{
		return this.resulthistory != null;
	}
	public ims.ocrr.orderingresults.vo.OrderResultHistoryRefVoCollection getResultHistory()
	{
		return this.resulthistory;
	}
	public void setResultHistory(ims.ocrr.orderingresults.vo.OrderResultHistoryRefVoCollection value)
	{
		this.isValidated = false;
		this.resulthistory = value;
	}
	public boolean getEnterTheatreDateIsNotNull()
	{
		return this.entertheatredate != null;
	}
	public ims.framework.utils.DateTime getEnterTheatreDate()
	{
		return this.entertheatredate;
	}
	public void setEnterTheatreDate(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.entertheatredate = value;
	}
	public boolean getStartProcedureDateIsNotNull()
	{
		return this.startproceduredate != null;
	}
	public ims.framework.utils.DateTime getStartProcedureDate()
	{
		return this.startproceduredate;
	}
	public void setStartProcedureDate(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.startproceduredate = value;
	}
	public boolean getEndProcedureDateIsNotNull()
	{
		return this.endproceduredate != null;
	}
	public ims.framework.utils.DateTime getEndProcedureDate()
	{
		return this.endproceduredate;
	}
	public void setEndProcedureDate(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.endproceduredate = value;
	}
	public boolean getLeaveRecoveryDateIsNotNull()
	{
		return this.leaverecoverydate != null;
	}
	public ims.framework.utils.DateTime getLeaveRecoveryDate()
	{
		return this.leaverecoverydate;
	}
	public void setLeaveRecoveryDate(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.leaverecoverydate = value;
	}
	public boolean getReportUrlIsNotNull()
	{
		return this.reporturl != null;
	}
	public String getReportUrl()
	{
		return this.reporturl;
	}
	public static int getReportUrlMaxLength()
	{
		return 500;
	}
	public void setReportUrl(String value)
	{
		this.isValidated = false;
		this.reporturl = value;
	}
	public boolean getReportDocumentUrlIsNotNull()
	{
		return this.reportdocumenturl != null;
	}
	public String getReportDocumentUrl()
	{
		return this.reportdocumenturl;
	}
	public static int getReportDocumentUrlMaxLength()
	{
		return 500;
	}
	public void setReportDocumentUrl(String value)
	{
		this.isValidated = false;
		this.reportdocumenturl = value;
	}
	public boolean getInvestigationDateTimeIsNotNull()
	{
		return this.investigationdatetime != null;
	}
	public ims.framework.utils.DateTime getInvestigationDateTime()
	{
		return this.investigationdatetime;
	}
	public void setInvestigationDateTime(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.investigationdatetime = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.investigation != null)
		{
			if(!this.investigation.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.ordinvcurrentstatus != null)
		{
			if(!this.ordinvcurrentstatus.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.investigation == null)
			listOfErrors.add("Investigation is mandatory");
		if(this.investigation != null)
		{
			String[] listOfOtherErrors = this.investigation.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.displaydatetime == null)
			listOfErrors.add("DisplayDateTime is mandatory");
		if(this.displaytimesupplied == null)
			listOfErrors.add("DisplayTimeSupplied is mandatory");
		if(this.displayflag == null)
			listOfErrors.add("DisplayFlag is mandatory");
		if(this.wasordered == null)
			listOfErrors.add("wasOrdered is mandatory");
		if(this.ordinvcurrentstatus == null)
			listOfErrors.add("OrdInvCurrentStatus is mandatory");
		if(this.ordinvcurrentstatus != null)
		{
			String[] listOfOtherErrors = this.ordinvcurrentstatus.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.fillerordnum != null)
			if(this.fillerordnum.length() > 20)
				listOfErrors.add("The length of the field [fillerordnum] in the value object [ims.ocrr.vo.OrderInvestigationWebServiceVo] is too big. It should be less or equal to 20");
		if(this.radattendanceid != null)
			if(this.radattendanceid.length() > 20)
				listOfErrors.add("The length of the field [radattendanceid] in the value object [ims.ocrr.vo.OrderInvestigationWebServiceVo] is too big. It should be less or equal to 20");
		if(this.reasonforstudy != null)
			if(this.reasonforstudy.length() > 150)
				listOfErrors.add("The length of the field [reasonforstudy] in the value object [ims.ocrr.vo.OrderInvestigationWebServiceVo] is too big. It should be less or equal to 150");
		if(this.ordinvseq == null)
			listOfErrors.add("ordInvSeq is mandatory");
		if(this.reporturl != null)
			if(this.reporturl.length() > 500)
				listOfErrors.add("The length of the field [reporturl] in the value object [ims.ocrr.vo.OrderInvestigationWebServiceVo] is too big. It should be less or equal to 500");
		if(this.reportdocumenturl != null)
			if(this.reportdocumenturl.length() > 500)
				listOfErrors.add("The length of the field [reportdocumenturl] in the value object [ims.ocrr.vo.OrderInvestigationWebServiceVo] 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];
		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;
	
		OrderInvestigationWebServiceVo clone = new OrderInvestigationWebServiceVo(this.id, this.version);
		
		if(this.investigation == null)
			clone.investigation = null;
		else
			clone.investigation = (ims.ocrr.vo.InvestigationUnderSpecimenVo)this.investigation.clone();
		clone.specimen = this.specimen;
		clone.responsibleclinician = this.responsibleclinician;
		clone.responsiblegp = this.responsiblegp;
		clone.patientlocation = this.patientlocation;
		clone.patientclinic = this.patientclinic;
		if(this.orderpriority == null)
			clone.orderpriority = null;
		else
			clone.orderpriority = (ims.ocrr.vo.lookups.OrderPriority)this.orderpriority.clone();
		if(this.repdatetime == null)
			clone.repdatetime = null;
		else
			clone.repdatetime = (ims.framework.utils.DateTime)this.repdatetime.clone();
		clone.reptimesupplied = this.reptimesupplied;
		if(this.displaydatetime == null)
			clone.displaydatetime = null;
		else
			clone.displaydatetime = (ims.framework.utils.DateTime)this.displaydatetime.clone();
		clone.displaytimesupplied = this.displaytimesupplied;
		if(this.displayflag == null)
			clone.displayflag = null;
		else
			clone.displayflag = (ims.ocrr.vo.lookups.OcsDisplayFlag)this.displayflag.clone();
		clone.wasordered = this.wasordered;
		clone.resultdemographics = this.resultdemographics;
		if(this.resultstatus == null)
			clone.resultstatus = null;
		else
			clone.resultstatus = (ims.ocrr.vo.lookups.ResultStatus)this.resultstatus.clone();
		if(this.ordinvcurrentstatus == null)
			clone.ordinvcurrentstatus = null;
		else
			clone.ordinvcurrentstatus = (ims.ocrr.vo.OrderedInvestigationStatusVo)this.ordinvcurrentstatus.clone();
		clone.ordinvstatushistory = this.ordinvstatushistory;
		clone.fillerordnum = this.fillerordnum;
		clone.radattendanceid = this.radattendanceid;
		if(this.appointmentdate == null)
			clone.appointmentdate = null;
		else
			clone.appointmentdate = (ims.framework.utils.DateTime)this.appointmentdate.clone();
		clone.reasonforstudy = this.reasonforstudy;
		clone.ordinvseq = this.ordinvseq;
		if(this.examreqonafterdate == null)
			clone.examreqonafterdate = null;
		else
			clone.examreqonafterdate = (ims.framework.utils.Date)this.examreqonafterdate.clone();
		clone.requestedlocation = this.requestedlocation;
		clone.performedlocation = this.performedlocation;
		clone.wasprocessed = this.wasprocessed;
		clone.resulthistory = this.resulthistory;
		if(this.entertheatredate == null)
			clone.entertheatredate = null;
		else
			clone.entertheatredate = (ims.framework.utils.DateTime)this.entertheatredate.clone();
		if(this.startproceduredate == null)
			clone.startproceduredate = null;
		else
			clone.startproceduredate = (ims.framework.utils.DateTime)this.startproceduredate.clone();
		if(this.endproceduredate == null)
			clone.endproceduredate = null;
		else
			clone.endproceduredate = (ims.framework.utils.DateTime)this.endproceduredate.clone();
		if(this.leaverecoverydate == null)
			clone.leaverecoverydate = null;
		else
			clone.leaverecoverydate = (ims.framework.utils.DateTime)this.leaverecoverydate.clone();
		clone.reporturl = this.reporturl;
		clone.reportdocumenturl = this.reportdocumenturl;
		if(this.investigationdatetime == null)
			clone.investigationdatetime = null;
		else
			clone.investigationdatetime = (ims.framework.utils.DateTime)this.investigationdatetime.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 (!(OrderInvestigationWebServiceVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A OrderInvestigationWebServiceVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((OrderInvestigationWebServiceVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((OrderInvestigationWebServiceVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.investigation != null)
			count++;
		if(this.specimen != null)
			count++;
		if(this.responsibleclinician != null)
			count++;
		if(this.responsiblegp != null)
			count++;
		if(this.patientlocation != null)
			count++;
		if(this.patientclinic != null)
			count++;
		if(this.orderpriority != null)
			count++;
		if(this.repdatetime != null)
			count++;
		if(this.reptimesupplied != null)
			count++;
		if(this.displaydatetime != null)
			count++;
		if(this.displaytimesupplied != null)
			count++;
		if(this.displayflag != null)
			count++;
		if(this.wasordered != null)
			count++;
		if(this.resultdemographics != null)
			count++;
		if(this.resultstatus != null)
			count++;
		if(this.ordinvcurrentstatus != null)
			count++;
		if(this.ordinvstatushistory != null)
			count++;
		if(this.fillerordnum != null)
			count++;
		if(this.radattendanceid != null)
			count++;
		if(this.appointmentdate != null)
			count++;
		if(this.reasonforstudy != null)
			count++;
		if(this.ordinvseq != null)
			count++;
		if(this.examreqonafterdate != null)
			count++;
		if(this.requestedlocation != null)
			count++;
		if(this.performedlocation != null)
			count++;
		if(this.wasprocessed != null)
			count++;
		if(this.resulthistory != null)
			count++;
		if(this.entertheatredate != null)
			count++;
		if(this.startproceduredate != null)
			count++;
		if(this.endproceduredate != null)
			count++;
		if(this.leaverecoverydate != null)
			count++;
		if(this.reporturl != null)
			count++;
		if(this.reportdocumenturl != null)
			count++;
		if(this.investigationdatetime != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 34;
	}
	protected ims.ocrr.vo.InvestigationUnderSpecimenVo investigation;
	protected ims.ocrr.orderingresults.vo.OrderSpecimenRefVoCollection specimen;
	protected ims.core.resource.people.vo.HcpRefVo responsibleclinician;
	protected ims.core.resource.people.vo.GpRefVo responsiblegp;
	protected ims.core.resource.place.vo.LocationRefVo patientlocation;
	protected ims.core.resource.place.vo.ClinicRefVo patientclinic;
	protected ims.ocrr.vo.lookups.OrderPriority orderpriority;
	protected ims.framework.utils.DateTime repdatetime;
	protected Boolean reptimesupplied;
	protected ims.framework.utils.DateTime displaydatetime;
	protected Boolean displaytimesupplied;
	protected ims.ocrr.vo.lookups.OcsDisplayFlag displayflag;
	protected Boolean wasordered;
	protected ims.core.patient.vo.MinDemographicsRefVo resultdemographics;
	protected ims.ocrr.vo.lookups.ResultStatus resultstatus;
	protected ims.ocrr.vo.OrderedInvestigationStatusVo ordinvcurrentstatus;
	protected ims.ocrr.orderingresults.vo.OrderedInvestigationStatusRefVoCollection ordinvstatushistory;
	protected String fillerordnum;
	protected String radattendanceid;
	protected ims.framework.utils.DateTime appointmentdate;
	protected String reasonforstudy;
	protected Integer ordinvseq;
	protected ims.framework.utils.Date examreqonafterdate;
	protected ims.core.resource.place.vo.LocationRefVo requestedlocation;
	protected ims.core.resource.place.vo.LocationRefVo performedlocation;
	protected Boolean wasprocessed;
	protected ims.ocrr.orderingresults.vo.OrderResultHistoryRefVoCollection resulthistory;
	protected ims.framework.utils.DateTime entertheatredate;
	protected ims.framework.utils.DateTime startproceduredate;
	protected ims.framework.utils.DateTime endproceduredate;
	protected ims.framework.utils.DateTime leaverecoverydate;
	protected String reporturl;
	protected String reportdocumenturl;
	protected ims.framework.utils.DateTime investigationdatetime;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
