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

/**
 * Linked to Oncology.PrimaryTumourDetails business object (ID: 1074100007).
 */
public class PrimaryTumourDetailsVo extends ims.oncology.vo.PrimaryTumourDetailsShortVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public PrimaryTumourDetailsVo()
	{
	}
	public PrimaryTumourDetailsVo(Integer id, int version)
	{
		super(id, version);
	}
	public PrimaryTumourDetailsVo(ims.oncology.vo.beans.PrimaryTumourDetailsVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.authoringinformation = bean.getAuthoringInformation() == null ? null : bean.getAuthoringInformation().buildVo();
		this.tumourgroup = bean.getTumourGroup() == null ? null : bean.getTumourGroup().buildVo();
		this.tumoursite = bean.getTumourSite() == null ? null : bean.getTumourSite().buildVo();
		this.tumourlaterality = bean.getTumourLaterality() == null ? null : ims.core.vo.lookups.LateralityLRB.buildLookup(bean.getTumourLaterality());
		this.iscurrent = bean.getIsCurrent();
		this.enddate = bean.getEndDate() == null ? null : bean.getEndDate().buildDate();
		this.patientdiagnosis = bean.getPatientDiagnosis() == null ? null : bean.getPatientDiagnosis().buildVo();
		this.pretreatmentoverall = bean.getPreTreatmentOverall() == null ? null : bean.getPreTreatmentOverall().buildVo();
		this.episodeofcare = bean.getEpisodeOfCare() == null ? null : new ims.core.admin.vo.EpisodeOfCareRefVo(new Integer(bean.getEpisodeOfCare().getId()), bean.getEpisodeOfCare().getVersion());
		this.tumourhistology = bean.getTumourHistology() == null ? null : bean.getTumourHistology().buildVo();
		this.carecontext = bean.getCareContext() == null ? null : bean.getCareContext().buildVo();
		this.benign = bean.getBenign() == null ? null : ims.core.vo.lookups.YesNoUnknown.buildLookup(bean.getBenign());
		this.tumourstatus = bean.getTumourStatus() == null ? null : ims.oncology.vo.lookups.TumourStatus.buildLookup(bean.getTumourStatus());
		this.histologysource = bean.getHistologySource() == null ? null : ims.oncology.vo.lookups.HistologySource.buildLookup(bean.getHistologySource());
		this.differentatationsource = bean.getDifferentatationSource() == null ? null : ims.oncology.vo.lookups.DifferentatationSource.buildLookup(bean.getDifferentatationSource());
		this.pretreatmenttval = bean.getPreTreatmentTVal() == null ? null : bean.getPreTreatmentTVal().buildVo();
		this.pretreatmenttcert = bean.getPreTreatmentTCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentTCert());
		this.pretreatmentnval = bean.getPreTreatmentNVal() == null ? null : bean.getPreTreatmentNVal().buildVo();
		this.pretreatmentncert = bean.getPreTreatmentNCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentNCert());
		this.pretreatmentmval = bean.getPreTreatmentMVal() == null ? null : bean.getPreTreatmentMVal().buildVo();
		this.pretreatmentmcert = bean.getPreTreatmentMCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentMCert());
		this.pretreatmentoverallcert = bean.getPreTreatmentOverAllCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentOverAllCert());
		this.integratedtval = bean.getIntegratedTVal() == null ? null : bean.getIntegratedTVal().buildVo();
		this.integratednval = bean.getIntegratedNVal() == null ? null : bean.getIntegratedNVal().buildVo();
		this.integratedmval = bean.getIntegratedMVal() == null ? null : bean.getIntegratedMVal().buildVo();
		this.basisofdiagnosis = bean.getBasisofDiagnosis() == null ? null : ims.core.vo.lookups.DiagnosisBasisofDiagnosis.buildLookup(bean.getBasisofDiagnosis());
		this.stagingclassifications = ims.oncology.vo.PatientTumourClassificationVoCollection.buildFromBeanCollection(bean.getStagingClassifications());
		this.pretreatmentserummarker = bean.getPreTreatmentSerumMarker() == null ? null : bean.getPreTreatmentSerumMarker().buildVo();
		this.gradeofdifferentation = bean.getGradeofDifferentation() == null ? null : bean.getGradeofDifferentation().buildVo();
		this.over45status = bean.getOver45Status();
		this.tumourrecurrence = ims.clinicaladmin.vo.PatientTumourRecurrenceVoCollection.buildFromBeanCollection(bean.getTumourRecurrence());
		this.tumourversion = bean.getTumourVersion() == null ? null : bean.getTumourVersion().buildVo();
		this.pathologicaltval = bean.getPathologicalTVal() == null ? null : bean.getPathologicalTVal().buildVo();
		this.pathologicalnval = bean.getPathologicalNVal() == null ? null : bean.getPathologicalNVal().buildVo();
		this.pathologicalmval = bean.getPathologicalMVal() == null ? null : bean.getPathologicalMVal().buildVo();
		this.assessment = bean.getAssessment() == null ? null : bean.getAssessment().buildVo();
		this.movedtoprognostic = bean.getMovedToPrognostic();
		this.prognosticlocation = bean.getPrognosticLocation() == null ? null : bean.getPrognosticLocation().buildVo();
		this.prognosticrisk = bean.getPrognosticRisk() == null ? null : bean.getPrognosticRisk().buildVo();
		this.prognosticpsa = bean.getPrognosticPSA() == null ? null : bean.getPrognosticPSA().buildVo();
		this.prognosticgleason = bean.getPrognosticGleason() == null ? null : bean.getPrognosticGleason().buildVo();
		this.prognosticgrouping = bean.getPrognosticGrouping() == null ? null : bean.getPrognosticGrouping().buildVo();
		this.prognosticgroupingcert = bean.getPrognosticGroupingCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticGroupingCert());
		this.prognostictval = bean.getPrognosticTVal() == null ? null : bean.getPrognosticTVal().buildVo();
		this.prognosticnval = bean.getPrognosticNVal() == null ? null : bean.getPrognosticNVal().buildVo();
		this.prognosticmval = bean.getPrognosticMVal() == null ? null : bean.getPrognosticMVal().buildVo();
		this.prognostictcert = bean.getPrognosticTCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticTCert());
		this.prognosticncert = bean.getPrognosticNCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticNCert());
		this.prognosticmcert = bean.getPrognosticMCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticMCert());
		this.pathologicaldate = bean.getPathologicalDate() == null ? null : bean.getPathologicalDate().buildDate();
		this.integrateddate = bean.getIntegratedDate() == null ? null : bean.getIntegratedDate().buildDate();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.oncology.vo.beans.PrimaryTumourDetailsVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.authoringinformation = bean.getAuthoringInformation() == null ? null : bean.getAuthoringInformation().buildVo(map);
		this.tumourgroup = bean.getTumourGroup() == null ? null : bean.getTumourGroup().buildVo(map);
		this.tumoursite = bean.getTumourSite() == null ? null : bean.getTumourSite().buildVo(map);
		this.tumourlaterality = bean.getTumourLaterality() == null ? null : ims.core.vo.lookups.LateralityLRB.buildLookup(bean.getTumourLaterality());
		this.iscurrent = bean.getIsCurrent();
		this.enddate = bean.getEndDate() == null ? null : bean.getEndDate().buildDate();
		this.patientdiagnosis = bean.getPatientDiagnosis() == null ? null : bean.getPatientDiagnosis().buildVo(map);
		this.pretreatmentoverall = bean.getPreTreatmentOverall() == null ? null : bean.getPreTreatmentOverall().buildVo(map);
		this.episodeofcare = bean.getEpisodeOfCare() == null ? null : new ims.core.admin.vo.EpisodeOfCareRefVo(new Integer(bean.getEpisodeOfCare().getId()), bean.getEpisodeOfCare().getVersion());
		this.tumourhistology = bean.getTumourHistology() == null ? null : bean.getTumourHistology().buildVo(map);
		this.carecontext = bean.getCareContext() == null ? null : bean.getCareContext().buildVo(map);
		this.benign = bean.getBenign() == null ? null : ims.core.vo.lookups.YesNoUnknown.buildLookup(bean.getBenign());
		this.tumourstatus = bean.getTumourStatus() == null ? null : ims.oncology.vo.lookups.TumourStatus.buildLookup(bean.getTumourStatus());
		this.histologysource = bean.getHistologySource() == null ? null : ims.oncology.vo.lookups.HistologySource.buildLookup(bean.getHistologySource());
		this.differentatationsource = bean.getDifferentatationSource() == null ? null : ims.oncology.vo.lookups.DifferentatationSource.buildLookup(bean.getDifferentatationSource());
		this.pretreatmenttval = bean.getPreTreatmentTVal() == null ? null : bean.getPreTreatmentTVal().buildVo(map);
		this.pretreatmenttcert = bean.getPreTreatmentTCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentTCert());
		this.pretreatmentnval = bean.getPreTreatmentNVal() == null ? null : bean.getPreTreatmentNVal().buildVo(map);
		this.pretreatmentncert = bean.getPreTreatmentNCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentNCert());
		this.pretreatmentmval = bean.getPreTreatmentMVal() == null ? null : bean.getPreTreatmentMVal().buildVo(map);
		this.pretreatmentmcert = bean.getPreTreatmentMCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentMCert());
		this.pretreatmentoverallcert = bean.getPreTreatmentOverAllCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPreTreatmentOverAllCert());
		this.integratedtval = bean.getIntegratedTVal() == null ? null : bean.getIntegratedTVal().buildVo(map);
		this.integratednval = bean.getIntegratedNVal() == null ? null : bean.getIntegratedNVal().buildVo(map);
		this.integratedmval = bean.getIntegratedMVal() == null ? null : bean.getIntegratedMVal().buildVo(map);
		this.basisofdiagnosis = bean.getBasisofDiagnosis() == null ? null : ims.core.vo.lookups.DiagnosisBasisofDiagnosis.buildLookup(bean.getBasisofDiagnosis());
		this.stagingclassifications = ims.oncology.vo.PatientTumourClassificationVoCollection.buildFromBeanCollection(bean.getStagingClassifications());
		this.pretreatmentserummarker = bean.getPreTreatmentSerumMarker() == null ? null : bean.getPreTreatmentSerumMarker().buildVo(map);
		this.gradeofdifferentation = bean.getGradeofDifferentation() == null ? null : bean.getGradeofDifferentation().buildVo(map);
		this.over45status = bean.getOver45Status();
		this.tumourrecurrence = ims.clinicaladmin.vo.PatientTumourRecurrenceVoCollection.buildFromBeanCollection(bean.getTumourRecurrence());
		this.tumourversion = bean.getTumourVersion() == null ? null : bean.getTumourVersion().buildVo(map);
		this.pathologicaltval = bean.getPathologicalTVal() == null ? null : bean.getPathologicalTVal().buildVo(map);
		this.pathologicalnval = bean.getPathologicalNVal() == null ? null : bean.getPathologicalNVal().buildVo(map);
		this.pathologicalmval = bean.getPathologicalMVal() == null ? null : bean.getPathologicalMVal().buildVo(map);
		this.assessment = bean.getAssessment() == null ? null : bean.getAssessment().buildVo(map);
		this.movedtoprognostic = bean.getMovedToPrognostic();
		this.prognosticlocation = bean.getPrognosticLocation() == null ? null : bean.getPrognosticLocation().buildVo(map);
		this.prognosticrisk = bean.getPrognosticRisk() == null ? null : bean.getPrognosticRisk().buildVo(map);
		this.prognosticpsa = bean.getPrognosticPSA() == null ? null : bean.getPrognosticPSA().buildVo(map);
		this.prognosticgleason = bean.getPrognosticGleason() == null ? null : bean.getPrognosticGleason().buildVo(map);
		this.prognosticgrouping = bean.getPrognosticGrouping() == null ? null : bean.getPrognosticGrouping().buildVo(map);
		this.prognosticgroupingcert = bean.getPrognosticGroupingCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticGroupingCert());
		this.prognostictval = bean.getPrognosticTVal() == null ? null : bean.getPrognosticTVal().buildVo(map);
		this.prognosticnval = bean.getPrognosticNVal() == null ? null : bean.getPrognosticNVal().buildVo(map);
		this.prognosticmval = bean.getPrognosticMVal() == null ? null : bean.getPrognosticMVal().buildVo(map);
		this.prognostictcert = bean.getPrognosticTCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticTCert());
		this.prognosticncert = bean.getPrognosticNCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticNCert());
		this.prognosticmcert = bean.getPrognosticMCert() == null ? null : ims.oncology.vo.lookups.TNMCertaintyFactor.buildLookup(bean.getPrognosticMCert());
		this.pathologicaldate = bean.getPathologicalDate() == null ? null : bean.getPathologicalDate().buildDate();
		this.integrateddate = bean.getIntegratedDate() == null ? null : bean.getIntegratedDate().buildDate();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.oncology.vo.beans.PrimaryTumourDetailsVoBean bean = null;
		if(map != null)
			bean = (ims.oncology.vo.beans.PrimaryTumourDetailsVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.oncology.vo.beans.PrimaryTumourDetailsVoBean();
			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("CARECONTEXT"))
			return getCareContext();
		if(fieldName.equals("BENIGN"))
			return getBenign();
		if(fieldName.equals("TUMOURSTATUS"))
			return getTumourStatus();
		if(fieldName.equals("HISTOLOGYSOURCE"))
			return getHistologySource();
		if(fieldName.equals("DIFFERENTATATIONSOURCE"))
			return getDifferentatationSource();
		if(fieldName.equals("PRETREATMENTTVAL"))
			return getPreTreatmentTVal();
		if(fieldName.equals("PRETREATMENTTCERT"))
			return getPreTreatmentTCert();
		if(fieldName.equals("PRETREATMENTNVAL"))
			return getPreTreatmentNVal();
		if(fieldName.equals("PRETREATMENTNCERT"))
			return getPreTreatmentNCert();
		if(fieldName.equals("PRETREATMENTMVAL"))
			return getPreTreatmentMVal();
		if(fieldName.equals("PRETREATMENTMCERT"))
			return getPreTreatmentMCert();
		if(fieldName.equals("PRETREATMENTOVERALLCERT"))
			return getPreTreatmentOverAllCert();
		if(fieldName.equals("INTEGRATEDTVAL"))
			return getIntegratedTVal();
		if(fieldName.equals("INTEGRATEDNVAL"))
			return getIntegratedNVal();
		if(fieldName.equals("INTEGRATEDMVAL"))
			return getIntegratedMVal();
		if(fieldName.equals("BASISOFDIAGNOSIS"))
			return getBasisofDiagnosis();
		if(fieldName.equals("STAGINGCLASSIFICATIONS"))
			return getStagingClassifications();
		if(fieldName.equals("PRETREATMENTSERUMMARKER"))
			return getPreTreatmentSerumMarker();
		if(fieldName.equals("GRADEOFDIFFERENTATION"))
			return getGradeofDifferentation();
		if(fieldName.equals("OVER45STATUS"))
			return getOver45Status();
		if(fieldName.equals("TUMOURRECURRENCE"))
			return getTumourRecurrence();
		if(fieldName.equals("TUMOURVERSION"))
			return getTumourVersion();
		if(fieldName.equals("PATHOLOGICALTVAL"))
			return getPathologicalTVal();
		if(fieldName.equals("PATHOLOGICALNVAL"))
			return getPathologicalNVal();
		if(fieldName.equals("PATHOLOGICALMVAL"))
			return getPathologicalMVal();
		if(fieldName.equals("ASSESSMENT"))
			return getAssessment();
		if(fieldName.equals("MOVEDTOPROGNOSTIC"))
			return getMovedToPrognostic();
		if(fieldName.equals("PROGNOSTICLOCATION"))
			return getPrognosticLocation();
		if(fieldName.equals("PROGNOSTICRISK"))
			return getPrognosticRisk();
		if(fieldName.equals("PROGNOSTICPSA"))
			return getPrognosticPSA();
		if(fieldName.equals("PROGNOSTICGLEASON"))
			return getPrognosticGleason();
		if(fieldName.equals("PROGNOSTICGROUPING"))
			return getPrognosticGrouping();
		if(fieldName.equals("PROGNOSTICGROUPINGCERT"))
			return getPrognosticGroupingCert();
		if(fieldName.equals("PROGNOSTICTVAL"))
			return getPrognosticTVal();
		if(fieldName.equals("PROGNOSTICNVAL"))
			return getPrognosticNVal();
		if(fieldName.equals("PROGNOSTICMVAL"))
			return getPrognosticMVal();
		if(fieldName.equals("PROGNOSTICTCERT"))
			return getPrognosticTCert();
		if(fieldName.equals("PROGNOSTICNCERT"))
			return getPrognosticNCert();
		if(fieldName.equals("PROGNOSTICMCERT"))
			return getPrognosticMCert();
		if(fieldName.equals("PATHOLOGICALDATE"))
			return getPathologicalDate();
		if(fieldName.equals("INTEGRATEDDATE"))
			return getIntegratedDate();
		return super.getFieldValueByFieldName(fieldName);
	}
	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 getBenignIsNotNull()
	{
		return this.benign != null;
	}
	public ims.core.vo.lookups.YesNoUnknown getBenign()
	{
		return this.benign;
	}
	public void setBenign(ims.core.vo.lookups.YesNoUnknown value)
	{
		this.isValidated = false;
		this.benign = value;
	}
	public boolean getTumourStatusIsNotNull()
	{
		return this.tumourstatus != null;
	}
	public ims.oncology.vo.lookups.TumourStatus getTumourStatus()
	{
		return this.tumourstatus;
	}
	public void setTumourStatus(ims.oncology.vo.lookups.TumourStatus value)
	{
		this.isValidated = false;
		this.tumourstatus = value;
	}
	public boolean getHistologySourceIsNotNull()
	{
		return this.histologysource != null;
	}
	public ims.oncology.vo.lookups.HistologySource getHistologySource()
	{
		return this.histologysource;
	}
	public void setHistologySource(ims.oncology.vo.lookups.HistologySource value)
	{
		this.isValidated = false;
		this.histologysource = value;
	}
	public boolean getDifferentatationSourceIsNotNull()
	{
		return this.differentatationsource != null;
	}
	public ims.oncology.vo.lookups.DifferentatationSource getDifferentatationSource()
	{
		return this.differentatationsource;
	}
	public void setDifferentatationSource(ims.oncology.vo.lookups.DifferentatationSource value)
	{
		this.isValidated = false;
		this.differentatationsource = value;
	}
	public boolean getPreTreatmentTValIsNotNull()
	{
		return this.pretreatmenttval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPreTreatmentTVal()
	{
		return this.pretreatmenttval;
	}
	public void setPreTreatmentTVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.pretreatmenttval = value;
	}
	public boolean getPreTreatmentTCertIsNotNull()
	{
		return this.pretreatmenttcert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPreTreatmentTCert()
	{
		return this.pretreatmenttcert;
	}
	public void setPreTreatmentTCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.pretreatmenttcert = value;
	}
	public boolean getPreTreatmentNValIsNotNull()
	{
		return this.pretreatmentnval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPreTreatmentNVal()
	{
		return this.pretreatmentnval;
	}
	public void setPreTreatmentNVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.pretreatmentnval = value;
	}
	public boolean getPreTreatmentNCertIsNotNull()
	{
		return this.pretreatmentncert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPreTreatmentNCert()
	{
		return this.pretreatmentncert;
	}
	public void setPreTreatmentNCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.pretreatmentncert = value;
	}
	public boolean getPreTreatmentMValIsNotNull()
	{
		return this.pretreatmentmval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPreTreatmentMVal()
	{
		return this.pretreatmentmval;
	}
	public void setPreTreatmentMVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.pretreatmentmval = value;
	}
	public boolean getPreTreatmentMCertIsNotNull()
	{
		return this.pretreatmentmcert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPreTreatmentMCert()
	{
		return this.pretreatmentmcert;
	}
	public void setPreTreatmentMCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.pretreatmentmcert = value;
	}
	public boolean getPreTreatmentOverAllCertIsNotNull()
	{
		return this.pretreatmentoverallcert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPreTreatmentOverAllCert()
	{
		return this.pretreatmentoverallcert;
	}
	public void setPreTreatmentOverAllCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.pretreatmentoverallcert = value;
	}
	public boolean getIntegratedTValIsNotNull()
	{
		return this.integratedtval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getIntegratedTVal()
	{
		return this.integratedtval;
	}
	public void setIntegratedTVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.integratedtval = value;
	}
	public boolean getIntegratedNValIsNotNull()
	{
		return this.integratednval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getIntegratedNVal()
	{
		return this.integratednval;
	}
	public void setIntegratedNVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.integratednval = value;
	}
	public boolean getIntegratedMValIsNotNull()
	{
		return this.integratedmval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getIntegratedMVal()
	{
		return this.integratedmval;
	}
	public void setIntegratedMVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.integratedmval = value;
	}
	public boolean getBasisofDiagnosisIsNotNull()
	{
		return this.basisofdiagnosis != null;
	}
	public ims.core.vo.lookups.DiagnosisBasisofDiagnosis getBasisofDiagnosis()
	{
		return this.basisofdiagnosis;
	}
	public void setBasisofDiagnosis(ims.core.vo.lookups.DiagnosisBasisofDiagnosis value)
	{
		this.isValidated = false;
		this.basisofdiagnosis = value;
	}
	public boolean getStagingClassificationsIsNotNull()
	{
		return this.stagingclassifications != null;
	}
	public ims.oncology.vo.PatientTumourClassificationVoCollection getStagingClassifications()
	{
		return this.stagingclassifications;
	}
	public void setStagingClassifications(ims.oncology.vo.PatientTumourClassificationVoCollection value)
	{
		this.isValidated = false;
		this.stagingclassifications = value;
	}
	public boolean getPreTreatmentSerumMarkerIsNotNull()
	{
		return this.pretreatmentserummarker != null;
	}
	public ims.clinicaladmin.vo.TumourSerumMarkersLiteVo getPreTreatmentSerumMarker()
	{
		return this.pretreatmentserummarker;
	}
	public void setPreTreatmentSerumMarker(ims.clinicaladmin.vo.TumourSerumMarkersLiteVo value)
	{
		this.isValidated = false;
		this.pretreatmentserummarker = value;
	}
	public boolean getGradeofDifferentationIsNotNull()
	{
		return this.gradeofdifferentation != null;
	}
	public ims.clinicaladmin.vo.HistopathologicGradeVo getGradeofDifferentation()
	{
		return this.gradeofdifferentation;
	}
	public void setGradeofDifferentation(ims.clinicaladmin.vo.HistopathologicGradeVo value)
	{
		this.isValidated = false;
		this.gradeofdifferentation = value;
	}
	public boolean getOver45StatusIsNotNull()
	{
		return this.over45status != null;
	}
	public String getOver45Status()
	{
		return this.over45status;
	}
	public static int getOver45StatusMaxLength()
	{
		return 1;
	}
	public void setOver45Status(String value)
	{
		this.isValidated = false;
		this.over45status = value;
	}
	public boolean getTumourRecurrenceIsNotNull()
	{
		return this.tumourrecurrence != null;
	}
	public ims.clinicaladmin.vo.PatientTumourRecurrenceVoCollection getTumourRecurrence()
	{
		return this.tumourrecurrence;
	}
	public void setTumourRecurrence(ims.clinicaladmin.vo.PatientTumourRecurrenceVoCollection value)
	{
		this.isValidated = false;
		this.tumourrecurrence = value;
	}
	public boolean getTumourVersionIsNotNull()
	{
		return this.tumourversion != null;
	}
	public ims.clinicaladmin.vo.TNMStagingClassificationVersionLiteVo getTumourVersion()
	{
		return this.tumourversion;
	}
	public void setTumourVersion(ims.clinicaladmin.vo.TNMStagingClassificationVersionLiteVo value)
	{
		this.isValidated = false;
		this.tumourversion = value;
	}
	public boolean getPathologicalTValIsNotNull()
	{
		return this.pathologicaltval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPathologicalTVal()
	{
		return this.pathologicaltval;
	}
	public void setPathologicalTVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.pathologicaltval = value;
	}
	public boolean getPathologicalNValIsNotNull()
	{
		return this.pathologicalnval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPathologicalNVal()
	{
		return this.pathologicalnval;
	}
	public void setPathologicalNVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.pathologicalnval = value;
	}
	public boolean getPathologicalMValIsNotNull()
	{
		return this.pathologicalmval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPathologicalMVal()
	{
		return this.pathologicalmval;
	}
	public void setPathologicalMVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.pathologicalmval = value;
	}
	public boolean getAssessmentIsNotNull()
	{
		return this.assessment != null;
	}
	public ims.assessment.vo.PatientAssessmentVo getAssessment()
	{
		return this.assessment;
	}
	public void setAssessment(ims.assessment.vo.PatientAssessmentVo value)
	{
		this.isValidated = false;
		this.assessment = value;
	}
	public boolean getMovedToPrognosticIsNotNull()
	{
		return this.movedtoprognostic != null;
	}
	public Boolean getMovedToPrognostic()
	{
		return this.movedtoprognostic;
	}
	public void setMovedToPrognostic(Boolean value)
	{
		this.isValidated = false;
		this.movedtoprognostic = value;
	}
	public boolean getPrognosticLocationIsNotNull()
	{
		return this.prognosticlocation != null;
	}
	public ims.oncology.vo.PrognosticLocationConfigVo getPrognosticLocation()
	{
		return this.prognosticlocation;
	}
	public void setPrognosticLocation(ims.oncology.vo.PrognosticLocationConfigVo value)
	{
		this.isValidated = false;
		this.prognosticlocation = value;
	}
	public boolean getPrognosticRiskIsNotNull()
	{
		return this.prognosticrisk != null;
	}
	public ims.clinicaladmin.vo.PrognosticRiskConfigVo getPrognosticRisk()
	{
		return this.prognosticrisk;
	}
	public void setPrognosticRisk(ims.clinicaladmin.vo.PrognosticRiskConfigVo value)
	{
		this.isValidated = false;
		this.prognosticrisk = value;
	}
	public boolean getPrognosticPSAIsNotNull()
	{
		return this.prognosticpsa != null;
	}
	public ims.clinicaladmin.vo.PSAConfigVo getPrognosticPSA()
	{
		return this.prognosticpsa;
	}
	public void setPrognosticPSA(ims.clinicaladmin.vo.PSAConfigVo value)
	{
		this.isValidated = false;
		this.prognosticpsa = value;
	}
	public boolean getPrognosticGleasonIsNotNull()
	{
		return this.prognosticgleason != null;
	}
	public ims.clinicaladmin.vo.GleasonConfigLiteVo getPrognosticGleason()
	{
		return this.prognosticgleason;
	}
	public void setPrognosticGleason(ims.clinicaladmin.vo.GleasonConfigLiteVo value)
	{
		this.isValidated = false;
		this.prognosticgleason = value;
	}
	public boolean getPrognosticGroupingIsNotNull()
	{
		return this.prognosticgrouping != null;
	}
	public ims.clinicaladmin.vo.OverallPrognosticGroupingLiteVo getPrognosticGrouping()
	{
		return this.prognosticgrouping;
	}
	public void setPrognosticGrouping(ims.clinicaladmin.vo.OverallPrognosticGroupingLiteVo value)
	{
		this.isValidated = false;
		this.prognosticgrouping = value;
	}
	public boolean getPrognosticGroupingCertIsNotNull()
	{
		return this.prognosticgroupingcert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPrognosticGroupingCert()
	{
		return this.prognosticgroupingcert;
	}
	public void setPrognosticGroupingCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.prognosticgroupingcert = value;
	}
	public boolean getPrognosticTValIsNotNull()
	{
		return this.prognostictval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPrognosticTVal()
	{
		return this.prognostictval;
	}
	public void setPrognosticTVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.prognostictval = value;
	}
	public boolean getPrognosticNValIsNotNull()
	{
		return this.prognosticnval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPrognosticNVal()
	{
		return this.prognosticnval;
	}
	public void setPrognosticNVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.prognosticnval = value;
	}
	public boolean getPrognosticMValIsNotNull()
	{
		return this.prognosticmval != null;
	}
	public ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo getPrognosticMVal()
	{
		return this.prognosticmval;
	}
	public void setPrognosticMVal(ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo value)
	{
		this.isValidated = false;
		this.prognosticmval = value;
	}
	public boolean getPrognosticTCertIsNotNull()
	{
		return this.prognostictcert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPrognosticTCert()
	{
		return this.prognostictcert;
	}
	public void setPrognosticTCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.prognostictcert = value;
	}
	public boolean getPrognosticNCertIsNotNull()
	{
		return this.prognosticncert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPrognosticNCert()
	{
		return this.prognosticncert;
	}
	public void setPrognosticNCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.prognosticncert = value;
	}
	public boolean getPrognosticMCertIsNotNull()
	{
		return this.prognosticmcert != null;
	}
	public ims.oncology.vo.lookups.TNMCertaintyFactor getPrognosticMCert()
	{
		return this.prognosticmcert;
	}
	public void setPrognosticMCert(ims.oncology.vo.lookups.TNMCertaintyFactor value)
	{
		this.isValidated = false;
		this.prognosticmcert = value;
	}
	public boolean getPathologicalDateIsNotNull()
	{
		return this.pathologicaldate != null;
	}
	public ims.framework.utils.Date getPathologicalDate()
	{
		return this.pathologicaldate;
	}
	public void setPathologicalDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.pathologicaldate = value;
	}
	public boolean getIntegratedDateIsNotNull()
	{
		return this.integrateddate != null;
	}
	public ims.framework.utils.Date getIntegratedDate()
	{
		return this.integrateddate;
	}
	public void setIntegratedDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.integrateddate = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.authoringinformation != null)
		{
			if(!this.authoringinformation.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.pretreatmentoverall != null)
		{
			if(!this.pretreatmentoverall.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.tumourhistology != null)
		{
			if(!this.tumourhistology.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.carecontext != null)
		{
			if(!this.carecontext.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.pretreatmenttval != null)
		{
			if(!this.pretreatmenttval.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.stagingclassifications != null)
		{
			if(!this.stagingclassifications.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.pretreatmentserummarker != null)
		{
			if(!this.pretreatmentserummarker.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.gradeofdifferentation != null)
		{
			if(!this.gradeofdifferentation.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.tumourrecurrence != null)
		{
			if(!this.tumourrecurrence.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.assessment != null)
		{
			if(!this.assessment.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.authoringinformation == null)
			listOfErrors.add("AuthoringInformation is mandatory");
		if(this.authoringinformation != null)
		{
			String[] listOfOtherErrors = this.authoringinformation.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.tumourgroup == null)
			listOfErrors.add("TumourGroup is mandatory");
		if(this.patientdiagnosis == null)
			listOfErrors.add("PatientDiagnosis is mandatory");
		if(this.pretreatmentoverall != null)
		{
			String[] listOfOtherErrors = this.pretreatmentoverall.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.episodeofcare == null)
			listOfErrors.add("EpisodeOfCare is mandatory");
		if(this.tumourhistology != null)
		{
			String[] listOfOtherErrors = this.tumourhistology.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		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.pretreatmenttval != null)
		{
			String[] listOfOtherErrors = this.pretreatmenttval.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.stagingclassifications != null)
		{
			String[] listOfOtherErrors = this.stagingclassifications.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.pretreatmentserummarker != null)
		{
			String[] listOfOtherErrors = this.pretreatmentserummarker.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.gradeofdifferentation != null)
		{
			String[] listOfOtherErrors = this.gradeofdifferentation.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.over45status != null)
			if(this.over45status.length() > 1)
				listOfErrors.add("The length of the field [over45status] in the value object [ims.oncology.vo.PrimaryTumourDetailsVo] is too big. It should be less or equal to 1");
		if(this.tumourrecurrence != null)
		{
			String[] listOfOtherErrors = this.tumourrecurrence.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.tumourversion == null)
			listOfErrors.add("TumourVersion is mandatory");
		if(this.assessment != null)
		{
			String[] listOfOtherErrors = this.assessment.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;
	
		PrimaryTumourDetailsVo clone = new PrimaryTumourDetailsVo(this.id, this.version);
		
		if(this.authoringinformation == null)
			clone.authoringinformation = null;
		else
			clone.authoringinformation = (ims.core.vo.AuthoringInformationVo)this.authoringinformation.clone();
		if(this.tumourgroup == null)
			clone.tumourgroup = null;
		else
			clone.tumourgroup = (ims.clinicaladmin.vo.TumourGroupLiteVo)this.tumourgroup.clone();
		if(this.tumoursite == null)
			clone.tumoursite = null;
		else
			clone.tumoursite = (ims.clinicaladmin.vo.TumourSiteLiteVo)this.tumoursite.clone();
		if(this.tumourlaterality == null)
			clone.tumourlaterality = null;
		else
			clone.tumourlaterality = (ims.core.vo.lookups.LateralityLRB)this.tumourlaterality.clone();
		clone.iscurrent = this.iscurrent;
		if(this.enddate == null)
			clone.enddate = null;
		else
			clone.enddate = (ims.framework.utils.Date)this.enddate.clone();
		if(this.patientdiagnosis == null)
			clone.patientdiagnosis = null;
		else
			clone.patientdiagnosis = (ims.oncology.vo.PatientDiagnosisForPrimaryTumourVo)this.patientdiagnosis.clone();
		if(this.pretreatmentoverall == null)
			clone.pretreatmentoverall = null;
		else
			clone.pretreatmentoverall = (ims.clinicaladmin.vo.TumourGroupSiteOverallStagingVo)this.pretreatmentoverall.clone();
		clone.episodeofcare = this.episodeofcare;
		if(this.tumourhistology == null)
			clone.tumourhistology = null;
		else
			clone.tumourhistology = (ims.clinicaladmin.vo.TumourHistologyLiteVo)this.tumourhistology.clone();
		if(this.carecontext == null)
			clone.carecontext = null;
		else
			clone.carecontext = (ims.core.vo.CareContextShortVo)this.carecontext.clone();
		if(this.benign == null)
			clone.benign = null;
		else
			clone.benign = (ims.core.vo.lookups.YesNoUnknown)this.benign.clone();
		if(this.tumourstatus == null)
			clone.tumourstatus = null;
		else
			clone.tumourstatus = (ims.oncology.vo.lookups.TumourStatus)this.tumourstatus.clone();
		if(this.histologysource == null)
			clone.histologysource = null;
		else
			clone.histologysource = (ims.oncology.vo.lookups.HistologySource)this.histologysource.clone();
		if(this.differentatationsource == null)
			clone.differentatationsource = null;
		else
			clone.differentatationsource = (ims.oncology.vo.lookups.DifferentatationSource)this.differentatationsource.clone();
		if(this.pretreatmenttval == null)
			clone.pretreatmenttval = null;
		else
			clone.pretreatmenttval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.pretreatmenttval.clone();
		if(this.pretreatmenttcert == null)
			clone.pretreatmenttcert = null;
		else
			clone.pretreatmenttcert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.pretreatmenttcert.clone();
		if(this.pretreatmentnval == null)
			clone.pretreatmentnval = null;
		else
			clone.pretreatmentnval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.pretreatmentnval.clone();
		if(this.pretreatmentncert == null)
			clone.pretreatmentncert = null;
		else
			clone.pretreatmentncert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.pretreatmentncert.clone();
		if(this.pretreatmentmval == null)
			clone.pretreatmentmval = null;
		else
			clone.pretreatmentmval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.pretreatmentmval.clone();
		if(this.pretreatmentmcert == null)
			clone.pretreatmentmcert = null;
		else
			clone.pretreatmentmcert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.pretreatmentmcert.clone();
		if(this.pretreatmentoverallcert == null)
			clone.pretreatmentoverallcert = null;
		else
			clone.pretreatmentoverallcert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.pretreatmentoverallcert.clone();
		if(this.integratedtval == null)
			clone.integratedtval = null;
		else
			clone.integratedtval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.integratedtval.clone();
		if(this.integratednval == null)
			clone.integratednval = null;
		else
			clone.integratednval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.integratednval.clone();
		if(this.integratedmval == null)
			clone.integratedmval = null;
		else
			clone.integratedmval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.integratedmval.clone();
		if(this.basisofdiagnosis == null)
			clone.basisofdiagnosis = null;
		else
			clone.basisofdiagnosis = (ims.core.vo.lookups.DiagnosisBasisofDiagnosis)this.basisofdiagnosis.clone();
		if(this.stagingclassifications == null)
			clone.stagingclassifications = null;
		else
			clone.stagingclassifications = (ims.oncology.vo.PatientTumourClassificationVoCollection)this.stagingclassifications.clone();
		if(this.pretreatmentserummarker == null)
			clone.pretreatmentserummarker = null;
		else
			clone.pretreatmentserummarker = (ims.clinicaladmin.vo.TumourSerumMarkersLiteVo)this.pretreatmentserummarker.clone();
		if(this.gradeofdifferentation == null)
			clone.gradeofdifferentation = null;
		else
			clone.gradeofdifferentation = (ims.clinicaladmin.vo.HistopathologicGradeVo)this.gradeofdifferentation.clone();
		clone.over45status = this.over45status;
		if(this.tumourrecurrence == null)
			clone.tumourrecurrence = null;
		else
			clone.tumourrecurrence = (ims.clinicaladmin.vo.PatientTumourRecurrenceVoCollection)this.tumourrecurrence.clone();
		if(this.tumourversion == null)
			clone.tumourversion = null;
		else
			clone.tumourversion = (ims.clinicaladmin.vo.TNMStagingClassificationVersionLiteVo)this.tumourversion.clone();
		if(this.pathologicaltval == null)
			clone.pathologicaltval = null;
		else
			clone.pathologicaltval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.pathologicaltval.clone();
		if(this.pathologicalnval == null)
			clone.pathologicalnval = null;
		else
			clone.pathologicalnval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.pathologicalnval.clone();
		if(this.pathologicalmval == null)
			clone.pathologicalmval = null;
		else
			clone.pathologicalmval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.pathologicalmval.clone();
		if(this.assessment == null)
			clone.assessment = null;
		else
			clone.assessment = (ims.assessment.vo.PatientAssessmentVo)this.assessment.clone();
		clone.movedtoprognostic = this.movedtoprognostic;
		if(this.prognosticlocation == null)
			clone.prognosticlocation = null;
		else
			clone.prognosticlocation = (ims.oncology.vo.PrognosticLocationConfigVo)this.prognosticlocation.clone();
		if(this.prognosticrisk == null)
			clone.prognosticrisk = null;
		else
			clone.prognosticrisk = (ims.clinicaladmin.vo.PrognosticRiskConfigVo)this.prognosticrisk.clone();
		if(this.prognosticpsa == null)
			clone.prognosticpsa = null;
		else
			clone.prognosticpsa = (ims.clinicaladmin.vo.PSAConfigVo)this.prognosticpsa.clone();
		if(this.prognosticgleason == null)
			clone.prognosticgleason = null;
		else
			clone.prognosticgleason = (ims.clinicaladmin.vo.GleasonConfigLiteVo)this.prognosticgleason.clone();
		if(this.prognosticgrouping == null)
			clone.prognosticgrouping = null;
		else
			clone.prognosticgrouping = (ims.clinicaladmin.vo.OverallPrognosticGroupingLiteVo)this.prognosticgrouping.clone();
		if(this.prognosticgroupingcert == null)
			clone.prognosticgroupingcert = null;
		else
			clone.prognosticgroupingcert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.prognosticgroupingcert.clone();
		if(this.prognostictval == null)
			clone.prognostictval = null;
		else
			clone.prognostictval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.prognostictval.clone();
		if(this.prognosticnval == null)
			clone.prognosticnval = null;
		else
			clone.prognosticnval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.prognosticnval.clone();
		if(this.prognosticmval == null)
			clone.prognosticmval = null;
		else
			clone.prognosticmval = (ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo)this.prognosticmval.clone();
		if(this.prognostictcert == null)
			clone.prognostictcert = null;
		else
			clone.prognostictcert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.prognostictcert.clone();
		if(this.prognosticncert == null)
			clone.prognosticncert = null;
		else
			clone.prognosticncert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.prognosticncert.clone();
		if(this.prognosticmcert == null)
			clone.prognosticmcert = null;
		else
			clone.prognosticmcert = (ims.oncology.vo.lookups.TNMCertaintyFactor)this.prognosticmcert.clone();
		if(this.pathologicaldate == null)
			clone.pathologicaldate = null;
		else
			clone.pathologicaldate = (ims.framework.utils.Date)this.pathologicaldate.clone();
		if(this.integrateddate == null)
			clone.integrateddate = null;
		else
			clone.integrateddate = (ims.framework.utils.Date)this.integrateddate.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 (!(PrimaryTumourDetailsVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A PrimaryTumourDetailsVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((PrimaryTumourDetailsVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((PrimaryTumourDetailsVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = super.countFieldsWithValue();
		if(this.carecontext != null)
			count++;
		if(this.benign != null)
			count++;
		if(this.tumourstatus != null)
			count++;
		if(this.histologysource != null)
			count++;
		if(this.differentatationsource != null)
			count++;
		if(this.pretreatmenttval != null)
			count++;
		if(this.pretreatmenttcert != null)
			count++;
		if(this.pretreatmentnval != null)
			count++;
		if(this.pretreatmentncert != null)
			count++;
		if(this.pretreatmentmval != null)
			count++;
		if(this.pretreatmentmcert != null)
			count++;
		if(this.pretreatmentoverallcert != null)
			count++;
		if(this.integratedtval != null)
			count++;
		if(this.integratednval != null)
			count++;
		if(this.integratedmval != null)
			count++;
		if(this.basisofdiagnosis != null)
			count++;
		if(this.stagingclassifications != null)
			count++;
		if(this.pretreatmentserummarker != null)
			count++;
		if(this.gradeofdifferentation != null)
			count++;
		if(this.over45status != null)
			count++;
		if(this.tumourrecurrence != null)
			count++;
		if(this.tumourversion != null)
			count++;
		if(this.pathologicaltval != null)
			count++;
		if(this.pathologicalnval != null)
			count++;
		if(this.pathologicalmval != null)
			count++;
		if(this.assessment != null)
			count++;
		if(this.movedtoprognostic != null)
			count++;
		if(this.prognosticlocation != null)
			count++;
		if(this.prognosticrisk != null)
			count++;
		if(this.prognosticpsa != null)
			count++;
		if(this.prognosticgleason != null)
			count++;
		if(this.prognosticgrouping != null)
			count++;
		if(this.prognosticgroupingcert != null)
			count++;
		if(this.prognostictval != null)
			count++;
		if(this.prognosticnval != null)
			count++;
		if(this.prognosticmval != null)
			count++;
		if(this.prognostictcert != null)
			count++;
		if(this.prognosticncert != null)
			count++;
		if(this.prognosticmcert != null)
			count++;
		if(this.pathologicaldate != null)
			count++;
		if(this.integrateddate != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return super.countValueObjectFields() + 41;
	}
	protected ims.core.vo.CareContextShortVo carecontext;
	protected ims.core.vo.lookups.YesNoUnknown benign;
	protected ims.oncology.vo.lookups.TumourStatus tumourstatus;
	protected ims.oncology.vo.lookups.HistologySource histologysource;
	protected ims.oncology.vo.lookups.DifferentatationSource differentatationsource;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo pretreatmenttval;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor pretreatmenttcert;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo pretreatmentnval;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor pretreatmentncert;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo pretreatmentmval;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor pretreatmentmcert;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor pretreatmentoverallcert;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo integratedtval;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo integratednval;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo integratedmval;
	protected ims.core.vo.lookups.DiagnosisBasisofDiagnosis basisofdiagnosis;
	protected ims.oncology.vo.PatientTumourClassificationVoCollection stagingclassifications;
	protected ims.clinicaladmin.vo.TumourSerumMarkersLiteVo pretreatmentserummarker;
	protected ims.clinicaladmin.vo.HistopathologicGradeVo gradeofdifferentation;
	protected String over45status;
	protected ims.clinicaladmin.vo.PatientTumourRecurrenceVoCollection tumourrecurrence;
	protected ims.clinicaladmin.vo.TNMStagingClassificationVersionLiteVo tumourversion;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo pathologicaltval;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo pathologicalnval;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo pathologicalmval;
	protected ims.assessment.vo.PatientAssessmentVo assessment;
	protected Boolean movedtoprognostic;
	protected ims.oncology.vo.PrognosticLocationConfigVo prognosticlocation;
	protected ims.clinicaladmin.vo.PrognosticRiskConfigVo prognosticrisk;
	protected ims.clinicaladmin.vo.PSAConfigVo prognosticpsa;
	protected ims.clinicaladmin.vo.GleasonConfigLiteVo prognosticgleason;
	protected ims.clinicaladmin.vo.OverallPrognosticGroupingLiteVo prognosticgrouping;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor prognosticgroupingcert;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo prognostictval;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo prognosticnval;
	protected ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVo prognosticmval;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor prognostictcert;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor prognosticncert;
	protected ims.oncology.vo.lookups.TNMCertaintyFactor prognosticmcert;
	protected ims.framework.utils.Date pathologicaldate;
	protected ims.framework.utils.Date integrateddate;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
