gt: 		for(int x = 0; x < lookupCollection.size(); x++)
context: //#############################################################################
  //#                                                                           #
  //#  Copyright (C) <2014>  <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/>.    #
  //#                                                                           #
  //#############################################################################
  //#EOH
  // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5007.25751)
  // Copyright (C) 1995-2014 IMS MAXIMS. All rights reserved.
  // WARNING: DO NOT MODIFY the content of this file
  
  package ims.clinical.forms.edischargedischargedetailscomponent;
  
  public abstract class BaseLogic extends Handlers implements IComponent
  {
  	public final Class getDomainInterface() throws ClassNotFoundException
  	{
  		return ims.clinical.domain.EDischargeDischargeDetailsComponent.class;
  	}
  	public final void setContext(ims.framework.UIComponentEngine engine, GenForm form, ims.clinical.domain.EDischargeDischargeDetailsComponent domain)
  	{
  		setContext(engine, form);
  		this.domain = domain;
  	}
  	public void setMode(ims.framework.enumerations.FormMode mode)
  	{
  		form.setMode(mode);
  	}
  	public ims.framework.enumerations.FormMode getMode()
  	{
  		return form.getMode();
  	}
  	protected final void onansConfirmationOfHardcopyValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ansConfirmationOfHardcopy().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindansConfirmationOfHardcopyLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.YesNo)
  		{
  			ims.core.vo.lookups.YesNo instance = (ims.core.vo.lookups.YesNo)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindansConfirmationOfHardcopyLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ansConfirmationOfHardcopy().addOption(instance);
  		}
  	}
  	protected final void bindansConfirmationOfHardcopyLookup()
  	{
  		this.form.ansConfirmationOfHardcopy().clear();
  		ims.core.vo.lookups.YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ansConfirmationOfHardcopy().addOption(lookupCollection.get(x));
  		}
  	}
  	protected final void defaultansConfirmationOfHardcopyLookupValue()
  	{
  		this.form.ansConfirmationOfHardcopy().setValue((ims.core.vo.lookups.YesNo)domain.getLookupService().getDefaultInstance(ims.core.vo.lookups.YesNo.class, engine.getFormName().getID(), ims.core.vo.lookups.YesNo.TYPE_ID));
  	}
  	protected final void onansFitToReturnWorkValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ansFitToReturnWork().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindansFitToReturnWorkLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.YesNo)
  		{
  			ims.core.vo.lookups.YesNo instance = (ims.core.vo.lookups.YesNo)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindansFitToReturnWorkLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ansFitToReturnWork().addOption(instance);
  		}
  	}
  	protected final void bindansFitToReturnWorkLookup()
  	{
  		this.form.ansFitToReturnWork().clear();
  		ims.core.vo.lookups.YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ansFitToReturnWork().addOption(lookupCollection.get(x));
  		}
  	}
  	protected final void defaultansFitToReturnWorkLookupValue()
  	{
  		this.form.ansFitToReturnWork().setValue((ims.core.vo.lookups.YesNo)domain.getLookupService().getDefaultInstance(ims.core.vo.lookups.YesNo.class, engine.getFormName().getID(), ims.core.vo.lookups.YesNo.TYPE_ID));
  	}
  	protected final void onansStatementOfFitnessValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ansStatementOfFitness().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindansStatementOfFitnessLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.YesNo)
  		{
  			ims.core.vo.lookups.YesNo instance = (ims.core.vo.lookups.YesNo)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindansStatementOfFitnessLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ansStatementOfFitness().addOption(instance);
  		}
  	}
  	protected final void bindansStatementOfFitnessLookup()
  	{
  		this.form.ansStatementOfFitness().clear();
  		ims.core.vo.lookups.YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ansStatementOfFitness().addOption(lookupCollection.get(x));
  		}
  	}
  	protected final void defaultansStatementOfFitnessLookupValue()
  	{
  		this.form.ansStatementOfFitness().setValue((ims.core.vo.lookups.YesNo)domain.getLookupService().getDefaultInstance(ims.core.vo.lookups.YesNo.class, engine.getFormName().getID(), ims.core.vo.lookups.YesNo.TYPE_ID));
  	}
  	protected final void onansCertificateofSicknessValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ansCertificateofSickness().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindansCertificateofSicknessLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.YesNo)
  		{
  			ims.core.vo.lookups.YesNo instance = (ims.core.vo.lookups.YesNo)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindansCertificateofSicknessLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ansCertificateofSickness().addOption(instance);
  		}
  	}
  	protected final void bindansCertificateofSicknessLookup()
  	{
  		this.form.ansCertificateofSickness().clear();
  		ims.core.vo.lookups.YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ansCertificateofSickness().addOption(lookupCollection.get(x));
  		}
  	}
  	protected final void defaultansCertificateofSicknessLookupValue()
  	{
  		this.form.ansCertificateofSickness().setValue((ims.core.vo.lookups.YesNo)domain.getLookupService().getDefaultInstance(ims.core.vo.lookups.YesNo.class, engine.getFormName().getID(), ims.core.vo.lookups.YesNo.TYPE_ID));
  	}
  	protected final void onansLivingAloneValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ansLivingAlone().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindansLivingAloneLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.YesNo)
  		{
  			ims.core.vo.lookups.YesNo instance = (ims.core.vo.lookups.YesNo)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindansLivingAloneLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.YesNo existingInstance = (ims.core.vo.lookups.YesNo)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ansLivingAlone().addOption(instance);
  		}
  	}
  	protected final void bindansLivingAloneLookup()
  	{
  		this.form.ansLivingAlone().clear();
  		ims.core.vo.lookups.YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());
  