/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/PDSPatientUpdateVo.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.patient.PDSPatientUpdate business object (ID: 1001100024).
 */
public class PDSPatientUpdateVo extends ims.core.patient.vo.PDSPatientUpdateRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public PDSPatientUpdateVo()
	{
	}
	public PDSPatientUpdateVo(Integer id, int version)
	{
		super(id, version);
	}
	public PDSPatientUpdateVo(ims.core.vo.beans.PDSPatientUpdateVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.administrativegendercode = bean.getAdministrativeGenderCode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getAdministrativeGenderCode());
		this.birthtime = bean.getBirthTime() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getBirthTime());
		this.deceasedtime = bean.getDeceasedTime() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDeceasedTime());
		this.languagecodeupdatemode = bean.getLanguageCodeUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getLanguageCodeUpdateMode());
		this.proficiencylevelcodeupdatemode = bean.getProficiencyLevelCodeUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getProficiencyLevelCodeUpdateMode());
		this.preferredcontactmethodupdatemode = bean.getPreferredContactMethodUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getPreferredContactMethodUpdateMode());
		this.preferredcontacttimesupdatemode = bean.getPreferredContactTimesUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getPreferredContactTimesUpdateMode());
		this.callcentrecallbackconsentupdatemode = bean.getCallCentreCallBackConsentUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getCallCentreCallBackConsentUpdateMode());
		this.nokrelationshipupdatemode = bean.getNokRelationshipUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokRelationshipUpdateMode());
		this.nokeffectivedatesupdatemode = bean.getNokEffectiveDatesUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokEffectiveDatesUpdateMode());
		this.nokcontactrankupdatemode = bean.getNokContactRankUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokContactRankUpdateMode());
		this.nokupdatemode = bean.getNokUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokUpdateMode());
		this.noklanguagecommunicationupdatemode = bean.getNokLanguageCommunicationUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokLanguageCommunicationUpdateMode());
		this.commchannels = ims.core.vo.PDSCommChannelRemovedVoCollection.buildFromBeanCollection(bean.getCommChannels());
		this.address = ims.core.vo.PDSAddrVoCollection.buildFromBeanCollection(bean.getAddress());
		this.names = ims.core.vo.PDSNamesRemovedVoCollection.buildFromBeanCollection(bean.getNames());
		this.nokaddress = bean.getNokAddress() == null ? null : bean.getNokAddress().buildVo();
		this.nokcommchannels = ims.core.vo.PDSCommChannelRemovedVoCollection.buildFromBeanCollection(bean.getNokCommChannels());
		this.pdsupdaterequest = bean.getPDSUpdateRequest() == null ? null : bean.getPDSUpdateRequest().buildVo();
		this.relatives = ims.core.vo.PDSRelativeRemoveVoCollection.buildFromBeanCollection(bean.getRelatives());
		this.genderupdatemode = bean.getGenderUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getGenderUpdateMode());
		this.dateofbirthupdatemode = bean.getDateOfBirthUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDateOfBirthUpdateMode());
		this.dateofdeathupdatemode = bean.getDateOfDeathUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDateOfDeathUpdateMode());
		this.consentupdatemode = bean.getConsentUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getConsentUpdateMode());
		this.preferredwrittencommformatupdatemode = bean.getPreferredWrittenCommFormatUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getPreferredWrittenCommFormatUpdateMode());
		this.deathnotificationupdatemode = bean.getDeathNotificationUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDeathNotificationUpdateMode());
		this.scn = bean.getSCN();
		this.patient = bean.getPatient() == null ? null : new ims.core.patient.vo.PatientRefVo(new Integer(bean.getPatient().getId()), bean.getPatient().getVersion());
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.core.vo.beans.PDSPatientUpdateVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.administrativegendercode = bean.getAdministrativeGenderCode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getAdministrativeGenderCode());
		this.birthtime = bean.getBirthTime() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getBirthTime());
		this.deceasedtime = bean.getDeceasedTime() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDeceasedTime());
		this.languagecodeupdatemode = bean.getLanguageCodeUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getLanguageCodeUpdateMode());
		this.proficiencylevelcodeupdatemode = bean.getProficiencyLevelCodeUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getProficiencyLevelCodeUpdateMode());
		this.preferredcontactmethodupdatemode = bean.getPreferredContactMethodUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getPreferredContactMethodUpdateMode());
		this.preferredcontacttimesupdatemode = bean.getPreferredContactTimesUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getPreferredContactTimesUpdateMode());
		this.callcentrecallbackconsentupdatemode = bean.getCallCentreCallBackConsentUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getCallCentreCallBackConsentUpdateMode());
		this.nokrelationshipupdatemode = bean.getNokRelationshipUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokRelationshipUpdateMode());
		this.nokeffectivedatesupdatemode = bean.getNokEffectiveDatesUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokEffectiveDatesUpdateMode());
		this.nokcontactrankupdatemode = bean.getNokContactRankUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokContactRankUpdateMode());
		this.nokupdatemode = bean.getNokUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokUpdateMode());
		this.noklanguagecommunicationupdatemode = bean.getNokLanguageCommunicationUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getNokLanguageCommunicationUpdateMode());
		this.commchannels = ims.core.vo.PDSCommChannelRemovedVoCollection.buildFromBeanCollection(bean.getCommChannels());
		this.address = ims.core.vo.PDSAddrVoCollection.buildFromBeanCollection(bean.getAddress());
		this.names = ims.core.vo.PDSNamesRemovedVoCollection.buildFromBeanCollection(bean.getNames());
		this.nokaddress = bean.getNokAddress() == null ? null : bean.getNokAddress().buildVo(map);
		this.nokcommchannels = ims.core.vo.PDSCommChannelRemovedVoCollection.buildFromBeanCollection(bean.getNokCommChannels());
		this.pdsupdaterequest = bean.getPDSUpdateRequest() == null ? null : bean.getPDSUpdateRequest().buildVo(map);
		this.relatives = ims.core.vo.PDSRelativeRemoveVoCollection.buildFromBeanCollection(bean.getRelatives());
		this.genderupdatemode = bean.getGenderUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getGenderUpdateMode());
		this.dateofbirthupdatemode = bean.getDateOfBirthUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDateOfBirthUpdateMode());
		this.dateofdeathupdatemode = bean.getDateOfDeathUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDateOfDeathUpdateMode());
		this.consentupdatemode = bean.getConsentUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getConsentUpdateMode());
		this.preferredwrittencommformatupdatemode = bean.getPreferredWrittenCommFormatUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getPreferredWrittenCommFormatUpdateMode());
		this.deathnotificationupdatemode = bean.getDeathNotificationUpdateMode() == null ? null : ims.core.vo.lookups.PDSUpdateMode.buildLookup(bean.getDeathNotificationUpdateMode());
		this.scn = bean.getSCN();
		this.patient = bean.getPatient() == null ? null : new ims.core.patient.vo.PatientRefVo(new Integer(bean.getPatient().getId()), bean.getPatient().getVersion());
	}
	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.PDSPatientUpdateVoBean bean = null;
		if(map != null)
			bean = (ims.core.vo.beans.PDSPatientUpdateVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.core.vo.beans.PDSPatientUpdateVoBean();
			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("ADMINISTRATIVEGENDERCODE"))
			return getAdministrativeGenderCode();
		if(fieldName.equals("BIRTHTIME"))
			return getBirthTime();
		if(fieldName.equals("DECEASEDTIME"))
			return getDeceasedTime();
		if(fieldName.equals("LANGUAGECODEUPDATEMODE"))
			return getLanguageCodeUpdateMode();
		if(fieldName.equals("PROFICIENCYLEVELCODEUPDATEMODE"))
			return getProficiencyLevelCodeUpdateMode();
		if(fieldName.equals("PREFERREDCONTACTMETHODUPDATEMODE"))
			return getPreferredContactMethodUpdateMode();
		if(fieldName.equals("PREFERREDCONTACTTIMESUPDATEMODE"))
			return getPreferredContactTimesUpdateMode();
		if(fieldName.equals("CALLCENTRECALLBACKCONSENTUPDATEMODE"))
			return getCallCentreCallBackConsentUpdateMode();
		if(fieldName.equals("NOKRELATIONSHIPUPDATEMODE"))
			return getNokRelationshipUpdateMode();
		if(fieldName.equals("NOKEFFECTIVEDATESUPDATEMODE"))
			return getNokEffectiveDatesUpdateMode();
		if(fieldName.equals("NOKCONTACTRANKUPDATEMODE"))
			return getNokContactRankUpdateMode();
		if(fieldName.equals("NOKUPDATEMODE"))
			return getNokUpdateMode();
		if(fieldName.equals("NOKLANGUAGECOMMUNICATIONUPDATEMODE"))
			return getNokLanguageCommunicationUpdateMode();
		if(fieldName.equals("COMMCHANNELS"))
			return getCommChannels();
		if(fieldName.equals("ADDRESS"))
			return getAddress();
		if(fieldName.equals("NAMES"))
			return getNames();
		if(fieldName.equals("NOKADDRESS"))
			return getNokAddress();
		if(fieldName.equals("NOKCOMMCHANNELS"))
			return getNokCommChannels();
		if(fieldName.equals("PDSUPDATEREQUEST"))
			return getPDSUpdateRequest();
		if(fieldName.equals("RELATIVES"))
			return getRelatives();
		if(fieldName.equals("GENDERUPDATEMODE"))
			return getGenderUpdateMode();
		if(fieldName.equals("DATEOFBIRTHUPDATEMODE"))
			return getDateOfBirthUpdateMode();
		if(fieldName.equals("DATEOFDEATHUPDATEMODE"))
			return getDateOfDeathUpdateMode();
		if(fieldName.equals("CONSENTUPDATEMODE"))
			return getConsentUpdateMode();
		if(fieldName.equals("PREFERREDWRITTENCOMMFORMATUPDATEMODE"))
			return getPreferredWrittenCommFormatUpdateMode();
		if(fieldName.equals("DEATHNOTIFICATIONUPDATEMODE"))
			return getDeathNotificationUpdateMode();
		if(fieldName.equals("SCN"))
			return getSCN();
		if(fieldName.equals("PATIENT"))
			return getPatient();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getAdministrativeGenderCodeIsNotNull()
	{
		return this.administrativegendercode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getAdministrativeGenderCode()
	{
		return this.administrativegendercode;
	}
	public void setAdministrativeGenderCode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.administrativegendercode = value;
	}
	public boolean getBirthTimeIsNotNull()
	{
		return this.birthtime != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getBirthTime()
	{
		return this.birthtime;
	}
	public void setBirthTime(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.birthtime = value;
	}
	public boolean getDeceasedTimeIsNotNull()
	{
		return this.deceasedtime != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getDeceasedTime()
	{
		return this.deceasedtime;
	}
	public void setDeceasedTime(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.deceasedtime = value;
	}
	public boolean getLanguageCodeUpdateModeIsNotNull()
	{
		return this.languagecodeupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getLanguageCodeUpdateMode()
	{
		return this.languagecodeupdatemode;
	}
	public void setLanguageCodeUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.languagecodeupdatemode = value;
	}
	public boolean getProficiencyLevelCodeUpdateModeIsNotNull()
	{
		return this.proficiencylevelcodeupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getProficiencyLevelCodeUpdateMode()
	{
		return this.proficiencylevelcodeupdatemode;
	}
	public void setProficiencyLevelCodeUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.proficiencylevelcodeupdatemode = value;
	}
	public boolean getPreferredContactMethodUpdateModeIsNotNull()
	{
		return this.preferredcontactmethodupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getPreferredContactMethodUpdateMode()
	{
		return this.preferredcontactmethodupdatemode;
	}
	public void setPreferredContactMethodUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.preferredcontactmethodupdatemode = value;
	}
	public boolean getPreferredContactTimesUpdateModeIsNotNull()
	{
		return this.preferredcontacttimesupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getPreferredContactTimesUpdateMode()
	{
		return this.preferredcontacttimesupdatemode;
	}
	public void setPreferredContactTimesUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.preferredcontacttimesupdatemode = value;
	}
	public boolean getCallCentreCallBackConsentUpdateModeIsNotNull()
	{
		return this.callcentrecallbackconsentupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getCallCentreCallBackConsentUpdateMode()
	{
		return this.callcentrecallbackconsentupdatemode;
	}
	public void setCallCentreCallBackConsentUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.callcentrecallbackconsentupdatemode = value;
	}
	public boolean getNokRelationshipUpdateModeIsNotNull()
	{
		return this.nokrelationshipupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getNokRelationshipUpdateMode()
	{
		return this.nokrelationshipupdatemode;
	}
	public void setNokRelationshipUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.nokrelationshipupdatemode = value;
	}
	public boolean getNokEffectiveDatesUpdateModeIsNotNull()
	{
		return this.nokeffectivedatesupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getNokEffectiveDatesUpdateMode()
	{
		return this.nokeffectivedatesupdatemode;
	}
	public void setNokEffectiveDatesUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.nokeffectivedatesupdatemode = value;
	}
	public boolean getNokContactRankUpdateModeIsNotNull()
	{
		return this.nokcontactrankupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getNokContactRankUpdateMode()
	{
		return this.nokcontactrankupdatemode;
	}
	public void setNokContactRankUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.nokcontactrankupdatemode = value;
	}
	public boolean getNokUpdateModeIsNotNull()
	{
		return this.nokupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getNokUpdateMode()
	{
		return this.nokupdatemode;
	}
	public void setNokUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.nokupdatemode = value;
	}
	public boolean getNokLanguageCommunicationUpdateModeIsNotNull()
	{
		return this.noklanguagecommunicationupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getNokLanguageCommunicationUpdateMode()
	{
		return this.noklanguagecommunicationupdatemode;
	}
	public void setNokLanguageCommunicationUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.noklanguagecommunicationupdatemode = value;
	}
	public boolean getCommChannelsIsNotNull()
	{
		return this.commchannels != null;
	}
	public ims.core.vo.PDSCommChannelRemovedVoCollection getCommChannels()
	{
		return this.commchannels;
	}
	public void setCommChannels(ims.core.vo.PDSCommChannelRemovedVoCollection value)
	{
		this.isValidated = false;
		this.commchannels = value;
	}
	public boolean getAddressIsNotNull()
	{
		return this.address != null;
	}
	public ims.core.vo.PDSAddrVoCollection getAddress()
	{
		return this.address;
	}
	public void setAddress(ims.core.vo.PDSAddrVoCollection value)
	{
		this.isValidated = false;
		this.address = value;
	}
	public boolean getNamesIsNotNull()
	{
		return this.names != null;
	}
	public ims.core.vo.PDSNamesRemovedVoCollection getNames()
	{
		return this.names;
	}
	public void setNames(ims.core.vo.PDSNamesRemovedVoCollection value)
	{
		this.isValidated = false;
		this.names = value;
	}
	public boolean getNokAddressIsNotNull()
	{
		return this.nokaddress != null;
	}
	public ims.core.vo.PDSAddrVo getNokAddress()
	{
		return this.nokaddress;
	}
	public void setNokAddress(ims.core.vo.PDSAddrVo value)
	{
		this.isValidated = false;
		this.nokaddress = value;
	}
	public boolean getNokCommChannelsIsNotNull()
	{
		return this.nokcommchannels != null;
	}
	public ims.core.vo.PDSCommChannelRemovedVoCollection getNokCommChannels()
	{
		return this.nokcommchannels;
	}
	public void setNokCommChannels(ims.core.vo.PDSCommChannelRemovedVoCollection value)
	{
		this.isValidated = false;
		this.nokcommchannels = value;
	}
	public boolean getPDSUpdateRequestIsNotNull()
	{
		return this.pdsupdaterequest != null;
	}
	public ims.core.vo.PDSGeneralUpdateRequestVo getPDSUpdateRequest()
	{
		return this.pdsupdaterequest;
	}
	public void setPDSUpdateRequest(ims.core.vo.PDSGeneralUpdateRequestVo value)
	{
		this.isValidated = false;
		this.pdsupdaterequest = value;
	}
	public boolean getRelativesIsNotNull()
	{
		return this.relatives != null;
	}
	public ims.core.vo.PDSRelativeRemoveVoCollection getRelatives()
	{
		return this.relatives;
	}
	public void setRelatives(ims.core.vo.PDSRelativeRemoveVoCollection value)
	{
		this.isValidated = false;
		this.relatives = value;
	}
	public boolean getGenderUpdateModeIsNotNull()
	{
		return this.genderupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getGenderUpdateMode()
	{
		return this.genderupdatemode;
	}
	public void setGenderUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.genderupdatemode = value;
	}
	public boolean getDateOfBirthUpdateModeIsNotNull()
	{
		return this.dateofbirthupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getDateOfBirthUpdateMode()
	{
		return this.dateofbirthupdatemode;
	}
	public void setDateOfBirthUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.dateofbirthupdatemode = value;
	}
	public boolean getDateOfDeathUpdateModeIsNotNull()
	{
		return this.dateofdeathupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getDateOfDeathUpdateMode()
	{
		return this.dateofdeathupdatemode;
	}
	public void setDateOfDeathUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.dateofdeathupdatemode = value;
	}
	public boolean getConsentUpdateModeIsNotNull()
	{
		return this.consentupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getConsentUpdateMode()
	{
		return this.consentupdatemode;
	}
	public void setConsentUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.consentupdatemode = value;
	}
	public boolean getPreferredWrittenCommFormatUpdateModeIsNotNull()
	{
		return this.preferredwrittencommformatupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getPreferredWrittenCommFormatUpdateMode()
	{
		return this.preferredwrittencommformatupdatemode;
	}
	public void setPreferredWrittenCommFormatUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.preferredwrittencommformatupdatemode = value;
	}
	public boolean getDeathNotificationUpdateModeIsNotNull()
	{
		return this.deathnotificationupdatemode != null;
	}
	public ims.core.vo.lookups.PDSUpdateMode getDeathNotificationUpdateMode()
	{
		return this.deathnotificationupdatemode;
	}
	public void setDeathNotificationUpdateMode(ims.core.vo.lookups.PDSUpdateMode value)
	{
		this.isValidated = false;
		this.deathnotificationupdatemode = value;
	}
	public boolean getSCNIsNotNull()
	{
		return this.scn != null;
	}
	public Integer getSCN()
	{
		return this.scn;
	}
	public void setSCN(Integer value)
	{
		this.isValidated = false;
		this.scn = value;
	}
	public boolean getPatientIsNotNull()
	{
		return this.patient != null;
	}
	public ims.core.patient.vo.PatientRefVo getPatient()
	{
		return this.patient;
	}
	public void setPatient(ims.core.patient.vo.PatientRefVo value)
	{
		this.isValidated = false;
		this.patient = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.commchannels != null)
		{
			if(!this.commchannels.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.address != null)
		{
			if(!this.address.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.names != null)
		{
			if(!this.names.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.nokcommchannels != null)
		{
			if(!this.nokcommchannels.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.relatives != null)
		{
			if(!this.relatives.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.commchannels != null)
		{
			String[] listOfOtherErrors = this.commchannels.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.address != null)
		{
			String[] listOfOtherErrors = this.address.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.names != null)
		{
			String[] listOfOtherErrors = this.names.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.nokcommchannels != null)
		{
			String[] listOfOtherErrors = this.nokcommchannels.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.relatives != null)
		{
			String[] listOfOtherErrors = this.relatives.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		int errorCount = listOfErrors.size();
		if(errorCount == 0)
		{
			this.isBusy = false;
			this.isValidated = true;
			return null;
		}
		String[] result = new String[errorCount];
		for(int x = 0; x < errorCount; x++)
			result[x] = (String)listOfErrors.get(x);
		this.isBusy = false;
		this.isValidated = false;
		return result;
	}
	public void clearIDAndVersion()
	{
		this.id = null;
		this.version = 0;
	}
	public Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		PDSPatientUpdateVo clone = new PDSPatientUpdateVo(this.id, this.version);
		
		if(this.administrativegendercode == null)
			clone.administrativegendercode = null;
		else
			clone.administrativegendercode = (ims.core.vo.lookups.PDSUpdateMode)this.administrativegendercode.clone();
		if(this.birthtime == null)
			clone.birthtime = null;
		else
			clone.birthtime = (ims.core.vo.lookups.PDSUpdateMode)this.birthtime.clone();
		if(this.deceasedtime == null)
			clone.deceasedtime = null;
		else
			clone.deceasedtime = (ims.core.vo.lookups.PDSUpdateMode)this.deceasedtime.clone();
		if(this.languagecodeupdatemode == null)
			clone.languagecodeupdatemode = null;
		else
			clone.languagecodeupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.languagecodeupdatemode.clone();
		if(this.proficiencylevelcodeupdatemode == null)
			clone.proficiencylevelcodeupdatemode = null;
		else
			clone.proficiencylevelcodeupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.proficiencylevelcodeupdatemode.clone();
		if(this.preferredcontactmethodupdatemode == null)
			clone.preferredcontactmethodupdatemode = null;
		else
			clone.preferredcontactmethodupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.preferredcontactmethodupdatemode.clone();
		if(this.preferredcontacttimesupdatemode == null)
			clone.preferredcontacttimesupdatemode = null;
		else
			clone.preferredcontacttimesupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.preferredcontacttimesupdatemode.clone();
		if(this.callcentrecallbackconsentupdatemode == null)
			clone.callcentrecallbackconsentupdatemode = null;
		else
			clone.callcentrecallbackconsentupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.callcentrecallbackconsentupdatemode.clone();
		if(this.nokrelationshipupdatemode == null)
			clone.nokrelationshipupdatemode = null;
		else
			clone.nokrelationshipupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.nokrelationshipupdatemode.clone();
		if(this.nokeffectivedatesupdatemode == null)
			clone.nokeffectivedatesupdatemode = null;
		else
			clone.nokeffectivedatesupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.nokeffectivedatesupdatemode.clone();
		if(this.nokcontactrankupdatemode == null)
			clone.nokcontactrankupdatemode = null;
		else
			clone.nokcontactrankupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.nokcontactrankupdatemode.clone();
		if(this.nokupdatemode == null)
			clone.nokupdatemode = null;
		else
			clone.nokupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.nokupdatemode.clone();
		if(this.noklanguagecommunicationupdatemode == null)
			clone.noklanguagecommunicationupdatemode = null;
		else
			clone.noklanguagecommunicationupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.noklanguagecommunicationupdatemode.clone();
		if(this.commchannels == null)
			clone.commchannels = null;
		else
			clone.commchannels = (ims.core.vo.PDSCommChannelRemovedVoCollection)this.commchannels.clone();
		if(this.address == null)
			clone.address = null;
		else
			clone.address = (ims.core.vo.PDSAddrVoCollection)this.address.clone();
		if(this.names == null)
			clone.names = null;
		else
			clone.names = (ims.core.vo.PDSNamesRemovedVoCollection)this.names.clone();
		if(this.nokaddress == null)
			clone.nokaddress = null;
		else
			clone.nokaddress = (ims.core.vo.PDSAddrVo)this.nokaddress.clone();
		if(this.nokcommchannels == null)
			clone.nokcommchannels = null;
		else
			clone.nokcommchannels = (ims.core.vo.PDSCommChannelRemovedVoCollection)this.nokcommchannels.clone();
		if(this.pdsupdaterequest == null)
			clone.pdsupdaterequest = null;
		else
			clone.pdsupdaterequest = (ims.core.vo.PDSGeneralUpdateRequestVo)this.pdsupdaterequest.clone();
		if(this.relatives == null)
			clone.relatives = null;
		else
			clone.relatives = (ims.core.vo.PDSRelativeRemoveVoCollection)this.relatives.clone();
		if(this.genderupdatemode == null)
			clone.genderupdatemode = null;
		else
			clone.genderupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.genderupdatemode.clone();
		if(this.dateofbirthupdatemode == null)
			clone.dateofbirthupdatemode = null;
		else
			clone.dateofbirthupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.dateofbirthupdatemode.clone();
		if(this.dateofdeathupdatemode == null)
			clone.dateofdeathupdatemode = null;
		else
			clone.dateofdeathupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.dateofdeathupdatemode.clone();
		if(this.consentupdatemode == null)
			clone.consentupdatemode = null;
		else
			clone.consentupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.consentupdatemode.clone();
		if(this.preferredwrittencommformatupdatemode == null)
			clone.preferredwrittencommformatupdatemode = null;
		else
			clone.preferredwrittencommformatupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.preferredwrittencommformatupdatemode.clone();
		if(this.deathnotificationupdatemode == null)
			clone.deathnotificationupdatemode = null;
		else
			clone.deathnotificationupdatemode = (ims.core.vo.lookups.PDSUpdateMode)this.deathnotificationupdatemode.clone();
		clone.scn = this.scn;
		clone.patient = this.patient;
		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 (!(PDSPatientUpdateVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A PDSPatientUpdateVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((PDSPatientUpdateVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((PDSPatientUpdateVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.administrativegendercode != null)
			count++;
		if(this.birthtime != null)
			count++;
		if(this.deceasedtime != null)
			count++;
		if(this.languagecodeupdatemode != null)
			count++;
		if(this.proficiencylevelcodeupdatemode != null)
			count++;
		if(this.preferredcontactmethodupdatemode != null)
			count++;
		if(this.preferredcontacttimesupdatemode != null)
			count++;
		if(this.callcentrecallbackconsentupdatemode != null)
			count++;
		if(this.nokrelationshipupdatemode != null)
			count++;
		if(this.nokeffectivedatesupdatemode != null)
			count++;
		if(this.nokcontactrankupdatemode != null)
			count++;
		if(this.nokupdatemode != null)
			count++;
		if(this.noklanguagecommunicationupdatemode != null)
			count++;
		if(this.commchannels != null)
			count++;
		if(this.address != null)
			count++;
		if(this.names != null)
			count++;
		if(this.nokaddress != null)
			count++;
		if(this.nokcommchannels != null)
			count++;
		if(this.pdsupdaterequest != null)
			count++;
		if(this.relatives != null)
			count++;
		if(this.genderupdatemode != null)
			count++;
		if(this.dateofbirthupdatemode != null)
			count++;
		if(this.dateofdeathupdatemode != null)
			count++;
		if(this.consentupdatemode != null)
			count++;
		if(this.preferredwrittencommformatupdatemode != null)
			count++;
		if(this.deathnotificationupdatemode != null)
			count++;
		if(this.scn != null)
			count++;
		if(this.patient != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 28;
	}
	protected ims.core.vo.lookups.PDSUpdateMode administrativegendercode;
	protected ims.core.vo.lookups.PDSUpdateMode birthtime;
	protected ims.core.vo.lookups.PDSUpdateMode deceasedtime;
	protected ims.core.vo.lookups.PDSUpdateMode languagecodeupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode proficiencylevelcodeupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode preferredcontactmethodupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode preferredcontacttimesupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode callcentrecallbackconsentupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode nokrelationshipupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode nokeffectivedatesupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode nokcontactrankupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode nokupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode noklanguagecommunicationupdatemode;
	protected ims.core.vo.PDSCommChannelRemovedVoCollection commchannels;
	protected ims.core.vo.PDSAddrVoCollection address;
	protected ims.core.vo.PDSNamesRemovedVoCollection names;
	protected ims.core.vo.PDSAddrVo nokaddress;
	protected ims.core.vo.PDSCommChannelRemovedVoCollection nokcommchannels;
	protected ims.core.vo.PDSGeneralUpdateRequestVo pdsupdaterequest;
	protected ims.core.vo.PDSRelativeRemoveVoCollection relatives;
	protected ims.core.vo.lookups.PDSUpdateMode genderupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode dateofbirthupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode dateofdeathupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode consentupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode preferredwrittencommformatupdatemode;
	protected ims.core.vo.lookups.PDSUpdateMode deathnotificationupdatemode;
	protected Integer scn;
	protected ims.core.patient.vo.PatientRefVo patient;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
