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

/**
 * Linked to core.cds.CDSInpatient business object (ID: 1104100001).
 */
public class CDSInpatientVo extends ims.core.cds.vo.CDSInpatientRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public CDSInpatientVo()
	{
	}
	public CDSInpatientVo(Integer id, int version)
	{
		super(id, version);
	}
	public CDSInpatientVo(ims.core.vo.beans.CDSInpatientVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.ubrn = bean.getUBRN();
		this.pathwayidentifier = bean.getPathwayIdentifier();
		this.pathwayorgcode = bean.getPathwayOrgCode();
		this.referraltotreatmentstatus = bean.getReferralToTreatmentStatus();
		this.rttstartdate = bean.getRTTStartDate() == null ? null : bean.getRTTStartDate().buildDate();
		this.rttenddate = bean.getRTTEndDate() == null ? null : bean.getRTTEndDate().buildDate();
		this.leadcareactind = bean.getLeadCareActInd();
		this.localpatientidentifier = bean.getLocalPatientIdentifier();
		this.patidorgcode = bean.getPatIdOrgCode();
		this.nhsnumber = bean.getNHSNumber();
		this.nhsnumberstatusind = bean.getNHSNumberStatusInd();
		this.patientname = bean.getPatientName();
		this.patientaddress = bean.getPatientAddress();
		this.postcode = bean.getPostCode();
		this.pctorgcode = bean.getPCTOrgCode();
		this.dateofbirth = bean.getDateOfBirth() == null ? null : bean.getDateOfBirth().buildDate();
		this.persongender = bean.getPersonGender();
		this.carersupportind = bean.getCarerSupportInd();
		this.ethniccategory = bean.getEthnicCategory();
		this.providerspellno = bean.getProviderSpellNo();
		this.admincategoryadt = bean.getAdminCategoryADT();
		this.patientclassification = bean.getPatientClassification();
		this.admissionmethod = bean.getAdmissionMethod();
		this.sourceofadmission = bean.getSourceOfAdmission();
		this.startdate = bean.getStartDate() == null ? null : bean.getStartDate().buildDate();
		this.age = bean.getAge();
		this.dischargedestination = bean.getDischargeDestination();
		this.dischargemethod = bean.getDischargeMethod();
		this.dischargereadydate = bean.getDischargeReadyDate() == null ? null : bean.getDischargeReadyDate().buildDate();
		this.dischargedate = bean.getDischargeDate() == null ? null : bean.getDischargeDate().buildDate();
		this.episodenumber = bean.getEpisodeNumber();
		this.lastepisodeind = bean.getLastEpisodeInd();
		this.admincategoryepis = bean.getAdminCategoryEPIS();
		this.operationstatus = bean.getOperationStatus();
		this.neonatalcarelevel = bean.getNeonatalCareLevel();
		this.firstadmission = bean.getFirstAdmission();
		this.psychpatientstatus = bean.getPsychPatientStatus();
		this.legalstatus = bean.getLegalStatus();
		this.episodestartdate = bean.getEpisodeStartDate() == null ? null : bean.getEpisodeStartDate().buildDate();
		this.episodeenddate = bean.getEpisodeEndDate() == null ? null : bean.getEpisodeEndDate().buildDate();
		this.ageatcdsactivity = bean.getAgeAtCDSActivity();
		this.serialnumber = bean.getSerialNumber();
		this.nhsserviceagreenum = bean.getNHSServiceAgreeNum();
		this.providerrefnum = bean.getProviderRefNum();
		this.commissionerrefnum = bean.getCommissionerRefNum();
		this.orgcodeprovider = bean.getOrgCodeProvider();
		this.orgcodecommissioner = bean.getOrgCodeCommissioner();
		this.consultantcode = bean.getConsultantCode();
		this.specialtycode = bean.getSpecialtyCode();
		this.treatmentfunccode = bean.getTreatmentFuncCode();
		this.icddiagnosisgroup = ims.core.vo.CDSDiagnosisDetailsVoCollection.buildFromBeanCollection(bean.getICDDiagnosisGroup());
		this.readdiaggroup = bean.getReadDiagGroup() == null ? null : new ims.core.cds.vo.CDSDiagnosisDetailsRefVo(new Integer(bean.getReadDiagGroup().getId()), bean.getReadDiagGroup().getVersion());
		if(bean.getOPCSProcedureGroup() != null)
		{
			this.opcsproceduregroup = new ims.core.cds.vo.CDSProcedureDetailsRefVoCollection();
			for(int opcsproceduregroup_i = 0; opcsproceduregroup_i < bean.getOPCSProcedureGroup().length; opcsproceduregroup_i++)
			{
				this.opcsproceduregroup.add(new ims.core.cds.vo.CDSProcedureDetailsRefVo(new Integer(bean.getOPCSProcedureGroup()[opcsproceduregroup_i].getId()), bean.getOPCSProcedureGroup()[opcsproceduregroup_i].getVersion()));
			}
		}
		this.readproceduregroup = bean.getREADProcedureGroup() == null ? null : new ims.core.cds.vo.CDSProcedureDetailsRefVo(new Integer(bean.getREADProcedureGroup().getId()), bean.getREADProcedureGroup().getVersion());
		this.locationgroupstartepis = bean.getLocationGroupStartEpis() == null ? null : bean.getLocationGroupStartEpis().buildVo();
		if(bean.getLocationGroupWardStay() != null)
		{
			this.locationgroupwardstay = new ims.core.cds.vo.CDSInpatientLocationGroupRefVoCollection();
			for(int locationgroupwardstay_i = 0; locationgroupwardstay_i < bean.getLocationGroupWardStay().length; locationgroupwardstay_i++)
			{
				this.locationgroupwardstay.add(new ims.core.cds.vo.CDSInpatientLocationGroupRefVo(new Integer(bean.getLocationGroupWardStay()[locationgroupwardstay_i].getId()), bean.getLocationGroupWardStay()[locationgroupwardstay_i].getVersion()));
			}
		}
		this.locationgroupendepis = bean.getLocationGroupEndEpis() == null ? null : new ims.core.cds.vo.CDSInpatientLocationGroupRefVo(new Integer(bean.getLocationGroupEndEpis().getId()), bean.getLocationGroupEndEpis().getVersion());
		this.neonatalcare = bean.getNeonatalCare() == null ? null : bean.getNeonatalCare().buildVo();
		this.paediatriccare = bean.getPaediatricCare() == null ? null : new ims.core.cds.vo.CDSCriticalCareDetailsRefVo(new Integer(bean.getPaediatricCare().getId()), bean.getPaediatricCare().getVersion());
		this.adultcare = bean.getAdultCare() == null ? null : new ims.core.cds.vo.CDSCriticalCareDetailsRefVo(new Integer(bean.getAdultCare().getId()), bean.getAdultCare().getVersion());
		this.ccunitbedconfiguration = bean.getCCUnitBedConfiguration();
		this.ccadmissionsource = bean.getCCAdmissionSource();
		this.ccsourcelocation = bean.getCCSourceLocation();
		this.ccadmissiontype = bean.getCCAdmissionType();
		this.advrespiratorysupdays = bean.getAdvRespiratorySupDays();
		this.bscrespiratorysupdays = bean.getBscRespiratorySupDays();
		this.advcardiosupdays = bean.getAdvCardioSupDays();
		this.bsccardiosupdays = bean.getBscCardioSupDays();
		this.renalsupportdays = bean.getRenalSupportDays();
		this.neurosupportdays = bean.getNeuroSupportDays();
		this.gastrosupportdays = bean.getGastroSupportDays();
		this.dermasupportdays = bean.getDermaSupportDays();
		this.liversupportdays = bean.getLiverSupportDays();
		this.organsupportmax = bean.getOrganSupportMax();
		this.cclevel2days = bean.getCCLevel2Days();
		this.cclevel3days = bean.getCCLevel3Days();
		this.ccdischargedate = bean.getCCDischargeDate() == null ? null : bean.getCCDischargeDate().buildDate();
		this.ccdischargetime = bean.getCCDischargeTime() == null ? null : bean.getCCDischargeTime().buildTime();
		this.ccdischargereadydate = bean.getCCDischargeReadyDate() == null ? null : bean.getCCDischargeReadyDate().buildDate();
		this.ccdischargereadytime = bean.getCCDischargeReadyTime() == null ? null : bean.getCCDischargeReadyTime().buildTime();
		this.ccdischargestatus = bean.getCCDischargeStatus();
		this.ccdischargedest = bean.getCCDischargeDest();
		this.ccdischargelocation = bean.getCCDischargeLocation();
		this.gpcode = bean.getGPCode();
		this.practicecode = bean.getPracticeCode();
		this.referrercode = bean.getReferrerCode();
		this.orgcodereferrer = bean.getOrgCodeReferrer();
		this.durelectivewait = bean.getDurElectiveWait();
		this.intendedmanagement = bean.getIntendedManagement();
		this.decidedtoadmitdate = bean.getDecidedToAdmitDate() == null ? null : bean.getDecidedToAdmitDate().buildDate();
		this.erodate = bean.getERODate() == null ? null : bean.getERODate().buildDate();
		this.resourcegrpcode = bean.getResourceGrpCode();
		this.procedurescheme = bean.getProcedureScheme();
		this.hrgdominantgrouping = bean.getHrgDominantGrouping();
		this.cdsapplicabledate = bean.getCDSApplicableDate() == null ? null : bean.getCDSApplicableDate().buildDateTime();
		this.cdssenderorgcode = bean.getCDSSenderOrgCode();
		this.resourcegpversion = bean.getResourceGPVersion();
		this.maritalstatus = bean.getMaritalStatus();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.core.vo.beans.CDSInpatientVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.ubrn = bean.getUBRN();
		this.pathwayidentifier = bean.getPathwayIdentifier();
		this.pathwayorgcode = bean.getPathwayOrgCode();
		this.referraltotreatmentstatus = bean.getReferralToTreatmentStatus();
		this.rttstartdate = bean.getRTTStartDate() == null ? null : bean.getRTTStartDate().buildDate();
		this.rttenddate = bean.getRTTEndDate() == null ? null : bean.getRTTEndDate().buildDate();
		this.leadcareactind = bean.getLeadCareActInd();
		this.localpatientidentifier = bean.getLocalPatientIdentifier();
		this.patidorgcode = bean.getPatIdOrgCode();
		this.nhsnumber = bean.getNHSNumber();
		this.nhsnumberstatusind = bean.getNHSNumberStatusInd();
		this.patientname = bean.getPatientName();
		this.patientaddress = bean.getPatientAddress();
		this.postcode = bean.getPostCode();
		this.pctorgcode = bean.getPCTOrgCode();
		this.dateofbirth = bean.getDateOfBirth() == null ? null : bean.getDateOfBirth().buildDate();
		this.persongender = bean.getPersonGender();
		this.carersupportind = bean.getCarerSupportInd();
		this.ethniccategory = bean.getEthnicCategory();
		this.providerspellno = bean.getProviderSpellNo();
		this.admincategoryadt = bean.getAdminCategoryADT();
		this.patientclassification = bean.getPatientClassification();
		this.admissionmethod = bean.getAdmissionMethod();
		this.sourceofadmission = bean.getSourceOfAdmission();
		this.startdate = bean.getStartDate() == null ? null : bean.getStartDate().buildDate();
		this.age = bean.getAge();
		this.dischargedestination = bean.getDischargeDestination();
		this.dischargemethod = bean.getDischargeMethod();
		this.dischargereadydate = bean.getDischargeReadyDate() == null ? null : bean.getDischargeReadyDate().buildDate();
		this.dischargedate = bean.getDischargeDate() == null ? null : bean.getDischargeDate().buildDate();
		this.episodenumber = bean.getEpisodeNumber();
		this.lastepisodeind = bean.getLastEpisodeInd();
		this.admincategoryepis = bean.getAdminCategoryEPIS();
		this.operationstatus = bean.getOperationStatus();
		this.neonatalcarelevel = bean.getNeonatalCareLevel();
		this.firstadmission = bean.getFirstAdmission();
		this.psychpatientstatus = bean.getPsychPatientStatus();
		this.legalstatus = bean.getLegalStatus();
		this.episodestartdate = bean.getEpisodeStartDate() == null ? null : bean.getEpisodeStartDate().buildDate();
		this.episodeenddate = bean.getEpisodeEndDate() == null ? null : bean.getEpisodeEndDate().buildDate();
		this.ageatcdsactivity = bean.getAgeAtCDSActivity();
		this.serialnumber = bean.getSerialNumber();
		this.nhsserviceagreenum = bean.getNHSServiceAgreeNum();
		this.providerrefnum = bean.getProviderRefNum();
		this.commissionerrefnum = bean.getCommissionerRefNum();
		this.orgcodeprovider = bean.getOrgCodeProvider();
		this.orgcodecommissioner = bean.getOrgCodeCommissioner();
		this.consultantcode = bean.getConsultantCode();
		this.specialtycode = bean.getSpecialtyCode();
		this.treatmentfunccode = bean.getTreatmentFuncCode();
		this.icddiagnosisgroup = ims.core.vo.CDSDiagnosisDetailsVoCollection.buildFromBeanCollection(bean.getICDDiagnosisGroup());
		this.readdiaggroup = bean.getReadDiagGroup() == null ? null : new ims.core.cds.vo.CDSDiagnosisDetailsRefVo(new Integer(bean.getReadDiagGroup().getId()), bean.getReadDiagGroup().getVersion());
		if(bean.getOPCSProcedureGroup() != null)
		{
			this.opcsproceduregroup = new ims.core.cds.vo.CDSProcedureDetailsRefVoCollection();
			for(int opcsproceduregroup_i = 0; opcsproceduregroup_i < bean.getOPCSProcedureGroup().length; opcsproceduregroup_i++)
			{
				this.opcsproceduregroup.add(new ims.core.cds.vo.CDSProcedureDetailsRefVo(new Integer(bean.getOPCSProcedureGroup()[opcsproceduregroup_i].getId()), bean.getOPCSProcedureGroup()[opcsproceduregroup_i].getVersion()));
			}
		}
		this.readproceduregroup = bean.getREADProcedureGroup() == null ? null : new ims.core.cds.vo.CDSProcedureDetailsRefVo(new Integer(bean.getREADProcedureGroup().getId()), bean.getREADProcedureGroup().getVersion());
		this.locationgroupstartepis = bean.getLocationGroupStartEpis() == null ? null : bean.getLocationGroupStartEpis().buildVo(map);
		if(bean.getLocationGroupWardStay() != null)
		{
			this.locationgroupwardstay = new ims.core.cds.vo.CDSInpatientLocationGroupRefVoCollection();
			for(int locationgroupwardstay_i = 0; locationgroupwardstay_i < bean.getLocationGroupWardStay().length; locationgroupwardstay_i++)
			{
				this.locationgroupwardstay.add(new ims.core.cds.vo.CDSInpatientLocationGroupRefVo(new Integer(bean.getLocationGroupWardStay()[locationgroupwardstay_i].getId()), bean.getLocationGroupWardStay()[locationgroupwardstay_i].getVersion()));
			}
		}
		this.locationgroupendepis = bean.getLocationGroupEndEpis() == null ? null : new ims.core.cds.vo.CDSInpatientLocationGroupRefVo(new Integer(bean.getLocationGroupEndEpis().getId()), bean.getLocationGroupEndEpis().getVersion());
		this.neonatalcare = bean.getNeonatalCare() == null ? null : bean.getNeonatalCare().buildVo(map);
		this.paediatriccare = bean.getPaediatricCare() == null ? null : new ims.core.cds.vo.CDSCriticalCareDetailsRefVo(new Integer(bean.getPaediatricCare().getId()), bean.getPaediatricCare().getVersion());
		this.adultcare = bean.getAdultCare() == null ? null : new ims.core.cds.vo.CDSCriticalCareDetailsRefVo(new Integer(bean.getAdultCare().getId()), bean.getAdultCare().getVersion());
		this.ccunitbedconfiguration = bean.getCCUnitBedConfiguration();
		this.ccadmissionsource = bean.getCCAdmissionSource();
		this.ccsourcelocation = bean.getCCSourceLocation();
		this.ccadmissiontype = bean.getCCAdmissionType();
		this.advrespiratorysupdays = bean.getAdvRespiratorySupDays();
		this.bscrespiratorysupdays = bean.getBscRespiratorySupDays();
		this.advcardiosupdays = bean.getAdvCardioSupDays();
		this.bsccardiosupdays = bean.getBscCardioSupDays();
		this.renalsupportdays = bean.getRenalSupportDays();
		this.neurosupportdays = bean.getNeuroSupportDays();
		this.gastrosupportdays = bean.getGastroSupportDays();
		this.dermasupportdays = bean.getDermaSupportDays();
		this.liversupportdays = bean.getLiverSupportDays();
		this.organsupportmax = bean.getOrganSupportMax();
		this.cclevel2days = bean.getCCLevel2Days();
		this.cclevel3days = bean.getCCLevel3Days();
		this.ccdischargedate = bean.getCCDischargeDate() == null ? null : bean.getCCDischargeDate().buildDate();
		this.ccdischargetime = bean.getCCDischargeTime() == null ? null : bean.getCCDischargeTime().buildTime();
		this.ccdischargereadydate = bean.getCCDischargeReadyDate() == null ? null : bean.getCCDischargeReadyDate().buildDate();
		this.ccdischargereadytime = bean.getCCDischargeReadyTime() == null ? null : bean.getCCDischargeReadyTime().buildTime();
		this.ccdischargestatus = bean.getCCDischargeStatus();
		this.ccdischargedest = bean.getCCDischargeDest();
		this.ccdischargelocation = bean.getCCDischargeLocation();
		this.gpcode = bean.getGPCode();
		this.practicecode = bean.getPracticeCode();
		this.referrercode = bean.getReferrerCode();
		this.orgcodereferrer = bean.getOrgCodeReferrer();
		this.durelectivewait = bean.getDurElectiveWait();
		this.intendedmanagement = bean.getIntendedManagement();
		this.decidedtoadmitdate = bean.getDecidedToAdmitDate() == null ? null : bean.getDecidedToAdmitDate().buildDate();
		this.erodate = bean.getERODate() == null ? null : bean.getERODate().buildDate();
		this.resourcegrpcode = bean.getResourceGrpCode();
		this.procedurescheme = bean.getProcedureScheme();
		this.hrgdominantgrouping = bean.getHrgDominantGrouping();
		this.cdsapplicabledate = bean.getCDSApplicableDate() == null ? null : bean.getCDSApplicableDate().buildDateTime();
		this.cdssenderorgcode = bean.getCDSSenderOrgCode();
		this.resourcegpversion = bean.getResourceGPVersion();
		this.maritalstatus = bean.getMaritalStatus();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.core.vo.beans.CDSInpatientVoBean bean = null;
		if(map != null)
			bean = (ims.core.vo.beans.CDSInpatientVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.core.vo.beans.CDSInpatientVoBean();
			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("UBRN"))
			return getUBRN();
		if(fieldName.equals("PATHWAYIDENTIFIER"))
			return getPathwayIdentifier();
		if(fieldName.equals("PATHWAYORGCODE"))
			return getPathwayOrgCode();
		if(fieldName.equals("REFERRALTOTREATMENTSTATUS"))
			return getReferralToTreatmentStatus();
		if(fieldName.equals("RTTSTARTDATE"))
			return getRTTStartDate();
		if(fieldName.equals("RTTENDDATE"))
			return getRTTEndDate();
		if(fieldName.equals("LEADCAREACTIND"))
			return getLeadCareActInd();
		if(fieldName.equals("LOCALPATIENTIDENTIFIER"))
			return getLocalPatientIdentifier();
		if(fieldName.equals("PATIDORGCODE"))
			return getPatIdOrgCode();
		if(fieldName.equals("NHSNUMBER"))
			return getNHSNumber();
		if(fieldName.equals("NHSNUMBERSTATUSIND"))
			return getNHSNumberStatusInd();
		if(fieldName.equals("PATIENTNAME"))
			return getPatientName();
		if(fieldName.equals("PATIENTADDRESS"))
			return getPatientAddress();
		if(fieldName.equals("POSTCODE"))
			return getPostCode();
		if(fieldName.equals("PCTORGCODE"))
			return getPCTOrgCode();
		if(fieldName.equals("DATEOFBIRTH"))
			return getDateOfBirth();
		if(fieldName.equals("PERSONGENDER"))
			return getPersonGender();
		if(fieldName.equals("CARERSUPPORTIND"))
			return getCarerSupportInd();
		if(fieldName.equals("ETHNICCATEGORY"))
			return getEthnicCategory();
		if(fieldName.equals("PROVIDERSPELLNO"))
			return getProviderSpellNo();
		if(fieldName.equals("ADMINCATEGORYADT"))
			return getAdminCategoryADT();
		if(fieldName.equals("PATIENTCLASSIFICATION"))
			return getPatientClassification();
		if(fieldName.equals("ADMISSIONMETHOD"))
			return getAdmissionMethod();
		if(fieldName.equals("SOURCEOFADMISSION"))
			return getSourceOfAdmission();
		if(fieldName.equals("STARTDATE"))
			return getStartDate();
		if(fieldName.equals("AGE"))
			return getAge();
		if(fieldName.equals("DISCHARGEDESTINATION"))
			return getDischargeDestination();
		if(fieldName.equals("DISCHARGEMETHOD"))
			return getDischargeMethod();
		if(fieldName.equals("DISCHARGEREADYDATE"))
			return getDischargeReadyDate();
		if(fieldName.equals("DISCHARGEDATE"))
			return getDischargeDate();
		if(fieldName.equals("EPISODENUMBER"))
			return getEpisodeNumber();
		if(fieldName.equals("LASTEPISODEIND"))
			return getLastEpisodeInd();
		if(fieldName.equals("ADMINCATEGORYEPIS"))
			return getAdminCategoryEPIS();
		if(fieldName.equals("OPERATIONSTATUS"))
			return getOperationStatus();
		if(fieldName.equals("NEONATALCARELEVEL"))
			return getNeonatalCareLevel();
		if(fieldName.equals("FIRSTADMISSION"))
			return getFirstAdmission();
		if(fieldName.equals("PSYCHPATIENTSTATUS"))
			return getPsychPatientStatus();
		if(fieldName.equals("LEGALSTATUS"))
			return getLegalStatus();
		if(fieldName.equals("EPISODESTARTDATE"))
			return getEpisodeStartDate();
		if(fieldName.equals("EPISODEENDDATE"))
			return getEpisodeEndDate();
		if(fieldName.equals("AGEATCDSACTIVITY"))
			return getAgeAtCDSActivity();
		if(fieldName.equals("SERIALNUMBER"))
			return getSerialNumber();
		if(fieldName.equals("NHSSERVICEAGREENUM"))
			return getNHSServiceAgreeNum();
		if(fieldName.equals("PROVIDERREFNUM"))
			return getProviderRefNum();
		if(fieldName.equals("COMMISSIONERREFNUM"))
			return getCommissionerRefNum();
		if(fieldName.equals("ORGCODEPROVIDER"))
			return getOrgCodeProvider();
		if(fieldName.equals("ORGCODECOMMISSIONER"))
			return getOrgCodeCommissioner();
		if(fieldName.equals("CONSULTANTCODE"))
			return getConsultantCode();
		if(fieldName.equals("SPECIALTYCODE"))
			return getSpecialtyCode();
		if(fieldName.equals("TREATMENTFUNCCODE"))
			return getTreatmentFuncCode();
		if(fieldName.equals("ICDDIAGNOSISGROUP"))
			return getICDDiagnosisGroup();
		if(fieldName.equals("READDIAGGROUP"))
			return getReadDiagGroup();
		if(fieldName.equals("OPCSPROCEDUREGROUP"))
			return getOPCSProcedureGroup();
		if(fieldName.equals("READPROCEDUREGROUP"))
			return getREADProcedureGroup();
		if(fieldName.equals("LOCATIONGROUPSTARTEPIS"))
			return getLocationGroupStartEpis();
		if(fieldName.equals("LOCATIONGROUPWARDSTAY"))
			return getLocationGroupWardStay();
		if(fieldName.equals("LOCATIONGROUPENDEPIS"))
			return getLocationGroupEndEpis();
		if(fieldName.equals("NEONATALCARE"))
			return getNeonatalCare();
		if(fieldName.equals("PAEDIATRICCARE"))
			return getPaediatricCare();
		if(fieldName.equals("ADULTCARE"))
			return getAdultCare();
		if(fieldName.equals("CCUNITBEDCONFIGURATION"))
			return getCCUnitBedConfiguration();
		if(fieldName.equals("CCADMISSIONSOURCE"))
			return getCCAdmissionSource();
		if(fieldName.equals("CCSOURCELOCATION"))
			return getCCSourceLocation();
		if(fieldName.equals("CCADMISSIONTYPE"))
			return getCCAdmissionType();
		if(fieldName.equals("ADVRESPIRATORYSUPDAYS"))
			return getAdvRespiratorySupDays();
		if(fieldName.equals("BSCRESPIRATORYSUPDAYS"))
			return getBscRespiratorySupDays();
		if(fieldName.equals("ADVCARDIOSUPDAYS"))
			return getAdvCardioSupDays();
		if(fieldName.equals("BSCCARDIOSUPDAYS"))
			return getBscCardioSupDays();
		if(fieldName.equals("RENALSUPPORTDAYS"))
			return getRenalSupportDays();
		if(fieldName.equals("NEUROSUPPORTDAYS"))
			return getNeuroSupportDays();
		if(fieldName.equals("GASTROSUPPORTDAYS"))
			return getGastroSupportDays();
		if(fieldName.equals("DERMASUPPORTDAYS"))
			return getDermaSupportDays();
		if(fieldName.equals("LIVERSUPPORTDAYS"))
			return getLiverSupportDays();
		if(fieldName.equals("ORGANSUPPORTMAX"))
			return getOrganSupportMax();
		if(fieldName.equals("CCLEVEL2DAYS"))
			return getCCLevel2Days();
		if(fieldName.equals("CCLEVEL3DAYS"))
			return getCCLevel3Days();
		if(fieldName.equals("CCDISCHARGEDATE"))
			return getCCDischargeDate();
		if(fieldName.equals("CCDISCHARGETIME"))
			return getCCDischargeTime();
		if(fieldName.equals("CCDISCHARGEREADYDATE"))
			return getCCDischargeReadyDate();
		if(fieldName.equals("CCDISCHARGEREADYTIME"))
			return getCCDischargeReadyTime();
		if(fieldName.equals("CCDISCHARGESTATUS"))
			return getCCDischargeStatus();
		if(fieldName.equals("CCDISCHARGEDEST"))
			return getCCDischargeDest();
		if(fieldName.equals("CCDISCHARGELOCATION"))
			return getCCDischargeLocation();
		if(fieldName.equals("GPCODE"))
			return getGPCode();
		if(fieldName.equals("PRACTICECODE"))
			return getPracticeCode();
		if(fieldName.equals("REFERRERCODE"))
			return getReferrerCode();
		if(fieldName.equals("ORGCODEREFERRER"))
			return getOrgCodeReferrer();
		if(fieldName.equals("DURELECTIVEWAIT"))
			return getDurElectiveWait();
		if(fieldName.equals("INTENDEDMANAGEMENT"))
			return getIntendedManagement();
		if(fieldName.equals("DECIDEDTOADMITDATE"))
			return getDecidedToAdmitDate();
		if(fieldName.equals("ERODATE"))
			return getERODate();
		if(fieldName.equals("RESOURCEGRPCODE"))
			return getResourceGrpCode();
		if(fieldName.equals("PROCEDURESCHEME"))
			return getProcedureScheme();
		if(fieldName.equals("HRGDOMINANTGROUPING"))
			return getHrgDominantGrouping();
		if(fieldName.equals("CDSAPPLICABLEDATE"))
			return getCDSApplicableDate();
		if(fieldName.equals("CDSSENDERORGCODE"))
			return getCDSSenderOrgCode();
		if(fieldName.equals("RESOURCEGPVERSION"))
			return getResourceGPVersion();
		if(fieldName.equals("MARITALSTATUS"))
			return getMaritalStatus();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getUBRNIsNotNull()
	{
		return this.ubrn != null;
	}
	public String getUBRN()
	{
		return this.ubrn;
	}
	public static int getUBRNMaxLength()
	{
		return 12;
	}
	public void setUBRN(String value)
	{
		this.isValidated = false;
		this.ubrn = value;
	}
	public boolean getPathwayIdentifierIsNotNull()
	{
		return this.pathwayidentifier != null;
	}
	public String getPathwayIdentifier()
	{
		return this.pathwayidentifier;
	}
	public static int getPathwayIdentifierMaxLength()
	{
		return 20;
	}
	public void setPathwayIdentifier(String value)
	{
		this.isValidated = false;
		this.pathwayidentifier = value;
	}
	public boolean getPathwayOrgCodeIsNotNull()
	{
		return this.pathwayorgcode != null;
	}
	public String getPathwayOrgCode()
	{
		return this.pathwayorgcode;
	}
	public static int getPathwayOrgCodeMaxLength()
	{
		return 3;
	}
	public void setPathwayOrgCode(String value)
	{
		this.isValidated = false;
		this.pathwayorgcode = value;
	}
	public boolean getReferralToTreatmentStatusIsNotNull()
	{
		return this.referraltotreatmentstatus != null;
	}
	public String getReferralToTreatmentStatus()
	{
		return this.referraltotreatmentstatus;
	}
	public static int getReferralToTreatmentStatusMaxLength()
	{
		return 2;
	}
	public void setReferralToTreatmentStatus(String value)
	{
		this.isValidated = false;
		this.referraltotreatmentstatus = value;
	}
	public boolean getRTTStartDateIsNotNull()
	{
		return this.rttstartdate != null;
	}
	public ims.framework.utils.Date getRTTStartDate()
	{
		return this.rttstartdate;
	}
	public void setRTTStartDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.rttstartdate = value;
	}
	public boolean getRTTEndDateIsNotNull()
	{
		return this.rttenddate != null;
	}
	public ims.framework.utils.Date getRTTEndDate()
	{
		return this.rttenddate;
	}
	public void setRTTEndDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.rttenddate = value;
	}
	public boolean getLeadCareActIndIsNotNull()
	{
		return this.leadcareactind != null;
	}
	public String getLeadCareActInd()
	{
		return this.leadcareactind;
	}
	public static int getLeadCareActIndMaxLength()
	{
		return 2;
	}
	public void setLeadCareActInd(String value)
	{
		this.isValidated = false;
		this.leadcareactind = value;
	}
	public boolean getLocalPatientIdentifierIsNotNull()
	{
		return this.localpatientidentifier != null;
	}
	public String getLocalPatientIdentifier()
	{
		return this.localpatientidentifier;
	}
	public static int getLocalPatientIdentifierMaxLength()
	{
		return 10;
	}
	public void setLocalPatientIdentifier(String value)
	{
		this.isValidated = false;
		this.localpatientidentifier = value;
	}
	public boolean getPatIdOrgCodeIsNotNull()
	{
		return this.patidorgcode != null;
	}
	public String getPatIdOrgCode()
	{
		return this.patidorgcode;
	}
	public static int getPatIdOrgCodeMaxLength()
	{
		return 5;
	}
	public void setPatIdOrgCode(String value)
	{
		this.isValidated = false;
		this.patidorgcode = value;
	}
	public boolean getNHSNumberIsNotNull()
	{
		return this.nhsnumber != null;
	}
	public String getNHSNumber()
	{
		return this.nhsnumber;
	}
	public static int getNHSNumberMaxLength()
	{
		return 17;
	}
	public void setNHSNumber(String value)
	{
		this.isValidated = false;
		this.nhsnumber = value;
	}
	public boolean getNHSNumberStatusIndIsNotNull()
	{
		return this.nhsnumberstatusind != null;
	}
	public String getNHSNumberStatusInd()
	{
		return this.nhsnumberstatusind;
	}
	public static int getNHSNumberStatusIndMaxLength()
	{
		return 2;
	}
	public void setNHSNumberStatusInd(String value)
	{
		this.isValidated = false;
		this.nhsnumberstatusind = value;
	}
	public boolean getPatientNameIsNotNull()
	{
		return this.patientname != null;
	}
	public String getPatientName()
	{
		return this.patientname;
	}
	public static int getPatientNameMaxLength()
	{
		return 70;
	}
	public void setPatientName(String value)
	{
		this.isValidated = false;
		this.patientname = value;
	}
	public boolean getPatientAddressIsNotNull()
	{
		return this.patientaddress != null;
	}
	public String getPatientAddress()
	{
		return this.patientaddress;
	}
	public static int getPatientAddressMaxLength()
	{
		return 175;
	}
	public void setPatientAddress(String value)
	{
		this.isValidated = false;
		this.patientaddress = value;
	}
	public boolean getPostCodeIsNotNull()
	{
		return this.postcode != null;
	}
	public String getPostCode()
	{
		return this.postcode;
	}
	public static int getPostCodeMaxLength()
	{
		return 8;
	}
	public void setPostCode(String value)
	{
		this.isValidated = false;
		this.postcode = value;
	}
	public boolean getPCTOrgCodeIsNotNull()
	{
		return this.pctorgcode != null;
	}
	public String getPCTOrgCode()
	{
		return this.pctorgcode;
	}
	public static int getPCTOrgCodeMaxLength()
	{
		return 3;
	}
	public void setPCTOrgCode(String value)
	{
		this.isValidated = false;
		this.pctorgcode = value;
	}
	public boolean getDateOfBirthIsNotNull()
	{
		return this.dateofbirth != null;
	}
	public ims.framework.utils.Date getDateOfBirth()
	{
		return this.dateofbirth;
	}
	public void setDateOfBirth(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.dateofbirth = value;
	}
	public boolean getPersonGenderIsNotNull()
	{
		return this.persongender != null;
	}
	public String getPersonGender()
	{
		return this.persongender;
	}
	public static int getPersonGenderMaxLength()
	{
		return 1;
	}
	public void setPersonGender(String value)
	{
		this.isValidated = false;
		this.persongender = value;
	}
	public boolean getCarerSupportIndIsNotNull()
	{
		return this.carersupportind != null;
	}
	public String getCarerSupportInd()
	{
		return this.carersupportind;
	}
	public static int getCarerSupportIndMaxLength()
	{
		return 2;
	}
	public void setCarerSupportInd(String value)
	{
		this.isValidated = false;
		this.carersupportind = value;
	}
	public boolean getEthnicCategoryIsNotNull()
	{
		return this.ethniccategory != null;
	}
	public String getEthnicCategory()
	{
		return this.ethniccategory;
	}
	public static int getEthnicCategoryMaxLength()
	{
		return 2;
	}
	public void setEthnicCategory(String value)
	{
		this.isValidated = false;
		this.ethniccategory = value;
	}
	public boolean getProviderSpellNoIsNotNull()
	{
		return this.providerspellno != null;
	}
	public String getProviderSpellNo()
	{
		return this.providerspellno;
	}
	public static int getProviderSpellNoMaxLength()
	{
		return 12;
	}
	public void setProviderSpellNo(String value)
	{
		this.isValidated = false;
		this.providerspellno = value;
	}
	public boolean getAdminCategoryADTIsNotNull()
	{
		return this.admincategoryadt != null;
	}
	public String getAdminCategoryADT()
	{
		return this.admincategoryadt;
	}
	public static int getAdminCategoryADTMaxLength()
	{
		return 2;
	}
	public void setAdminCategoryADT(String value)
	{
		this.isValidated = false;
		this.admincategoryadt = value;
	}
	public boolean getPatientClassificationIsNotNull()
	{
		return this.patientclassification != null;
	}
	public String getPatientClassification()
	{
		return this.patientclassification;
	}
	public static int getPatientClassificationMaxLength()
	{
		return 1;
	}
	public void setPatientClassification(String value)
	{
		this.isValidated = false;
		this.patientclassification = value;
	}
	public boolean getAdmissionMethodIsNotNull()
	{
		return this.admissionmethod != null;
	}
	public String getAdmissionMethod()
	{
		return this.admissionmethod;
	}
	public static int getAdmissionMethodMaxLength()
	{
		return 2;
	}
	public void setAdmissionMethod(String value)
	{
		this.isValidated = false;
		this.admissionmethod = value;
	}
	public boolean getSourceOfAdmissionIsNotNull()
	{
		return this.sourceofadmission != null;
	}
	public String getSourceOfAdmission()
	{
		return this.sourceofadmission;
	}
	public static int getSourceOfAdmissionMaxLength()
	{
		return 2;
	}
	public void setSourceOfAdmission(String value)
	{
		this.isValidated = false;
		this.sourceofadmission = value;
	}
	public boolean getStartDateIsNotNull()
	{
		return this.startdate != null;
	}
	public ims.framework.utils.Date getStartDate()
	{
		return this.startdate;
	}
	public void setStartDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.startdate = value;
	}
	public boolean getAgeIsNotNull()
	{
		return this.age != null;
	}
	public Integer getAge()
	{
		return this.age;
	}
	public void setAge(Integer value)
	{
		this.isValidated = false;
		this.age = value;
	}
	public boolean getDischargeDestinationIsNotNull()
	{
		return this.dischargedestination != null;
	}
	public String getDischargeDestination()
	{
		return this.dischargedestination;
	}
	public static int getDischargeDestinationMaxLength()
	{
		return 2;
	}
	public void setDischargeDestination(String value)
	{
		this.isValidated = false;
		this.dischargedestination = value;
	}
	public boolean getDischargeMethodIsNotNull()
	{
		return this.dischargemethod != null;
	}
	public String getDischargeMethod()
	{
		return this.dischargemethod;
	}
	public static int getDischargeMethodMaxLength()
	{
		return 1;
	}
	public void setDischargeMethod(String value)
	{
		this.isValidated = false;
		this.dischargemethod = value;
	}
	public boolean getDischargeReadyDateIsNotNull()
	{
		return this.dischargereadydate != null;
	}
	public ims.framework.utils.Date getDischargeReadyDate()
	{
		return this.dischargereadydate;
	}
	public void setDischargeReadyDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.dischargereadydate = value;
	}
	public boolean getDischargeDateIsNotNull()
	{
		return this.dischargedate != null;
	}
	public ims.framework.utils.Date getDischargeDate()
	{
		return this.dischargedate;
	}
	public void setDischargeDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.dischargedate = value;
	}
	public boolean getEpisodeNumberIsNotNull()
	{
		return this.episodenumber != null;
	}
	public String getEpisodeNumber()
	{
		return this.episodenumber;
	}
	public static int getEpisodeNumberMaxLength()
	{
		return 2;
	}
	public void setEpisodeNumber(String value)
	{
		this.isValidated = false;
		this.episodenumber = value;
	}
	public boolean getLastEpisodeIndIsNotNull()
	{
		return this.lastepisodeind != null;
	}
	public String getLastEpisodeInd()
	{
		return this.lastepisodeind;
	}
	public static int getLastEpisodeIndMaxLength()
	{
		return 1;
	}
	public void setLastEpisodeInd(String value)
	{
		this.isValidated = false;
		this.lastepisodeind = value;
	}
	public boolean getAdminCategoryEPISIsNotNull()
	{
		return this.admincategoryepis != null;
	}
	public String getAdminCategoryEPIS()
	{
		return this.admincategoryepis;
	}
	public static int getAdminCategoryEPISMaxLength()
	{
		return 2;
	}
	public void setAdminCategoryEPIS(String value)
	{
		this.isValidated = false;
		this.admincategoryepis = value;
	}
	public boolean getOperationStatusIsNotNull()
	{
		return this.operationstatus != null;
	}
	public String getOperationStatus()
	{
		return this.operationstatus;
	}
	public static int getOperationStatusMaxLength()
	{
		return 1;
	}
	public void setOperationStatus(String value)
	{
		this.isValidated = false;
		this.operationstatus = value;
	}
	public boolean getNeonatalCareLevelIsNotNull()
	{
		return this.neonatalcarelevel != null;
	}
	public String getNeonatalCareLevel()
	{
		return this.neonatalcarelevel;
	}
	public static int getNeonatalCareLevelMaxLength()
	{
		return 1;
	}
	public void setNeonatalCareLevel(String value)
	{
		this.isValidated = false;
		this.neonatalcarelevel = value;
	}
	public boolean getFirstAdmissionIsNotNull()
	{
		return this.firstadmission != null;
	}
	public String getFirstAdmission()
	{
		return this.firstadmission;
	}
	public static int getFirstAdmissionMaxLength()
	{
		return 1;
	}
	public void setFirstAdmission(String value)
	{
		this.isValidated = false;
		this.firstadmission = value;
	}
	public boolean getPsychPatientStatusIsNotNull()
	{
		return this.psychpatientstatus != null;
	}
	public String getPsychPatientStatus()
	{
		return this.psychpatientstatus;
	}
	public static int getPsychPatientStatusMaxLength()
	{
		return 1;
	}
	public void setPsychPatientStatus(String value)
	{
		this.isValidated = false;
		this.psychpatientstatus = value;
	}
	public boolean getLegalStatusIsNotNull()
	{
		return this.legalstatus != null;
	}
	public String getLegalStatus()
	{
		return this.legalstatus;
	}
	public static int getLegalStatusMaxLength()
	{
		return 2;
	}
	public void setLegalStatus(String value)
	{
		this.isValidated = false;
		this.legalstatus = value;
	}
	public boolean getEpisodeStartDateIsNotNull()
	{
		return this.episodestartdate != null;
	}
	public ims.framework.utils.Date getEpisodeStartDate()
	{
		return this.episodestartdate;
	}
	public void setEpisodeStartDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.episodestartdate = value;
	}
	public boolean getEpisodeEndDateIsNotNull()
	{
		return this.episodeenddate != null;
	}
	public ims.framework.utils.Date getEpisodeEndDate()
	{
		return this.episodeenddate;
	}
	public void setEpisodeEndDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.episodeenddate = value;
	}
	public boolean getAgeAtCDSActivityIsNotNull()
	{
		return this.ageatcdsactivity != null;
	}
	public Integer getAgeAtCDSActivity()
	{
		return this.ageatcdsactivity;
	}
	public void setAgeAtCDSActivity(Integer value)
	{
		this.isValidated = false;
		this.ageatcdsactivity = value;
	}
	public boolean getSerialNumberIsNotNull()
	{
		return this.serialnumber != null;
	}
	public String getSerialNumber()
	{
		return this.serialnumber;
	}
	public static int getSerialNumberMaxLength()
	{
		return 6;
	}
	public void setSerialNumber(String value)
	{
		this.isValidated = false;
		this.serialnumber = value;
	}
	public boolean getNHSServiceAgreeNumIsNotNull()
	{
		return this.nhsserviceagreenum != null;
	}
	public String getNHSServiceAgreeNum()
	{
		return this.nhsserviceagreenum;
	}
	public static int getNHSServiceAgreeNumMaxLength()
	{
		return 10;
	}
	public void setNHSServiceAgreeNum(String value)
	{
		this.isValidated = false;
		this.nhsserviceagreenum = value;
	}
	public boolean getProviderRefNumIsNotNull()
	{
		return this.providerrefnum != null;
	}
	public String getProviderRefNum()
	{
		return this.providerrefnum;
	}
	public static int getProviderRefNumMaxLength()
	{
		return 17;
	}
	public void setProviderRefNum(String value)
	{
		this.isValidated = false;
		this.providerrefnum = value;
	}
	public boolean getCommissionerRefNumIsNotNull()
	{
		return this.commissionerrefnum != null;
	}
	public String getCommissionerRefNum()
	{
		return this.commissionerrefnum;
	}
	public static int getCommissionerRefNumMaxLength()
	{
		return 17;
	}
	public void setCommissionerRefNum(String value)
	{
		this.isValidated = false;
		this.commissionerrefnum = value;
	}
	public boolean getOrgCodeProviderIsNotNull()
	{
		return this.orgcodeprovider != null;
	}
	public String getOrgCodeProvider()
	{
		return this.orgcodeprovider;
	}
	public static int getOrgCodeProviderMaxLength()
	{
		return 5;
	}
	public void setOrgCodeProvider(String value)
	{
		this.isValidated = false;
		this.orgcodeprovider = value;
	}
	public boolean getOrgCodeCommissionerIsNotNull()
	{
		return this.orgcodecommissioner != null;
	}
	public String getOrgCodeCommissioner()
	{
		return this.orgcodecommissioner;
	}
	public static int getOrgCodeCommissionerMaxLength()
	{
		return 5;
	}
	public void setOrgCodeCommissioner(String value)
	{
		this.isValidated = false;
		this.orgcodecommissioner = value;
	}
	public boolean getConsultantCodeIsNotNull()
	{
		return this.consultantcode != null;
	}
	public String getConsultantCode()
	{
		return this.consultantcode;
	}
	public static int getConsultantCodeMaxLength()
	{
		return 8;
	}
	public void setConsultantCode(String value)
	{
		this.isValidated = false;
		this.consultantcode = value;
	}
	public boolean getSpecialtyCodeIsNotNull()
	{
		return this.specialtycode != null;
	}
	public String getSpecialtyCode()
	{
		return this.specialtycode;
	}
	public static int getSpecialtyCodeMaxLength()
	{
		return 3;
	}
	public void setSpecialtyCode(String value)
	{
		this.isValidated = false;
		this.specialtycode = value;
	}
	public boolean getTreatmentFuncCodeIsNotNull()
	{
		return this.treatmentfunccode != null;
	}
	public String getTreatmentFuncCode()
	{
		return this.treatmentfunccode;
	}
	public static int getTreatmentFuncCodeMaxLength()
	{
		return 3;
	}
	public void setTreatmentFuncCode(String value)
	{
		this.isValidated = false;
		this.treatmentfunccode = value;
	}
	public boolean getICDDiagnosisGroupIsNotNull()
	{
		return this.icddiagnosisgroup != null;
	}
	public ims.core.vo.CDSDiagnosisDetailsVoCollection getICDDiagnosisGroup()
	{
		return this.icddiagnosisgroup;
	}
	public void setICDDiagnosisGroup(ims.core.vo.CDSDiagnosisDetailsVoCollection value)
	{
		this.isValidated = false;
		this.icddiagnosisgroup = value;
	}
	public boolean getReadDiagGroupIsNotNull()
	{
		return this.readdiaggroup != null;
	}
	public ims.core.cds.vo.CDSDiagnosisDetailsRefVo getReadDiagGroup()
	{
		return this.readdiaggroup;
	}
	public void setReadDiagGroup(ims.core.cds.vo.CDSDiagnosisDetailsRefVo value)
	{
		this.isValidated = false;
		this.readdiaggroup = value;
	}
	public boolean getOPCSProcedureGroupIsNotNull()
	{
		return this.opcsproceduregroup != null;
	}
	public ims.core.cds.vo.CDSProcedureDetailsRefVoCollection getOPCSProcedureGroup()
	{
		return this.opcsproceduregroup;
	}
	public void setOPCSProcedureGroup(ims.core.cds.vo.CDSProcedureDetailsRefVoCollection value)
	{
		this.isValidated = false;
		this.opcsproceduregroup = value;
	}
	public boolean getREADProcedureGroupIsNotNull()
	{
		return this.readproceduregroup != null;
	}
	public ims.core.cds.vo.CDSProcedureDetailsRefVo getREADProcedureGroup()
	{
		return this.readproceduregroup;
	}
	public void setREADProcedureGroup(ims.core.cds.vo.CDSProcedureDetailsRefVo value)
	{
		this.isValidated = false;
		this.readproceduregroup = value;
	}
	public boolean getLocationGroupStartEpisIsNotNull()
	{
		return this.locationgroupstartepis != null;
	}
	public ims.core.vo.CDSInpatientLocationGroupVo getLocationGroupStartEpis()
	{
		return this.locationgroupstartepis;
	}
	public void setLocationGroupStartEpis(ims.core.vo.CDSInpatientLocationGroupVo value)
	{
		this.isValidated = false;
		this.locationgroupstartepis = value;
	}
	public boolean getLocationGroupWardStayIsNotNull()
	{
		return this.locationgroupwardstay != null;
	}
	public ims.core.cds.vo.CDSInpatientLocationGroupRefVoCollection getLocationGroupWardStay()
	{
		return this.locationgroupwardstay;
	}
	public void setLocationGroupWardStay(ims.core.cds.vo.CDSInpatientLocationGroupRefVoCollection value)
	{
		this.isValidated = false;
		this.locationgroupwardstay = value;
	}
	public boolean getLocationGroupEndEpisIsNotNull()
	{
		return this.locationgroupendepis != null;
	}
	public ims.core.cds.vo.CDSInpatientLocationGroupRefVo getLocationGroupEndEpis()
	{
		return this.locationgroupendepis;
	}
	public void setLocationGroupEndEpis(ims.core.cds.vo.CDSInpatientLocationGroupRefVo value)
	{
		this.isValidated = false;
		this.locationgroupendepis = value;
	}
	public boolean getNeonatalCareIsNotNull()
	{
		return this.neonatalcare != null;
	}
	public ims.core.vo.CDSCriticalCareVo getNeonatalCare()
	{
		return this.neonatalcare;
	}
	public void setNeonatalCare(ims.core.vo.CDSCriticalCareVo value)
	{
		this.isValidated = false;
		this.neonatalcare = value;
	}
	public boolean getPaediatricCareIsNotNull()
	{
		return this.paediatriccare != null;
	}
	public ims.core.cds.vo.CDSCriticalCareDetailsRefVo getPaediatricCare()
	{
		return this.paediatriccare;
	}
	public void setPaediatricCare(ims.core.cds.vo.CDSCriticalCareDetailsRefVo value)
	{
		this.isValidated = false;
		this.paediatriccare = value;
	}
	public boolean getAdultCareIsNotNull()
	{
		return this.adultcare != null;
	}
	public ims.core.cds.vo.CDSCriticalCareDetailsRefVo getAdultCare()
	{
		return this.adultcare;
	}
	public void setAdultCare(ims.core.cds.vo.CDSCriticalCareDetailsRefVo value)
	{
		this.isValidated = false;
		this.adultcare = value;
	}
	public boolean getCCUnitBedConfigurationIsNotNull()
	{
		return this.ccunitbedconfiguration != null;
	}
	public String getCCUnitBedConfiguration()
	{
		return this.ccunitbedconfiguration;
	}
	public static int getCCUnitBedConfigurationMaxLength()
	{
		return 2;
	}
	public void setCCUnitBedConfiguration(String value)
	{
		this.isValidated = false;
		this.ccunitbedconfiguration = value;
	}
	public boolean getCCAdmissionSourceIsNotNull()
	{
		return this.ccadmissionsource != null;
	}
	public String getCCAdmissionSource()
	{
		return this.ccadmissionsource;
	}
	public static int getCCAdmissionSourceMaxLength()
	{
		return 2;
	}
	public void setCCAdmissionSource(String value)
	{
		this.isValidated = false;
		this.ccadmissionsource = value;
	}
	public boolean getCCSourceLocationIsNotNull()
	{
		return this.ccsourcelocation != null;
	}
	public String getCCSourceLocation()
	{
		return this.ccsourcelocation;
	}
	public static int getCCSourceLocationMaxLength()
	{
		return 2;
	}
	public void setCCSourceLocation(String value)
	{
		this.isValidated = false;
		this.ccsourcelocation = value;
	}
	public boolean getCCAdmissionTypeIsNotNull()
	{
		return this.ccadmissiontype != null;
	}
	public String getCCAdmissionType()
	{
		return this.ccadmissiontype;
	}
	public static int getCCAdmissionTypeMaxLength()
	{
		return 2;
	}
	public void setCCAdmissionType(String value)
	{
		this.isValidated = false;
		this.ccadmissiontype = value;
	}
	public boolean getAdvRespiratorySupDaysIsNotNull()
	{
		return this.advrespiratorysupdays != null;
	}
	public String getAdvRespiratorySupDays()
	{
		return this.advrespiratorysupdays;
	}
	public static int getAdvRespiratorySupDaysMaxLength()
	{
		return 3;
	}
	public void setAdvRespiratorySupDays(String value)
	{
		this.isValidated = false;
		this.advrespiratorysupdays = value;
	}
	public boolean getBscRespiratorySupDaysIsNotNull()
	{
		return this.bscrespiratorysupdays != null;
	}
	public String getBscRespiratorySupDays()
	{
		return this.bscrespiratorysupdays;
	}
	public static int getBscRespiratorySupDaysMaxLength()
	{
		return 3;
	}
	public void setBscRespiratorySupDays(String value)
	{
		this.isValidated = false;
		this.bscrespiratorysupdays = value;
	}
	public boolean getAdvCardioSupDaysIsNotNull()
	{
		return this.advcardiosupdays != null;
	}
	public String getAdvCardioSupDays()
	{
		return this.advcardiosupdays;
	}
	public static int getAdvCardioSupDaysMaxLength()
	{
		return 3;
	}
	public void setAdvCardioSupDays(String value)
	{
		this.isValidated = false;
		this.advcardiosupdays = value;
	}
	public boolean getBscCardioSupDaysIsNotNull()
	{
		return this.bsccardiosupdays != null;
	}
	public String getBscCardioSupDays()
	{
		return this.bsccardiosupdays;
	}
	public static int getBscCardioSupDaysMaxLength()
	{
		return 3;
	}
	public void setBscCardioSupDays(String value)
	{
		this.isValidated = false;
		this.bsccardiosupdays = value;
	}
	public boolean getRenalSupportDaysIsNotNull()
	{
		return this.renalsupportdays != null;
	}
	public String getRenalSupportDays()
	{
		return this.renalsupportdays;
	}
	public static int getRenalSupportDaysMaxLength()
	{
		return 3;
	}
	public void setRenalSupportDays(String value)
	{
		this.isValidated = false;
		this.renalsupportdays = value;
	}
	public boolean getNeuroSupportDaysIsNotNull()
	{
		return this.neurosupportdays != null;
	}
	public String getNeuroSupportDays()
	{
		return this.neurosupportdays;
	}
	public static int getNeuroSupportDaysMaxLength()
	{
		return 3;
	}
	public void setNeuroSupportDays(String value)
	{
		this.isValidated = false;
		this.neurosupportdays = value;
	}
	public boolean getGastroSupportDaysIsNotNull()
	{
		return this.gastrosupportdays != null;
	}
	public String getGastroSupportDays()
	{
		return this.gastrosupportdays;
	}
	public static int getGastroSupportDaysMaxLength()
	{
		return 3;
	}
	public void setGastroSupportDays(String value)
	{
		this.isValidated = false;
		this.gastrosupportdays = value;
	}
	public boolean getDermaSupportDaysIsNotNull()
	{
		return this.dermasupportdays != null;
	}
	public String getDermaSupportDays()
	{
		return this.dermasupportdays;
	}
	public static int getDermaSupportDaysMaxLength()
	{
		return 3;
	}
	public void setDermaSupportDays(String value)
	{
		this.isValidated = false;
		this.dermasupportdays = value;
	}
	public boolean getLiverSupportDaysIsNotNull()
	{
		return this.liversupportdays != null;
	}
	public String getLiverSupportDays()
	{
		return this.liversupportdays;
	}
	public static int getLiverSupportDaysMaxLength()
	{
		return 3;
	}
	public void setLiverSupportDays(String value)
	{
		this.isValidated = false;
		this.liversupportdays = value;
	}
	public boolean getOrganSupportMaxIsNotNull()
	{
		return this.organsupportmax != null;
	}
	public String getOrganSupportMax()
	{
		return this.organsupportmax;
	}
	public static int getOrganSupportMaxMaxLength()
	{
		return 2;
	}
	public void setOrganSupportMax(String value)
	{
		this.isValidated = false;
		this.organsupportmax = value;
	}
	public boolean getCCLevel2DaysIsNotNull()
	{
		return this.cclevel2days != null;
	}
	public String getCCLevel2Days()
	{
		return this.cclevel2days;
	}
	public static int getCCLevel2DaysMaxLength()
	{
		return 3;
	}
	public void setCCLevel2Days(String value)
	{
		this.isValidated = false;
		this.cclevel2days = value;
	}
	public boolean getCCLevel3DaysIsNotNull()
	{
		return this.cclevel3days != null;
	}
	public String getCCLevel3Days()
	{
		return this.cclevel3days;
	}
	public static int getCCLevel3DaysMaxLength()
	{
		return 3;
	}
	public void setCCLevel3Days(String value)
	{
		this.isValidated = false;
		this.cclevel3days = value;
	}
	public boolean getCCDischargeDateIsNotNull()
	{
		return this.ccdischargedate != null;
	}
	public ims.framework.utils.Date getCCDischargeDate()
	{
		return this.ccdischargedate;
	}
	public void setCCDischargeDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.ccdischargedate = value;
	}
	public boolean getCCDischargeTimeIsNotNull()
	{
		return this.ccdischargetime != null;
	}
	public ims.framework.utils.Time getCCDischargeTime()
	{
		return this.ccdischargetime;
	}
	public void setCCDischargeTime(ims.framework.utils.Time value)
	{
		this.isValidated = false;
		this.ccdischargetime = value;
	}
	public boolean getCCDischargeReadyDateIsNotNull()
	{
		return this.ccdischargereadydate != null;
	}
	public ims.framework.utils.Date getCCDischargeReadyDate()
	{
		return this.ccdischargereadydate;
	}
	public void setCCDischargeReadyDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.ccdischargereadydate = value;
	}
	public boolean getCCDischargeReadyTimeIsNotNull()
	{
		return this.ccdischargereadytime != null;
	}
	public ims.framework.utils.Time getCCDischargeReadyTime()
	{
		return this.ccdischargereadytime;
	}
	public void setCCDischargeReadyTime(ims.framework.utils.Time value)
	{
		this.isValidated = false;
		this.ccdischargereadytime = value;
	}
	public boolean getCCDischargeStatusIsNotNull()
	{
		return this.ccdischargestatus != null;
	}
	public String getCCDischargeStatus()
	{
		return this.ccdischargestatus;
	}
	public static int getCCDischargeStatusMaxLength()
	{
		return 2;
	}
	public void setCCDischargeStatus(String value)
	{
		this.isValidated = false;
		this.ccdischargestatus = value;
	}
	public boolean getCCDischargeDestIsNotNull()
	{
		return this.ccdischargedest != null;
	}
	public String getCCDischargeDest()
	{
		return this.ccdischargedest;
	}
	public static int getCCDischargeDestMaxLength()
	{
		return 2;
	}
	public void setCCDischargeDest(String value)
	{
		this.isValidated = false;
		this.ccdischargedest = value;
	}
	public boolean getCCDischargeLocationIsNotNull()
	{
		return this.ccdischargelocation != null;
	}
	public String getCCDischargeLocation()
	{
		return this.ccdischargelocation;
	}
	public static int getCCDischargeLocationMaxLength()
	{
		return 2;
	}
	public void setCCDischargeLocation(String value)
	{
		this.isValidated = false;
		this.ccdischargelocation = value;
	}
	public boolean getGPCodeIsNotNull()
	{
		return this.gpcode != null;
	}
	public String getGPCode()
	{
		return this.gpcode;
	}
	public static int getGPCodeMaxLength()
	{
		return 8;
	}
	public void setGPCode(String value)
	{
		this.isValidated = false;
		this.gpcode = value;
	}
	public boolean getPracticeCodeIsNotNull()
	{
		return this.practicecode != null;
	}
	public String getPracticeCode()
	{
		return this.practicecode;
	}
	public static int getPracticeCodeMaxLength()
	{
		return 6;
	}
	public void setPracticeCode(String value)
	{
		this.isValidated = false;
		this.practicecode = value;
	}
	public boolean getReferrerCodeIsNotNull()
	{
		return this.referrercode != null;
	}
	public String getReferrerCode()
	{
		return this.referrercode;
	}
	public static int getReferrerCodeMaxLength()
	{
		return 8;
	}
	public void setReferrerCode(String value)
	{
		this.isValidated = false;
		this.referrercode = value;
	}
	public boolean getOrgCodeReferrerIsNotNull()
	{
		return this.orgcodereferrer != null;
	}
	public String getOrgCodeReferrer()
	{
		return this.orgcodereferrer;
	}
	public static int getOrgCodeReferrerMaxLength()
	{
		return 6;
	}
	public void setOrgCodeReferrer(String value)
	{
		this.isValidated = false;
		this.orgcodereferrer = value;
	}
	public boolean getDurElectiveWaitIsNotNull()
	{
		return this.durelectivewait != null;
	}
	public String getDurElectiveWait()
	{
		return this.durelectivewait;
	}
	public static int getDurElectiveWaitMaxLength()
	{
		return 4;
	}
	public void setDurElectiveWait(String value)
	{
		this.isValidated = false;
		this.durelectivewait = value;
	}
	public boolean getIntendedManagementIsNotNull()
	{
		return this.intendedmanagement != null;
	}
	public String getIntendedManagement()
	{
		return this.intendedmanagement;
	}
	public static int getIntendedManagementMaxLength()
	{
		return 1;
	}
	public void setIntendedManagement(String value)
	{
		this.isValidated = false;
		this.intendedmanagement = value;
	}
	public boolean getDecidedToAdmitDateIsNotNull()
	{
		return this.decidedtoadmitdate != null;
	}
	public ims.framework.utils.Date getDecidedToAdmitDate()
	{
		return this.decidedtoadmitdate;
	}
	public void setDecidedToAdmitDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.decidedtoadmitdate = value;
	}
	public boolean getERODateIsNotNull()
	{
		return this.erodate != null;
	}
	public ims.framework.utils.Date getERODate()
	{
		return this.erodate;
	}
	public void setERODate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.erodate = value;
	}
	public boolean getResourceGrpCodeIsNotNull()
	{
		return this.resourcegrpcode != null;
	}
	public String getResourceGrpCode()
	{
		return this.resourcegrpcode;
	}
	public static int getResourceGrpCodeMaxLength()
	{
		return 3;
	}
	public void setResourceGrpCode(String value)
	{
		this.isValidated = false;
		this.resourcegrpcode = value;
	}
	public boolean getProcedureSchemeIsNotNull()
	{
		return this.procedurescheme != null;
	}
	public String getProcedureScheme()
	{
		return this.procedurescheme;
	}
	public static int getProcedureSchemeMaxLength()
	{
		return 2;
	}
	public void setProcedureScheme(String value)
	{
		this.isValidated = false;
		this.procedurescheme = value;
	}
	public boolean getHrgDominantGroupingIsNotNull()
	{
		return this.hrgdominantgrouping != null;
	}
	public String getHrgDominantGrouping()
	{
		return this.hrgdominantgrouping;
	}
	public static int getHrgDominantGroupingMaxLength()
	{
		return 4;
	}
	public void setHrgDominantGrouping(String value)
	{
		this.isValidated = false;
		this.hrgdominantgrouping = value;
	}
	public boolean getCDSApplicableDateIsNotNull()
	{
		return this.cdsapplicabledate != null;
	}
	public ims.framework.utils.DateTime getCDSApplicableDate()
	{
		return this.cdsapplicabledate;
	}
	public void setCDSApplicableDate(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.cdsapplicabledate = value;
	}
	public boolean getCDSSenderOrgCodeIsNotNull()
	{
		return this.cdssenderorgcode != null;
	}
	public String getCDSSenderOrgCode()
	{
		return this.cdssenderorgcode;
	}
	public static int getCDSSenderOrgCodeMaxLength()
	{
		return 5;
	}
	public void setCDSSenderOrgCode(String value)
	{
		this.isValidated = false;
		this.cdssenderorgcode = value;
	}
	public boolean getResourceGPVersionIsNotNull()
	{
		return this.resourcegpversion != null;
	}
	public String getResourceGPVersion()
	{
		return this.resourcegpversion;
	}
	public static int getResourceGPVersionMaxLength()
	{
		return 3;
	}
	public void setResourceGPVersion(String value)
	{
		this.isValidated = false;
		this.resourcegpversion = value;
	}
	public boolean getMaritalStatusIsNotNull()
	{
		return this.maritalstatus != null;
	}
	public String getMaritalStatus()
	{
		return this.maritalstatus;
	}
	public static int getMaritalStatusMaxLength()
	{
		return 1;
	}
	public void setMaritalStatus(String value)
	{
		this.isValidated = false;
		this.maritalstatus = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.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.ubrn != null)
			if(this.ubrn.length() > 12)
				listOfErrors.add("The length of the field [ubrn] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 12");
		if(this.pathwayidentifier != null)
			if(this.pathwayidentifier.length() > 20)
				listOfErrors.add("The length of the field [pathwayidentifier] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 20");
		if(this.pathwayorgcode != null)
			if(this.pathwayorgcode.length() > 3)
				listOfErrors.add("The length of the field [pathwayorgcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.referraltotreatmentstatus != null)
			if(this.referraltotreatmentstatus.length() > 2)
				listOfErrors.add("The length of the field [referraltotreatmentstatus] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.leadcareactind != null)
			if(this.leadcareactind.length() > 2)
				listOfErrors.add("The length of the field [leadcareactind] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.localpatientidentifier == null || this.localpatientidentifier.length() == 0)
			listOfErrors.add("LocalPatientIdentifier is mandatory");
		else if(this.localpatientidentifier.length() > 10)
			listOfErrors.add("The length of the field [localpatientidentifier] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 10");
		if(this.patidorgcode != null)
			if(this.patidorgcode.length() > 5)
				listOfErrors.add("The length of the field [patidorgcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 5");
		if(this.nhsnumber != null)
			if(this.nhsnumber.length() > 17)
				listOfErrors.add("The length of the field [nhsnumber] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 17");
		if(this.nhsnumberstatusind != null)
			if(this.nhsnumberstatusind.length() > 2)
				listOfErrors.add("The length of the field [nhsnumberstatusind] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.patientname != null)
			if(this.patientname.length() > 70)
				listOfErrors.add("The length of the field [patientname] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 70");
		if(this.patientaddress != null)
			if(this.patientaddress.length() > 175)
				listOfErrors.add("The length of the field [patientaddress] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 175");
		if(this.postcode != null)
			if(this.postcode.length() > 8)
				listOfErrors.add("The length of the field [postcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 8");
		if(this.pctorgcode != null)
			if(this.pctorgcode.length() > 3)
				listOfErrors.add("The length of the field [pctorgcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.persongender != null)
			if(this.persongender.length() > 1)
				listOfErrors.add("The length of the field [persongender] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.carersupportind != null)
			if(this.carersupportind.length() > 2)
				listOfErrors.add("The length of the field [carersupportind] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.ethniccategory != null)
			if(this.ethniccategory.length() > 2)
				listOfErrors.add("The length of the field [ethniccategory] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.providerspellno != null)
			if(this.providerspellno.length() > 12)
				listOfErrors.add("The length of the field [providerspellno] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 12");
		if(this.admincategoryadt != null)
			if(this.admincategoryadt.length() > 2)
				listOfErrors.add("The length of the field [admincategoryadt] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.patientclassification != null)
			if(this.patientclassification.length() > 1)
				listOfErrors.add("The length of the field [patientclassification] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.admissionmethod != null)
			if(this.admissionmethod.length() > 2)
				listOfErrors.add("The length of the field [admissionmethod] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.sourceofadmission != null)
			if(this.sourceofadmission.length() > 2)
				listOfErrors.add("The length of the field [sourceofadmission] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.dischargedestination != null)
			if(this.dischargedestination.length() > 2)
				listOfErrors.add("The length of the field [dischargedestination] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.dischargemethod != null)
			if(this.dischargemethod.length() > 1)
				listOfErrors.add("The length of the field [dischargemethod] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.episodenumber != null)
			if(this.episodenumber.length() > 2)
				listOfErrors.add("The length of the field [episodenumber] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.lastepisodeind != null)
			if(this.lastepisodeind.length() > 1)
				listOfErrors.add("The length of the field [lastepisodeind] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.admincategoryepis != null)
			if(this.admincategoryepis.length() > 2)
				listOfErrors.add("The length of the field [admincategoryepis] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.operationstatus != null)
			if(this.operationstatus.length() > 1)
				listOfErrors.add("The length of the field [operationstatus] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.neonatalcarelevel != null)
			if(this.neonatalcarelevel.length() > 1)
				listOfErrors.add("The length of the field [neonatalcarelevel] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.firstadmission != null)
			if(this.firstadmission.length() > 1)
				listOfErrors.add("The length of the field [firstadmission] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.psychpatientstatus != null)
			if(this.psychpatientstatus.length() > 1)
				listOfErrors.add("The length of the field [psychpatientstatus] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.legalstatus != null)
			if(this.legalstatus.length() > 2)
				listOfErrors.add("The length of the field [legalstatus] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.serialnumber != null)
			if(this.serialnumber.length() > 6)
				listOfErrors.add("The length of the field [serialnumber] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 6");
		if(this.nhsserviceagreenum != null)
			if(this.nhsserviceagreenum.length() > 10)
				listOfErrors.add("The length of the field [nhsserviceagreenum] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 10");
		if(this.providerrefnum != null)
			if(this.providerrefnum.length() > 17)
				listOfErrors.add("The length of the field [providerrefnum] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 17");
		if(this.commissionerrefnum != null)
			if(this.commissionerrefnum.length() > 17)
				listOfErrors.add("The length of the field [commissionerrefnum] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 17");
		if(this.orgcodeprovider != null)
			if(this.orgcodeprovider.length() > 5)
				listOfErrors.add("The length of the field [orgcodeprovider] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 5");
		if(this.orgcodecommissioner != null)
			if(this.orgcodecommissioner.length() > 5)
				listOfErrors.add("The length of the field [orgcodecommissioner] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 5");
		if(this.consultantcode != null)
			if(this.consultantcode.length() > 8)
				listOfErrors.add("The length of the field [consultantcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 8");
		if(this.specialtycode != null)
			if(this.specialtycode.length() > 3)
				listOfErrors.add("The length of the field [specialtycode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.treatmentfunccode != null)
			if(this.treatmentfunccode.length() > 3)
				listOfErrors.add("The length of the field [treatmentfunccode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.ccunitbedconfiguration != null)
			if(this.ccunitbedconfiguration.length() > 2)
				listOfErrors.add("The length of the field [ccunitbedconfiguration] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.ccadmissionsource != null)
			if(this.ccadmissionsource.length() > 2)
				listOfErrors.add("The length of the field [ccadmissionsource] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.ccsourcelocation != null)
			if(this.ccsourcelocation.length() > 2)
				listOfErrors.add("The length of the field [ccsourcelocation] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.ccadmissiontype != null)
			if(this.ccadmissiontype.length() > 2)
				listOfErrors.add("The length of the field [ccadmissiontype] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.advrespiratorysupdays != null)
			if(this.advrespiratorysupdays.length() > 3)
				listOfErrors.add("The length of the field [advrespiratorysupdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.bscrespiratorysupdays != null)
			if(this.bscrespiratorysupdays.length() > 3)
				listOfErrors.add("The length of the field [bscrespiratorysupdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.advcardiosupdays != null)
			if(this.advcardiosupdays.length() > 3)
				listOfErrors.add("The length of the field [advcardiosupdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.bsccardiosupdays != null)
			if(this.bsccardiosupdays.length() > 3)
				listOfErrors.add("The length of the field [bsccardiosupdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.renalsupportdays != null)
			if(this.renalsupportdays.length() > 3)
				listOfErrors.add("The length of the field [renalsupportdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.neurosupportdays != null)
			if(this.neurosupportdays.length() > 3)
				listOfErrors.add("The length of the field [neurosupportdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.gastrosupportdays != null)
			if(this.gastrosupportdays.length() > 3)
				listOfErrors.add("The length of the field [gastrosupportdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.dermasupportdays != null)
			if(this.dermasupportdays.length() > 3)
				listOfErrors.add("The length of the field [dermasupportdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.liversupportdays != null)
			if(this.liversupportdays.length() > 3)
				listOfErrors.add("The length of the field [liversupportdays] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.organsupportmax != null)
			if(this.organsupportmax.length() > 2)
				listOfErrors.add("The length of the field [organsupportmax] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.cclevel2days != null)
			if(this.cclevel2days.length() > 3)
				listOfErrors.add("The length of the field [cclevel2days] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.cclevel3days != null)
			if(this.cclevel3days.length() > 3)
				listOfErrors.add("The length of the field [cclevel3days] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.ccdischargestatus != null)
			if(this.ccdischargestatus.length() > 2)
				listOfErrors.add("The length of the field [ccdischargestatus] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.ccdischargedest != null)
			if(this.ccdischargedest.length() > 2)
				listOfErrors.add("The length of the field [ccdischargedest] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.ccdischargelocation != null)
			if(this.ccdischargelocation.length() > 2)
				listOfErrors.add("The length of the field [ccdischargelocation] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.gpcode != null)
			if(this.gpcode.length() > 8)
				listOfErrors.add("The length of the field [gpcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 8");
		if(this.practicecode != null)
			if(this.practicecode.length() > 6)
				listOfErrors.add("The length of the field [practicecode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 6");
		if(this.referrercode != null)
			if(this.referrercode.length() > 8)
				listOfErrors.add("The length of the field [referrercode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 8");
		if(this.orgcodereferrer != null)
			if(this.orgcodereferrer.length() > 6)
				listOfErrors.add("The length of the field [orgcodereferrer] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 6");
		if(this.durelectivewait != null)
			if(this.durelectivewait.length() > 4)
				listOfErrors.add("The length of the field [durelectivewait] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 4");
		if(this.intendedmanagement != null)
			if(this.intendedmanagement.length() > 1)
				listOfErrors.add("The length of the field [intendedmanagement] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		if(this.resourcegrpcode != null)
			if(this.resourcegrpcode.length() > 3)
				listOfErrors.add("The length of the field [resourcegrpcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.procedurescheme != null)
			if(this.procedurescheme.length() > 2)
				listOfErrors.add("The length of the field [procedurescheme] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 2");
		if(this.hrgdominantgrouping != null)
			if(this.hrgdominantgrouping.length() > 4)
				listOfErrors.add("The length of the field [hrgdominantgrouping] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 4");
		if(this.cdsapplicabledate == null)
			listOfErrors.add("CDSApplicableDate is mandatory");
		if(this.cdssenderorgcode == null || this.cdssenderorgcode.length() == 0)
			listOfErrors.add("CDSSenderOrgCode is mandatory");
		else if(this.cdssenderorgcode.length() > 5)
			listOfErrors.add("The length of the field [cdssenderorgcode] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 5");
		if(this.resourcegpversion != null)
			if(this.resourcegpversion.length() > 3)
				listOfErrors.add("The length of the field [resourcegpversion] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 3");
		if(this.maritalstatus != null)
			if(this.maritalstatus.length() > 1)
				listOfErrors.add("The length of the field [maritalstatus] in the value object [ims.core.vo.CDSInpatientVo] is too big. It should be less or equal to 1");
		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;
	
		CDSInpatientVo clone = new CDSInpatientVo(this.id, this.version);
		
		clone.ubrn = this.ubrn;
		clone.pathwayidentifier = this.pathwayidentifier;
		clone.pathwayorgcode = this.pathwayorgcode;
		clone.referraltotreatmentstatus = this.referraltotreatmentstatus;
		if(this.rttstartdate == null)
			clone.rttstartdate = null;
		else
			clone.rttstartdate = (ims.framework.utils.Date)this.rttstartdate.clone();
		if(this.rttenddate == null)
			clone.rttenddate = null;
		else
			clone.rttenddate = (ims.framework.utils.Date)this.rttenddate.clone();
		clone.leadcareactind = this.leadcareactind;
		clone.localpatientidentifier = this.localpatientidentifier;
		clone.patidorgcode = this.patidorgcode;
		clone.nhsnumber = this.nhsnumber;
		clone.nhsnumberstatusind = this.nhsnumberstatusind;
		clone.patientname = this.patientname;
		clone.patientaddress = this.patientaddress;
		clone.postcode = this.postcode;
		clone.pctorgcode = this.pctorgcode;
		if(this.dateofbirth == null)
			clone.dateofbirth = null;
		else
			clone.dateofbirth = (ims.framework.utils.Date)this.dateofbirth.clone();
		clone.persongender = this.persongender;
		clone.carersupportind = this.carersupportind;
		clone.ethniccategory = this.ethniccategory;
		clone.providerspellno = this.providerspellno;
		clone.admincategoryadt = this.admincategoryadt;
		clone.patientclassification = this.patientclassification;
		clone.admissionmethod = this.admissionmethod;
		clone.sourceofadmission = this.sourceofadmission;
		if(this.startdate == null)
			clone.startdate = null;
		else
			clone.startdate = (ims.framework.utils.Date)this.startdate.clone();
		clone.age = this.age;
		clone.dischargedestination = this.dischargedestination;
		clone.dischargemethod = this.dischargemethod;
		if(this.dischargereadydate == null)
			clone.dischargereadydate = null;
		else
			clone.dischargereadydate = (ims.framework.utils.Date)this.dischargereadydate.clone();
		if(this.dischargedate == null)
			clone.dischargedate = null;
		else
			clone.dischargedate = (ims.framework.utils.Date)this.dischargedate.clone();
		clone.episodenumber = this.episodenumber;
		clone.lastepisodeind = this.lastepisodeind;
		clone.admincategoryepis = this.admincategoryepis;
		clone.operationstatus = this.operationstatus;
		clone.neonatalcarelevel = this.neonatalcarelevel;
		clone.firstadmission = this.firstadmission;
		clone.psychpatientstatus = this.psychpatientstatus;
		clone.legalstatus = this.legalstatus;
		if(this.episodestartdate == null)
			clone.episodestartdate = null;
		else
			clone.episodestartdate = (ims.framework.utils.Date)this.episodestartdate.clone();
		if(this.episodeenddate == null)
			clone.episodeenddate = null;
		else
			clone.episodeenddate = (ims.framework.utils.Date)this.episodeenddate.clone();
		clone.ageatcdsactivity = this.ageatcdsactivity;
		clone.serialnumber = this.serialnumber;
		clone.nhsserviceagreenum = this.nhsserviceagreenum;
		clone.providerrefnum = this.providerrefnum;
		clone.commissionerrefnum = this.commissionerrefnum;
		clone.orgcodeprovider = this.orgcodeprovider;
		clone.orgcodecommissioner = this.orgcodecommissioner;
		clone.consultantcode = this.consultantcode;
		clone.specialtycode = this.specialtycode;
		clone.treatmentfunccode = this.treatmentfunccode;
		if(this.icddiagnosisgroup == null)
			clone.icddiagnosisgroup = null;
		else
			clone.icddiagnosisgroup = (ims.core.vo.CDSDiagnosisDetailsVoCollection)this.icddiagnosisgroup.clone();
		clone.readdiaggroup = this.readdiaggroup;
		clone.opcsproceduregroup = this.opcsproceduregroup;
		clone.readproceduregroup = this.readproceduregroup;
		if(this.locationgroupstartepis == null)
			clone.locationgroupstartepis = null;
		else
			clone.locationgroupstartepis = (ims.core.vo.CDSInpatientLocationGroupVo)this.locationgroupstartepis.clone();
		clone.locationgroupwardstay = this.locationgroupwardstay;
		clone.locationgroupendepis = this.locationgroupendepis;
		if(this.neonatalcare == null)
			clone.neonatalcare = null;
		else
			clone.neonatalcare = (ims.core.vo.CDSCriticalCareVo)this.neonatalcare.clone();
		clone.paediatriccare = this.paediatriccare;
		clone.adultcare = this.adultcare;
		clone.ccunitbedconfiguration = this.ccunitbedconfiguration;
		clone.ccadmissionsource = this.ccadmissionsource;
		clone.ccsourcelocation = this.ccsourcelocation;
		clone.ccadmissiontype = this.ccadmissiontype;
		clone.advrespiratorysupdays = this.advrespiratorysupdays;
		clone.bscrespiratorysupdays = this.bscrespiratorysupdays;
		clone.advcardiosupdays = this.advcardiosupdays;
		clone.bsccardiosupdays = this.bsccardiosupdays;
		clone.renalsupportdays = this.renalsupportdays;
		clone.neurosupportdays = this.neurosupportdays;
		clone.gastrosupportdays = this.gastrosupportdays;
		clone.dermasupportdays = this.dermasupportdays;
		clone.liversupportdays = this.liversupportdays;
		clone.organsupportmax = this.organsupportmax;
		clone.cclevel2days = this.cclevel2days;
		clone.cclevel3days = this.cclevel3days;
		if(this.ccdischargedate == null)
			clone.ccdischargedate = null;
		else
			clone.ccdischargedate = (ims.framework.utils.Date)this.ccdischargedate.clone();
		if(this.ccdischargetime == null)
			clone.ccdischargetime = null;
		else
			clone.ccdischargetime = (ims.framework.utils.Time)this.ccdischargetime.clone();
		if(this.ccdischargereadydate == null)
			clone.ccdischargereadydate = null;
		else
			clone.ccdischargereadydate = (ims.framework.utils.Date)this.ccdischargereadydate.clone();
		if(this.ccdischargereadytime == null)
			clone.ccdischargereadytime = null;
		else
			clone.ccdischargereadytime = (ims.framework.utils.Time)this.ccdischargereadytime.clone();
		clone.ccdischargestatus = this.ccdischargestatus;
		clone.ccdischargedest = this.ccdischargedest;
		clone.ccdischargelocation = this.ccdischargelocation;
		clone.gpcode = this.gpcode;
		clone.practicecode = this.practicecode;
		clone.referrercode = this.referrercode;
		clone.orgcodereferrer = this.orgcodereferrer;
		clone.durelectivewait = this.durelectivewait;
		clone.intendedmanagement = this.intendedmanagement;
		if(this.decidedtoadmitdate == null)
			clone.decidedtoadmitdate = null;
		else
			clone.decidedtoadmitdate = (ims.framework.utils.Date)this.decidedtoadmitdate.clone();
		if(this.erodate == null)
			clone.erodate = null;
		else
			clone.erodate = (ims.framework.utils.Date)this.erodate.clone();
		clone.resourcegrpcode = this.resourcegrpcode;
		clone.procedurescheme = this.procedurescheme;
		clone.hrgdominantgrouping = this.hrgdominantgrouping;
		if(this.cdsapplicabledate == null)
			clone.cdsapplicabledate = null;
		else
			clone.cdsapplicabledate = (ims.framework.utils.DateTime)this.cdsapplicabledate.clone();
		clone.cdssenderorgcode = this.cdssenderorgcode;
		clone.resourcegpversion = this.resourcegpversion;
		clone.maritalstatus = this.maritalstatus;
		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 (!(CDSInpatientVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A CDSInpatientVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((CDSInpatientVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((CDSInpatientVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.ubrn != null)
			count++;
		if(this.pathwayidentifier != null)
			count++;
		if(this.pathwayorgcode != null)
			count++;
		if(this.referraltotreatmentstatus != null)
			count++;
		if(this.rttstartdate != null)
			count++;
		if(this.rttenddate != null)
			count++;
		if(this.leadcareactind != null)
			count++;
		if(this.localpatientidentifier != null)
			count++;
		if(this.patidorgcode != null)
			count++;
		if(this.nhsnumber != null)
			count++;
		if(this.nhsnumberstatusind != null)
			count++;
		if(this.patientname != null)
			count++;
		if(this.patientaddress != null)
			count++;
		if(this.postcode != null)
			count++;
		if(this.pctorgcode != null)
			count++;
		if(this.dateofbirth != null)
			count++;
		if(this.persongender != null)
			count++;
		if(this.carersupportind != null)
			count++;
		if(this.ethniccategory != null)
			count++;
		if(this.providerspellno != null)
			count++;
		if(this.admincategoryadt != null)
			count++;
		if(this.patientclassification != null)
			count++;
		if(this.admissionmethod != null)
			count++;
		if(this.sourceofadmission != null)
			count++;
		if(this.startdate != null)
			count++;
		if(this.age != null)
			count++;
		if(this.dischargedestination != null)
			count++;
		if(this.dischargemethod != null)
			count++;
		if(this.dischargereadydate != null)
			count++;
		if(this.dischargedate != null)
			count++;
		if(this.episodenumber != null)
			count++;
		if(this.lastepisodeind != null)
			count++;
		if(this.admincategoryepis != null)
			count++;
		if(this.operationstatus != null)
			count++;
		if(this.neonatalcarelevel != null)
			count++;
		if(this.firstadmission != null)
			count++;
		if(this.psychpatientstatus != null)
			count++;
		if(this.legalstatus != null)
			count++;
		if(this.episodestartdate != null)
			count++;
		if(this.episodeenddate != null)
			count++;
		if(this.ageatcdsactivity != null)
			count++;
		if(this.serialnumber != null)
			count++;
		if(this.nhsserviceagreenum != null)
			count++;
		if(this.providerrefnum != null)
			count++;
		if(this.commissionerrefnum != null)
			count++;
		if(this.orgcodeprovider != null)
			count++;
		if(this.orgcodecommissioner != null)
			count++;
		if(this.consultantcode != null)
			count++;
		if(this.specialtycode != null)
			count++;
		if(this.treatmentfunccode != null)
			count++;
		if(this.icddiagnosisgroup != null)
			count++;
		if(this.readdiaggroup != null)
			count++;
		if(this.opcsproceduregroup != null)
			count++;
		if(this.readproceduregroup != null)
			count++;
		if(this.locationgroupstartepis != null)
			count++;
		if(this.locationgroupwardstay != null)
			count++;
		if(this.locationgroupendepis != null)
			count++;
		if(this.neonatalcare != null)
			count++;
		if(this.paediatriccare != null)
			count++;
		if(this.adultcare != null)
			count++;
		if(this.ccunitbedconfiguration != null)
			count++;
		if(this.ccadmissionsource != null)
			count++;
		if(this.ccsourcelocation != null)
			count++;
		if(this.ccadmissiontype != null)
			count++;
		if(this.advrespiratorysupdays != null)
			count++;
		if(this.bscrespiratorysupdays != null)
			count++;
		if(this.advcardiosupdays != null)
			count++;
		if(this.bsccardiosupdays != null)
			count++;
		if(this.renalsupportdays != null)
			count++;
		if(this.neurosupportdays != null)
			count++;
		if(this.gastrosupportdays != null)
			count++;
		if(this.dermasupportdays != null)
			count++;
		if(this.liversupportdays != null)
			count++;
		if(this.organsupportmax != null)
			count++;
		if(this.cclevel2days != null)
			count++;
		if(this.cclevel3days != null)
			count++;
		if(this.ccdischargedate != null)
			count++;
		if(this.ccdischargetime != null)
			count++;
		if(this.ccdischargereadydate != null)
			count++;
		if(this.ccdischargereadytime != null)
			count++;
		if(this.ccdischargestatus != null)
			count++;
		if(this.ccdischargedest != null)
			count++;
		if(this.ccdischargelocation != null)
			count++;
		if(this.gpcode != null)
			count++;
		if(this.practicecode != null)
			count++;
		if(this.referrercode != null)
			count++;
		if(this.orgcodereferrer != null)
			count++;
		if(this.durelectivewait != null)
			count++;
		if(this.intendedmanagement != null)
			count++;
		if(this.decidedtoadmitdate != null)
			count++;
		if(this.erodate != null)
			count++;
		if(this.resourcegrpcode != null)
			count++;
		if(this.procedurescheme != null)
			count++;
		if(this.hrgdominantgrouping != null)
			count++;
		if(this.cdsapplicabledate != null)
			count++;
		if(this.cdssenderorgcode != null)
			count++;
		if(this.resourcegpversion != null)
			count++;
		if(this.maritalstatus != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 98;
	}
	protected String ubrn;
	protected String pathwayidentifier;
	protected String pathwayorgcode;
	protected String referraltotreatmentstatus;
	protected ims.framework.utils.Date rttstartdate;
	protected ims.framework.utils.Date rttenddate;
	protected String leadcareactind;
	protected String localpatientidentifier;
	protected String patidorgcode;
	protected String nhsnumber;
	protected String nhsnumberstatusind;
	protected String patientname;
	protected String patientaddress;
	protected String postcode;
	protected String pctorgcode;
	protected ims.framework.utils.Date dateofbirth;
	protected String persongender;
	protected String carersupportind;
	protected String ethniccategory;
	protected String providerspellno;
	protected String admincategoryadt;
	protected String patientclassification;
	protected String admissionmethod;
	protected String sourceofadmission;
	protected ims.framework.utils.Date startdate;
	protected Integer age;
	protected String dischargedestination;
	protected String dischargemethod;
	protected ims.framework.utils.Date dischargereadydate;
	protected ims.framework.utils.Date dischargedate;
	protected String episodenumber;
	protected String lastepisodeind;
	protected String admincategoryepis;
	protected String operationstatus;
	protected String neonatalcarelevel;
	protected String firstadmission;
	protected String psychpatientstatus;
	protected String legalstatus;
	protected ims.framework.utils.Date episodestartdate;
	protected ims.framework.utils.Date episodeenddate;
	protected Integer ageatcdsactivity;
	protected String serialnumber;
	protected String nhsserviceagreenum;
	protected String providerrefnum;
	protected String commissionerrefnum;
	protected String orgcodeprovider;
	protected String orgcodecommissioner;
	protected String consultantcode;
	protected String specialtycode;
	protected String treatmentfunccode;
	protected ims.core.vo.CDSDiagnosisDetailsVoCollection icddiagnosisgroup;
	protected ims.core.cds.vo.CDSDiagnosisDetailsRefVo readdiaggroup;
	protected ims.core.cds.vo.CDSProcedureDetailsRefVoCollection opcsproceduregroup;
	protected ims.core.cds.vo.CDSProcedureDetailsRefVo readproceduregroup;
	protected ims.core.vo.CDSInpatientLocationGroupVo locationgroupstartepis;
	protected ims.core.cds.vo.CDSInpatientLocationGroupRefVoCollection locationgroupwardstay;
	protected ims.core.cds.vo.CDSInpatientLocationGroupRefVo locationgroupendepis;
	protected ims.core.vo.CDSCriticalCareVo neonatalcare;
	protected ims.core.cds.vo.CDSCriticalCareDetailsRefVo paediatriccare;
	protected ims.core.cds.vo.CDSCriticalCareDetailsRefVo adultcare;
	protected String ccunitbedconfiguration;
	protected String ccadmissionsource;
	protected String ccsourcelocation;
	protected String ccadmissiontype;
	protected String advrespiratorysupdays;
	protected String bscrespiratorysupdays;
	protected String advcardiosupdays;
	protected String bsccardiosupdays;
	protected String renalsupportdays;
	protected String neurosupportdays;
	protected String gastrosupportdays;
	protected String dermasupportdays;
	protected String liversupportdays;
	protected String organsupportmax;
	protected String cclevel2days;
	protected String cclevel3days;
	protected ims.framework.utils.Date ccdischargedate;
	protected ims.framework.utils.Time ccdischargetime;
	protected ims.framework.utils.Date ccdischargereadydate;
	protected ims.framework.utils.Time ccdischargereadytime;
	protected String ccdischargestatus;
	protected String ccdischargedest;
	protected String ccdischargelocation;
	protected String gpcode;
	protected String practicecode;
	protected String referrercode;
	protected String orgcodereferrer;
	protected String durelectivewait;
	protected String intendedmanagement;
	protected ims.framework.utils.Date decidedtoadmitdate;
	protected ims.framework.utils.Date erodate;
	protected String resourcegrpcode;
	protected String procedurescheme;
	protected String hrgdominantgrouping;
	protected ims.framework.utils.DateTime cdsapplicabledate;
	protected String cdssenderorgcode;
	protected String resourcegpversion;
	protected String maritalstatus;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
