gt: 				if (i5 > 0)
context: //#############################################################################
  //#                                                                           #
  //#  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
   * Copyright (C) 1995-2004 IMS MAXIMS plc. All rights reserved.
   * IMS Development Environment (version 1.80 build 5589.25814)
   * WARNING: DO NOT MODIFY the content of this file
   * Generated: 12/10/2015, 13:28
   *
   */
  package ims.medical.domain.objects;
  
  /**
   * 
   * @author Kevin O'Carroll
   * Generated.
   */
  
  
  public class OPDVisitDetails extends ims.domain.DomainObject implements ims.domain.SystemInformationRetainer, java.io.Serializable {
  	public static final int CLASSID = 1023100024;
  	private static final long serialVersionUID = 1023100024L;
  	public static final String CLASSVERSION = "${ClassVersion}";
  
  	@Override
  	public boolean shouldCapQuery()
  	{
  		return true;
  	}
  
  	/** Authoring Care Professional */
  	private ims.core.resource.people.domain.objects.Hcp authoringCP;
  	/** Authoring Date Time */
  	private java.util.Date authoringDateTime;
  	/** Collection of relatives present
  	  * Collection of ims.core.admin.domain.objects.OPDRelPres.
  	  */
  	private java.util.Set relPresent;
  	/** Clinical Contact */
  	private ims.core.admin.domain.objects.ClinicalContact clinicalContact;
  	/** Other HCPs present
  	  * Collection of ims.medical.domain.objects.OPDVisitHcpPresent.
  	  */
  	private java.util.Set otherHcpsPresent;
  	/** CareContext */
  	private ims.core.admin.domain.objects.CareContext careContext;
  	/** SystemInformation */
  	private ims.domain.SystemInformation systemInformation = new ims.domain.SystemInformation();
      public OPDVisitDetails (Integer id, int ver)
      {
      	super(id, ver);
      }
      public OPDVisitDetails ()
      {
      	super();
      }
      public OPDVisitDetails (Integer id, int ver, Boolean includeRecord)
      {
      	super(id, ver, includeRecord);
      }
  	public Class getRealDomainClass()
  	{
  		return ims.medical.domain.objects.OPDVisitDetails.class;
  	}
  
  
  	public ims.core.resource.people.domain.objects.Hcp getAuthoringCP() {
  		return authoringCP;
  	}
  	public void setAuthoringCP(ims.core.resource.people.domain.objects.Hcp authoringCP) {
  		this.authoringCP = authoringCP;
  	}
  
  	public java.util.Date getAuthoringDateTime() {
  		return authoringDateTime;
  	}
  	public void setAuthoringDateTime(java.util.Date authoringDateTime) {
  		this.authoringDateTime = authoringDateTime;
  	}
  
  	public java.util.Set getRelPresent() {
  		if ( null == relPresent ) {
  			relPresent = new java.util.HashSet();
  		}
  		return relPresent;
  	}
  	public void setRelPresent(java.util.Set paramValue) {
  		this.relPresent = paramValue;
  	}
  
  	public ims.core.admin.domain.objects.ClinicalContact getClinicalContact() {
  		return clinicalContact;
  	}
  	public void setClinicalContact(ims.core.admin.domain.objects.ClinicalContact clinicalContact) {
  		this.clinicalContact = clinicalContact;
  	}
  
  	public java.util.Set getOtherHcpsPresent() {
  		if ( null == otherHcpsPresent ) {
  			otherHcpsPresent = new java.util.HashSet();
  		}
  		return otherHcpsPresent;
  	}
  	public void setOtherHcpsPresent(java.util.Set paramValue) {
  		this.otherHcpsPresent = paramValue;
  	}
  
  	public ims.core.admin.domain.objects.CareContext getCareContext() {
  		return careContext;
  	}
  	public void setCareContext(ims.core.admin.domain.objects.CareContext careContext) {
  		this.careContext = careContext;
  	}
  
  	public ims.domain.SystemInformation getSystemInformation() {
  		if (systemInformation == null) systemInformation = new ims.domain.SystemInformation();
  		return systemInformation;
  	}
  
  
  	/**
  	 * isConfigurationObject
  	 * Taken from the Usage property of the business object, this method will return
  	 * a boolean indicating whether this is a configuration object or not
  	 * Configuration = true, Instantiation = false
  	 */
  	public static boolean isConfigurationObject()
  	{
  		if ( "Instantiation".equals("Configuration") )
  			return true;
  		else
  			return false;
  	}
  
  
  
  
  
  	public int getClassId() {
  		return CLASSID;
  	}
  
  	public String getClassVersion()
  	{
  		return CLASSVERSION;
  	}
  
  	public String toAuditString()
  	{
  		StringBuffer auditStr = new StringBuffer();
  		
  		auditStr.append("\r\n*authoringCP* :");
  		if (authoringCP != null)
  		{
  			auditStr.append(toShortClassName(authoringCP));
  				
  		    auditStr.append(authoringCP.getId());
  		}
  	    auditStr.append("; ");
  		auditStr.append("\r\n*authoringDateTime* :");
  		auditStr.append(authoringDateTime);
  	    auditStr.append("; ");
  		auditStr.append("\r\n*relPresent* :");
  		if (relPresent != null)
  		{
  			java.util.Iterator it3 = relPresent.iterator();
  			int i3=0;
  			while (it3.hasNext())
  			{
  				if (i3 > 0)
  					auditStr.append(",");
  				ims.core.admin.domain.objects.OPDRelPres obj = (ims.core.admin.domain.objects.OPDRelPres)it3.next();
  		if (obj != null)
  		{
  		   if (i3 == 0)
  		   {
  			auditStr.append(toShortClassName(obj));
  			auditStr.append("[");
  		   }
  		
  		   auditStr.append(obj.getId());
  		}
  			i3++;
  		}
  		if (i3 > 0)
  			auditStr.append("] " + i3);
  		}
  	    auditStr.append("; ");
  		auditStr.append("\r\n*clinicalContact* :");
  		if (clinicalContact != null)
  		{
  			auditStr.append(toShortClassName(clinicalContact));
  				
  		    auditStr.append(clinicalContact.getId());
  		}
  	    auditStr.append("; ");
  		auditStr.append("\r\n*otherHcpsPresent* :");
  		if (otherHcpsPresent != null)
  		{
  			java.util.Iterator it5 = otherHcpsPresent.iterator();
  			int i5=0;
  			while (it5.hasNext())
  			{
  