gt: 		this.formInfo = form.getFormInfo();
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.oncology.forms.internalreferrals;
  
  import ims.framework.*;
  import ims.framework.controls.*;
  import ims.framework.enumerations.*;
  import ims.framework.utils.RuntimeAnchoring;
  
  public class GenForm extends FormBridge
  {
  	private static final long serialVersionUID = 1L;
  
  	public boolean canProvideData(IReportSeed[] reportSeeds)
  	{
  		return new ReportDataProvider(reportSeeds, this.getFormReportFields()).canProvideData();
  	}
  	public boolean hasData(IReportSeed[] reportSeeds)
  	{
  		return new ReportDataProvider(reportSeeds, this.getFormReportFields()).hasData();
  	}
  	public IReportField[] getData(IReportSeed[] reportSeeds)
  	{
  		return getData(reportSeeds, false);
  	}
  	public IReportField[] getData(IReportSeed[] reportSeeds, boolean excludeNulls)
  	{
  		return new ReportDataProvider(reportSeeds, this.getFormReportFields(), excludeNulls).getData();
  	}
  	public static class grdListRow extends GridRowBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		protected grdListRow(GridRow row)
  		{
  			super(row);
  		}
  		public void showOpened(int column)
  		{
  			super.row.showOpened(column);
  		}
  		public void setColDateReadOnly(boolean value)
  		{
  			super.row.setReadOnly(0, value);
  		}
  		public boolean isColDateReadOnly()
  		{
  			return super.row.isReadOnly(0);
  		}
  		public void showColDateOpened()
  		{
  			super.row.showOpened(0);
  		}
  		public String getColDate()
  		{
  			return (String)super.row.get(0);
  		}
  		public void setColDate(String value)
  		{
  			super.row.set(0, value);
  		}
  		public void setCellColDateTooltip(String value)
  		{
  			super.row.setTooltip(0, value);
  		}
  		public void setColTypeReadOnly(boolean value)
  		{
  			super.row.setReadOnly(1, value);
  		}
  		public boolean isColTypeReadOnly()
  		{
  			return super.row.isReadOnly(1);
  		}
  		public void showColTypeOpened()
  		{
  			super.row.showOpened(1);
  		}
  		public String getColType()
  		{
  			return (String)super.row.get(1);
  		}
  		public void setColType(String value)
  		{
  			super.row.set(1, value);
  		}
  		public void setCellColTypeTooltip(String value)
  		{
  			super.row.setTooltip(1, value);
  		}
  		public void setColInvDateReadOnly(boolean value)
  		{
  			super.row.setReadOnly(2, value);
  		}
  		public boolean isColInvDateReadOnly()
  		{
  			return super.row.isReadOnly(2);
  		}
  		public void showColInvDateOpened()
  		{
  			super.row.showOpened(2);
  		}
  		public String getColInvDate()
  		{
  			return (String)super.row.get(2);
  		}
  		public void setColInvDate(String value)
  		{
  			super.row.set(2, value);
  		}
  		public void setCellColInvDateTooltip(String value)
  		{
  			super.row.setTooltip(2, value);
  		}
  		public ims.oncology.vo.InternalReferralVo getValue()
  		{
  			return (ims.oncology.vo.InternalReferralVo)super.row.getValue();
  		}
  		public void setValue(ims.oncology.vo.InternalReferralVo value)
  		{
  			super.row.setValue(value);
  		}
  	}
  	public static class grdListRowCollection extends GridRowCollectionBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		private grdListRowCollection(GridRowCollection collection)
  		{
  			super(collection);
  		}
  		public grdListRow get(int index)
  		{
  			return new grdListRow(super.collection.get(index));
  		}
  		public grdListRow newRow()
  		{
  			return new grdListRow(super.collection.newRow());
  		}
  		public grdListRow newRow(boolean autoSelect)
  		{
  			return new grdListRow(super.collection.newRow(autoSelect));
  		}
  		public grdListRow newRowAt(int index)
  		{
  			return new grdListRow(super.collection.newRowAt(index));
  		}
  		public grdListRow newRowAt(int index, boolean autoSelect)
  		{
  			return new grdListRow(super.collection.newRowAt(index, autoSelect));
  		}
  	}
  	public static class grdListGrid extends GridBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		private void addStringColumn(String caption, int captionAlignment, int alignment, int width, boolean readOnly, boolean bold, int sortOrder, int maxLength, boolean canGrow, ims.framework.enumerations.CharacterCasing casing)
  		{
  			super.grid.addStringColumn(caption, captionAlignment, alignment, width, readOnly, bold, sortOrder, maxLength, canGrow, casing);
  		}
  		public ims.oncology.vo.InternalReferralVoCollection getValues()
  		{
  			ims.oncology.vo.InternalReferralVoCollection listOfValues = new ims.oncology.vo.InternalReferralVoCollection();
  			for(int x = 0; x < this.getRows().size(); x++)
  			{
  				listOfValues.add(this.getRows().get(x).getValue());
  			}
  			return listOfValues;
  		}
  		public ims.oncology.vo.InternalReferralVo getValue()
  		{
  			return (ims.oncology.vo.InternalReferralVo)super.grid.getValue();
  		}
  		public void setValue(ims.oncology.vo.InternalReferralVo value)
  		{
  			super.grid.setValue(value);
  		}
  		public grdListRow getSelectedRow()
  		{
  			return super.grid.getSelectedRow() == null ? null : new grdListRow(super.grid.getSelectedRow());
  		}
  		public int getSelectedRowIndex()
  		{
  			return super.grid.getSelectedRowIndex();
  		}
  		public grdListRowCollection getRows()
  		{
  			return new grdListRowCollection(super.grid.getRows());
  		}
  		public grdListRow getRowByValue(ims.oncology.vo.InternalReferralVo value)
  		{
  			GridRow row = super.grid.getRowByValue(value);
  			return row == null?null:new grdListRow(row);
  		}
  		public void setColDateHeaderTooltip(String value)
  		{
  			super.grid.setColumnHeaderTooltip(0, value);
  		}
  		public String getColDateHeaderTooltip()
  		{
  			return super.grid.getColumnHeaderTooltip(0);
  		}
  		public void setColTypeHeaderTooltip(String value)
  		{
  			super.grid.setColumnHeaderTooltip(1, value);
  		}
  		public String getColTypeHeaderTooltip()
  		{
  			return super.grid.getColumnHeaderTooltip(1);
  		}
  		public void setColInvDateHeaderTooltip(String value)
  		{
  			super.grid.setColumnHeaderTooltip(2, value);
  		}
  		public String getColInvDateHeaderTooltip()
  		{
  			return super.grid.getColumnHeaderTooltip(2);
  		}
  	}
  
  	public static class GroupStatusRadioButton extends RadioButtonBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		protected void setContext(Integer startTabIndex, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize)
  		{
  			if(startTabIndex == null)
  				throw new RuntimeException("Invalid startTabIndex ");
  			RuntimeAnchoring anchoringHelper1 = new RuntimeAnchoring(designSize, runtimeSize, 168, 16, 56, 16, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  			control.addButton(0, anchoringHelper1.getX(), anchoringHelper1.getY(), anchoringHelper1.getWidth(), "All", startTabIndex.intValue() + 2);
  			RuntimeAnchoring anchoringHelper2 = new RuntimeAnchoring(designSize, runtimeSize, 72, 16, 64, 16, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  			control.addButton(1, anchoringHelper2.getX(), anchoringHelper2.getY(), anchoringHelper2.getWidth(), "Active", startTabIndex.intValue() + 1);
  		}
  		public void setText(GroupStatusEnumeration option, String value)
  		{
  			if(option != null && option.id >= 0 && value != null)
  				control.setText(option.id, value);
  		}
  		public GroupStatusEnumeration getValue()
  		{
  			switch (super.control.getValue())
  			{
  				case -1: return GroupStatusEnumeration.None;
  				case 0: return GroupStatusEnumeration.rdoAll;
  				case 1: return GroupStatusEnumeration.rdoCurrent;
  			}
  			return null;
  		}
  		public void setValue(GroupStatusEnumeration value)
  		{
  			if(value != null)
  				super.control.setValue(value.id);
  			else
  				super.control.setValue(GroupStatusEnumeration.None.id);
  		}
  		public boolean isEnabled(GroupStatusEnumeration option)
  		{
  			return super.control.isEnabled(option.id);
  		}
  		public void setEnabled(GroupStatusEnumeration option, boolean value)
  		{
  			super.control.setEnabled(option.id, value);
  		}
  		public boolean isVisible(GroupStatusEnumeration option)
  		{
  			return super.control.isVisible(option.id);
  		}
  		public void setVisible(GroupStatusEnumeration option, boolean value)
  		{
  			super.control.setVisible(option.id, value);
  		}
  		public void setVisible(boolean value)
  		{
  			super.control.setVisible(value);
  		}
  		public void setEnabled(boolean value)
  		{
  			super.control.setEnabled(value);
  		}
  	}
  	public static class GroupStatusEnumeration implements java.io.Serializable
  	{
  		private static final long serialVersionUID = 1L;
  		public static GroupStatusEnumeration None = new GroupStatusEnumeration(-1);
  		public static GroupStatusEnumeration rdoAll = new GroupStatusEnumeration(0);
  		public static GroupStatusEnumeration rdoCurrent = new GroupStatusEnumeration(1);
  		private GroupStatusEnumeration(int id)
  		{
  			this.id = id;
  		}
  		public boolean equals(Object o)
  		{
  			return this.id == ((GroupStatusEnumeration)o).id;
  		}
  		private int id;
  	}
  	private void validateContext(ims.framework.Context context)
  	{
  		if(context == null)
  			return;
  		if(!context.isValidContextType(ims.core.vo.CareContextShortVo.class))
  			throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.CareContextShortVo' of the global context variable 'Core.CurrentCareContext' is not supported.");
  		if(!context.isValidContextType(ims.core.vo.PatientShort.class))
  			throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.PatientShort' of the global context variable 'Core.PatientShort' is not supported.");
  		if(!context.isValidContextType(ims.oncology.vo.InternalReferralsSearchCriteriaVo.class))
  			throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.oncology.vo.InternalReferralsSearchCriteriaVo' of the global context variable 'Oncology.InternalReferralsSearchCriteria' is not supported.");
  	}
  	private void validateMandatoryContext(Context context)
  	{
  		if(new ims.framework.ContextVariable("Core.PatientShort", "_cvp_Core.PatientShort").getValueIsNull(context))
  			throw new ims.framework.exceptions.FormMandatoryContextMissingException("The required context data 'Core.PatientShort' is not available.");
  	}
  	public boolean supportsRecordedInError()
  	{
  		return false;
  	}
  	public ims.vo.ValueObject getRecordedInErrorVo()
  	{
  		return null;
  	}
  	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context) throws Exception
  	{
  		setContext(loader, form, appForm, factory, context, Boolean.FALSE, new Integer(0), null, null, new Integer(0));
  	}
  	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context, Boolean skipContextValidation) throws Exception
  	{
  		setContext(loader, form, appForm, factory, context, skipContextValidation, new Integer(0), null, null, new Integer(0));
  	}
  	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, ims.framework.Context context, Boolean skipContextValidation, Integer startControlID, ims.framework.utils.SizeInfo runtimeSize, ims.framework.Control control, Integer startTabIndex) throws Exception
  	{
  		if(loader == null); // this is to avoid eclipse warning only.
  		if(factory == null); // this is to avoid eclipse warning only.
  		if(runtimeSize == null); // this is to avoid eclipse warning only.
  		if(appForm == null)
  			throw new RuntimeException("Invalid application form");
  		if(startControlID == null)
  			throw new RuntimeException("Invalid startControlID");
  		if(control == null); // this is to avoid eclipse warning only.
  		if(startTabIndex == null)
  			throw new RuntimeException("Invalid startTabIndex");
  		this.context = context;
  		this.componentIdentifier = startControlID.toString();
  