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

/**
 * Linked to Pathways.PatientPathwayJourney business object (ID: 1088100000).
 */
public class PatientJourneyVo extends ims.pathways.vo.PatientPathwayJourneyRefVo implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public PatientJourneyVo()
	{
	}
	public PatientJourneyVo(Integer id, int version)
	{
		super(id, version);
	}
	public PatientJourneyVo(ims.pathways.vo.beans.PatientJourneyVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.patient = bean.getPatient() == null ? null : bean.getPatient().buildVo();
		this.pathway = bean.getPathway() == null ? null : bean.getPathway().buildVo();
		if(bean.getPatientTargets() != null)
		{
			this.patienttargets = new ims.pathways.vo.PatientJourneyTargetRefVoCollection();
			for(int patienttargets_i = 0; patienttargets_i < bean.getPatientTargets().length; patienttargets_i++)
			{
				this.patienttargets.add(new ims.pathways.vo.PatientJourneyTargetRefVo(new Integer(bean.getPatientTargets()[patienttargets_i].getId()), bean.getPatientTargets()[patienttargets_i].getVersion()));
			}
		}
		this.referral = bean.getReferral() == null ? null : new ims.core.admin.vo.ReferralRefVo(new Integer(bean.getReferral().getId()), bean.getReferral().getVersion());
		this.startdate = bean.getStartDate() == null ? null : bean.getStartDate().buildDate();
		this.currentstatus = bean.getCurrentStatus() == null ? null : new ims.pathways.vo.PatientJourneyStatusRefVo(new Integer(bean.getCurrentStatus().getId()), bean.getCurrentStatus().getVersion());
		if(bean.getStatusHistory() != null)
		{
			this.statushistory = new ims.pathways.vo.PatientJourneyStatusRefVoCollection();
			for(int statushistory_i = 0; statushistory_i < bean.getStatusHistory().length; statushistory_i++)
			{
				this.statushistory.add(new ims.pathways.vo.PatientJourneyStatusRefVo(new Integer(bean.getStatusHistory()[statushistory_i].getId()), bean.getStatusHistory()[statushistory_i].getVersion()));
			}
		}
		this.endedondate = bean.getEndedOnDate() == null ? null : bean.getEndedOnDate().buildDate();
		this.currentclock = bean.getCurrentClock() == null ? null : bean.getCurrentClock().buildVo();
		this.clockhistory = ims.pathways.vo.PathwayClockVoCollection.buildFromBeanCollection(bean.getClockHistory());
		this.extreferralkey = bean.getExtReferralKey();
		this.pathwayhistory = ims.pathways.vo.PathwayHistoryVoCollection.buildFromBeanCollection(bean.getPathwayHistory());
		this.responsibleconsultant = bean.getResponsibleConsultant() == null ? null : new ims.core.resource.people.vo.HcpRefVo(new Integer(bean.getResponsibleConsultant().getId()), bean.getResponsibleConsultant().getVersion());
		this.linkedcomments = ims.pathways.vo.PatientJourneyCommentVoCollection.buildFromBeanCollection(bean.getLinkedComments());
		this.lastvalidationdate = bean.getLastValidationDate() == null ? null : bean.getLastValidationDate().buildDate();
		this.nextvalidationdate = bean.getNextValidationDate() == null ? null : bean.getNextValidationDate().buildDate();
		this.iscancerpathway = bean.getIsCancerPathway();
		this.cancerpathwaydate = bean.getCancerPathwayDate() == null ? null : bean.getCancerPathwayDate().buildDate();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.pathways.vo.beans.PatientJourneyVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.patient = bean.getPatient() == null ? null : bean.getPatient().buildVo(map);
		this.pathway = bean.getPathway() == null ? null : bean.getPathway().buildVo(map);
		if(bean.getPatientTargets() != null)
		{
			this.patienttargets = new ims.pathways.vo.PatientJourneyTargetRefVoCollection();
			for(int patienttargets_i = 0; patienttargets_i < bean.getPatientTargets().length; patienttargets_i++)
			{
				this.patienttargets.add(new ims.pathways.vo.PatientJourneyTargetRefVo(new Integer(bean.getPatientTargets()[patienttargets_i].getId()), bean.getPatientTargets()[patienttargets_i].getVersion()));
			}
		}
		this.referral = bean.getReferral() == null ? null : new ims.core.admin.vo.ReferralRefVo(new Integer(bean.getReferral().getId()), bean.getReferral().getVersion());
		this.startdate = bean.getStartDate() == null ? null : bean.getStartDate().buildDate();
		this.currentstatus = bean.getCurrentStatus() == null ? null : new ims.pathways.vo.PatientJourneyStatusRefVo(new Integer(bean.getCurrentStatus().getId()), bean.getCurrentStatus().getVersion());
		if(bean.getStatusHistory() != null)
		{
			this.statushistory = new ims.pathways.vo.PatientJourneyStatusRefVoCollection();
			for(int statushistory_i = 0; statushistory_i < bean.getStatusHistory().length; statushistory_i++)
			{
				this.statushistory.add(new ims.pathways.vo.PatientJourneyStatusRefVo(new Integer(bean.getStatusHistory()[statushistory_i].getId()), bean.getStatusHistory()[statushistory_i].getVersion()));
			}
		}
		this.endedondate = bean.getEndedOnDate() == null ? null : bean.getEndedOnDate().buildDate();
		this.currentclock = bean.getCurrentClock() == null ? null : bean.getCurrentClock().buildVo(map);
		this.clockhistory = ims.pathways.vo.PathwayClockVoCollection.buildFromBeanCollection(bean.getClockHistory());
		this.extreferralkey = bean.getExtReferralKey();
		this.pathwayhistory = ims.pathways.vo.PathwayHistoryVoCollection.buildFromBeanCollection(bean.getPathwayHistory());
		this.responsibleconsultant = bean.getResponsibleConsultant() == null ? null : new ims.core.resource.people.vo.HcpRefVo(new Integer(bean.getResponsibleConsultant().getId()), bean.getResponsibleConsultant().getVersion());
		this.linkedcomments = ims.pathways.vo.PatientJourneyCommentVoCollection.buildFromBeanCollection(bean.getLinkedComments());
		this.lastvalidationdate = bean.getLastValidationDate() == null ? null : bean.getLastValidationDate().buildDate();
		this.nextvalidationdate = bean.getNextValidationDate() == null ? null : bean.getNextValidationDate().buildDate();
		this.iscancerpathway = bean.getIsCancerPathway();
		this.cancerpathwaydate = bean.getCancerPathwayDate() == null ? null : bean.getCancerPathwayDate().buildDate();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.pathways.vo.beans.PatientJourneyVoBean bean = null;
		if(map != null)
			bean = (ims.pathways.vo.beans.PatientJourneyVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.pathways.vo.beans.PatientJourneyVoBean();
			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("PATIENT"))
			return getPatient();
		if(fieldName.equals("PATHWAY"))
			return getPathway();
		if(fieldName.equals("PATIENTTARGETS"))
			return getPatientTargets();
		if(fieldName.equals("REFERRAL"))
			return getReferral();
		if(fieldName.equals("STARTDATE"))
			return getStartDate();
		if(fieldName.equals("CURRENTSTATUS"))
			return getCurrentStatus();
		if(fieldName.equals("STATUSHISTORY"))
			return getStatusHistory();
		if(fieldName.equals("ENDEDONDATE"))
			return getEndedOnDate();
		if(fieldName.equals("CURRENTCLOCK"))
			return getCurrentClock();
		if(fieldName.equals("CLOCKHISTORY"))
			return getClockHistory();
		if(fieldName.equals("EXTREFERRALKEY"))
			return getExtReferralKey();
		if(fieldName.equals("PATHWAYHISTORY"))
			return getPathwayHistory();
		if(fieldName.equals("RESPONSIBLECONSULTANT"))
			return getResponsibleConsultant();
		if(fieldName.equals("LINKEDCOMMENTS"))
			return getLinkedComments();
		if(fieldName.equals("LASTVALIDATIONDATE"))
			return getLastValidationDate();
		if(fieldName.equals("NEXTVALIDATIONDATE"))
			return getNextValidationDate();
		if(fieldName.equals("ISCANCERPATHWAY"))
			return getIsCancerPathway();
		if(fieldName.equals("CANCERPATHWAYDATE"))
			return getCancerPathwayDate();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getPatientIsNotNull()
	{
		return this.patient != null;
	}
	public ims.core.vo.PatientShort getPatient()
	{
		return this.patient;
	}
	public void setPatient(ims.core.vo.PatientShort value)
	{
		this.isValidated = false;
		this.patient = value;
	}
	public boolean getPathwayIsNotNull()
	{
		return this.pathway != null;
	}
	public ims.pathways.vo.PathwayLiteVo getPathway()
	{
		return this.pathway;
	}
	public void setPathway(ims.pathways.vo.PathwayLiteVo value)
	{
		this.isValidated = false;
		this.pathway = value;
	}
	public boolean getPatientTargetsIsNotNull()
	{
		return this.patienttargets != null;
	}
	public ims.pathways.vo.PatientJourneyTargetRefVoCollection getPatientTargets()
	{
		return this.patienttargets;
	}
	public void setPatientTargets(ims.pathways.vo.PatientJourneyTargetRefVoCollection value)
	{
		this.isValidated = false;
		this.patienttargets = value;
	}
	public boolean getReferralIsNotNull()
	{
		return this.referral != null;
	}
	public ims.core.admin.vo.ReferralRefVo getReferral()
	{
		return this.referral;
	}
	public void setReferral(ims.core.admin.vo.ReferralRefVo value)
	{
		this.isValidated = false;
		this.referral = 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 getCurrentStatusIsNotNull()
	{
		return this.currentstatus != null;
	}
	public ims.pathways.vo.PatientJourneyStatusRefVo getCurrentStatus()
	{
		return this.currentstatus;
	}
	public void setCurrentStatus(ims.pathways.vo.PatientJourneyStatusRefVo value)
	{
		this.isValidated = false;
		this.currentstatus = value;
	}
	public boolean getStatusHistoryIsNotNull()
	{
		return this.statushistory != null;
	}
	public ims.pathways.vo.PatientJourneyStatusRefVoCollection getStatusHistory()
	{
		return this.statushistory;
	}
	public void setStatusHistory(ims.pathways.vo.PatientJourneyStatusRefVoCollection value)
	{
		this.isValidated = false;
		this.statushistory = value;
	}
	public boolean getEndedOnDateIsNotNull()
	{
		return this.endedondate != null;
	}
	public ims.framework.utils.Date getEndedOnDate()
	{
		return this.endedondate;
	}
	public void setEndedOnDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.endedondate = value;
	}
	public boolean getCurrentClockIsNotNull()
	{
		return this.currentclock != null;
	}
	public ims.pathways.vo.PathwayClockVo getCurrentClock()
	{
		return this.currentclock;
	}
	public void setCurrentClock(ims.pathways.vo.PathwayClockVo value)
	{
		this.isValidated = false;
		this.currentclock = value;
	}
	public boolean getClockHistoryIsNotNull()
	{
		return this.clockhistory != null;
	}
	public ims.pathways.vo.PathwayClockVoCollection getClockHistory()
	{
		return this.clockhistory;
	}
	public void setClockHistory(ims.pathways.vo.PathwayClockVoCollection value)
	{
		this.isValidated = false;
		this.clockhistory = value;
	}
	public boolean getExtReferralKeyIsNotNull()
	{
		return this.extreferralkey != null;
	}
	public String getExtReferralKey()
	{
		return this.extreferralkey;
	}
	public static int getExtReferralKeyMaxLength()
	{
		return 255;
	}
	public void setExtReferralKey(String value)
	{
		this.isValidated = false;
		this.extreferralkey = value;
	}
	public boolean getPathwayHistoryIsNotNull()
	{
		return this.pathwayhistory != null;
	}
	public ims.pathways.vo.PathwayHistoryVoCollection getPathwayHistory()
	{
		return this.pathwayhistory;
	}
	public void setPathwayHistory(ims.pathways.vo.PathwayHistoryVoCollection value)
	{
		this.isValidated = false;
		this.pathwayhistory = value;
	}
	public boolean getResponsibleConsultantIsNotNull()
	{
		return this.responsibleconsultant != null;
	}
	public ims.core.resource.people.vo.HcpRefVo getResponsibleConsultant()
	{
		return this.responsibleconsultant;
	}
	public void setResponsibleConsultant(ims.core.resource.people.vo.HcpRefVo value)
	{
		this.isValidated = false;
		this.responsibleconsultant = value;
	}
	public boolean getLinkedCommentsIsNotNull()
	{
		return this.linkedcomments != null;
	}
	public ims.pathways.vo.PatientJourneyCommentVoCollection getLinkedComments()
	{
		return this.linkedcomments;
	}
	public void setLinkedComments(ims.pathways.vo.PatientJourneyCommentVoCollection value)
	{
		this.isValidated = false;
		this.linkedcomments = value;
	}
	public boolean getLastValidationDateIsNotNull()
	{
		return this.lastvalidationdate != null;
	}
	public ims.framework.utils.Date getLastValidationDate()
	{
		return this.lastvalidationdate;
	}
	public void setLastValidationDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.lastvalidationdate = value;
	}
	public boolean getNextValidationDateIsNotNull()
	{
		return this.nextvalidationdate != null;
	}
	public ims.framework.utils.Date getNextValidationDate()
	{
		return this.nextvalidationdate;
	}
	public void setNextValidationDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.nextvalidationdate = value;
	}
	public boolean getIsCancerPathwayIsNotNull()
	{
		return this.iscancerpathway != null;
	}
	public Boolean getIsCancerPathway()
	{
		return this.iscancerpathway;
	}
	public void setIsCancerPathway(Boolean value)
	{
		this.isValidated = false;
		this.iscancerpathway = value;
	}
	public boolean getCancerPathwayDateIsNotNull()
	{
		return this.cancerpathwaydate != null;
	}
	public ims.framework.utils.Date getCancerPathwayDate()
	{
		return this.cancerpathwaydate;
	}
	public void setCancerPathwayDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.cancerpathwaydate = value;
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.currentclock != null)
		{
			if(!this.currentclock.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.clockhistory != null)
		{
			if(!this.clockhistory.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.pathwayhistory != null)
		{
			if(!this.pathwayhistory.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.linkedcomments != null)
		{
			if(!this.linkedcomments.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.patient == null)
			listOfErrors.add("Patient is mandatory");
		if(this.pathway == null)
			listOfErrors.add("Pathway is mandatory");
		if(this.patienttargets == null || this.patienttargets.size() == 0)
			listOfErrors.add("PatientTargets are mandatory");
		if(this.startdate == null)
			listOfErrors.add("StartDate is mandatory");
		if(this.currentstatus == null)
			listOfErrors.add("CurrentStatus is mandatory");
		if(this.statushistory == null || this.statushistory.size() == 0)
			listOfErrors.add("StatusHistory are mandatory");
		if(this.currentclock != null)
		{
			String[] listOfOtherErrors = this.currentclock.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.clockhistory != null)
		{
			String[] listOfOtherErrors = this.clockhistory.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.extreferralkey == null || this.extreferralkey.length() == 0)
			listOfErrors.add("ExtReferralKey is mandatory");
		else if(this.extreferralkey.length() > 255)
			listOfErrors.add("The length of the field [extreferralkey] in the value object [ims.pathways.vo.PatientJourneyVo] is too big. It should be less or equal to 255");
		if(this.pathwayhistory != null)
		{
			String[] listOfOtherErrors = this.pathwayhistory.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.linkedcomments != null)
		{
			String[] listOfOtherErrors = this.linkedcomments.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;
	
		PatientJourneyVo clone = new PatientJourneyVo(this.id, this.version);
		
		if(this.patient == null)
			clone.patient = null;
		else
			clone.patient = (ims.core.vo.PatientShort)this.patient.clone();
		if(this.pathway == null)
			clone.pathway = null;
		else
			clone.pathway = (ims.pathways.vo.PathwayLiteVo)this.pathway.clone();
		clone.patienttargets = this.patienttargets;
		clone.referral = this.referral;
		if(this.startdate == null)
			clone.startdate = null;
		else
			clone.startdate = (ims.framework.utils.Date)this.startdate.clone();
		clone.currentstatus = this.currentstatus;
		clone.statushistory = this.statushistory;
		if(this.endedondate == null)
			clone.endedondate = null;
		else
			clone.endedondate = (ims.framework.utils.Date)this.endedondate.clone();
		if(this.currentclock == null)
			clone.currentclock = null;
		else
			clone.currentclock = (ims.pathways.vo.PathwayClockVo)this.currentclock.clone();
		if(this.clockhistory == null)
			clone.clockhistory = null;
		else
			clone.clockhistory = (ims.pathways.vo.PathwayClockVoCollection)this.clockhistory.clone();
		clone.extreferralkey = this.extreferralkey;
		if(this.pathwayhistory == null)
			clone.pathwayhistory = null;
		else
			clone.pathwayhistory = (ims.pathways.vo.PathwayHistoryVoCollection)this.pathwayhistory.clone();
		clone.responsibleconsultant = this.responsibleconsultant;
		if(this.linkedcomments == null)
			clone.linkedcomments = null;
		else
			clone.linkedcomments = (ims.pathways.vo.PatientJourneyCommentVoCollection)this.linkedcomments.clone();
		if(this.lastvalidationdate == null)
			clone.lastvalidationdate = null;
		else
			clone.lastvalidationdate = (ims.framework.utils.Date)this.lastvalidationdate.clone();
		if(this.nextvalidationdate == null)
			clone.nextvalidationdate = null;
		else
			clone.nextvalidationdate = (ims.framework.utils.Date)this.nextvalidationdate.clone();
		clone.iscancerpathway = this.iscancerpathway;
		if(this.cancerpathwaydate == null)
			clone.cancerpathwaydate = null;
		else
			clone.cancerpathwaydate = (ims.framework.utils.Date)this.cancerpathwaydate.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 (!(PatientJourneyVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A PatientJourneyVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((PatientJourneyVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((PatientJourneyVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.patient != null)
			count++;
		if(this.pathway != null)
			count++;
		if(this.patienttargets != null)
			count++;
		if(this.referral != null)
			count++;
		if(this.startdate != null)
			count++;
		if(this.currentstatus != null)
			count++;
		if(this.statushistory != null)
			count++;
		if(this.endedondate != null)
			count++;
		if(this.currentclock != null)
			count++;
		if(this.clockhistory != null)
			count++;
		if(this.extreferralkey != null)
			count++;
		if(this.pathwayhistory != null)
			count++;
		if(this.responsibleconsultant != null)
			count++;
		if(this.linkedcomments != null)
			count++;
		if(this.lastvalidationdate != null)
			count++;
		if(this.nextvalidationdate != null)
			count++;
		if(this.iscancerpathway != null)
			count++;
		if(this.cancerpathwaydate != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 18;
	}
	protected ims.core.vo.PatientShort patient;
	protected ims.pathways.vo.PathwayLiteVo pathway;
	protected ims.pathways.vo.PatientJourneyTargetRefVoCollection patienttargets;
	protected ims.core.admin.vo.ReferralRefVo referral;
	protected ims.framework.utils.Date startdate;
	protected ims.pathways.vo.PatientJourneyStatusRefVo currentstatus;
	protected ims.pathways.vo.PatientJourneyStatusRefVoCollection statushistory;
	protected ims.framework.utils.Date endedondate;
	protected ims.pathways.vo.PathwayClockVo currentclock;
	protected ims.pathways.vo.PathwayClockVoCollection clockhistory;
	protected String extreferralkey;
	protected ims.pathways.vo.PathwayHistoryVoCollection pathwayhistory;
	protected ims.core.resource.people.vo.HcpRefVo responsibleconsultant;
	protected ims.pathways.vo.PatientJourneyCommentVoCollection linkedcomments;
	protected ims.framework.utils.Date lastvalidationdate;
	protected ims.framework.utils.Date nextvalidationdate;
	protected Boolean iscancerpathway;
	protected ims.framework.utils.Date cancerpathwaydate;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
