gt: 		if(value == null)
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 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.RefMan.forms.electivelistdetails;
  
  public abstract class BaseLogic extends Handlers
  {
  	public final Class getDomainInterface() throws ClassNotFoundException
  	{
  		return ims.RefMan.domain.ElectiveListDetails.class;
  	}
  	public final void setContext(ims.framework.UIEngine engine, GenForm form, ims.RefMan.domain.ElectiveListDetails domain)
  	{
  		setContext(engine, form);
  		this.domain = domain;
  	}
  	protected final void oncmbPatientCategoryValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ctnDetails().cmbPatientCategory().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.PatientStatus existingInstance = (ims.core.vo.lookups.PatientStatus)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindcmbPatientCategoryLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.PatientStatus)
  		{
  			ims.core.vo.lookups.PatientStatus instance = (ims.core.vo.lookups.PatientStatus)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindcmbPatientCategoryLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.PatientStatus existingInstance = (ims.core.vo.lookups.PatientStatus)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ctnDetails().cmbPatientCategory().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
  		}
  	}
  	protected final void bindcmbPatientCategoryLookup()
  	{
  		this.form.ctnDetails().cmbPatientCategory().clear();
  		ims.core.vo.lookups.PatientStatusCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getPatientStatus(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ctnDetails().cmbPatientCategory().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
  		}
  	}
  	protected final void setcmbPatientCategoryLookupValue(int id)
  	{
  		ims.core.vo.lookups.PatientStatus instance = ims.core.vo.lookups.LookupHelper.getPatientStatusInstance(this.domain.getLookupService(), id);
  		if(instance != null)
  			this.form.ctnDetails().cmbPatientCategory().setValue(instance);
  	}
  	protected final void defaultcmbPatientCategoryLookupValue()
  	{
  		this.form.ctnDetails().cmbPatientCategory().setValue((ims.core.vo.lookups.PatientStatus)domain.getLookupService().getDefaultInstance(ims.core.vo.lookups.PatientStatus.class, engine.getFormName().getID(), ims.core.vo.lookups.PatientStatus.TYPE_ID));
  	}
  	protected final void oncmbTransportRequiredValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbTransportRequired().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.scheduling.vo.lookups.ApptTransportType existingInstance = (ims.scheduling.vo.lookups.ApptTransportType)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindcmbTransportRequiredLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.scheduling.vo.lookups.ApptTransportType)
  		{
  			ims.scheduling.vo.lookups.ApptTransportType instance = (ims.scheduling.vo.lookups.ApptTransportType)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindcmbTransportRequiredLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.scheduling.vo.lookups.ApptTransportType existingInstance = (ims.scheduling.vo.lookups.ApptTransportType)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbTransportRequired().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
  		}
  	}
  	protected final void bindcmbTransportRequiredLookup()
  	{
  		this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbTransportRequired().clear();
  		ims.scheduling.vo.lookups.ApptTransportTypeCollection lookupCollection = ims.scheduling.vo.lookups.LookupHelper.getApptTransportType(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbTransportRequired().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
  		}
  	}
  	protected final void setcmbTransportRequiredLookupValue(int id)
  	{
  		ims.scheduling.vo.lookups.ApptTransportType instance = ims.scheduling.vo.lookups.LookupHelper.getApptTransportTypeInstance(this.domain.getLookupService(), id);
  		if(instance != null)
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbTransportRequired().setValue(instance);
  	}
  	protected final void defaultcmbTransportRequiredLookupValue()
  	{
  		this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbTransportRequired().setValue((ims.scheduling.vo.lookups.ApptTransportType)domain.getLookupService().getDefaultInstance(ims.scheduling.vo.lookups.ApptTransportType.class, engine.getFormName().getID(), ims.scheduling.vo.lookups.ApptTransportType.TYPE_ID));
  	}
  	protected final void oncmbInterpreterRequiredValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbInterpreterRequired().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.Language existingInstance = (ims.core.vo.lookups.Language)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindcmbInterpreterRequiredLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.Language)
  		{
  			ims.core.vo.lookups.Language instance = (ims.core.vo.lookups.Language)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindcmbInterpreterRequiredLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.Language existingInstance = (ims.core.vo.lookups.Language)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbInterpreterRequired().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
  		}
  	}
  	protected final void bindcmbInterpreterRequiredLookup()
  	{
  		this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbInterpreterRequired().clear();
  		ims.core.vo.lookups.LanguageCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getLanguage(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbInterpreterRequired().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
  		}
  	}
  	protected final void setcmbInterpreterRequiredLookupValue(int id)
  	{
  		ims.core.vo.lookups.Language instance = ims.core.vo.lookups.LookupHelper.getLanguageInstance(this.domain.getLookupService(), id);
  		if(instance != null)
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbInterpreterRequired().setValue(instance);
  	}
  	protected final void defaultcmbInterpreterRequiredLookupValue()
  	{
  		this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbInterpreterRequired().setValue((ims.core.vo.lookups.Language)domain.getLookupService().getDefaultInstance(ims.core.vo.lookups.Language.class, engine.getFormName().getID(), ims.core.vo.lookups.Language.TYPE_ID));
  	}
  	protected final void oncmbLateralitySecondValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbLateralitySecond().getValues();
  
  		if(value == null)
  		{
  			if(listOfValues != null && listOfValues.size() > 0)
  			{
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.LateralityLRB existingInstance = (ims.core.vo.lookups.LateralityLRB)listOfValues.get(x);
  					if(!existingInstance.isActive())
  					{
  						bindcmbLateralitySecondLookup();
  						return;
  					}
  				}
  			}
  		}
  		else if(value instanceof ims.core.vo.lookups.LateralityLRB)
  		{
  			ims.core.vo.lookups.LateralityLRB instance = (ims.core.vo.lookups.LateralityLRB)value;
  
  			if(listOfValues != null)
  			{
  				if(listOfValues.size() == 0)
  					bindcmbLateralitySecondLookup();
  
  				for(int x = 0; x < listOfValues.size(); x++)
  				{
  					ims.core.vo.lookups.LateralityLRB existingInstance = (ims.core.vo.lookups.LateralityLRB)listOfValues.get(x);
  					if(existingInstance.equals(instance))
  						return;
  				}
  			}
  
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbLateralitySecond().newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor());
  		}
  	}
  	protected final void bindcmbLateralitySecondLookup()
  	{
  		this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbLateralitySecond().clear();
  		ims.core.vo.lookups.LateralityLRBCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getLateralityLRB(this.domain.getLookupService());
  		for(int x = 0; x < lookupCollection.size(); x++)
  		{
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbLateralitySecond().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
  		}
  	}
  	protected final void setcmbLateralitySecondLookupValue(int id)
  	{
  		ims.core.vo.lookups.LateralityLRB instance = ims.core.vo.lookups.LookupHelper.getLateralityLRBInstance(this.domain.getLookupService(), id);
  		if(instance != null)
  			this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbLateralitySecond().setValue(instance);
  	}
  	protected final void defaultcmbLateralitySecondLookupValue()
  	{
  		this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbLateralitySecond().setValue((ims.core.vo.lookups.LateralityLRB)domain.getLookupService().getDefaultInstance(ims.core.vo.lookups.LateralityLRB.class, engine.getFormName().getID(), ims.core.vo.lookups.LateralityLRB.TYPE_ID));
  	}
  	protected final void oncmbLateralityValueSet(Object value)
  	{
  		java.util.ArrayList listOfValues = this.form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbLaterality().getValues();
  
  