gt: 				AddEmergencyTheatre = new LocalFormName(134278);
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.core.forms.pendingemergencytheatreworklist;
  
  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;
  
  	protected void fireCustomControlValueChanged()
  	{
  		super.fireValueChanged();
  	}
  	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 cmbUrgencyCategoryComboBox extends ComboBoxBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		public void newRow(ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory value, String text)
  		{
  			super.control.newRow(value, text);
  		}
  		public void newRow(ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory value, String text, ims.framework.utils.Image image)
  		{
  			super.control.newRow(value, text, image);
  		}
  		public void newRow(ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory value, String text, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, textColor);
  		}
  		public void newRow(ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, image, textColor);
  		}
  		public boolean removeRow(ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory value)
  		{
  			return super.control.removeRow(value);
  		}
  		public ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory getValue()
  		{
  			return (ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory)super.control.getValue();
  		}
  		public void setValue(ims.scheduling.vo.lookups.PendingTheatreUrgencyCategory value)
  		{
  			super.control.setValue(value);
  		}
  	}
  	public static class qmbExpectedWardComboBox extends ComboBoxBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		public void newRow(ims.core.vo.LocationLiteVo value, String text)
  		{
  			super.control.newRow(value, text);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Image image)
  		{
  			super.control.newRow(value, text, image);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, textColor);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, image, textColor);
  		}
  		public boolean removeRow(ims.core.vo.LocationLiteVo value)
  		{
  			return super.control.removeRow(value);
  		}
  		public ims.core.vo.LocationLiteVo getValue()
  		{
  			return (ims.core.vo.LocationLiteVo)super.control.getValue();
  		}
  		public void setValue(ims.core.vo.LocationLiteVo value)
  		{
  			super.control.setValue(value);
  		}
  		public void setEditedText(String text)
  		{
  			super.control.setEditedText(text);
  		}
  		public String getEditedText()
  		{
  			return super.control.getEditedText();
  		}
  	}
  	public static class qmbExpectedHospitalComboBox extends ComboBoxBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		public void newRow(ims.core.vo.LocationLiteVo value, String text)
  		{
  			super.control.newRow(value, text);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Image image)
  		{
  			super.control.newRow(value, text, image);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, textColor);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, image, textColor);
  		}
  		public boolean removeRow(ims.core.vo.LocationLiteVo value)
  		{
  			return super.control.removeRow(value);
  		}
  		public ims.core.vo.LocationLiteVo getValue()
  		{
  			return (ims.core.vo.LocationLiteVo)super.control.getValue();
  		}
  		public void setValue(ims.core.vo.LocationLiteVo value)
  		{
  			super.control.setValue(value);
  		}
  		public void setEditedText(String text)
  		{
  			super.control.setEditedText(text);
  		}
  		public String getEditedText()
  		{
  			return super.control.getEditedText();
  		}
  	}
  	public static class grdServicesRow extends GridRowBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		protected grdServicesRow(GridRow row)
  		{
  			super(row);
  		}
  		public void showOpened(int column)
  		{
  			super.row.showOpened(column);
  		}
  		public void setColServiceReadOnly(boolean value)
  		{
  			super.row.setReadOnly(0, value);
  		}
  		public boolean isColServiceReadOnly()
  		{
  			return super.row.isReadOnly(0);
  		}
  		public void showColServiceOpened()
  		{
  			super.row.showOpened(0);
  		}
  		public String getColService()
  		{
  			return (String)super.row.get(0);
  		}
  		public void setColService(String value)
  		{
  			super.row.set(0, value);
  		}
  		public void setCellColServiceTooltip(String value)
  		{
  			super.row.setTooltip(0, value);
  		}
  		public ims.core.vo.ServiceShortVo getValue()
  		{
  			return (ims.core.vo.ServiceShortVo)super.row.getValue();
  		}
  		public void setValue(ims.core.vo.ServiceShortVo value)
  		{
  			super.row.setValue(value);
  		}
  	}
  	public static class grdServicesRowCollection extends GridRowCollectionBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		private grdServicesRowCollection(GridRowCollection collection)
  		{
  			super(collection);
  		}
  		public grdServicesRow get(int index)
  		{
  			return new grdServicesRow(super.collection.get(index));
  		}
  		public grdServicesRow newRow()
  		{
  			return new grdServicesRow(super.collection.newRow());
  		}
  		public grdServicesRow newRow(boolean autoSelect)
  		{
  			return new grdServicesRow(super.collection.newRow(autoSelect));
  		}
  		public grdServicesRow newRowAt(int index)
  		{
  			return new grdServicesRow(super.collection.newRowAt(index));
  		}
  		public grdServicesRow newRowAt(int index, boolean autoSelect)
  		{
  			return new grdServicesRow(super.collection.newRowAt(index, autoSelect));
  		}
  	}
  	public static class grdServicesGrid 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.core.vo.ServiceShortVoCollection getValues()
  		{
  			ims.core.vo.ServiceShortVoCollection listOfValues = new ims.core.vo.ServiceShortVoCollection();
  			for(int x = 0; x < this.getRows().size(); x++)
  			{
  				listOfValues.add(this.getRows().get(x).getValue());
  			}
  			return listOfValues;
  		}
  		public ims.core.vo.ServiceShortVo getValue()
  		{
  			return (ims.core.vo.ServiceShortVo)super.grid.getValue();
  		}
  		public void setValue(ims.core.vo.ServiceShortVo value)
  		{
  			super.grid.setValue(value);
  		}
  		public grdServicesRow getSelectedRow()
  		{
  			return super.grid.getSelectedRow() == null ? null : new grdServicesRow(super.grid.getSelectedRow());
  		}
  		public int getSelectedRowIndex()
  		{
  			return super.grid.getSelectedRowIndex();
  		}
  		public grdServicesRowCollection getRows()
  		{
  			return new grdServicesRowCollection(super.grid.getRows());
  		}
  		public grdServicesRow getRowByValue(ims.core.vo.ServiceShortVo value)
  		{
  			GridRow row = super.grid.getRowByValue(value);
  			return row == null?null:new grdServicesRow(row);
  		}
  		public void setColServiceHeaderTooltip(String value)
  		{
  			super.grid.setColumnHeaderTooltip(0, value);
  		}
  		public String getColServiceHeaderTooltip()
  		{
  			return super.grid.getColumnHeaderTooltip(0);
  		}
  	}
  	private void validateContext(ims.framework.Context context)
  	{
  		if(context == null)
  			return;
  		if(!context.isValidContextType(ims.RefMan.vo.CatsReferralRefVo.class))
  			throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.RefMan.vo.CatsReferralRefVo' of the global context variable 'RefMan.CatsReferral' 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.scheduling.vo.PendingEmergencyTheatreWorklistSearchCriteriaVo.class))
  			throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.scheduling.vo.PendingEmergencyTheatreWorklistSearchCriteriaVo' of the global context variable 'Core.BedMngPendingEmergencyTheatreListCriteria' is not supported.");
  	}
  	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();
  		this.formInfo = form.getFormInfo();
  		this.globalContext = new GlobalContext(context);
  	
  		if(skipContextValidation == null || !skipContextValidation.booleanValue())
  		{
  			validateContext(context);
  		}
  	
  		super.setContext(form);
  
  		ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(848, 632);
  		if(runtimeSize == null)
  			runtimeSize = designSize;
  		form.setWidth(runtimeSize.getWidth());
  		form.setHeight(runtimeSize.getHeight());
  		super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
  		super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
  		super.setGlobalContext(ContextBridgeFlyweightFactory.getInstance().create(GlobalContextBridge.class, context, false));
  
  		// Context Menus
  		contextMenus = new ContextMenus();
  		contextMenus.RefMan.contextMenuPendingEmergencyTheatre = factory.createMenu(startControlID.intValue() + 1);
  		contextMenus.RefMan.contextMenuPendingEmergencyTheatreVIEW_EDIT_EMERGENCY_THEATREItem = factory.createMenuItem(startControlID.intValue() + 1, "View / Edit Pending Emergency Theatre Details", true, false, new Integer(102150), true, false);
  		if(factory.getUIEngine().getLoggedInRole().hasMenuActionRight(appForm, new ims.framework.MenuAction(6310001)))
  			contextMenus.RefMan.contextMenuPendingEmergencyTheatre.add(contextMenus.RefMan.contextMenuPendingEmergencyTheatreVIEW_EDIT_EMERGENCY_THEATREItem);
  		contextMenus.RefMan.contextMenuPendingEmergencyTheatreREMOVE_EMERGENCY_THEATREItem = factory.createMenuItem(startControlID.intValue() + 2, "Remove Pending Emergency Theatre Details Record", true, false, new Integer(102300), true, false);
  		if(factory.getUIEngine().getLoggedInRole().hasMenuActionRight(appForm, new ims.framework.MenuAction(6310002)))
  			contextMenus.RefMan.contextMenuPendingEmergencyTheatre.add(contextMenus.RefMan.contextMenuPendingEmergencyTheatreREMOVE_EMERGENCY_THEATREItem);
  		contextMenus.RefMan.contextMenuPendingEmergencyTheatreBOOK_EMERGENCY_THEATREItem = factory.createMenuItem(startControlID.intValue() + 3, "Book Non-Elective Theatre Appointment", true, false, new Integer(102186), true, false);
  		if(factory.getUIEngine().getLoggedInRole().hasMenuActionRight(appForm, new ims.framework.MenuAction(6310003)))
  			contextMenus.RefMan.contextMenuPendingEmergencyTheatre.add(contextMenus.RefMan.contextMenuPendingEmergencyTheatreBOOK_EMERGENCY_THEATREItem);
  		form.registerMenu(contextMenus.RefMan.contextMenuPendingEmergencyTheatre);
  
  
  		// Custom Controls
  		ims.framework.CustomComponent instance1 = factory.getEmptyCustomComponent();
  		RuntimeAnchoring anchoringHelper1 = new RuntimeAnchoring(designSize, runtimeSize, 524, 8, 328, 20, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
  		ims.framework.FormUiLogic m_ccRespHcpForm = loader.loadComponent(102256, appForm, startControlID * 10 + 1000, anchoringHelper1.getSize(), instance1, startTabIndex.intValue() + 5, skipContextValidation);
  		//ims.framework.Control m_ccRespHcpControl = factory.getControl(CustomComponent.class, new Object[] { control, new Integer(startControlID.intValue() + 1000), new Integer(524), new Integer(8), new Integer(328), new Integer(20), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT, new Integer(startTabIndex.intValue() + 5), m_ccRespHcpForm, instance1 } );
  		ims.framework.Control m_ccRespHcpControl = factory.getControl(CustomComponent.class, new Object[] { control, new Integer(startControlID.intValue() + 1001),  new Integer(anchoringHelper1.getX()), new Integer(anchoringHelper1.getY()), new Integer(anchoringHelper1.getWidth()), new Integer(anchoringHelper1.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT, new Integer(startTabIndex.intValue() + 5), m_ccRespHcpForm, instance1, Boolean.FALSE } );
  		super.addControl(m_ccRespHcpControl);
  		Menu[] menus1 = m_ccRespHcpForm.getForm().getRegisteredMenus();
  		for(int x = 0; x < menus1.length; x++)
  		{
  			form.registerMenu(menus1[x]);
  		}
  
  		// Label Controls
  		RuntimeAnchoring anchoringHelper2 = new RuntimeAnchoring(designSize, runtimeSize, 10, 605, 37, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
  		super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1002), new Integer(anchoringHelper2.getX()), new Integer(anchoringHelper2.getY()), new Integer(anchoringHelper2.getWidth()), new Integer(anchoringHelper2.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Total:", new Integer(1), null, new Integer(0)}));
  		RuntimeAnchoring anchoringHelper3 = new RuntimeAnchoring(designSize, runtimeSize, 404, 108, 94, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1003), new Integer(anchoringHelper3.getX()), new Integer(anchoringHelper3.getY()), new Integer(anchoringHelper3.getWidth()), new Integer(anchoringHelper3.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Expected Ward:", new Integer(1), null, new Integer(0)}));
  		RuntimeAnchoring anchoringHelper4 = new RuntimeAnchoring(designSize, runtimeSize, 404, 134, 91, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1004), new Integer(anchoringHelper4.getX()), new Integer(anchoringHelper4.getY()), new Integer(anchoringHelper4.getWidth()), new Integer(anchoringHelper4.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Expected Date:", new Integer(1), null, new Integer(0)}));
  		RuntimeAnchoring anchoringHelper5 = new RuntimeAnchoring(designSize, runtimeSize, 404, 82, 111, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1005), new Integer(anchoringHelper5.getX()), new Integer(anchoringHelper5.getY()), new Integer(anchoringHelper5.getWidth()), new Integer(anchoringHelper5.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Expected Hospital:", new Integer(1), null, new Integer(0)}));
  		RuntimeAnchoring anchoringHelper6 = new RuntimeAnchoring(designSize, runtimeSize, 404, 35, 110, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1006), new Integer(anchoringHelper6.getX()), new Integer(anchoringHelper6.getY()), new Integer(anchoringHelper6.getWidth()), new Integer(anchoringHelper6.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Urgency Category:", new Integer(1), null, new Integer(0)}));
  		RuntimeAnchoring anchoringHelper7 = new RuntimeAnchoring(designSize, runtimeSize, 404, 10, 104, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1007), new Integer(anchoringHelper7.getX()), new Integer(anchoringHelper7.getY()), new Integer(anchoringHelper7.getWidth()), new Integer(anchoringHelper7.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Responsible HCP:", new Integer(1), null, new Integer(0)}));
  
  		// Date Controls
  		RuntimeAnchoring anchoringHelper8 = new RuntimeAnchoring(designSize, runtimeSize, 524, 132, 128, 20, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(DateControl.class, new Object[] { control, new Integer(startControlID.intValue() + 1008), new Integer(anchoringHelper8.getX()), new Integer(anchoringHelper8.getY()), new Integer(anchoringHelper8.getWidth()), new Integer(anchoringHelper8.getHeight()), new Integer(startTabIndex.intValue() + 12), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT,Boolean.TRUE, null, Boolean.FALSE, null, Boolean.FALSE, null}));
  
  		// ComboBox Controls
  		RuntimeAnchoring anchoringHelper9 = new RuntimeAnchoring(designSize, runtimeSize, 524, 33, 312, 21, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
  		ComboBox m_cmbUrgencyCategoryTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1009), new Integer(anchoringHelper9.getX()), new Integer(anchoringHelper9.getY()), new Integer(anchoringHelper9.getWidth()), new Integer(anchoringHelper9.getHeight()), new Integer(startTabIndex.intValue() + 7), ControlState.UNKNOWN, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT ,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.FALSE, new Integer(1), null, Boolean.FALSE, new Integer(-1)});
  		addControl(m_cmbUrgencyCategoryTemp);
  		cmbUrgencyCategoryComboBox cmbUrgencyCategory = (cmbUrgencyCategoryComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(cmbUrgencyCategoryComboBox.class, m_cmbUrgencyCategoryTemp);
  		super.addComboBox(cmbUrgencyCategory);
  
  		// Query ComboBox Controls
  		RuntimeAnchoring anchoringHelper10 = new RuntimeAnchoring(designSize, runtimeSize, 524, 106, 312, 21, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
  		ComboBox m_qmbExpectedWardTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1010), new Integer(anchoringHelper10.getX()), new Integer(anchoringHelper10.getY()), new Integer(anchoringHelper10.getWidth()), new Integer(anchoringHelper10.getHeight()), new Integer(startTabIndex.intValue() + 11), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.TRUE, new Integer(1), null, Boolean.FALSE, new Integer(-1), Boolean.FALSE});
  		addControl(m_qmbExpectedWardTemp);
  		qmbExpectedWardComboBox qmbExpectedWard = (qmbExpectedWardComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(qmbExpectedWardComboBox.class, m_qmbExpectedWardTemp);
  		super.addComboBox(qmbExpectedWard);
  		RuntimeAnchoring anchoringHelper11 = new RuntimeAnchoring(designSize, runtimeSize, 524, 80, 312, 21, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
  		ComboBox m_qmbExpectedHospitalTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1011), new Integer(anchoringHelper11.getX()), new Integer(anchoringHelper11.getY()), new Integer(anchoringHelper11.getWidth()), new Integer(anchoringHelper11.getHeight()), new Integer(startTabIndex.intValue() + 10), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.TRUE, new Integer(1), null, Boolean.FALSE, new Integer(-1), Boolean.FALSE});
  		addControl(m_qmbExpectedHospitalTemp);
  		qmbExpectedHospitalComboBox qmbExpectedHospital = (qmbExpectedHospitalComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(qmbExpectedHospitalComboBox.class, m_qmbExpectedHospitalTemp);
  		super.addComboBox(qmbExpectedHospital);
  
  		// CheckBox Controls
  		RuntimeAnchoring anchoringHelper12 = new RuntimeAnchoring(designSize, runtimeSize, 524, 59, 160, 16, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(CheckBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1012), new Integer(anchoringHelper12.getX()), new Integer(anchoringHelper12.getY()), new Integer(anchoringHelper12.getWidth()), new Integer(anchoringHelper12.getHeight()), new Integer(startTabIndex.intValue() + 9), ControlState.UNKNOWN, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.TOPLEFT ,"Not Currently an Inpatient", Boolean.TRUE, null}));
  		RuntimeAnchoring anchoringHelper13 = new RuntimeAnchoring(designSize, runtimeSize, 404, 59, 104, 16, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(CheckBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1013), new Integer(anchoringHelper13.getX()), new Integer(anchoringHelper13.getY()), new Integer(anchoringHelper13.getWidth()), new Integer(anchoringHelper13.getHeight()), new Integer(startTabIndex.intValue() + 8), ControlState.UNKNOWN, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.TOPLEFT ,"Inpatients Only", Boolean.TRUE, null}));
  		RuntimeAnchoring anchoringHelper14 = new RuntimeAnchoring(designSize, runtimeSize, 10, 109, 222, 16, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(CheckBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1014), new Integer(anchoringHelper14.getX()), new Integer(anchoringHelper14.getY()), new Integer(anchoringHelper14.getWidth()), new Integer(anchoringHelper14.getHeight()), new Integer(startTabIndex.intValue() + 3), ControlState.UNKNOWN, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.TOPLEFT ,"Only List Endoscopy Procedure Requests", Boolean.TRUE, null}));
  		RuntimeAnchoring anchoringHelper15 = new RuntimeAnchoring(designSize, runtimeSize, 10, 134, 200, 16, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(CheckBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1015), new Integer(anchoringHelper15.getX()), new Integer(anchoringHelper15.getY()), new Integer(anchoringHelper15.getWidth()), new Integer(anchoringHelper15.getHeight()), new Integer(startTabIndex.intValue() + 4), ControlState.UNKNOWN, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.TOPLEFT ,"Exclude Endoscopy Procedures", Boolean.TRUE, null}));
  
  		// Grid Controls
  		RuntimeAnchoring anchoringHelper16 = new RuntimeAnchoring(designSize, runtimeSize, 10, 8, 352, 97, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		Grid m_grdServicesTemp = (Grid)factory.getControl(Grid.class, new Object[] { control, new Integer(startControlID.intValue() + 1016), new Integer(anchoringHelper16.getX()), new Integer(anchoringHelper16.getY()), new Integer(anchoringHelper16.getWidth()), new Integer(anchoringHelper16.getHeight()), new Integer(startTabIndex.intValue() + 1), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT,Boolean.FALSE, Boolean.FALSE, new Integer(24), Boolean.TRUE, null, Boolean.FALSE, Boolean.FALSE, new Integer(0), null, Boolean.FALSE, Boolean.TRUE});
  		addControl(m_grdServicesTemp);
  		grdServicesGrid grdServices = (grdServicesGrid)GridFlyweightFactory.getInstance().createGridBridge(grdServicesGrid.class, m_grdServicesTemp);
  		grdServices.addStringColumn("Service", 0, 0, -1, true, false, 0, 0, true, ims.framework.enumerations.CharacterCasing.NORMAL);
  		super.addGrid(grdServices);
  
  		// Dynamic Grid Controls
  		RuntimeAnchoring anchoringHelper17 = new RuntimeAnchoring(designSize, runtimeSize, 10, 168, 828, 432, ims.framework.enumerations.ControlAnchoring.ALL);
  		super.addControl(factory.getControl(DynamicGrid.class, new Object[] { control, new Integer(startControlID.intValue() + 1017), new Integer(anchoringHelper17.getX()), new Integer(anchoringHelper17.getY()), new Integer(anchoringHelper17.getWidth()), new Integer(anchoringHelper17.getHeight()), new Integer(startTabIndex.intValue() + 15), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL, contextMenus.RefMan.contextMenuPendingEmergencyTheatre, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE}));
  
  		// Image Buttons Controls
  		RuntimeAnchoring anchoringHelper18 = new RuntimeAnchoring(designSize, runtimeSize, 366, 8, 25, 25, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(ImageButton.class, new Object[] { control, new Integer(startControlID.intValue() + 1018), new Integer(anchoringHelper18.getX()), new Integer(anchoringHelper18.getY()), new Integer(anchoringHelper18.getWidth()), new Integer(anchoringHelper18.getHeight()), new Integer(startTabIndex.intValue() + 2), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, this.getImages().Core.Plus, this.getImages().Core.PlusDisabled, "Add Services", Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, null}));
  		RuntimeAnchoring anchoringHelper19 = new RuntimeAnchoring(designSize, runtimeSize, 806, 132, 30, 30, ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
  		super.addControl(factory.getControl(ImageButton.class, new Object[] { control, new Integer(startControlID.intValue() + 1019), new Integer(anchoringHelper19.getX()), new Integer(anchoringHelper19.getY()), new Integer(anchoringHelper19.getWidth()), new Integer(anchoringHelper19.getHeight()), new Integer(startTabIndex.intValue() + 14), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPRIGHT, this.getImages().Core.ClearEnabled24, this.getImages().Core.ClearDisabled24, "Reset search criteria and results", Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, null}));
  		RuntimeAnchoring anchoringHelper20 = new RuntimeAnchoring(designSize, runtimeSize, 771, 132, 30, 30, ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
  		super.addControl(factory.getControl(ImageButton.class, new Object[] { control, new Integer(startControlID.intValue() + 1020), new Integer(anchoringHelper20.getX()), new Integer(anchoringHelper20.getY()), new Integer(anchoringHelper20.getWidth()), new Integer(anchoringHelper20.getHeight()), new Integer(startTabIndex.intValue() + 13), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPRIGHT, this.getImages().Core.FindEnabled24, this.getImages().Core.FindDisabled24, "Search for Pending Theatre Emergencies matching 'Search Criteria'", Boolean.FALSE, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null}));
  	}
  
  
  
  	public Forms getForms()
  	{
  		return (Forms)super.getFormReferences();
  	}
  
  	public Images getImages()
  	{
  		return (Images)super.getImageReferences();
  	}
  	public ims.core.forms.mosquery.IComponent ccRespHcp()
  	{
  		return (ims.core.forms.mosquery.IComponent)((ims.framework.cn.controls.CustomComponent)super.getControl(0)).getLogic();
  	}
  	public void setccRespHcpValueChangedEvent(ims.framework.delegates.ValueChanged delegate)
  	{
  		((CustomComponent)super.getControl(0)).setValueChangedEvent(delegate);
  	}
  	public void setccRespHcpVisible(boolean value)
  	{
  		((ims.framework.Control)super.getControl(0)).setVisible(value);
  	}
  	public boolean isccRespHcpVisible()
  	{
  		return ((ims.framework.Control)super.getControl(0)).isVisible();
  	}
  	public void setccRespHcpEnabled(boolean value)
  	{
  		((ims.framework.Control)super.getControl(0)).setEnabled(value);
  	}
  	public boolean isccRespHcpEnabled()
  	{
  		return ((ims.framework.Control)super.getControl(0)).isEnabled();
  	}
  	public Label lblTotal()
  	{
  		return (Label)super.getControl(1);
  	}
  	public Label lblWard()
  	{
  		return (Label)super.getControl(2);
  	}
  	public Label lblDate()
  	{
  		return (Label)super.getControl(3);
  	}
  	public Label lblHosp()
  	{
  		return (Label)super.getControl(4);
  	}
  	public DateControl dteExpected()
  	{
  		return (DateControl)super.getControl(7);
  	}
  	public cmbUrgencyCategoryComboBox cmbUrgencyCategory()
  	{
  		return (cmbUrgencyCategoryComboBox)super.getComboBox(0);
  	}
  	public qmbExpectedWardComboBox qmbExpectedWard()
  	{
  		return (qmbExpectedWardComboBox)super.getComboBox(1);
  	}
  	public qmbExpectedHospitalComboBox qmbExpectedHospital()
  	{
  		return (qmbExpectedHospitalComboBox)super.getComboBox(2);
  	}
  	public CheckBox chkNotInpatient()
  	{
  		return (CheckBox)super.getControl(11);
  	}
  	public CheckBox chkInpatients()
  	{
  		return (CheckBox)super.getControl(12);
  	}
  	public CheckBox chkListEndoscopy()
  	{
  		return (CheckBox)super.getControl(13);
  	}
  	public CheckBox chkExcludeEndoscopy()
  	{
  		return (CheckBox)super.getControl(14);
  	}
  	public grdServicesGrid grdServices()
  	{
  		return (grdServicesGrid)super.getGrid(0);
  	}
  	public DynamicGrid dyngrdResults()
  	{
  		return (DynamicGrid)super.getControl(16);
  	}
  	public ImageButton imbAddService()
  	{
  		return (ImageButton)super.getControl(17);
  	}
  	public ImageButton imbClear()
  	{
  		return (ImageButton)super.getControl(18);
  	}
  	public ImageButton imbSearch()
  	{
  		return (ImageButton)super.getControl(19);
  	}
  
  	public static class Forms implements java.io.Serializable
  	{
  		private static final long serialVersionUID = 1L;
  		protected final class LocalFormName extends FormName
  		{
  			private static final long serialVersionUID = 1L;
  		
  			private LocalFormName(int name)
  			{
  				super(name);
  			}
  		}
  
  		private Forms()
  		{
  			RefMan = new RefManForms();
  		}
  		public final class RefManForms implements java.io.Serializable
  		{
  			private static final long serialVersionUID = 1L;
  			private RefManForms()
  			{
  