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

	public ServiceTriageActionVo()
	{
	}
	public ServiceTriageActionVo(Integer id, int version)
	{
		super(id, version);
	}
	public ServiceTriageActionVo(ims.core.vo.beans.ServiceTriageActionVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.service = bean.getService() == null ? null : new ims.core.clinical.vo.ServiceRefVo(new Integer(bean.getService().getId()), bean.getService().getVersion());
		this.opa = bean.getOPA() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getOPA());
		this.directtolist = bean.getDirectToList() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getDirectToList());
		this.directtolistandopa = bean.getDirectToListAndOPA() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getDirectToListAndOPA());
		this.spr = bean.getSPR();
		this.linkeddiagnostic = bean.getLinkedDiagnostic() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getLinkedDiagnostic());
		this.consultant = bean.getConsultant();
		this.associatespecialist = bean.getAssociateSpecialist();
		this.anydoctortosee = bean.getAnyDoctorToSee();
		this.otherhcp = bean.getOtherHCP();
		this.otherhcpvalues = ims.core.vo.lookups.OtherHCPCollection.buildFromBeanCollection(bean.getOtherHCPValues());
		this.linkedopasanddiagnostic = bean.getLinkedOPAsAndDiagnostic() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getLinkedOPAsAndDiagnostic());
		this.opaandlinkeddiagostic = bean.getOPAAndLinkedDiagostic() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getOPAAndLinkedDiagostic());
		this.linkedopas = bean.getLinkedOPAs() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getLinkedOPAs());
		this.defaultactionformanualreferral = bean.getDefaultActionForManualReferral() == null ? null : ims.RefMan.vo.lookups.DefaultTriageActionForManualReferral.buildLookup(bean.getDefaultActionForManualReferral());
		this.defaultactionforcabreferral = bean.getDefaultActionForCABReferral() == null ? null : ims.RefMan.vo.lookups.DefaultTriageActionForCABReferral.buildLookup(bean.getDefaultActionForCABReferral());
		this.changecabopa = bean.getChangeCABOPA() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getChangeCABOPA());
		this.changecabopaanddirecttolist = bean.getChangeCABOPAandDirectToList() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getChangeCABOPAandDirectToList());
		this.cabopaanddirecttolist = bean.getCABOPAandDirectToList() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getCABOPAandDirectToList());
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.core.vo.beans.ServiceTriageActionVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.service = bean.getService() == null ? null : new ims.core.clinical.vo.ServiceRefVo(new Integer(bean.getService().getId()), bean.getService().getVersion());
		this.opa = bean.getOPA() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getOPA());
		this.directtolist = bean.getDirectToList() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getDirectToList());
		this.directtolistandopa = bean.getDirectToListAndOPA() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getDirectToListAndOPA());
		this.spr = bean.getSPR();
		this.linkeddiagnostic = bean.getLinkedDiagnostic() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getLinkedDiagnostic());
		this.consultant = bean.getConsultant();
		this.associatespecialist = bean.getAssociateSpecialist();
		this.anydoctortosee = bean.getAnyDoctorToSee();
		this.otherhcp = bean.getOtherHCP();
		this.otherhcpvalues = ims.core.vo.lookups.OtherHCPCollection.buildFromBeanCollection(bean.getOtherHCPValues());
		this.linkedopasanddiagnostic = bean.getLinkedOPAsAndDiagnostic() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getLinkedOPAsAndDiagnostic());
		this.opaandlinkeddiagostic = bean.getOPAAndLinkedDiagostic() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getOPAAndLinkedDiagostic());
		this.linkedopas = bean.getLinkedOPAs() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getLinkedOPAs());
		this.defaultactionformanualreferral = bean.getDefaultActionForManualReferral() == null ? null : ims.RefMan.vo.lookups.DefaultTriageActionForManualReferral.buildLookup(bean.getDefaultActionForManualReferral());
		this.defaultactionforcabreferral = bean.getDefaultActionForCABReferral() == null ? null : ims.RefMan.vo.lookups.DefaultTriageActionForCABReferral.buildLookup(bean.getDefaultActionForCABReferral());
		this.changecabopa = bean.getChangeCABOPA() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getChangeCABOPA());
		this.changecabopaanddirecttolist = bean.getChangeCABOPAandDirectToList() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getChangeCABOPAandDirectToList());
		this.cabopaanddirecttolist = bean.getCABOPAandDirectToList() == null ? null : ims.core.vo.lookups.ReferralTypeForTriageAction.buildLookup(bean.getCABOPAandDirectToList());
	}
	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.ServiceTriageActionVoBean bean = null;
		if(map != null)
			bean = (ims.core.vo.beans.ServiceTriageActionVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.core.vo.beans.ServiceTriageActionVoBean();
			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("SERVICE"))
			return getService();
		if(fieldName.equals("OPA"))
			return getOPA();
		if(fieldName.equals("DIRECTTOLIST"))
			return getDirectToList();
		if(fieldName.equals("DIRECTTOLISTANDOPA"))
			return getDirectToListAndOPA();
		if(fieldName.equals("SPR"))
			return getSPR();
		if(fieldName.equals("LINKEDDIAGNOSTIC"))
			return getLinkedDiagnostic();
		if(fieldName.equals("CONSULTANT"))
			return getConsultant();
		if(fieldName.equals("ASSOCIATESPECIALIST"))
			return getAssociateSpecialist();
		if(fieldName.equals("ANYDOCTORTOSEE"))
			return getAnyDoctorToSee();
		if(fieldName.equals("OTHERHCP"))
			return getOtherHCP();
		if(fieldName.equals("OTHERHCPVALUES"))
			return getOtherHCPValues();
		if(fieldName.equals("LINKEDOPASANDDIAGNOSTIC"))
			return getLinkedOPAsAndDiagnostic();
		if(fieldName.equals("OPAANDLINKEDDIAGOSTIC"))
			return getOPAAndLinkedDiagostic();
		if(fieldName.equals("LINKEDOPAS"))
			return getLinkedOPAs();
		if(fieldName.equals("DEFAULTACTIONFORMANUALREFERRAL"))
			return getDefaultActionForManualReferral();
		if(fieldName.equals("DEFAULTACTIONFORCABREFERRAL"))
			return getDefaultActionForCABReferral();
		if(fieldName.equals("CHANGECABOPA"))
			return getChangeCABOPA();
		if(fieldName.equals("CHANGECABOPAANDDIRECTTOLIST"))
			return getChangeCABOPAandDirectToList();
		if(fieldName.equals("CABOPAANDDIRECTTOLIST"))
			return getCABOPAandDirectToList();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getServiceIsNotNull()
	{
		return this.service != null;
	}
	public ims.core.clinical.vo.ServiceRefVo getService()
	{
		return this.service;
	}
	public void setService(ims.core.clinical.vo.ServiceRefVo value)
	{
		this.isValidated = false;
		this.service = value;
	}
	public boolean getOPAIsNotNull()
	{
		return this.opa != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getOPA()
	{
		return this.opa;
	}
	public void setOPA(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.opa = value;
	}
	public boolean getDirectToListIsNotNull()
	{
		return this.directtolist != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getDirectToList()
	{
		return this.directtolist;
	}
	public void setDirectToList(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.directtolist = value;
	}
	public boolean getDirectToListAndOPAIsNotNull()
	{
		return this.directtolistandopa != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getDirectToListAndOPA()
	{
		return this.directtolistandopa;
	}
	public void setDirectToListAndOPA(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.directtolistandopa = value;
	}
	public boolean getSPRIsNotNull()
	{
		return this.spr != null;
	}
	public Boolean getSPR()
	{
		return this.spr;
	}
	public void setSPR(Boolean value)
	{
		this.isValidated = false;
		this.spr = value;
	}
	public boolean getLinkedDiagnosticIsNotNull()
	{
		return this.linkeddiagnostic != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getLinkedDiagnostic()
	{
		return this.linkeddiagnostic;
	}
	public void setLinkedDiagnostic(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.linkeddiagnostic = value;
	}
	public boolean getConsultantIsNotNull()
	{
		return this.consultant != null;
	}
	public Boolean getConsultant()
	{
		return this.consultant;
	}
	public void setConsultant(Boolean value)
	{
		this.isValidated = false;
		this.consultant = value;
	}
	public boolean getAssociateSpecialistIsNotNull()
	{
		return this.associatespecialist != null;
	}
	public Boolean getAssociateSpecialist()
	{
		return this.associatespecialist;
	}
	public void setAssociateSpecialist(Boolean value)
	{
		this.isValidated = false;
		this.associatespecialist = value;
	}
	public boolean getAnyDoctorToSeeIsNotNull()
	{
		return this.anydoctortosee != null;
	}
	public Boolean getAnyDoctorToSee()
	{
		return this.anydoctortosee;
	}
	public void setAnyDoctorToSee(Boolean value)
	{
		this.isValidated = false;
		this.anydoctortosee = value;
	}
	public boolean getOtherHCPIsNotNull()
	{
		return this.otherhcp != null;
	}
	public Boolean getOtherHCP()
	{
		return this.otherhcp;
	}
	public void setOtherHCP(Boolean value)
	{
		this.isValidated = false;
		this.otherhcp = value;
	}
	public boolean getOtherHCPValuesIsNotNull()
	{
		return this.otherhcpvalues != null;
	}
	public ims.core.vo.lookups.OtherHCPCollection getOtherHCPValues()
	{
		return this.otherhcpvalues;
	}
	public void setOtherHCPValues(ims.core.vo.lookups.OtherHCPCollection value)
	{
		this.isValidated = false;
		this.otherhcpvalues = value;
	}
	public boolean getLinkedOPAsAndDiagnosticIsNotNull()
	{
		return this.linkedopasanddiagnostic != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getLinkedOPAsAndDiagnostic()
	{
		return this.linkedopasanddiagnostic;
	}
	public void setLinkedOPAsAndDiagnostic(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.linkedopasanddiagnostic = value;
	}
	public boolean getOPAAndLinkedDiagosticIsNotNull()
	{
		return this.opaandlinkeddiagostic != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getOPAAndLinkedDiagostic()
	{
		return this.opaandlinkeddiagostic;
	}
	public void setOPAAndLinkedDiagostic(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.opaandlinkeddiagostic = value;
	}
	public boolean getLinkedOPAsIsNotNull()
	{
		return this.linkedopas != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getLinkedOPAs()
	{
		return this.linkedopas;
	}
	public void setLinkedOPAs(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.linkedopas = value;
	}
	public boolean getDefaultActionForManualReferralIsNotNull()
	{
		return this.defaultactionformanualreferral != null;
	}
	public ims.RefMan.vo.lookups.DefaultTriageActionForManualReferral getDefaultActionForManualReferral()
	{
		return this.defaultactionformanualreferral;
	}
	public void setDefaultActionForManualReferral(ims.RefMan.vo.lookups.DefaultTriageActionForManualReferral value)
	{
		this.isValidated = false;
		this.defaultactionformanualreferral = value;
	}
	public boolean getDefaultActionForCABReferralIsNotNull()
	{
		return this.defaultactionforcabreferral != null;
	}
	public ims.RefMan.vo.lookups.DefaultTriageActionForCABReferral getDefaultActionForCABReferral()
	{
		return this.defaultactionforcabreferral;
	}
	public void setDefaultActionForCABReferral(ims.RefMan.vo.lookups.DefaultTriageActionForCABReferral value)
	{
		this.isValidated = false;
		this.defaultactionforcabreferral = value;
	}
	public boolean getChangeCABOPAIsNotNull()
	{
		return this.changecabopa != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getChangeCABOPA()
	{
		return this.changecabopa;
	}
	public void setChangeCABOPA(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.changecabopa = value;
	}
	public boolean getChangeCABOPAandDirectToListIsNotNull()
	{
		return this.changecabopaanddirecttolist != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getChangeCABOPAandDirectToList()
	{
		return this.changecabopaanddirecttolist;
	}
	public void setChangeCABOPAandDirectToList(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.changecabopaanddirecttolist = value;
	}
	public boolean getCABOPAandDirectToListIsNotNull()
	{
		return this.cabopaanddirecttolist != null;
	}
	public ims.core.vo.lookups.ReferralTypeForTriageAction getCABOPAandDirectToList()
	{
		return this.cabopaanddirecttolist;
	}
	public void setCABOPAandDirectToList(ims.core.vo.lookups.ReferralTypeForTriageAction value)
	{
		this.isValidated = false;
		this.cabopaanddirecttolist = 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.service == null)
			listOfErrors.add("Service is mandatory");
		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;
	
		ServiceTriageActionVo clone = new ServiceTriageActionVo(this.id, this.version);
		
		clone.service = this.service;
		if(this.opa == null)
			clone.opa = null;
		else
			clone.opa = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.opa.clone();
		if(this.directtolist == null)
			clone.directtolist = null;
		else
			clone.directtolist = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.directtolist.clone();
		if(this.directtolistandopa == null)
			clone.directtolistandopa = null;
		else
			clone.directtolistandopa = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.directtolistandopa.clone();
		clone.spr = this.spr;
		if(this.linkeddiagnostic == null)
			clone.linkeddiagnostic = null;
		else
			clone.linkeddiagnostic = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.linkeddiagnostic.clone();
		clone.consultant = this.consultant;
		clone.associatespecialist = this.associatespecialist;
		clone.anydoctortosee = this.anydoctortosee;
		clone.otherhcp = this.otherhcp;
		if(this.otherhcpvalues == null)
			clone.otherhcpvalues = null;
		else
			clone.otherhcpvalues = (ims.core.vo.lookups.OtherHCPCollection)this.otherhcpvalues.clone();
		if(this.linkedopasanddiagnostic == null)
			clone.linkedopasanddiagnostic = null;
		else
			clone.linkedopasanddiagnostic = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.linkedopasanddiagnostic.clone();
		if(this.opaandlinkeddiagostic == null)
			clone.opaandlinkeddiagostic = null;
		else
			clone.opaandlinkeddiagostic = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.opaandlinkeddiagostic.clone();
		if(this.linkedopas == null)
			clone.linkedopas = null;
		else
			clone.linkedopas = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.linkedopas.clone();
		if(this.defaultactionformanualreferral == null)
			clone.defaultactionformanualreferral = null;
		else
			clone.defaultactionformanualreferral = (ims.RefMan.vo.lookups.DefaultTriageActionForManualReferral)this.defaultactionformanualreferral.clone();
		if(this.defaultactionforcabreferral == null)
			clone.defaultactionforcabreferral = null;
		else
			clone.defaultactionforcabreferral = (ims.RefMan.vo.lookups.DefaultTriageActionForCABReferral)this.defaultactionforcabreferral.clone();
		if(this.changecabopa == null)
			clone.changecabopa = null;
		else
			clone.changecabopa = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.changecabopa.clone();
		if(this.changecabopaanddirecttolist == null)
			clone.changecabopaanddirecttolist = null;
		else
			clone.changecabopaanddirecttolist = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.changecabopaanddirecttolist.clone();
		if(this.cabopaanddirecttolist == null)
			clone.cabopaanddirecttolist = null;
		else
			clone.cabopaanddirecttolist = (ims.core.vo.lookups.ReferralTypeForTriageAction)this.cabopaanddirecttolist.clone();
		clone.isValidated = this.isValidated;
		
		this.isBusy = false;
		return clone;
	}
	public int compareTo(Object obj)
	{
		return compareTo(obj, true);
	}
	public int compareTo(Object obj, boolean caseInsensitive)
	{
		if (obj == null)
		{
			return -1;
		}
		if(caseInsensitive); // this is to avoid eclipse warning only.
		if (!(ServiceTriageActionVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A ServiceTriageActionVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((ServiceTriageActionVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((ServiceTriageActionVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.service != null)
			count++;
		if(this.opa != null)
			count++;
		if(this.directtolist != null)
			count++;
		if(this.directtolistandopa != null)
			count++;
		if(this.spr != null)
			count++;
		if(this.linkeddiagnostic != null)
			count++;
		if(this.consultant != null)
			count++;
		if(this.associatespecialist != null)
			count++;
		if(this.anydoctortosee != null)
			count++;
		if(this.otherhcp != null)
			count++;
		if(this.otherhcpvalues != null)
			count++;
		if(this.linkedopasanddiagnostic != null)
			count++;
		if(this.opaandlinkeddiagostic != null)
			count++;
		if(this.linkedopas != null)
			count++;
		if(this.defaultactionformanualreferral != null)
			count++;
		if(this.defaultactionforcabreferral != null)
			count++;
		if(this.changecabopa != null)
			count++;
		if(this.changecabopaanddirecttolist != null)
			count++;
		if(this.cabopaanddirecttolist != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 19;
	}
	protected ims.core.clinical.vo.ServiceRefVo service;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction opa;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction directtolist;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction directtolistandopa;
	protected Boolean spr;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction linkeddiagnostic;
	protected Boolean consultant;
	protected Boolean associatespecialist;
	protected Boolean anydoctortosee;
	protected Boolean otherhcp;
	protected ims.core.vo.lookups.OtherHCPCollection otherhcpvalues;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction linkedopasanddiagnostic;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction opaandlinkeddiagostic;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction linkedopas;
	protected ims.RefMan.vo.lookups.DefaultTriageActionForManualReferral defaultactionformanualreferral;
	protected ims.RefMan.vo.lookups.DefaultTriageActionForCABReferral defaultactionforcabreferral;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction changecabopa;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction changecabopaanddirecttolist;
	protected ims.core.vo.lookups.ReferralTypeForTriageAction cabopaanddirecttolist;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
