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


public class NewResultsCriteriaVo extends ims.vo.ValueObject implements ims.vo.ImsCloneable, Comparable
{
	private static final long serialVersionUID = 1L;

	public NewResultsCriteriaVo()
	{
	}
	public NewResultsCriteriaVo(ims.ocrr.vo.beans.NewResultsCriteriaVoBean bean)
	{
		this.hospital = bean.getHospital() == null ? null : bean.getHospital().buildVo();
		this.orderinglocationtype = bean.getOrderingLocationType();
		// Base value object field type not supported.
		this.discipline = ims.core.vo.ServiceLiteVoCollection.buildFromBeanCollection(bean.getDiscipline());
		// Interface field type not supported.
		this.newupdated = bean.getNewUpdated();
		this.fromdate = bean.getFromDate() == null ? null : bean.getFromDate().buildDate();
		this.todate = bean.getToDate() == null ? null : bean.getToDate().buildDate();
		this.days = bean.getDays();
		this.seenchecked = bean.getSeenChecked();
		this.forreview = bean.getForReview();
		this.specialty = bean.getSpecialty() == null ? null : ims.core.vo.lookups.Specialty.buildLookup(bean.getSpecialty());
		this.completed = bean.getCompleted();
		this.checked = bean.getChecked();
		this.reviewinghcp = bean.getReviewingHCP() == null ? null : bean.getReviewingHCP().buildVo();
		this.excludecurrentinpatients = bean.getExcludeCurrentInpatients();
		// Interface field type not supported.
		this.order = bean.getOrder();
		this.currenip = bean.getCurrenIP();
		this.newestfirst = bean.getNewestFirst();
		this.abnormalpathologyresultsonly = bean.getAbnormalPathologyResultsOnly();
		this.orderbyme = bean.getOrderByMe();
		this.responsiblehcpfororder = bean.getResponsibleHCPForOrder();
		this.forreviewbyme = bean.getForReviewByMe();
		this.inpatientorders = bean.getInpatientOrders();
		this.outpatientorders = bean.getOutpatientOrders();
		this.currentinpatientsonly = bean.getCurrentInpatientsOnly();
		this.inpatientorderspatientdischarged = bean.getInpatientOrdersPatientDischarged();
		this.selectedtab = bean.getSelectedTab();
		this.wastimeron = bean.getWasTimerOn();
		this.inpatientward = bean.getInpatientWard() == null ? null : bean.getInpatientWard().buildVo();
		this.outpatientdepartment = bean.getOutpatientDepartment() == null ? null : bean.getOutpatientDepartment().buildVo();
		this.responsiblehcpforcurrentip = bean.getResponsibleHCPForCurrentIP();
		this.specialtytick = bean.getSpecialtyTick();
		this.responsiblehcptick = bean.getResponsibleHCPTick();
		this.edorders = bean.getEDOrders();
		this.inpatienthospital = bean.getInpatientHospital() == null ? null : bean.getInpatientHospital().buildVo();
		this.patientid = bean.getPatientId();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.ocrr.vo.beans.NewResultsCriteriaVoBean bean)
	{
		this.hospital = bean.getHospital() == null ? null : bean.getHospital().buildVo(map);
		this.orderinglocationtype = bean.getOrderingLocationType();
		// Base value object field type not supported.
		this.discipline = ims.core.vo.ServiceLiteVoCollection.buildFromBeanCollection(bean.getDiscipline());
		// Interface field type not supported.
		this.newupdated = bean.getNewUpdated();
		this.fromdate = bean.getFromDate() == null ? null : bean.getFromDate().buildDate();
		this.todate = bean.getToDate() == null ? null : bean.getToDate().buildDate();
		this.days = bean.getDays();
		this.seenchecked = bean.getSeenChecked();
		this.forreview = bean.getForReview();
		this.specialty = bean.getSpecialty() == null ? null : ims.core.vo.lookups.Specialty.buildLookup(bean.getSpecialty());
		this.completed = bean.getCompleted();
		this.checked = bean.getChecked();
		this.reviewinghcp = bean.getReviewingHCP() == null ? null : bean.getReviewingHCP().buildVo(map);
		this.excludecurrentinpatients = bean.getExcludeCurrentInpatients();
		// Interface field type not supported.
		this.order = bean.getOrder();
		this.currenip = bean.getCurrenIP();
		this.newestfirst = bean.getNewestFirst();
		this.abnormalpathologyresultsonly = bean.getAbnormalPathologyResultsOnly();
		this.orderbyme = bean.getOrderByMe();
		this.responsiblehcpfororder = bean.getResponsibleHCPForOrder();
		this.forreviewbyme = bean.getForReviewByMe();
		this.inpatientorders = bean.getInpatientOrders();
		this.outpatientorders = bean.getOutpatientOrders();
		this.currentinpatientsonly = bean.getCurrentInpatientsOnly();
		this.inpatientorderspatientdischarged = bean.getInpatientOrdersPatientDischarged();
		this.selectedtab = bean.getSelectedTab();
		this.wastimeron = bean.getWasTimerOn();
		this.inpatientward = bean.getInpatientWard() == null ? null : bean.getInpatientWard().buildVo(map);
		this.outpatientdepartment = bean.getOutpatientDepartment() == null ? null : bean.getOutpatientDepartment().buildVo(map);
		this.responsiblehcpforcurrentip = bean.getResponsibleHCPForCurrentIP();
		this.specialtytick = bean.getSpecialtyTick();
		this.responsiblehcptick = bean.getResponsibleHCPTick();
		this.edorders = bean.getEDOrders();
		this.inpatienthospital = bean.getInpatientHospital() == null ? null : bean.getInpatientHospital().buildVo(map);
		this.patientid = bean.getPatientId();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.ocrr.vo.beans.NewResultsCriteriaVoBean bean = null;
		if(map != null)
			bean = (ims.ocrr.vo.beans.NewResultsCriteriaVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.ocrr.vo.beans.NewResultsCriteriaVoBean();
			map.addValueObjectBean(this, bean);
			bean.populate(map, this);
		}
		return bean;
	}
	public boolean getHospitalIsNotNull()
	{
		return this.hospital != null;
	}
	public ims.core.vo.LocationLiteVo getHospital()
	{
		return this.hospital;
	}
	public void setHospital(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.hospital = value;
	}
	public boolean getOrderingLocationTypeIsNotNull()
	{
		return this.orderinglocationtype != null;
	}
	public Integer getOrderingLocationType()
	{
		return this.orderinglocationtype;
	}
	public void setOrderingLocationType(Integer value)
	{
		this.isValidated = false;
		this.orderinglocationtype = value;
	}
	public boolean getOrderingLocationIsNotNull()
	{
		return this.orderinglocation != null;
	}
	public ims.vo.ValueObject getOrderingLocation()
	{
		return this.orderinglocation;
	}
	public void setOrderingLocation(ims.vo.ValueObject value)
	{
		this.isValidated = false;
		this.orderinglocation = value;
	}
	public boolean getDisciplineIsNotNull()
	{
		return this.discipline != null;
	}
	public ims.core.vo.ServiceLiteVoCollection getDiscipline()
	{
		return this.discipline;
	}
	public void setDiscipline(ims.core.vo.ServiceLiteVoCollection value)
	{
		this.isValidated = false;
		this.discipline = value;
	}
	public boolean getOrderingHCPIsNotNull()
	{
		return this.orderinghcp != null;
	}
	public ims.vo.interfaces.IMos getOrderingHCP()
	{
		return this.orderinghcp;
	}
	public void setOrderingHCP(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.orderinghcp = value;
	}
	public boolean getNewUpdatedIsNotNull()
	{
		return this.newupdated != null;
	}
	public Boolean getNewUpdated()
	{
		return this.newupdated;
	}
	public void setNewUpdated(Boolean value)
	{
		this.isValidated = false;
		this.newupdated = value;
	}
	public boolean getFromDateIsNotNull()
	{
		return this.fromdate != null;
	}
	public ims.framework.utils.Date getFromDate()
	{
		return this.fromdate;
	}
	public void setFromDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.fromdate = value;
	}
	public boolean getToDateIsNotNull()
	{
		return this.todate != null;
	}
	public ims.framework.utils.Date getToDate()
	{
		return this.todate;
	}
	public void setToDate(ims.framework.utils.Date value)
	{
		this.isValidated = false;
		this.todate = value;
	}
	public boolean getDaysIsNotNull()
	{
		return this.days != null;
	}
	public Integer getDays()
	{
		return this.days;
	}
	public void setDays(Integer value)
	{
		this.isValidated = false;
		this.days = value;
	}
	public boolean getSeenCheckedIsNotNull()
	{
		return this.seenchecked != null;
	}
	public Boolean getSeenChecked()
	{
		return this.seenchecked;
	}
	public void setSeenChecked(Boolean value)
	{
		this.isValidated = false;
		this.seenchecked = value;
	}
	public boolean getForReviewIsNotNull()
	{
		return this.forreview != null;
	}
	public Boolean getForReview()
	{
		return this.forreview;
	}
	public void setForReview(Boolean value)
	{
		this.isValidated = false;
		this.forreview = value;
	}
	public boolean getSpecialtyIsNotNull()
	{
		return this.specialty != null;
	}
	public ims.core.vo.lookups.Specialty getSpecialty()
	{
		return this.specialty;
	}
	public void setSpecialty(ims.core.vo.lookups.Specialty value)
	{
		this.isValidated = false;
		this.specialty = value;
	}
	public boolean getCompletedIsNotNull()
	{
		return this.completed != null;
	}
	public Boolean getCompleted()
	{
		return this.completed;
	}
	public void setCompleted(Boolean value)
	{
		this.isValidated = false;
		this.completed = value;
	}
	public boolean getCheckedIsNotNull()
	{
		return this.checked != null;
	}
	public Boolean getChecked()
	{
		return this.checked;
	}
	public void setChecked(Boolean value)
	{
		this.isValidated = false;
		this.checked = value;
	}
	public boolean getReviewingHCPIsNotNull()
	{
		return this.reviewinghcp != null;
	}
	public ims.core.vo.HcpLiteVo getReviewingHCP()
	{
		return this.reviewinghcp;
	}
	public void setReviewingHCP(ims.core.vo.HcpLiteVo value)
	{
		this.isValidated = false;
		this.reviewinghcp = value;
	}
	public boolean getExcludeCurrentInpatientsIsNotNull()
	{
		return this.excludecurrentinpatients != null;
	}
	public Boolean getExcludeCurrentInpatients()
	{
		return this.excludecurrentinpatients;
	}
	public void setExcludeCurrentInpatients(Boolean value)
	{
		this.isValidated = false;
		this.excludecurrentinpatients = value;
	}
	public boolean getHCPIsNotNull()
	{
		return this.hcp != null;
	}
	public ims.vo.interfaces.IMos getHCP()
	{
		return this.hcp;
	}
	public void setHCP(ims.vo.interfaces.IMos value)
	{
		this.isValidated = false;
		this.hcp = value;
	}
	public boolean getOrderIsNotNull()
	{
		return this.order != null;
	}
	public Boolean getOrder()
	{
		return this.order;
	}
	public void setOrder(Boolean value)
	{
		this.isValidated = false;
		this.order = value;
	}
	public boolean getCurrenIPIsNotNull()
	{
		return this.currenip != null;
	}
	public Boolean getCurrenIP()
	{
		return this.currenip;
	}
	public void setCurrenIP(Boolean value)
	{
		this.isValidated = false;
		this.currenip = value;
	}
	public boolean getNewestFirstIsNotNull()
	{
		return this.newestfirst != null;
	}
	public Boolean getNewestFirst()
	{
		return this.newestfirst;
	}
	public void setNewestFirst(Boolean value)
	{
		this.isValidated = false;
		this.newestfirst = value;
	}
	public boolean getAbnormalPathologyResultsOnlyIsNotNull()
	{
		return this.abnormalpathologyresultsonly != null;
	}
	public Boolean getAbnormalPathologyResultsOnly()
	{
		return this.abnormalpathologyresultsonly;
	}
	public void setAbnormalPathologyResultsOnly(Boolean value)
	{
		this.isValidated = false;
		this.abnormalpathologyresultsonly = value;
	}
	public boolean getOrderByMeIsNotNull()
	{
		return this.orderbyme != null;
	}
	public Boolean getOrderByMe()
	{
		return this.orderbyme;
	}
	public void setOrderByMe(Boolean value)
	{
		this.isValidated = false;
		this.orderbyme = value;
	}
	public boolean getResponsibleHCPForOrderIsNotNull()
	{
		return this.responsiblehcpfororder != null;
	}
	public Boolean getResponsibleHCPForOrder()
	{
		return this.responsiblehcpfororder;
	}
	public void setResponsibleHCPForOrder(Boolean value)
	{
		this.isValidated = false;
		this.responsiblehcpfororder = value;
	}
	public boolean getForReviewByMeIsNotNull()
	{
		return this.forreviewbyme != null;
	}
	public Boolean getForReviewByMe()
	{
		return this.forreviewbyme;
	}
	public void setForReviewByMe(Boolean value)
	{
		this.isValidated = false;
		this.forreviewbyme = value;
	}
	public boolean getInpatientOrdersIsNotNull()
	{
		return this.inpatientorders != null;
	}
	public Boolean getInpatientOrders()
	{
		return this.inpatientorders;
	}
	public void setInpatientOrders(Boolean value)
	{
		this.isValidated = false;
		this.inpatientorders = value;
	}
	public boolean getOutpatientOrdersIsNotNull()
	{
		return this.outpatientorders != null;
	}
	public Boolean getOutpatientOrders()
	{
		return this.outpatientorders;
	}
	public void setOutpatientOrders(Boolean value)
	{
		this.isValidated = false;
		this.outpatientorders = value;
	}
	public boolean getCurrentInpatientsOnlyIsNotNull()
	{
		return this.currentinpatientsonly != null;
	}
	public Boolean getCurrentInpatientsOnly()
	{
		return this.currentinpatientsonly;
	}
	public void setCurrentInpatientsOnly(Boolean value)
	{
		this.isValidated = false;
		this.currentinpatientsonly = value;
	}
	public boolean getInpatientOrdersPatientDischargedIsNotNull()
	{
		return this.inpatientorderspatientdischarged != null;
	}
	public Boolean getInpatientOrdersPatientDischarged()
	{
		return this.inpatientorderspatientdischarged;
	}
	public void setInpatientOrdersPatientDischarged(Boolean value)
	{
		this.isValidated = false;
		this.inpatientorderspatientdischarged = value;
	}
	public boolean getSelectedTabIsNotNull()
	{
		return this.selectedtab != null;
	}
	public Integer getSelectedTab()
	{
		return this.selectedtab;
	}
	public void setSelectedTab(Integer value)
	{
		this.isValidated = false;
		this.selectedtab = value;
	}
	public boolean getWasTimerOnIsNotNull()
	{
		return this.wastimeron != null;
	}
	public Boolean getWasTimerOn()
	{
		return this.wastimeron;
	}
	public void setWasTimerOn(Boolean value)
	{
		this.isValidated = false;
		this.wastimeron = value;
	}
	public boolean getInpatientWardIsNotNull()
	{
		return this.inpatientward != null;
	}
	public ims.core.vo.LocationLiteVo getInpatientWard()
	{
		return this.inpatientward;
	}
	public void setInpatientWard(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.inpatientward = value;
	}
	public boolean getOutpatientDepartmentIsNotNull()
	{
		return this.outpatientdepartment != null;
	}
	public ims.core.vo.LocationLiteVo getOutpatientDepartment()
	{
		return this.outpatientdepartment;
	}
	public void setOutpatientDepartment(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.outpatientdepartment = value;
	}
	public boolean getResponsibleHCPForCurrentIPIsNotNull()
	{
		return this.responsiblehcpforcurrentip != null;
	}
	public Boolean getResponsibleHCPForCurrentIP()
	{
		return this.responsiblehcpforcurrentip;
	}
	public void setResponsibleHCPForCurrentIP(Boolean value)
	{
		this.isValidated = false;
		this.responsiblehcpforcurrentip = value;
	}
	public boolean getSpecialtyTickIsNotNull()
	{
		return this.specialtytick != null;
	}
	public Boolean getSpecialtyTick()
	{
		return this.specialtytick;
	}
	public void setSpecialtyTick(Boolean value)
	{
		this.isValidated = false;
		this.specialtytick = value;
	}
	public boolean getResponsibleHCPTickIsNotNull()
	{
		return this.responsiblehcptick != null;
	}
	public Boolean getResponsibleHCPTick()
	{
		return this.responsiblehcptick;
	}
	public void setResponsibleHCPTick(Boolean value)
	{
		this.isValidated = false;
		this.responsiblehcptick = value;
	}
	public boolean getEDOrdersIsNotNull()
	{
		return this.edorders != null;
	}
	public Boolean getEDOrders()
	{
		return this.edorders;
	}
	public void setEDOrders(Boolean value)
	{
		this.isValidated = false;
		this.edorders = value;
	}
	public boolean getInpatientHospitalIsNotNull()
	{
		return this.inpatienthospital != null;
	}
	public ims.core.vo.LocationLiteVo getInpatientHospital()
	{
		return this.inpatienthospital;
	}
	public void setInpatientHospital(ims.core.vo.LocationLiteVo value)
	{
		this.isValidated = false;
		this.inpatienthospital = value;
	}
	public boolean getPatientIdIsNotNull()
	{
		return this.patientid != null;
	}
	public Integer getPatientId()
	{
		return this.patientid;
	}
	public void setPatientId(Integer value)
	{
		this.isValidated = false;
		this.patientid = value;
	}
	public final String getIItemText()
	{
		return toString();
	}
	public final Integer getBoId() 
	{
		return null;
	}
	public final String getBoClassName()
	{
		return null;
	}
	public boolean equals(Object obj)
	{
		if(obj == null)
			return false;
		if(!(obj instanceof NewResultsCriteriaVo))
			return false;
		NewResultsCriteriaVo compareObj = (NewResultsCriteriaVo)obj;
		if(this.getHospital() == null && compareObj.getHospital() != null)
			return false;
		if(this.getHospital() != null && compareObj.getHospital() == null)
			return false;
		if(this.getHospital() != null && compareObj.getHospital() != null)
			return this.getHospital().equals(compareObj.getHospital());
		return super.equals(obj);
	}
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.hospital != null)
		{
			if(!this.hospital.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.orderinglocation != null)
		{
			if(!this.orderinglocation.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.discipline != null)
		{
			if(!this.discipline.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.reviewinghcp != null)
		{
			if(!this.reviewinghcp.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.hospital != null)
		{
			String[] listOfOtherErrors = this.hospital.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.orderinglocation != null)
		{
			String[] listOfOtherErrors = this.orderinglocation.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.discipline != null)
		{
			String[] listOfOtherErrors = this.discipline.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.reviewinghcp != null)
		{
			String[] listOfOtherErrors = this.reviewinghcp.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 Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		NewResultsCriteriaVo clone = new NewResultsCriteriaVo();
		
		if(this.hospital == null)
			clone.hospital = null;
		else
			clone.hospital = (ims.core.vo.LocationLiteVo)this.hospital.clone();
		clone.orderinglocationtype = this.orderinglocationtype;
		if(this.orderinglocation == null)
			clone.orderinglocation = null;
		else
			clone.orderinglocation = (ims.vo.ValueObject)this.orderinglocation.clone();
		if(this.discipline == null)
			clone.discipline = null;
		else
			clone.discipline = (ims.core.vo.ServiceLiteVoCollection)this.discipline.clone();
		clone.orderinghcp = this.orderinghcp;
		clone.newupdated = this.newupdated;
		if(this.fromdate == null)
			clone.fromdate = null;
		else
			clone.fromdate = (ims.framework.utils.Date)this.fromdate.clone();
		if(this.todate == null)
			clone.todate = null;
		else
			clone.todate = (ims.framework.utils.Date)this.todate.clone();
		clone.days = this.days;
		clone.seenchecked = this.seenchecked;
		clone.forreview = this.forreview;
		if(this.specialty == null)
			clone.specialty = null;
		else
			clone.specialty = (ims.core.vo.lookups.Specialty)this.specialty.clone();
		clone.completed = this.completed;
		clone.checked = this.checked;
		if(this.reviewinghcp == null)
			clone.reviewinghcp = null;
		else
			clone.reviewinghcp = (ims.core.vo.HcpLiteVo)this.reviewinghcp.clone();
		clone.excludecurrentinpatients = this.excludecurrentinpatients;
		clone.hcp = this.hcp;
		clone.order = this.order;
		clone.currenip = this.currenip;
		clone.newestfirst = this.newestfirst;
		clone.abnormalpathologyresultsonly = this.abnormalpathologyresultsonly;
		clone.orderbyme = this.orderbyme;
		clone.responsiblehcpfororder = this.responsiblehcpfororder;
		clone.forreviewbyme = this.forreviewbyme;
		clone.inpatientorders = this.inpatientorders;
		clone.outpatientorders = this.outpatientorders;
		clone.currentinpatientsonly = this.currentinpatientsonly;
		clone.inpatientorderspatientdischarged = this.inpatientorderspatientdischarged;
		clone.selectedtab = this.selectedtab;
		clone.wastimeron = this.wastimeron;
		if(this.inpatientward == null)
			clone.inpatientward = null;
		else
			clone.inpatientward = (ims.core.vo.LocationLiteVo)this.inpatientward.clone();
		if(this.outpatientdepartment == null)
			clone.outpatientdepartment = null;
		else
			clone.outpatientdepartment = (ims.core.vo.LocationLiteVo)this.outpatientdepartment.clone();
		clone.responsiblehcpforcurrentip = this.responsiblehcpforcurrentip;
		clone.specialtytick = this.specialtytick;
		clone.responsiblehcptick = this.responsiblehcptick;
		clone.edorders = this.edorders;
		if(this.inpatienthospital == null)
			clone.inpatienthospital = null;
		else
			clone.inpatienthospital = (ims.core.vo.LocationLiteVo)this.inpatienthospital.clone();
		clone.patientid = this.patientid;
		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 (!(NewResultsCriteriaVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A NewResultsCriteriaVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		NewResultsCriteriaVo compareObj = (NewResultsCriteriaVo)obj;
		int retVal = 0;
		if (retVal == 0)
		{
			if(this.getHospital() == null && compareObj.getHospital() != null)
				return -1;
			if(this.getHospital() != null && compareObj.getHospital() == null)
				return 1;
			if(this.getHospital() != null && compareObj.getHospital() != null)
				retVal = this.getHospital().compareTo(compareObj.getHospital());
		}
		return retVal;
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = 0;
		if(this.hospital != null)
			count++;
		if(this.orderinglocationtype != null)
			count++;
		if(this.orderinglocation != null)
			count++;
		if(this.discipline != null)
			count++;
		if(this.orderinghcp != null)
			count++;
		if(this.newupdated != null)
			count++;
		if(this.fromdate != null)
			count++;
		if(this.todate != null)
			count++;
		if(this.days != null)
			count++;
		if(this.seenchecked != null)
			count++;
		if(this.forreview != null)
			count++;
		if(this.specialty != null)
			count++;
		if(this.completed != null)
			count++;
		if(this.checked != null)
			count++;
		if(this.reviewinghcp != null)
			count++;
		if(this.excludecurrentinpatients != null)
			count++;
		if(this.hcp != null)
			count++;
		if(this.order != null)
			count++;
		if(this.currenip != null)
			count++;
		if(this.newestfirst != null)
			count++;
		if(this.abnormalpathologyresultsonly != null)
			count++;
		if(this.orderbyme != null)
			count++;
		if(this.responsiblehcpfororder != null)
			count++;
		if(this.forreviewbyme != null)
			count++;
		if(this.inpatientorders != null)
			count++;
		if(this.outpatientorders != null)
			count++;
		if(this.currentinpatientsonly != null)
			count++;
		if(this.inpatientorderspatientdischarged != null)
			count++;
		if(this.selectedtab != null)
			count++;
		if(this.wastimeron != null)
			count++;
		if(this.inpatientward != null)
			count++;
		if(this.outpatientdepartment != null)
			count++;
		if(this.responsiblehcpforcurrentip != null)
			count++;
		if(this.specialtytick != null)
			count++;
		if(this.responsiblehcptick != null)
			count++;
		if(this.edorders != null)
			count++;
		if(this.inpatienthospital != null)
			count++;
		if(this.patientid != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return 38;
	}
	protected ims.core.vo.LocationLiteVo hospital;
	protected Integer orderinglocationtype;
	protected ims.vo.ValueObject orderinglocation;
	protected ims.core.vo.ServiceLiteVoCollection discipline;
	protected ims.vo.interfaces.IMos orderinghcp;
	protected Boolean newupdated;
	protected ims.framework.utils.Date fromdate;
	protected ims.framework.utils.Date todate;
	protected Integer days;
	protected Boolean seenchecked;
	protected Boolean forreview;
	protected ims.core.vo.lookups.Specialty specialty;
	protected Boolean completed;
	protected Boolean checked;
	protected ims.core.vo.HcpLiteVo reviewinghcp;
	protected Boolean excludecurrentinpatients;
	protected ims.vo.interfaces.IMos hcp;
	protected Boolean order;
	protected Boolean currenip;
	protected Boolean newestfirst;
	protected Boolean abnormalpathologyresultsonly;
	protected Boolean orderbyme;
	protected Boolean responsiblehcpfororder;
	protected Boolean forreviewbyme;
	protected Boolean inpatientorders;
	protected Boolean outpatientorders;
	protected Boolean currentinpatientsonly;
	protected Boolean inpatientorderspatientdischarged;
	protected Integer selectedtab;
	protected Boolean wastimeron;
	protected ims.core.vo.LocationLiteVo inpatientward;
	protected ims.core.vo.LocationLiteVo outpatientdepartment;
	protected Boolean responsiblehcpforcurrentip;
	protected Boolean specialtytick;
	protected Boolean responsiblehcptick;
	protected Boolean edorders;
	protected ims.core.vo.LocationLiteVo inpatienthospital;
	protected Integer patientid;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
